summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-03-27 13:19:50 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-03-27 13:19:50 +0800
commit95301268221bfcf72baaa9f34f234ff6231235c8 (patch)
treec64191bf0f499c4e0d6b020460f019c04f7dc2e8 /client
parent75ab3274c8f36aa0be49d03e3616e5c557890b2a (diff)
downloadmariadb-git-95301268221bfcf72baaa9f34f234ff6231235c8.tar.gz
BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
When the thread executing a DDL was killed after finished its execution but before writing the binlog event, the error code in the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED. This patch fixed the problem by ignoring the kill status when constructing the event for DDL statements. This patch also included the following changes in order to provide the test case. 1) modified mysqltest to support variable for connection command 2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to run mysql client against the slave mysqld.
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 312012d7b8d..865c1d9a717 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -4093,13 +4093,20 @@ int select_connection(struct st_command *command)
if (!*p)
die("Missing connection name in connect");
- name= p;
- while (*p && !my_isspace(charset_info,*p))
- p++;
- if (*p)
- *p++= 0;
- command->last_argument= p;
- return select_connection_name(name);
+
+ static DYNAMIC_STRING ds_connection;
+ const struct command_arg connection_args[] = {
+ { "connection_name", ARG_STRING, TRUE, &ds_connection, "Name of the connection that we switch to." }
+ };
+ check_command_args(command, command->first_argument, connection_args,
+ sizeof(connection_args)/sizeof(struct command_arg),
+ ',');
+
+ DBUG_PRINT("info", ("changing connection: %s", ds_connection.str));
+
+ int ret= select_connection_name(ds_connection.str);
+ dynstr_free(&ds_connection);
+ return ret;
}