mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
merge with 4.1 tree
This commit is contained in:
@@ -623,7 +623,6 @@ check_connection(THD *thd)
|
||||
thd->ip= 0;
|
||||
bzero((char*) &thd->remote, sizeof(struct sockaddr));
|
||||
}
|
||||
/* Ensure that wrong hostnames doesn't cause buffer overflows */
|
||||
vio_keepalive(net->vio, TRUE);
|
||||
|
||||
ulong pkt_len= 0;
|
||||
@@ -1828,6 +1827,7 @@ mysql_execute_command(THD *thd)
|
||||
{
|
||||
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, ER_NOT_SUPPORTED_YET, "SHOW NEW MASTER");
|
||||
res= 1;
|
||||
@@ -1881,8 +1881,6 @@ mysql_execute_command(THD *thd)
|
||||
res = mysql_preload_keys(thd, tables);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_REPLICATION
|
||||
case SQLCOM_CHANGE_MASTER:
|
||||
{
|
||||
@@ -1921,7 +1919,6 @@ mysql_execute_command(THD *thd)
|
||||
res = load_master_data(thd);
|
||||
break;
|
||||
#endif /* HAVE_REPLICATION */
|
||||
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
case SQLCOM_SHOW_INNODB_STATUS:
|
||||
{
|
||||
@@ -1931,7 +1928,6 @@ mysql_execute_command(THD *thd)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REPLICATION
|
||||
case SQLCOM_LOAD_MASTER_TABLE:
|
||||
{
|
||||
@@ -2630,11 +2626,12 @@ mysql_execute_command(THD *thd)
|
||||
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:
|
||||
#ifdef DONT_ALLOW_SHOW_COMMANDS
|
||||
@@ -3156,7 +3153,16 @@ mysql_execute_command(THD *thd)
|
||||
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,ER_WARNING_NOT_COMPLETE_ROLLBACK,0);
|
||||
else
|
||||
send_ok(thd);
|
||||
@@ -3168,7 +3174,7 @@ mysql_execute_command(THD *thd)
|
||||
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, ER_WARNING_NOT_COMPLETE_ROLLBACK, 0);
|
||||
else
|
||||
send_ok(thd);
|
||||
|
||||
Reference in New Issue
Block a user