summaryrefslogtreecommitdiffstats
path: root/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test')
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test93
1 files changed, 93 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test
new file mode 100644
index 00000000..3d1ccf3c
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_20100.test
@@ -0,0 +1,93 @@
+--source ../include/mdev_20100_init.inc
+--echo
+--echo this test is for MDEV-20100
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+--disable_ps_protocol
+eval $CHILD2_1_CREATE_TABLES;
+--enable_ps_protocol
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+ a INT,
+ b CHAR(1),
+ c DATETIME,
+ PRIMARY KEY(a)
+) $MASTER_1_ENGINE $MASTER_1_COMMENT_P_2_1;
+eval CREATE TABLE tbl_a (
+ a INT,
+ b CHAR(1),
+ c DATETIME,
+ PRIMARY KEY(a)
+) $MASTER_1_ENGINE $MASTER_1_COMMENT_P_2_1;
+--enable_query_log
+INSERT INTO tbl_a (a, b, c) VALUES
+ (1, 'a', '2008-08-01 10:21:39'),
+ (2, 'b', '2000-01-01 00:00:00'),
+ (3, 'e', '2007-06-04 20:03:11'),
+ (4, 'd', '2003-11-30 05:01:03'),
+ (5, 'c', '2001-12-31 23:59:59');
+
+--echo
+--echo test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_ps2_protocol
+SELECT a, b, c FROM tbl_a PARTITION (pt2) WHERE b = 'c';
+SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
+SELECT a, b, c FROM tbl_a PARTITION (pt3) WHERE b = 'c';
+SELECT a, b, c FROM tbl_a PARTITION (pt1,pt2);
+SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
+SELECT a, b, c FROM tbl_a PARTITION (pt1,pt3);
+SELECT a, b, c FROM tbl_a PARTITION (pt1) WHERE b = 'c';
+SELECT a, b, c FROM tbl_a PARTITION (pt2,pt3);
+--enable_ps2_protocol
+
+--connection child2_1
+--disable_ps2_protocol
+eval $CHILD2_1_SELECT_ARGUMENT1;
+--enable_ps2_protocol
+--disable_ps_protocol
+eval $CHILD2_1_SELECT_TABLES;
+--enable_ps_protocol
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/mdev_20100_deinit.inc
+--echo
+--echo end of test