summaryrefslogtreecommitdiff
path: root/storage/connect/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/mysql-test')
-rw-r--r--storage/connect/mysql-test/connect/r/infoschema-9739.result12
-rw-r--r--storage/connect/mysql-test/connect/r/tbl.result45
-rw-r--r--storage/connect/mysql-test/connect/t/infoschema-9739.test9
-rw-r--r--storage/connect/mysql-test/connect/t/tbl.test45
4 files changed, 84 insertions, 27 deletions
diff --git a/storage/connect/mysql-test/connect/r/infoschema-9739.result b/storage/connect/mysql-test/connect/r/infoschema-9739.result
new file mode 100644
index 00000000000..bcebec1d0e0
--- /dev/null
+++ b/storage/connect/mysql-test/connect/r/infoschema-9739.result
@@ -0,0 +1,12 @@
+Warnings:
+Warning 1105 No file name. Table will use t1.xml
+create table t1 (i int) engine=Connect table_type=XML;
+Warnings:
+Warning 1105 No file name. Table will use t1.xml
+select * from information_schema.tables where create_options like '%table_type=XML%';
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT
+Warnings:
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1286 Unknown storage engine 'InnoDB'
+Warning 1296 Got error 174 'File t1.xml not found' from CONNECT
+drop table t1;
diff --git a/storage/connect/mysql-test/connect/r/tbl.result b/storage/connect/mysql-test/connect/r/tbl.result
index bc77516c22d..f51b4dfa57f 100644
--- a/storage/connect/mysql-test/connect/r/tbl.result
+++ b/storage/connect/mysql-test/connect/r/tbl.result
@@ -44,8 +44,8 @@ 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;
+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
@@ -59,15 +59,15 @@ t3 3 t3
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where tabname = 't2';
+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;
+SELECT * FROM total WHERE tabname = 't2' AND ta = 3;
tabname ta message
t2 3 t2
-select * from total where tabname in ('t1','t4');
+SELECT * FROM total WHERE tabname IN ('t1','t4');
tabname ta message
t1 1 Testing
t1 2 dos table
@@ -75,11 +75,11 @@ t1 3 t1
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where ta = 3 and tabname in ('t1','t2');
+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';
+SELECT * FROM total WHERE tabname <> 't2';
tabname ta message
t1 1 Testing
t1 2 dos table
@@ -90,12 +90,12 @@ t3 3 t3
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where tabname != 't2' and ta = 3;
+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');
+SELECT * FROM total WHERE tabname NOT IN ('t2','t3');
tabname ta message
t1 1 Testing
t1 2 dos table
@@ -103,11 +103,11 @@ t1 3 t1
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where ta = 3 and tabname in ('t2','t3');
+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');
+SELECT * FROM total WHERE ta = 3 OR tabname IN ('t2','t4');
tabname ta message
t1 3 t1
t2 1 Testing
@@ -117,7 +117,7 @@ t3 3 t3
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where not tabname = 't2';
+SELECT * FROM total WHERE NOT tabname = 't2';
tabname ta message
t1 1 Testing
t1 2 dos table
@@ -128,7 +128,7 @@ t3 3 t3
t4 1 Testing
t4 2 myisam table
t4 3 t4
-select * from total where tabname = 't2' or tabname = 't1';
+SELECT * FROM total WHERE tabname = 't2' OR tabname = 't1';
tabname ta message
t1 1 Testing
t1 2 dos table
@@ -141,3 +141,22 @@ DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
+#
+# Checking thread TBL tables
+#
+CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=MYSQL SRCDEF='select 11 as v';
+SELECT * FROM t1;
+v
+11
+CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL SRCDEF='select 22 as v';
+SELECT * FROM t2;
+v
+22
+CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=PORT';;
+SELECT * FROM total order by v desc;
+v
+22
+11
+DROP TABLE total;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/storage/connect/mysql-test/connect/t/infoschema-9739.test b/storage/connect/mysql-test/connect/t/infoschema-9739.test
new file mode 100644
index 00000000000..e9eb7fb796e
--- /dev/null
+++ b/storage/connect/mysql-test/connect/t/infoschema-9739.test
@@ -0,0 +1,9 @@
+#
+# MDEV-9739 Assertion `m_status == DA_ERROR || m_status == DA_OK' failed in Diagnostics_area::message() ; connect.xml* tests fail in buildbot
+#
+
+--source have_libxml2.inc
+
+create table t1 (i int) engine=Connect table_type=XML;
+select * from information_schema.tables where create_options like '%table_type=XML%';
+drop table t1;
diff --git a/storage/connect/mysql-test/connect/t/tbl.test b/storage/connect/mysql-test/connect/t/tbl.test
index 43c506c9403..3dc4b2e64b0 100644
--- a/storage/connect/mysql-test/connect/t/tbl.test
+++ b/storage/connect/mysql-test/connect/t/tbl.test
@@ -31,23 +31,40 @@ INSERT INTO t4 (message) VALUES ('Testing'),('myisam table'),('t4');
SELECT * FROM t4;
--replace_result $PORT PORT
---eval 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;
-select * from total where tabname = 't2';
-select * from total where tabname = 't2' and ta = 3;
-select * from total where tabname in ('t1','t4');
-select * from total where ta = 3 and tabname in ('t1','t2');
-select * from total where tabname <> 't2';
-select * from total where tabname != 't2' and ta = 3;
-select * from total where tabname not in ('t2','t3');
-select * from total where ta = 3 and tabname in ('t2','t3');
-select * from total where ta = 3 or tabname in ('t2','t4');
-select * from total where not tabname = 't2';
-select * from total where tabname = 't2' or tabname = 't1';
+--eval 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;
+SELECT * FROM total WHERE tabname = 't2';
+SELECT * FROM total WHERE tabname = 't2' AND ta = 3;
+SELECT * FROM total WHERE tabname IN ('t1','t4');
+SELECT * FROM total WHERE ta = 3 AND tabname IN ('t1','t2');
+SELECT * FROM total WHERE tabname <> 't2';
+SELECT * FROM total WHERE tabname != 't2' AND ta = 3;
+SELECT * FROM total WHERE tabname NOT IN ('t2','t3');
+SELECT * FROM total WHERE ta = 3 AND tabname IN ('t2','t3');
+SELECT * FROM total WHERE ta = 3 OR tabname IN ('t2','t4');
+SELECT * FROM total WHERE NOT tabname = 't2';
+SELECT * FROM total WHERE tabname = 't2' OR tabname = 't1';
DROP TABLE total;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
+
+--echo #
+--echo # Checking thread TBL tables
+--echo #
+CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=MYSQL SRCDEF='select 11 as v';
+SELECT * FROM t1;
+
+CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL SRCDEF='select 22 as v';
+SELECT * FROM t2;
+
+--replace_result $PORT PORT
+--eval CREATE TABLE total (v BIGINT(20) UNSIGNED NOT NULL) ENGINE=CONNECT TABLE_TYPE=TBL TABLE_LIST='t1,t2' OPTION_LIST='thread=yes,port=$PORT';
+SELECT * FROM total order by v desc;
+
+DROP TABLE total;
+DROP TABLE t1;
+DROP TABLE t2;