diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2020-04-30 17:36:41 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2020-04-30 17:36:41 +0200 |
commit | 23c6fb3e6231b8939331e2d9f157092f24ed8f4f (patch) | |
tree | ff0f65edbc442afcc3f3a3159753c8a2284d9c95 /mysql-test | |
parent | de8c9b538f7e77f18470ccfcacf723a9c2e31b38 (diff) | |
parent | 6a31aea5a1a50614af3a6591a085dc47061cdd0e (diff) | |
download | mariadb-git-23c6fb3e6231b8939331e2d9f157092f24ed8f4f.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/My/SafeProcess/safe_process_win.cc | 2 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/suite.pm | 5 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_conditional_comments.result | 15 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_fail_register.result | 16 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_conditional_comments.test | 12 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_fail_register.test | 33 |
7 files changed, 80 insertions, 5 deletions
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc index 7d81bf1a1b4..4dd4e24f30d 100644 --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc @@ -206,7 +206,7 @@ int main(int argc, const char** argv ) } else { if (strcmp(arg, "--verbose") == 0) verbose++; - else if (strncmp(arg, "--parent-pid", 10) == 0) + else if (strncmp(arg, "--parent-pid", 12) == 0) { /* Override parent_pid with a value provided by user */ const char* start; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 920d66987e3..43e35bdab6d 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -281,7 +281,7 @@ my $current_config_name; # The currently running config file template our @opt_experimentals; our $experimental_test_cases= []; -my $baseport; +our $baseport; # $opt_build_thread may later be set from $opt_port_base my $opt_build_thread= $ENV{'MTR_BUILD_THREAD'} || "auto"; my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto"; diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index f90679e6f1f..3db419bae84 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -62,9 +62,10 @@ sub skip_combinations { sub ipv6_ok() { use Socket; return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); + $!=""; # eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation - eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) }; - return $@ eq ""; + eval { bind $sock, sockaddr_in6($::baseport, Socket::IN6ADDR_LOOPBACK) }; + return $@ eq "" && $! eq "" } $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); diff --git a/mysql-test/suite/rpl/r/rpl_conditional_comments.result b/mysql-test/suite/rpl/r/rpl_conditional_comments.result index 5668322d4aa..f8ceed3fa36 100644 --- a/mysql-test/suite/rpl/r/rpl_conditional_comments.result +++ b/mysql-test/suite/rpl/r/rpl_conditional_comments.result @@ -65,5 +65,20 @@ include/diff_tables.inc [master:t1,slave:t1] # comments SELECT c1 FROM /*!999999 t1 WHEREN; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!999999 t1 WHEREN' at line 1 +insert t1 values (/*!50505 1 /* foo */ */ + 2); +insert t1 values (/*!999999 10 /* foo */ */ + 20); +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; insert t1 values (/*!50505 1 /* foo */ */ + 2) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; insert t1 values (/* 999999 10 (* foo *) */ + 20) +master-bin.000001 # Query # # COMMIT +select * from t1; +c1 +62 +3 +20 DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_fail_register.result b/mysql-test/suite/rpl/r/rpl_fail_register.result new file mode 100644 index 00000000000..4e433636ad9 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_fail_register.result @@ -0,0 +1,16 @@ +include/master-slave.inc +[connection master] +set @old_dbug=@@global.debug_dbug; +set global debug_dbug='d,fail_com_register_slave'; +stop slave; +reset slave; +include/wait_for_slave_to_stop.inc +start slave; +stop slave; +include/wait_for_slave_to_stop.inc +set global debug_dbug=@old_dbug; +kill DUMP_THREAD; +show slave hosts; +Server_id Host Port Master_id +start slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_conditional_comments.test b/mysql-test/suite/rpl/t/rpl_conditional_comments.test index bcc964a92c7..6e4ec8745f4 100644 --- a/mysql-test/suite/rpl/t/rpl_conditional_comments.test +++ b/mysql-test/suite/rpl/t/rpl_conditional_comments.test @@ -68,7 +68,17 @@ sync_slave_with_master; --echo # comments --connection master --error 1064 -SELECT c1 FROM /*!999999 t1 WHEREN; +SELECT c1 FROM /*!999999 t1 WHEREN; #*/ + +# +# Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS +# +insert t1 values (/*!50505 1 /* foo */ */ + 2); +insert t1 values (/*!999999 10 /* foo */ */ + 20); +source include/show_binlog_events.inc; +sync_slave_with_master; +select * from t1; +connection master; DROP TABLE t1; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_fail_register.test b/mysql-test/suite/rpl/t/rpl_fail_register.test new file mode 100644 index 00000000000..bfecc9d7f14 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_fail_register.test @@ -0,0 +1,33 @@ +source include/have_debug.inc; +source include/have_binlog_format_mixed.inc; +source include/master-slave.inc; + +connection slave; + +set @old_dbug=@@global.debug_dbug; +set global debug_dbug='d,fail_com_register_slave'; + +stop slave; +reset slave; +source include/wait_for_slave_to_stop.inc; +start slave; +stop slave; +source include/wait_for_slave_to_stop.inc; +set global debug_dbug=@old_dbug; + +connection master; + +### why is that needed? +let $id=`SELECT id from information_schema.processlist where command='Binlog Dump'`; +if ($id) { + replace_result $id DUMP_THREAD; + eval kill $id; + let $wait_condition= SELECT count(*)=0 from information_schema.processlist where command='Binlog Dump'; + source include/wait_condition.inc; +} + +show slave hosts; + +connection slave; +start slave; +source include/rpl_end.inc; |