summaryrefslogtreecommitdiff
path: root/storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test')
-rw-r--r--storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test51
1 files changed, 51 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
new file mode 100644
index 00000000000..5ac1e0b0891
--- /dev/null
+++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_26345.test
@@ -0,0 +1,51 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+
+--echo
+--echo MDEV-26345 SELECT MIN on Spider table returns more rows than expected
+--echo
+
+--connection child2_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ `a`int,
+ `b`int,
+ PRIMARY KEY (`a`, `b`)
+) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+
+insert into `tbl_a` VALUES (1,1), (1,2), (2,11);
+
+--connection master_1
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+eval CREATE TABLE tbl_a (
+ `a`int,
+ `b`int,
+ PRIMARY KEY (`a`, `b`)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a"' PARTITION BY LIST COLUMNS(`b`) (
+ PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
+);
+
+--connection master_1
+SELECT MIN(b), a FROM tbl_a WHERE a=1;
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_remote;
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings