summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <davi@endora.local>2008-03-27 09:13:51 -0300
committerunknown <davi@endora.local>2008-03-27 09:13:51 -0300
commit861434c3b0ae696e694858cd90c4208e10da6f4f (patch)
tree5e6a631ef5f0ef0f8e3137869681cefcedd7323c /sql/sql_acl.cc
parented6b0a2f507f729c2390931e53ba87bd4858142a (diff)
parentf7d8fb1cdde7a9655b984827547a7f4f85560834 (diff)
downloadmariadb-git-861434c3b0ae696e694858cd90c4208e10da6f4f.tar.gz
Merge mysql.com:/Users/davi/mysql/mysql-5.1-bug33201
into mysql.com:/Users/davi/mysql/mysql-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 e9504f423ad..f1db7010ad2 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2880,6 +2880,12 @@ bool 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 @@ bool 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);
}