bug #1712570 Deleting last record freezes

This commit is contained in:
Marc Delisle
2007-05-09 12:55:29 +00:00
parent e51272900f
commit ca77057c21
17 changed files with 100 additions and 67 deletions

View File

@@ -1166,6 +1166,30 @@ function PMA_DBI_getCompatibilities()
return $compats;
}
/**
* returns warnings for last query
*
* @uses $GLOBALS['userlink']
* @uses PMA_DBI_fetch_result()
* @param resource mysql link $link mysql link resource
* @return array warnings
*/
function PMA_DBI_get_warnings($link = null)
{
if (PMA_MYSQL_INT_VERSION < 40100) {
return array();
}
if (empty($link)) {
if (isset($GLOBALS['userlink'])) {
$link = $GLOBALS['userlink'];
} else {
return array();
}
}
return PMA_DBI_fetch_result('SHOW WARNINGS', null, null, $link);
}
/**
* returns true (int > 0) if current user is superuser