From: Date: May 29 2007 6:52pm Subject: bk commit into 5.1 tree (malff:1.2524) List-Archive: http://lists.mysql.com/commits/27746 Message-Id: <20070531002222.3AC3A8E0C73@weblab.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of marcsql. When marcsql does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-05-29 10:52:07-06:00, malff@weblab.(none) +7 -0 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge MERGE: 1.1810.2961.4 sql/mysqld.cc@stripped, 2007-05-29 10:49:59-06:00, malff@weblab.(none) +0 -0 Auto merged MERGE: 1.439.1.171 sql/sp_head.cc@stripped, 2007-05-29 10:51:51-06:00, malff@weblab.(none) +0 -1 MERGE: 1.200.7.23 sql/sql_acl.cc@stripped, 2007-05-29 10:49:59-06:00, malff@weblab.(none) +0 -0 Auto merged MERGE: 1.128.1.92 sql/sql_lex.cc@stripped, 2007-05-29 10:51:55-06:00, malff@weblab.(none) +2 -5 MERGE: 1.142.1.81 sql/sql_lex.h@stripped, 2007-05-29 10:51:57-06:00, malff@weblab.(none) +0 -1 MERGE: 1.175.1.72 sql/sql_view.cc@stripped, 2007-05-29 10:51:59-06:00, malff@weblab.(none) +0 -2 MERGE: 1.78.1.33 tests/mysql_client_test.c@stripped, 2007-05-29 10:52:03-06:00, malff@weblab.(none) +0 -64 MERGE: 1.167.1.60 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: malff # Host: weblab.(none) # Root: /home/marcsql/TREE/mysql-5.1-rt-merge/RESYNC --- 1.645/sql/mysqld.cc 2007-05-29 10:52:15 -06:00 +++ 1.646/sql/mysqld.cc 2007-05-29 10:52:15 -06:00 @@ -347,7 +347,15 @@ bool opt_endinfo, using_udf_functions; my_bool locked_in_memory; bool opt_using_transactions, using_update_log; bool volatile abort_loop; -bool volatile shutdown_in_progress, grant_option; +bool volatile shutdown_in_progress; +/** + @brief 'grant_option' is used to indicate if privileges needs + to be checked, in which case the lock, LOCK_grant, is used + to protect access to the grant table. + @note This flag is dropped in 5.1 + @see grant_init() + */ +bool volatile grant_option; my_bool opt_skip_slave_start = 0; // If set, slave is not autostarted my_bool opt_reckless_slave = 0; --- 1.234/sql/sql_acl.cc 2007-05-29 10:52:15 -06:00 +++ 1.235/sql/sql_acl.cc 2007-05-29 10:52:15 -06:00 @@ -3136,7 +3136,7 @@ bool mysql_table_grant(THD *thd, TABLE_L } } } - 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 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 *ta 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 *ta } 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