#
# MDEV-30392 Syntax error upon query with subquery from Spider table
#
for master_1
for child2
for child3
set spider_same_server_link=1;
set global spider_same_server_link=1;
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 'srv', table 't1'";
Warnings:
Warning	138	Spider table params in COMMENT or CONNECTION strings have been deprecated and will be removed in a future release. Please use table options instead.
SELECT a FROM t2 WHERE a IN ( SELECT a FROM t2 );
a
1
2
DROP TABLE t1, t2;
DROP SERVER srv;
for master_1
for child2
for child3
#
# end of test mdev_30392
#
