diff options
Diffstat (limited to 'storage/connect/mysql-test/connect/t')
-rw-r--r-- | storage/connect/mysql-test/connect/t/mysql.test | 20 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/t/odbc_postgresql.sql | 3 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/t/odbc_postgresql.test | 6 |
3 files changed, 29 insertions, 0 deletions
diff --git a/storage/connect/mysql-test/connect/t/mysql.test b/storage/connect/mysql-test/connect/t/mysql.test index 451de29c0b0..ce76a4665d5 100644 --- a/storage/connect/mysql-test/connect/t/mysql.test +++ b/storage/connect/mysql-test/connect/t/mysql.test @@ -484,5 +484,25 @@ DROP TABLE t2; DROP TABLE t1; --echo # +--echo # MDEV-28533 CONNECT engine does not quote columns involved in WHERE clause +--echo # + +CREATE TABLE t1 (id int, `spaced col` varchar(10),`nospace` varchar(10)); +insert into t1 values (1,1,'x1'),(2,'C-003','x2'); + +SELECT * from t1; + +--replace_result $PORT PORT +--eval CREATE TABLE t2 (id int, `spaced col` varchar(10), `nospace` varchar(10)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT' + +SELECT * from t2; +SELECT `id` FROM t2 WHERE t2.`nospace` = 'x1'; +SELECT `id` FROM t2 WHERE t2.`spaced col` = 'C-003'; + + +DROP TABLE t1; +DROP TABLE t2; + +--echo # --echo # End of 10.3 tests --echo # diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql index 1c302294393..a795817a4d3 100644 --- a/storage/connect/mysql-test/connect/t/odbc_postgresql.sql +++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.sql @@ -25,3 +25,6 @@ INSERT INTO schema1.t1 VALUES ('aaa'),('bbb'),('ccc'),('яяя'); CREATE VIEW schema1.v1 AS SELECT * FROM schema1.t1; CREATE TABLE schema1.t2 (a CHAR(10) NOT NULL); INSERT INTO schema1.t2 VALUES ('xxx'),('yyy'),('zzz'),('ÄÖÜ'); +CREATE TABLE schema1.t3 (a CHAR(10) NOT NULL, b CHAR(10) NOT NULL); +INSERT INTO schema1.t3 VALUES ('xxx', 'aaa'),('yyy', 'bbb'),('zzz', 'ccc'),('ÄÖÜ', 'яяя'); + diff --git a/storage/connect/mysql-test/connect/t/odbc_postgresql.test b/storage/connect/mysql-test/connect/t/odbc_postgresql.test index 7fc16130713..86597423d04 100644 --- a/storage/connect/mysql-test/connect/t/odbc_postgresql.test +++ b/storage/connect/mysql-test/connect/t/odbc_postgresql.test @@ -205,3 +205,9 @@ CREATE VIEW v1 AS SELECT * FROM t1; SELECT * FROM v1; DROP VIEW v1; DROP TABLE t1; + +# MDEV-25767 DELETE with WHERE condition crashes when two columns used for +# pkey +CREATE TABLE t1 (a VARCHAR(6), b VARCHAR(6), PRIMARY KEY(a, b)) ENGINE=CONNECT TABNAME='schema1.t3' CHARSET=utf8 DATA_CHARSET=utf8 TABLE_TYPE=ODBC CONNECTION='DSN=ConnectEnginePostgresql;UID=mtr;PWD=mtr'; +DELETE FROM t1 WHERE a='20'; +DROP TABLE t1; |