Commit 53193599 authored by Sergei Golubchik's avatar Sergei Golubchik

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)
parent 2c381d8c
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR'; create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1); 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. # while others don't have openat and fail with errcode 20.
repair table t1; repair table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR'; eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
insert t1 values (1); insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD --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. --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; repair table t1;
drop table t1; drop table t1;
...@@ -19,7 +19,7 @@ drop table t1; ...@@ -19,7 +19,7 @@ drop table t1;
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR'; eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1); insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD --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; repair table t2;
drop table t2; drop table t2;
......
...@@ -14,6 +14,7 @@ for (<#sql*.MYI>) { ...@@ -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.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)+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)+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"; symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI";
} }
EOF EOF
......
...@@ -43,10 +43,7 @@ DROP TABLE t1; ...@@ -43,10 +43,7 @@ DROP TABLE t1;
set @@SESSION.SQL_LOG_BIN = 1; set @@SESSION.SQL_LOG_BIN = 1;
--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client. --echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
--write_file $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 &
(`$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
--echo # Step-4: Wait till dump thread transfer is completed. --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%'; 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; ...@@ -62,5 +59,3 @@ source include/wait_until_rows_count.inc;
--source include/stop_dump_threads.inc --source include/stop_dump_threads.inc
DROP TABLE t1; DROP TABLE t1;
--remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
...@@ -20,6 +20,7 @@ let $check_ipv6_just_check= 1; ...@@ -20,6 +20,7 @@ let $check_ipv6_just_check= 1;
#============================================================================== #==============================================================================
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
--disable_connect_log
--disable_abort_on_error --disable_abort_on_error
let $check_ipv6_supported= 1; let $check_ipv6_supported= 1;
...@@ -44,6 +45,7 @@ if(!$mysql_errno) ...@@ -44,6 +45,7 @@ if(!$mysql_errno)
connection default; connection default;
--enable_abort_on_error --enable_abort_on_error
--enable_connect_log
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
...@@ -62,6 +64,7 @@ let $check_ipv4_mapped_just_check= 1; ...@@ -62,6 +64,7 @@ let $check_ipv4_mapped_just_check= 1;
#============================================================================== #==============================================================================
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
--disable_connect_log
--disable_abort_on_error --disable_abort_on_error
let $check_ipv4_mapped_supported= 1; let $check_ipv4_mapped_supported= 1;
...@@ -86,6 +89,7 @@ if(!$mysql_errno) ...@@ -86,6 +89,7 @@ if(!$mysql_errno)
connection default; connection default;
--enable_abort_on_error --enable_abort_on_error
--enable_connect_log
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
......
#============================================================================== #==============================================================================
# Establish the level of IPV6 support # Establish the level of IPV6 support
#============================================================================== #==============================================================================
connection default;
#============================================================================== #==============================================================================
# Get hostname, port number # Get hostname, port number
#============================================================================== #==============================================================================
......
#============================================================================== #==============================================================================
# Establish the level of IPV6 support # Establish the level of IPV6 support
#============================================================================== #==============================================================================
connection default;
#============================================================================== #==============================================================================
# Get hostname, port number # Get hostname, port number
#============================================================================== #==============================================================================
......
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
# prepared statement. # prepared statement.
--source include/no_protocol.inc --source include/no_protocol.inc
set global session_track_schema=FALSE;
#=================================== #===================================
# Set IP address defaults with respect to IPV6 support # Set IP address defaults with respect to IPV6 support
# #
...@@ -73,6 +71,7 @@ if($my_socket_debug) ...@@ -73,6 +71,7 @@ if($my_socket_debug)
--echo IPV6=$check_ipv6_supported, IPV4_MAPPED = $check_ipv4_mapped_supported, LOCALHOST = $my_localhost --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 # The logging of commands and result sets is mostly disabled.
--echo # There are some messages which help to observe the progress of the test. --echo # There are some messages which help to observe the progress of the test.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment