Skip to content

Commit 11f61d9

Browse files
MDEV-37568 Fix remote table key direction in spider/bugfix.index
Ideally spider should throw an error when local and remote tables have conflict definitions. This fixes the test for --view-protocol and --mysqld=--loose-spider-disable-group-by-handler
1 parent 14720ec commit 11f61d9

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

storage/spider/mysql-test/spider/bugfix/r/index.result

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,27 @@ set global spider_same_server_link= on;
1010
select @@spider_auto_increment_mode;
1111
@@spider_auto_increment_mode
1212
0
13-
create or replace table auto_test_local.t (id int primary key) engine=InnoDB;
13+
create or replace table auto_test_local.t (id int, primary key(id desc)) engine=InnoDB;
1414
create or replace table t_sp1 (id int auto_increment, primary key(id desc))
1515
engine=Spider COMMENT='wrapper "mysql", srv "s_1", table "t"';
1616
insert into t_sp1 () values (),(),();
1717
insert into t_sp1 () values (),(),();
18-
select * from t_sp1;
18+
select * from auto_test_local.t;
1919
id
20-
1
21-
2
22-
3
23-
4
20+
6
2421
5
22+
4
23+
3
24+
2
25+
1
26+
select * from t_sp1;
27+
id
2528
6
29+
5
30+
4
31+
3
32+
2
33+
1
2634
drop table t_sp1, auto_test_local.t;
2735
#
2836
# MDEV-27581 Wrong result with DESC key on partitioned Spider table

storage/spider/mysql-test/spider/bugfix/t/index.test

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ set global spider_same_server_link= on;
1212
--echo #
1313

1414
select @@spider_auto_increment_mode;
15-
create or replace table auto_test_local.t (id int primary key) engine=InnoDB;
15+
create or replace table auto_test_local.t (id int, primary key(id desc)) engine=InnoDB;
1616
create or replace table t_sp1 (id int auto_increment, primary key(id desc))
1717
engine=Spider COMMENT='wrapper "mysql", srv "s_1", table "t"';
1818
insert into t_sp1 () values (),(),();
1919
insert into t_sp1 () values (),(),();
20-
# MDEV-37568
21-
--disable_view_protocol
20+
select * from auto_test_local.t;
2221
select * from t_sp1;
23-
--enable_view_protocol
2422
drop table t_sp1, auto_test_local.t;
2523

2624
--echo #

0 commit comments

Comments
 (0)