diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-08-22 18:43:46 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-08-22 18:43:46 +0300 |
commit | 2d2f57654521df494afc41545322e0ebb0ec47a4 (patch) | |
tree | 6116b622fcbb528013b9fec903f0efd6927f75e2 /sql/sql_parse.cc | |
parent | 11fbbe44ac160a305d6ca452c6a14ef34a8282b9 (diff) | |
parent | e3563c7911580a34d423a154aaa0f9c99d01f45b (diff) | |
download | mariadb-git-2d2f57654521df494afc41545322e0ebb0ec47a4.tar.gz |
After merge fixes
mysql-test/r/func_test.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/func_test.test:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 509f3ee5736..6686f927e05 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1458,6 +1458,7 @@ mysql_execute_command(void) { if (check_global_access(thd, REPL_SLAVE_ACL)) goto error; + /* This query don't work now. See comment in repl_failsafe.cc */ #ifndef WORKING_NEW_MASTER net_printf(&thd->net, ER_NOT_SUPPORTED_YET, "SHOW NEW MASTER"); res= 1; @@ -2146,11 +2147,12 @@ mysql_execute_command(void) break; case SQLCOM_SHOW_STATUS: res= mysqld_show(thd,(lex->wild ? lex->wild->ptr() : NullS),status_vars, - OPT_GLOBAL); + OPT_GLOBAL, &LOCK_status); break; case SQLCOM_SHOW_VARIABLES: res= mysqld_show(thd, (lex->wild ? lex->wild->ptr() : NullS), - init_vars, lex->option_type); + init_vars, lex->option_type, + &LOCK_global_system_variables); break; case SQLCOM_SHOW_LOGS: { @@ -2551,7 +2553,16 @@ mysql_execute_command(void) thd->server_status&= ~SERVER_STATUS_IN_TRANS; if (!ha_rollback(thd)) { - if (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) + /* + If a non-transactional table was updated, warn; don't warn if this is a + slave thread (because when a slave thread executes a ROLLBACK, it has + been read from the binary log, so it's 100% sure and normal to produce + error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the + slave SQL thread, it would not stop the thread but just be printed in + the error log; but we don't want users to wonder why they have this + message in the error log, so we don't send it. + */ + if ((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) && !thd->slave_thread) send_warning(&thd->net,ER_WARNING_NOT_COMPLETE_ROLLBACK,0); else send_ok(&thd->net); @@ -2563,7 +2574,7 @@ mysql_execute_command(void) case SQLCOM_ROLLBACK_TO_SAVEPOINT: if (!ha_rollback_to_savepoint(thd, lex->savepoint_name)) { - if (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) + if ((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) && !thd->slave_thread) send_warning(&thd->net,ER_WARNING_NOT_COMPLETE_ROLLBACK,0); else send_ok(&thd->net); @@ -3581,8 +3592,8 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables) if (options & REFRESH_LOG) { /* - Flush the normal query log, the update log, the binary log, the slow query - log, and the relay log (if it exists). + Flush the normal query log, the update log, the binary log, + the slow query log, and the relay log (if it exists). */ mysql_log.new_file(1); mysql_update_log.new_file(1); |