1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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
This commit is contained in:
unknown
2008-02-01 14:14:37 +01:00
3 changed files with 52 additions and 1 deletions

View File

@@ -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);
}