summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-09-13 15:17:28 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-09-13 15:17:28 +0400
commitdc82f70e9f203fb6cd2e9dd2b43beb1a2d6e791e (patch)
tree012b419628f2b1b54755e21b0cbf00f5c4151091 /mysql-test
parenta237a920991f417e9a4567957f4fc7aa5b538270 (diff)
downloadmariadb-git-dc82f70e9f203fb6cd2e9dd2b43beb1a2d6e791e.tar.gz
MDEV-13633 JSON_ARRAY() - bad output with some UTF8 characters.
set_charset() calls added for Item_func_json_arran and Item_func_json_object::val_str-s.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_json.result6
-rw-r--r--mysql-test/t/func_json.test6
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result
index 0c60c42ec77..5c3134b7ce9 100644
--- a/mysql-test/r/func_json.result
+++ b/mysql-test/r/func_json.result
@@ -699,3 +699,9 @@ select @str, @path, JSON_EXTRACT(@str, @path);
select json_array(5,json_query('[1,2]','$'));
json_array(5,json_query('[1,2]','$'))
[5, [1,2]]
+SELECT JSON_ARRAY('1. ě 2. š 3. č 4. ř 5. ž 6. ý 7. á 8. í 9. é 10. ů 11. ú') AS json_data;
+json_data
+["1. ě 2. š 3. č 4. ř 5. ž 6. ý 7. á 8. í 9. é 10. ů 11. ú"]
+SELECT JSON_OBJECT("user","Jožko Mrkvičká") as json_data;
+json_data
+{"user": "Jožko Mrkvičká"}
diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test
index 39e31b8bb58..c660cb14856 100644
--- a/mysql-test/t/func_json.test
+++ b/mysql-test/t/func_json.test
@@ -354,3 +354,9 @@ select @str, @path, JSON_EXTRACT(@str, @path);
#
select json_array(5,json_query('[1,2]','$'));
+#
+# MDEV-13633 JSON_ARRAY() - bad output with some UTF8 characters.
+#
+
+SELECT JSON_ARRAY('1. ě 2. š 3. č 4. ř 5. ž 6. ý 7. á 8. í 9. é 10. ů 11. ú') AS json_data;
+SELECT JSON_OBJECT("user","Jožko Mrkvičká") as json_data;