Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-30542 Add multilength spider self-reference detection test
- Loading branch information
1 parent
be7ef65
commit 75063d1
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
storage/spider/mysql-test/spider/bugfix/r/self_reference_multi.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
for master_1 | ||
for child2 | ||
for child3 | ||
|
||
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 table t2 (c int); | ||
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"'; | ||
alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t0"'; | ||
select * from t0; | ||
ERROR HY000: An infinite loop is detected when opening table test.t0 | ||
select * from t1; | ||
ERROR HY000: An infinite loop is detected when opening table test.t0 | ||
select * from t2; | ||
ERROR HY000: An infinite loop is detected when opening table test.t0 | ||
drop table t0, t1, t2; | ||
for master_1 | ||
for child2 | ||
for child3 |
29 changes: 29 additions & 0 deletions
29
storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_init.inc | ||
--enable_result_log | ||
--enable_query_log | ||
|
||
--echo | ||
--echo MDEV-6268 SPIDER table with no COMMENT clause causes queries to wait forever | ||
--echo | ||
|
||
--replace_regex /SOCKET ".*"/SOCKET "$MASTER_1_MYSOCK"/ | ||
eval CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); | ||
create table t2 (c int); | ||
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"'; | ||
alter table t2 ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv",TABLE "t0"'; | ||
--error 12719 | ||
select * from t0; | ||
--error 12719 | ||
select * from t1; | ||
--error 12719 | ||
select * from t2; | ||
drop table t0, t1, t2; | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_deinit.inc | ||
--enable_result_log | ||
--enable_query_log |