summaryrefslogtreecommitdiff
path: root/storage/spider/mysql-test/spider/bugfix/t/mdev_26013.test
blob: e31041c3bf1648f8933ba336648727105fe17136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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-26013 distinct not work properly in some cases for spider tables
--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`)
) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;

insert into `tbl_a` VALUES (1,999), (2,999);

--connection master_1
CREATE DATABASE auto_test_remote;
USE auto_test_remote;

eval CREATE TABLE tbl_a (
    `a`int,
    `b`int,
    PRIMARY KEY (`a`)
) $MASTER_1_ENGINE $MASTER_1_CHARSET COMMENT='table "tbl_a"' PARTITION BY LIST COLUMNS(`a`) (
    PARTITION `pt1` DEFAULT COMMENT = 'srv "s_2_1"'
);

--connection master_1
SELECT distinct b FROM tbl_a WHERE b=999;

--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