diff options
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/get_binlog_dump_thread_id.inc | 22 | ||||
-rw-r--r-- | mysql-test/include/have_debug_sync.inc | 6 | ||||
-rw-r--r-- | mysql-test/include/have_semisync.inc | 4 | ||||
-rw-r--r-- | mysql-test/include/have_semisync.opt | 4 | ||||
-rw-r--r-- | mysql-test/include/have_semisync_plugin.inc | 15 | ||||
-rw-r--r-- | mysql-test/include/mix1.inc | 7 | ||||
-rw-r--r-- | mysql-test/include/support_long_file_names.inc | 37 |
7 files changed, 49 insertions, 46 deletions
diff --git a/mysql-test/include/get_binlog_dump_thread_id.inc b/mysql-test/include/get_binlog_dump_thread_id.inc deleted file mode 100644 index bfc8506b39e..00000000000 --- a/mysql-test/include/get_binlog_dump_thread_id.inc +++ /dev/null @@ -1,22 +0,0 @@ ---exec $MYSQL test -e "show processlist" > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id ---disable_warnings -drop table if exists t999; ---enable_warnings -# Create a table to hold the process list -create temporary table t999( - id int, - user char(255), - host char(255), - db char(255), - Command char(255), - time int, - State char(255), - info char(255) -); -# Load processlist into table, headers will create seom warnings ---disable_warnings ---replace_result $MYSQLTEST_VARDIR "." -eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999; ---enable_warnings -let $id = `select Id from t999 where Command="Binlog Dump"`; -drop table t999; diff --git a/mysql-test/include/have_debug_sync.inc b/mysql-test/include/have_debug_sync.inc index 8efec7dad95..dbe6dfddd26 100644 --- a/mysql-test/include/have_debug_sync.inc +++ b/mysql-test/include/have_debug_sync.inc @@ -1,4 +1,4 @@ -if (`SELECT COUNT(*) = 0 FROM information_schema.session_variables WHERE - variable_name = 'debug_sync' AND variable_value LIKE 'ON %'`) { - --skip Needs debug_sync enabled +if (`select count(*) = 0 from information_schema.session_variables where variable_name = 'debug_sync' and variable_value like 'on %'`) +{ + skip debug_sync is not available; } diff --git a/mysql-test/include/have_semisync.inc b/mysql-test/include/have_semisync.inc new file mode 100644 index 00000000000..243fad83717 --- /dev/null +++ b/mysql-test/include/have_semisync.inc @@ -0,0 +1,4 @@ +if (`select count(*) < 2 from information_schema.plugins where plugin_name like 'rpl_semi_sync_%'`) +{ + --skip Test requires semisync plugins +} diff --git a/mysql-test/include/have_semisync.opt b/mysql-test/include/have_semisync.opt new file mode 100644 index 00000000000..2888844cdcd --- /dev/null +++ b/mysql-test/include/have_semisync.opt @@ -0,0 +1,4 @@ +--plugin-load=$SEMISYNC_MASTER_SO +--plugin-load=$SEMISYNC_SLAVE_SO +--loose-rpl-semi-sync-master +--loose-rpl-semi-sync-slave diff --git a/mysql-test/include/have_semisync_plugin.inc b/mysql-test/include/have_semisync_plugin.inc deleted file mode 100644 index 8a1679de636..00000000000 --- a/mysql-test/include/have_semisync_plugin.inc +++ /dev/null @@ -1,15 +0,0 @@ -# -# Check if server has support for loading plugins -# -if (`SELECT @@have_dynamic_loading != 'YES'`) { - --skip Requires dynamic loading -} - -# -# Check if the variable SEMISYNC_MASTER_SO is set -# -if (!$SEMISYNC_MASTER_SO) -{ - skip Need semisync plugins; -} - diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 87d6698865a..75ba0e43221 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -627,17 +627,12 @@ DROP TABLE t1,t2,t3; create table t1 (a int) engine=innodb; let $MYSQLD_DATADIR= `select @@datadir`; copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/bug29807.frm; ---error 1146 +--error ER_NO_SUCH_TABLE_IN_ENGINE select * from bug29807; drop table t1; ---error 1051 drop table bug29807; -create table bug29807 (a int); -drop table bug29807; ---disable_query_log call mtr.add_suppression("InnoDB: Error: table .test...bug29807. does not exist in the InnoDB internal"); call mtr.add_suppression("Cannot find or open table test\/bug29807 from"); ---enable_query_log # diff --git a/mysql-test/include/support_long_file_names.inc b/mysql-test/include/support_long_file_names.inc new file mode 100644 index 00000000000..1f5b3d7be08 --- /dev/null +++ b/mysql-test/include/support_long_file_names.inc @@ -0,0 +1,37 @@ +--error 0,3 +--perl +my $n = 254 - length($ENV{MYSQLTEST_VARDIR}); +my $name = $ENV{MYSQLTEST_VARDIR} . '/' . sprintf("%0${n}d", $$); +if (!open(LONG_NAME,">$name")) +{ + # We cannot rely either on a particular error code, or error string + # to check that we indeed hit "File name too long". + # Instead, we will try to create a file with a short name + # the same way, in the same location. If it goes all right, + # we will assume the problem was with the file name length + + open(SHORT_NAME,">$ENV{MYSQLTEST_VARDIR}/$$") || + # Even a shorter name could not be created, something else is wrong + die "Could not create file $ENV{MYSQLTEST_VARDIR}/$$: $!"; + close(SHORT_NAME); + unlink("$ENV{MYSQLTEST_VARDIR}/$$"); + exit(3); +} else { + close(LONG_NAME); + unlink($name); + exit(0); +} +EOF + +# If perl exited with error code 0, the check has passed, +# so the calling test will be executed. +# If perl exited with error code 3, it will be caught by +# --error above, and processed by the check below. +# If perl exited with some other error code, something went wrong, +# so the test will fail. + +if ($errno) +{ + --skip Long file names are not supported +} + |