diff options
author | thek@adventure.(none) <> | 2007-05-28 13:56:49 +0200 |
---|---|---|
committer | thek@adventure.(none) <> | 2007-05-28 13:56:49 +0200 |
commit | 1bccb382bd77c7d213dfa8b96fcb13de8d6e65d9 (patch) | |
tree | e648442f58d907f0f08ae860aaba38bb73969717 /sql/sql_acl.cc | |
parent | 2631fb011086be38a577830f32864d84cd09091d (diff) | |
parent | 4ec0f6ceb956828148ad12b9a46c65a74541ce1c (diff) | |
download | mariadb-git-1bccb382bd77c7d213dfa8b96fcb13de8d6e65d9.tar.gz |
Merge adventure.(none):/home/thek/Development/cpp/bug24988/my50-bug24988
into adventure.(none):/home/thek/Development/cpp/bug24988/my51-bug24988
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index ba1ec66fb02..193ed5a92c8 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3136,7 +3136,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list, } } } - grant_option=TRUE; + thd->mem_root= old_root; pthread_mutex_unlock(&acl_cache->lock); @@ -3310,7 +3310,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, continue; } } - grant_option=TRUE; + thd->mem_root= old_root; pthread_mutex_unlock(&acl_cache->lock); if (!result && !no_error) @@ -3493,6 +3493,8 @@ my_bool grant_init() delete thd; /* Remember that we don't have a THD */ my_pthread_setspecific_ptr(THR_THD, 0); + /* Set the grant option flag so we will check grants */ + grant_option= TRUE; DBUG_RETURN(return_val); } @@ -3522,7 +3524,6 @@ static my_bool grant_load(TABLE_LIST *tables) THR_MALLOC); DBUG_ENTER("grant_load"); - grant_option = FALSE; (void) hash_init(&column_priv_hash,system_charset_info, 0,0,0, (hash_get_key) get_grant_table, (hash_free_key) free_grant_table,0); @@ -3637,7 +3638,6 @@ static my_bool grant_load(TABLE_LIST *tables) } while (!p_table->file->index_next(p_table->record[0])); } - grant_option= TRUE; return_val=0; // Return ok end_unlock: @@ -3670,7 +3670,6 @@ my_bool grant_reload(THD *thd) { TABLE_LIST tables[3]; HASH old_column_priv_hash, old_proc_priv_hash, old_func_priv_hash; - bool old_grant_option; MEM_ROOT old_mem; my_bool return_val= 1; DBUG_ENTER("grant_reload"); @@ -3700,7 +3699,6 @@ my_bool grant_reload(THD *thd) old_column_priv_hash= column_priv_hash; old_proc_priv_hash= proc_priv_hash; old_func_priv_hash= func_priv_hash; - old_grant_option= grant_option; old_mem= memex; if ((return_val= grant_load(tables))) @@ -3710,7 +3708,6 @@ my_bool grant_reload(THD *thd) column_priv_hash= old_column_priv_hash; /* purecov: deadcode */ proc_priv_hash= old_proc_priv_hash; func_priv_hash= old_func_priv_hash; - grant_option= old_grant_option; /* purecov: deadcode */ memex= old_mem; /* purecov: deadcode */ } else |