summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
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
commit51a91166387760546d563ebf72bfa037fcff24a8 (patch)
treec64191bf0f499c4e0d6b020460f019c04f7dc2e8 /mysql-test/mysql-test-run.pl
parentf606cfeae3f934b4e6864693994ed80b7f2631ef (diff)
downloadmariadb-git-51a91166387760546d563ebf72bfa037fcff24a8.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 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 0948c973e9b..ffa9b4cb1d3 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -2063,7 +2063,7 @@ sub environment_setup () {
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
# ----------------------------------------------------
- # Setup env so childs can execute mysql
+ # Setup env so childs can execute mysql against master
# ----------------------------------------------------
my $cmdline_mysql=
mtr_native_path($exe_mysql) .
@@ -2075,6 +2075,18 @@ sub environment_setup () {
$ENV{'MYSQL'}= $cmdline_mysql;
# ----------------------------------------------------
+ # Setup env so childs can execute mysql against slave
+ # ----------------------------------------------------
+ my $cmdline_mysql_slave=
+ mtr_native_path($exe_mysql) .
+ " --no-defaults --host=localhost --user=root --password= " .
+ "--port=$slave->[0]->{'port'} " .
+ "--socket=$slave->[0]->{'path_sock'} ".
+ "--character-sets-dir=$path_charsetsdir";
+
+ $ENV{'MYSQL_SLAVE'}= $cmdline_mysql_slave;
+
+ # ----------------------------------------------------
# Setup env so childs can execute bug25714
# ----------------------------------------------------
$ENV{'MYSQL_BUG25714'}= $exe_bug25714;