summaryrefslogtreecommitdiff
path: root/storage/connect/mysql-test/connect/t/mysql.test
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/mysql-test/connect/t/mysql.test')
-rw-r--r--storage/connect/mysql-test/connect/t/mysql.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/storage/connect/mysql-test/connect/t/mysql.test b/storage/connect/mysql-test/connect/t/mysql.test
index ce76a4665d5..a50db4a6457 100644
--- a/storage/connect/mysql-test/connect/t/mysql.test
+++ b/storage/connect/mysql-test/connect/t/mysql.test
@@ -504,5 +504,35 @@ DROP TABLE t1;
DROP TABLE t2;
--echo #
+--echo # MDEV-28489 / MDEV-26722 UTF8 bytes calculated incorrectly
+--echo #
+
+CREATE TABLE t1 (name varchar(20)) CHARSET=utf8;
+INSERT INTO t1 (name) VALUES ('Иванова'), ('Ivanova');
+
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 (name varchar(1)) ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT' CHARSET=utf8
+
+SELECT hex(name) from t1;
+# This will warn as we are truncating data
+SELECT hex(name) from t2;
+
+DROP TABLE t2;
+DROP TABLE t1;
+
+CREATE TABLE t1 (col char(5)) CHARSET=utf8;
+INSERT INTO t1 (col) VALUES ('glace'), ('glacé');
+
+--replace_result $PORT PORT
+--eval CREATE TABLE t2 ENGINE=CONNECT TABLE_TYPE=MYSQL DBNAME='test' TABNAME='t1' OPTION_LIST='host=localhost,user=root,port=$PORT' CHARSET=utf8
+
+SELECT hex(col) from t1;
+SELECT hex(col) from t2;
+
+DROP TABLE t2;
+DROP TABLE t1;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #