mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0 BitKeeper/etc/ignore: auto-union sql/item_subselect.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_view.cc: Auto merged
This commit is contained in:
@@ -2426,8 +2426,8 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
|
||||
create_new_users= test_if_create_new_users(thd);
|
||||
int result=0;
|
||||
rw_wrlock(&LOCK_grant);
|
||||
MEM_ROOT *old_root=my_pthread_getspecific_ptr(MEM_ROOT*,THR_MALLOC);
|
||||
my_pthread_setspecific_ptr(THR_MALLOC,&memex);
|
||||
MEM_ROOT *old_root= thd->mem_root;
|
||||
thd->mem_root= &memex;
|
||||
|
||||
while ((Str = str_list++))
|
||||
{
|
||||
@@ -2535,7 +2535,7 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list,
|
||||
}
|
||||
}
|
||||
grant_option=TRUE;
|
||||
my_pthread_setspecific_ptr(THR_MALLOC,old_root);
|
||||
thd->mem_root= old_root;
|
||||
rw_unlock(&LOCK_grant);
|
||||
if (!result)
|
||||
send_ok(thd);
|
||||
@@ -2667,6 +2667,7 @@ my_bool grant_init(THD *org_thd)
|
||||
THD *thd;
|
||||
TABLE_LIST tables[2];
|
||||
MYSQL_LOCK *lock;
|
||||
MEM_ROOT *memex_ptr;
|
||||
my_bool return_val= 1;
|
||||
TABLE *t_table, *c_table;
|
||||
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
|
||||
@@ -2714,7 +2715,8 @@ my_bool grant_init(THD *org_thd)
|
||||
grant_option= TRUE;
|
||||
|
||||
/* Will be restored by org_thd->store_globals() */
|
||||
my_pthread_setspecific_ptr(THR_MALLOC,&memex);
|
||||
memex_ptr= &memex;
|
||||
my_pthread_setspecific_ptr(THR_MALLOC, &memex_ptr);
|
||||
do
|
||||
{
|
||||
GRANT_TABLE *mem_check;
|
||||
|
||||
Reference in New Issue
Block a user