1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

After merge fixes

This commit is contained in:
Sinisa@sinisa.nasamreza.org
2003-08-22 18:43:46 +03:00
158 changed files with 3762 additions and 1278 deletions

View File

@@ -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);