Skip to content

Commit 5319359

Browse files
committed
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)
1 parent 2c381d8 commit 5319359

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

mysql-test/main/repair_symlink-5543.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
22
insert t1 values (1);
3-
# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
3+
# Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat,
44
# while others don't have openat and fail with errcode 20.
55
repair table t1;
66
Table Op Msg_type Msg_text

mysql-test/main/repair_symlink-5543.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
1010
insert t1 values (1);
1111
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
12-
--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
12+
--echo # Some systems fail with errcode 31 (FreeBSD), 40, or 90 (MIPS) when doing openat,
1313
--echo # while others don't have openat and fail with errcode 20.
14-
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
14+
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0|31/20/ /".*"/"<errmsg>"/
1515
repair table t1;
1616
drop table t1;
1717

1818
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
1919
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
2020
insert t2 values (1);
2121
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
22-
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
22+
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0|31/20/ /".*"/"<errmsg>"/
2323
repair table t2;
2424
drop table t2;
2525

mysql-test/main/temp_table_symlink.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ for (<#sql*.MYI>) {
1414
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MYI", hex($3)+1;
1515
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+1;
1616
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+2;
17+
symlink "$ENV{datadir}/test/d1.MYI", sprintf "#sql$1_$2%x.MAI", hex($3)+3;
1718
symlink "$ENV{datadir}/test/d1.MYI", "#sql_$1_0.MAI";
1819
}
1920
EOF

mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ DROP TABLE t1;
4343
set @@SESSION.SQL_LOG_BIN = 1;
4444

4545
--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
46-
--write_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
47-
(`$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 &
48-
EOF
49-
--exec /bin/bash $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
46+
--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 &
5047

5148
--echo # Step-4: Wait till dump thread transfer is completed.
5249
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;
6259
--source include/stop_dump_threads.inc
6360

6461
DROP TABLE t1;
65-
--remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
66-

mysql-test/suite/perfschema/include/socket_ipv6.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ let $check_ipv6_just_check= 1;
2020
#==============================================================================
2121
--disable_query_log
2222
--disable_result_log
23+
--disable_connect_log
2324
--disable_abort_on_error
2425

2526
let $check_ipv6_supported= 1;
@@ -44,6 +45,7 @@ if(!$mysql_errno)
4445
connection default;
4546

4647
--enable_abort_on_error
48+
--enable_connect_log
4749
--enable_result_log
4850
--enable_query_log
4951

@@ -62,6 +64,7 @@ let $check_ipv4_mapped_just_check= 1;
6264
#==============================================================================
6365
--disable_query_log
6466
--disable_result_log
67+
--disable_connect_log
6568
--disable_abort_on_error
6669

6770
let $check_ipv4_mapped_supported= 1;
@@ -86,6 +89,7 @@ if(!$mysql_errno)
8689
connection default;
8790

8891
--enable_abort_on_error
92+
--enable_connect_log
8993
--enable_result_log
9094
--enable_query_log
9195

mysql-test/suite/perfschema/r/socket_connect.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#==============================================================================
22
# Establish the level of IPV6 support
33
#==============================================================================
4-
connection default;
54
#==============================================================================
65
# Get hostname, port number
76
#==============================================================================

mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#==============================================================================
22
# Establish the level of IPV6 support
33
#==============================================================================
4-
connection default;
54
#==============================================================================
65
# Get hostname, port number
76
#==============================================================================

mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
# prepared statement.
3939
--source include/no_protocol.inc
4040

41-
set global session_track_schema=FALSE;
42-
4341
#===================================
4442
# Set IP address defaults with respect to IPV6 support
4543
#
@@ -73,6 +71,7 @@ if($my_socket_debug)
7371
--echo IPV6=$check_ipv6_supported, IPV4_MAPPED = $check_ipv4_mapped_supported, LOCALHOST = $my_localhost
7472
}
7573
#===================================
74+
set global session_track_schema=FALSE;
7675

7776
--echo # The logging of commands and result sets is mostly disabled.
7877
--echo # There are some messages which help to observe the progress of the test.

0 commit comments

Comments
 (0)