#
# Checking TBL tables
#
CREATE TABLE t1 (
a INT NOT NULL,
message CHAR(10)) ENGINE=connect;
Warnings:
Warning	1105	No table_type. Will be set to DOS
Warning	1105	No file name. Table will use t1.dos
INSERT INTO t1 VALUES (1,'Testing'),(2,'dos table'),(3,'t1');
SELECT * FROM t1;
a	message
1	Testing
2	dos table
3	t1
CREATE TABLE t2 (
a INT NOT NULL,
message CHAR(10)) ENGINE=connect TABLE_TYPE=BIN;
Warnings:
Warning	1105	No file name. Table will use t2.bin
INSERT INTO t2 VALUES (1,'Testing'),(2,NULL),(3,'t2');
SELECT * FROM t2;
a	message
1	Testing
2	NULL
3	t2
CREATE TABLE t3 (
a INT NOT NULL,
message CHAR(10)) ENGINE=connect TABLE_TYPE=CSV;
Warnings:
Warning	1105	No file name. Table will use t3.csv
INSERT INTO t3 VALUES (1,'Testing'),(2,'csv table'),(3,'t3');
SELECT * FROM t3;
a	message
1	Testing
2	csv table
3	t3
CREATE TABLE t4 (
ta INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
message CHAR(20)) ENGINE=MyISAM;
INSERT INTO t4 (message) VALUES ('Testing'),('myisam table'),('t4');
SELECT * FROM t4;
ta	message
1	Testing
2	myisam table
3	t4
CREATE TABLE total (tabname CHAR(8) NOT NULL SPECIAL='TABID', ta TINYINT NOT NULL FLAG=1, message CHAR(20)) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2,t3,t4' OPTION_LIST='port=PORT';
SELECT * FROM total;
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t2	1	Testing
t2	2	NULL
t2	3	t2
t3	1	Testing
t3	2	csv table
t3	3	t3
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE tabname = 't2';
tabname	ta	message
t2	1	Testing
t2	2	NULL
t2	3	t2
SELECT * FROM total WHERE tabname = 't2' AND ta = 3;
tabname	ta	message
t2	3	t2
SELECT * FROM total WHERE tabname IN ('t1','t4');
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE ta = 3 AND tabname IN ('t1','t2');
tabname	ta	message
t1	3	t1
t2	3	t2
SELECT * FROM total WHERE tabname <> 't2';
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t3	1	Testing
t3	2	csv table
t3	3	t3
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE tabname != 't2' AND ta = 3;
tabname	ta	message
t1	3	t1
t3	3	t3
t4	3	t4
SELECT * FROM total WHERE tabname NOT IN ('t2','t3');
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE ta = 3 AND tabname IN ('t2','t3');
tabname	ta	message
t2	3	t2
t3	3	t3
SELECT * FROM total WHERE ta = 3 OR tabname IN ('t2','t4');
tabname	ta	message
t1	3	t1
t2	1	Testing
t2	2	NULL
t2	3	t2
t3	3	t3
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE NOT tabname = 't2';
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t3	1	Testing
t3	2	csv table
t3	3	t3
t4	1	Testing
t4	2	myisam table
t4	3	t4
SELECT * FROM total WHERE tabname = 't2' OR tabname = 't1';
tabname	ta	message
t1	1	Testing
t1	2	dos table
t1	3	t1
t2	1	Testing
t2	2	NULL
t2	3	t2
DROP TABLE total;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
#
# MDEV-28288 System versioning doesn't support correct work for
#            engine=connect and doesn't always give any warnings/errors
#
create table t2 (
x int,
y int
) engine=connect table_type=FIX file_name='test.txt' with system versioning;
ERROR HY000: System-versioned tables do not support CONNECT storage engine
