diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2021-04-12 23:17:32 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2021-04-21 10:21:47 +0400 |
commit | a2ce788f02bfca7b2e5fb441832459c451d0cbc2 (patch) | |
tree | cc0d21203c32aac659e103759a5cf0e51f9d76a4 /mysql-test/suite/json | |
parent | 67b31a6e4c8cffcb0660740979e03ee3f81a464c (diff) | |
download | mariadb-git-a2ce788f02bfca7b2e5fb441832459c451d0cbc2.tar.gz |
MDEV-25259 JSON_TABLE: Illegal mix of collations upon executing query with combination of charsets via view.
The ::print method didn't print the explicitly specified charset.
Diffstat (limited to 'mysql-test/suite/json')
-rw-r--r-- | mysql-test/suite/json/r/json_table.result | 10 | ||||
-rw-r--r-- | mysql-test/suite/json/t/json_table.test | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/suite/json/r/json_table.result b/mysql-test/suite/json/r/json_table.result index 8789f4ced8d..619aeea985e 100644 --- a/mysql-test/suite/json/r/json_table.result +++ b/mysql-test/suite/json/r/json_table.result @@ -793,5 +793,15 @@ a b c o DROP VIEW v2; DROP TABLE t1, t2; # +# MDEV-25259 JSON_TABLE: Illegal mix of collations upon executing query with combination of charsets via view. +# +CREATE VIEW v AS +SELECT * FROM JSON_TABLE(CONVERT('[]' USING dec8), +'$' COLUMNS(b VARCHAR(8) CHARSET utf8 PATH '$')) AS jt2 +WHERE (CONVERT('[]' USING cp1256) = b); +SELECT * FROM v; +b +DROP VIEW v; +# # End of 10.6 tests # diff --git a/mysql-test/suite/json/t/json_table.test b/mysql-test/suite/json/t/json_table.test index e91e89ab72f..9b31ddeb3b6 100644 --- a/mysql-test/suite/json/t/json_table.test +++ b/mysql-test/suite/json/t/json_table.test @@ -686,5 +686,18 @@ DROP VIEW v2; DROP TABLE t1, t2; --echo # +--echo # MDEV-25259 JSON_TABLE: Illegal mix of collations upon executing query with combination of charsets via view. +--echo # + +CREATE VIEW v AS + SELECT * FROM JSON_TABLE(CONVERT('[]' USING dec8), + '$' COLUMNS(b VARCHAR(8) CHARSET utf8 PATH '$')) AS jt2 + WHERE (CONVERT('[]' USING cp1256) = b); + +SELECT * FROM v; + +DROP VIEW v; + +--echo # --echo # End of 10.6 tests --echo # |