diff options
author | hery.ramilison@oracle.com <> | 2011-11-17 09:00:58 +0100 |
---|---|---|
committer | Build Team <MYSQL-RE_WW@oracle.com> | 2011-11-17 09:00:58 +0100 |
commit | 85f07c7d7de623b5c9de188e99445fb96212957d (patch) | |
tree | 1dd794717469322a1b041143778258b1fc84fbff /sql/sql_reload.cc | |
parent | 6c1fa38c50341a7558aa402ba3704926fbe5426a (diff) | |
parent | 4ee0f595650f9400887ccdc89f20860fa03417f5 (diff) | |
download | mariadb-git-85f07c7d7de623b5c9de188e99445fb96212957d.tar.gz |
Merge from mysql-5.5.18-release
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 089077bb89c..b0665a9ea6b 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -118,7 +118,14 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, if (options & REFRESH_ERROR_LOG) if (flush_error_log()) + { + /* + When flush_error_log() failed, my_error() has not been called. + So, we have to do it here to keep the protocol. + */ + my_error(ER_UNKNOWN_ERROR, MYF(0)); result= 1; + } if ((options & REFRESH_SLOW_LOG) && opt_slow_log) logger.flush_slow_log(); @@ -200,7 +207,13 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, if (close_cached_tables(thd, tables, ((options & REFRESH_FAST) ? FALSE : TRUE), thd->variables.lock_wait_timeout)) + { + /* + NOTE: my_error() has been already called by reopen_tables() within + close_cached_tables(). + */ result= 1; + } if (thd->global_read_lock.make_global_read_lock_block_commit(thd)) // Killed { @@ -256,7 +269,13 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, ((options & REFRESH_FAST) ? FALSE : TRUE), (thd ? thd->variables.lock_wait_timeout : LONG_TIMEOUT))) + { + /* + NOTE: my_error() has been already called by reopen_tables() within + close_cached_tables(). + */ result= 1; + } } my_dbopt_cleanup(); } @@ -273,7 +292,8 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, tmp_write_to_binlog= 0; if (reset_master(thd)) { - result=1; + /* NOTE: my_error() has been already called by reset_master(). */ + result= 1; } } #endif @@ -281,7 +301,10 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, if (options & REFRESH_DES_KEY_FILE) { if (des_key_file && load_des_key_file(des_key_file)) - result= 1; + { + /* NOTE: my_error() has been already called by load_des_key_file(). */ + result= 1; + } } #endif #ifdef HAVE_REPLICATION @@ -290,7 +313,10 @@ bool reload_acl_and_cache(THD *thd, unsigned long options, tmp_write_to_binlog= 0; mysql_mutex_lock(&LOCK_active_mi); if (reset_slave(thd, active_mi)) - result=1; + { + /* NOTE: my_error() has been already called by reset_slave(). */ + result= 1; + } mysql_mutex_unlock(&LOCK_active_mi); } #endif |