summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2008-02-01 14:14:37 +0100
committerunknown <thek@adventure.(none)>2008-02-01 14:14:37 +0100
commit36265f707c406afa4455dd24a6cc7c682f10efd3 (patch)
treef3a2815a6fd9457aa543771067bc63077a57d75f /sql/sql_acl.cc
parent97355f4e0a39260b7c54f1ee688e4738f42a0166 (diff)
parentf7d8fb1cdde7a9655b984827547a7f4f85560834 (diff)
downloadmariadb-git-36265f707c406afa4455dd24a6cc7c682f10efd3.tar.gz
Merge adventure.(none):/home/thek/Development/cpp/bug33201/my50-bug33201
into adventure.(none):/home/thek/Development/cpp/bug33201/my51-bug33201 mysql-test/t/grant.test: Auto merged sql/sql_acl.cc: Auto merged mysql-test/r/grant.result: Manual merge
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 d2d26da229a..7e66db9a816 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -3041,6 +3041,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 */
@@ -3173,6 +3179,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);
}