summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2008-03-28 11:26:40 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2008-03-28 11:26:40 +0200
commitab82016ae85b7126319e3749b5c8232e5b8fbf79 (patch)
tree0fd10e41929b167225dcb231bc87a2c847824456 /sql/sql_acl.cc
parented1d366a23e4320e0dcee29c642c94e6ce491fd3 (diff)
parentb6b4202b48a865f90ebd0ad72b3896f59044e65d (diff)
downloadmariadb-git-ab82016ae85b7126319e3749b5c8232e5b8fbf79.tar.gz
Merge bk-internal:/home/bk/mysql-5.0
into magare.gmz:/home/kgeorge/mysql/work/merge-5.0-bugteam sql/sql_acl.cc: Auto merged
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index e773f754e18..7592986ef81 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2880,6 +2880,12 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
}
#endif
+ /*
+ The lock api is depending on the thd->lex variable which needs to be
+ re-initialized.
+ */
+ Query_tables_list backup;
+ thd->lex->reset_n_backup_query_tables_list(&backup);
if (simple_open_n_lock_tables(thd,tables))
{ // Should never happen
close_thread_tables(thd); /* purecov: deadcode */
@@ -3018,6 +3024,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
send_ok(thd);
/* Tables are automatically closed */
+ thd->lex->restore_backup_query_tables_list(&backup);
DBUG_RETURN(result);
}