summaryrefslogtreecommitdiff
path: root/mysql-test/suite/wsrep/t
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-02-14 11:38:46 -0500
committerNirbhay Choubey <nirbhay@skysql.com>2014-02-14 11:38:46 -0500
commit8e476e6cbe313fadb6e0cd4402ff8c9d2d487406 (patch)
tree9c3d55cd08893b821c355fded3d962bb79a0e67c /mysql-test/suite/wsrep/t
parente0f0f5f6d0b983619a67725c6a3351c31a547852 (diff)
downloadmariadb-git-8e476e6cbe313fadb6e0cd4402ff8c9d2d487406.tar.gz
MDEV#5534: mysql_tzinfo_to_sql generates wrong query
mysql_tzinfo_to_sql tries to set wsrep_replicate_myisam as SESSION variable, while its a GLOBAL-only system variable, and thus the resulting sql would fail to load. Fixed by changing the scope to GLOBAL in the SET command. Also added following include files to facilitate testing : * include/have_wsrep.inc * include/not_wsrep.inc * include/have_wsrep_enabled.inc
Diffstat (limited to 'mysql-test/suite/wsrep/t')
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.test5
-rw-r--r--mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test40
-rw-r--r--mysql-test/suite/wsrep/t/variables.test19
3 files changed, 63 insertions, 1 deletions
diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test
index 907fae5f4fb..99d34873512 100644
--- a/mysql-test/suite/wsrep/t/binlog_format.test
+++ b/mysql-test/suite/wsrep/t/binlog_format.test
@@ -1,8 +1,11 @@
---source include/have_wsrep.inc
+--source include/have_wsrep_enabled.inc
--source include/have_binlog_format_row.inc
#
# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
#
+call mtr.add_suppression("WSREP: cannot get fake InnoDB transaction ID");
+call mtr.add_suppression("WSREP: Could not open saved state file for reading:.*");
+
SHOW VARIABLES LIKE 'binlog_format';
-- error ER_WRONG_VALUE_FOR_VAR
SET binlog_format=STATEMENT;
diff --git a/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
new file mode 100644
index 00000000000..100e09d3afb
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test
@@ -0,0 +1,40 @@
+--source include/have_wsrep.inc
+--source include/have_symlink.inc
+--source include/not_windows.inc
+
+--echo #
+--echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
+--echo #
+
+--exec mkdir $MYSQLTEST_VARDIR/zoneinfo
+--exec ln -s $MYSQLTEST_VARDIR/zoneinfo $MYSQLTEST_VARDIR/zoneinfo/posix
+--copy_file std_data/zoneinfo/GMT $MYSQLTEST_VARDIR/zoneinfo/GMT
+--copy_file std_data/words.dat $MYSQLTEST_VARDIR/zoneinfo/garbage
+--copy_file std_data/words.dat $MYSQLTEST_VARDIR/zoneinfo/ignored.tab
+
+--echo # Verbose run
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_TZINFO_TO_SQL --verbose $MYSQLTEST_VARDIR/zoneinfo 2>&1
+
+--echo # Silent run
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo 2>&1
+
+--echo #
+--echo # Testing with explicit timezonefile
+--echo #
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_TZINFO_TO_SQL $MYSQLTEST_VARDIR/zoneinfo/GMT XXX 2>&1
+
+--echo #
+--echo # Testing --leap
+--echo #
+
+--exec $MYSQL_TZINFO_TO_SQL --leap $MYSQLTEST_VARDIR/zoneinfo/GMT 2>&1
+
+#
+# Cleanup
+#
+
+--exec rm -rf $MYSQLTEST_VARDIR/zoneinfo
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
new file mode 100644
index 00000000000..306cdf9b2c9
--- /dev/null
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -0,0 +1,19 @@
+--source include/have_wsrep.inc
+
+--echo
+--echo # MDEV#5534: mysql_tzinfo_to_sql generates wrong query
+--echo #
+--echo # Testing wsrep_replicate_myisam variable.
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.wsrep_replicate_myisam;
+SELECT @@global.wsrep_replicate_myisam;
+
+--error ER_GLOBAL_VARIABLE
+SET SESSION wsrep_replicate_myisam= ON;
+SET GLOBAL wsrep_replicate_myisam= ON;
+
+# Reset it back.
+SET GLOBAL wsrep_replicate_myisam= OFF;
+
+--echo # End of test.