#
# 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;
