diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-02 12:22:57 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-04 19:34:20 +0200 |
commit | 531935992adbf2bea4e772583d93a6c4b5bd78fd (patch) | |
tree | 06af6674029cc7468bd716811810354ce1946f38 | |
parent | 2c381d8cf65ad46936045fb7ee141de4e392cde7 (diff) | |
download | mariadb-git-531935992adbf2bea4e772583d93a6c4b5bd78fd.tar.gz |
test fixes for FreeBSD
* FreeBSD returns errno 31 (EMLINK, Too many links),
not 40 (ELOOP, Too many levels of symbolic links)
* (`mysqlbinlog|mysql`) was just crazy, why did it ever work?
* socket_ipv6.inc check (that checked whether ipv6 is supported)
only worked correctly when ipv6 was supported
* perfschema.socket_summary_by_instance was changing global variables
and then skip-ing the test (because on missing ipv6)
8 files changed, 11 insertions, 14 deletions
diff --git a/mysql-test/main/repair_symlink-5543.result b/mysql-test/main/repair_symlink-5543.result index 2024c9f5684..4f816d407b9 100644 --- a/mysql-test/main/repair_symlink-5543.result +++ b/mysql-test/main/repair_symlink-5543.result @@ -1,6 +1,6 @@ create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR'; insert t1 values (1); -# Some systems fail with errcode 40, or 90 (MIPS) when doing openat, +# Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat, # while others don't have openat and fail with errcode 20. repair table t1; Table Op Msg_type Msg_text diff --git a/mysql-test/main/repair_symlink-5543.test b/mysql-test/main/repair_symlink-5543.test index ac7bb497f24..747e3f6ca1c 100644 --- a/mysql-test/main/repair_symlink-5543.test +++ b/mysql-test/main/repair_symlink-5543.test @@ -9,9 +9,9 @@ eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR'; insert t1 values (1); --system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD ---echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat, +--echo # Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat, --echo # while others don't have openat and fail with errcode 20. ---replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/ +--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0|31/20/ /".*"/"<errmsg>"/ repair table t1; drop table t1; @@ -19,7 +19,7 @@ drop table t1; eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR'; insert t2 values (1); --system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD ---replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/ +--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0|31/20/ /".*"/"<errmsg>"/ repair table t2; drop table t2; diff --git a/mysql-test/main/temp_table_symlink.test b/mysql-test/main/temp_table_symlink.test index 9297b472805..5bd8c5ac5bc 100644 --- a/mysql-test/main/temp_table_symlink.test +++ b/mysql-test/main/temp_table_symlink.test @@ -14,6 +14,7 @@ for (<#sql*.MYI>) { symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MYI", hex($3)+1; symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+1; symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+2; + symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+3; symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI"; } EOF diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test index d73e453ce96..b6a95c2c9be 100644 --- a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test +++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test @@ -43,10 +43,7 @@ DROP TABLE t1; set @@SESSION.SQL_LOG_BIN = 1; --echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client. ---write_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh -(`$MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT`) < /dev/null > /dev/null 2>&1 & -EOF ---exec /bin/bash $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh +--exec ($MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT) < /dev/null > /dev/null 2>&1 & --echo # Step-4: Wait till dump thread transfer is completed. let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%'; @@ -62,5 +59,3 @@ source include/wait_until_rows_count.inc; --source include/stop_dump_threads.inc DROP TABLE t1; ---remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh - diff --git a/mysql-test/suite/perfschema/include/socket_ipv6.inc b/mysql-test/suite/perfschema/include/socket_ipv6.inc index dd077a12c7a..0c9f47abe47 100644 --- a/mysql-test/suite/perfschema/include/socket_ipv6.inc +++ b/mysql-test/suite/perfschema/include/socket_ipv6.inc @@ -20,6 +20,7 @@ let $check_ipv6_just_check= 1; #============================================================================== --disable_query_log --disable_result_log +--disable_connect_log --disable_abort_on_error let $check_ipv6_supported= 1; @@ -44,6 +45,7 @@ if(!$mysql_errno) connection default; --enable_abort_on_error +--enable_connect_log --enable_result_log --enable_query_log @@ -62,6 +64,7 @@ let $check_ipv4_mapped_just_check= 1; #============================================================================== --disable_query_log --disable_result_log +--disable_connect_log --disable_abort_on_error let $check_ipv4_mapped_supported= 1; @@ -86,6 +89,7 @@ if(!$mysql_errno) connection default; --enable_abort_on_error +--enable_connect_log --enable_result_log --enable_query_log diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result index 304521b044f..cbb83b94891 100644 --- a/mysql-test/suite/perfschema/r/socket_connect.result +++ b/mysql-test/suite/perfschema/r/socket_connect.result @@ -1,7 +1,6 @@ #============================================================================== # Establish the level of IPV6 support #============================================================================== -connection default; #============================================================================== # Get hostname, port number #============================================================================== diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result index 455b6a2ad00..4fd3a4a237c 100644 --- a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result +++ b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result @@ -1,7 +1,6 @@ #============================================================================== # Establish the level of IPV6 support #============================================================================== -connection default; #============================================================================== # Get hostname, port number #============================================================================== diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test index 42bcb3e4d70..445be52a089 100644 --- a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test +++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test @@ -38,8 +38,6 @@ # prepared statement. --source include/no_protocol.inc -set global session_track_schema=FALSE; - #=================================== # Set IP address defaults with respect to IPV6 support # @@ -73,6 +71,7 @@ if($my_socket_debug) --echo IPV6=$check_ipv6_supported, IPV4_MAPPED = $check_ipv4_mapped_supported, LOCALHOST = $my_localhost } #=================================== +set global session_track_schema=FALSE; --echo # The logging of commands and result sets is mostly disabled. --echo # There are some messages which help to observe the progress of the test. |