Commit 24faa5de authored by Yuchen Pei's avatar Yuchen Pei

MDEV-30542 Fixing spider/bugfix.self_reference_multi

The server needs to have a unique name
parent 84dbd025
...@@ -4,11 +4,11 @@ for child3 ...@@ -4,11 +4,11 @@ for child3
MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); CREATE SERVER $srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
create table t2 (c int); create table t2 (c int);
create table t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; create table t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv_self_reference_multi",TABLE "t2"';
create table t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t1"'; create table t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv_self_reference_multi",TABLE "t1"';
alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t0"'; alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv_self_reference_multi",TABLE "t0"';
select * from t0; select * from t0;
ERROR HY000: An infinite loop is detected when opening table test.t0 ERROR HY000: An infinite loop is detected when opening table test.t0
select * from t1; select * from t1;
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
--echo MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever --echo MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever
--echo --echo
--replace_regex /SOCKET ".*"/SOCKET "$MASTER_1_MYSOCK"/ --let $srv=srv_self_reference_multi
eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); evalp CREATE SERVER $srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
create table t2 (c int); create table t2 (c int);
create table t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; eval create table t1 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "$srv",TABLE "t2"';
create table t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t1"'; eval create table t0 (c int) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "$srv",TABLE "t1"';
alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t0"'; eval alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "$srv",TABLE "t0"';
--error 12719 --error 12719
select * from t0; select * from t0;
--error 12719 --error 12719
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment