From ad236e55cea76f4fc91ce96226a28788ef54c462 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sun, 18 Apr 2004 14:04:58 +0000 Subject: [PATCH] Hotfix to avoid "MySQL out of sync" errors. --- ChangeLog | 6 +++++- server_privileges.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82f3b8b95..76b9065aa 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,11 @@ $Source$ 2004-04-18 Alexander M. Turek * lang/german-*.inc.php: Updates. - * server_privileges.php: $url_query was not visible in function scope. + * server_privileges.php: + - $url_query was not visible in function scope; + - Hotfix to avoid "MySQL out of sync" errors. + * libraries/dbi/*.dbi.lib.php: Allow the $link argument of + PMA_DBI_affected_rows() to be left out. 2004-04-17 Marc Delisle * libraries/dbi/mysql.dbi.lib.php: was still using PMA_mysql_field_flags diff --git a/server_privileges.php b/server_privileges.php index 42a35638d..4df50052d 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1063,8 +1063,8 @@ if (empty($adduser) && empty($checkprivs)) { } else { $sql_query = 'SELECT `Table_name`, `Table_priv`, IF(`Column_priv` = "", 0, 1) AS "Column_priv" FROM `tables_priv` WHERE `Host` = "' . $hostname . '" AND `User` = "' . PMA_sqlAddslashes($username) . '" AND `Db` = "' . $dbname . '" ORDER BY `Table_name` ASC;'; } - $res = PMA_DBI_query($sql_query); - if (PMA_DBI_affected_rows($userlink) == 0) { + $res = PMA_DBI_query($sql_query, NULL, PMA_DBI_QUERY_STORE); + if (PMA_DBI_affected_rows() == 0) { echo ' ' . "\n" . '
' . $strNone . '
' . "\n" . ' ' . "\n";