summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/func_json.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /mysql-test/main/func_json.test
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/func_json.test')
-rw-r--r--mysql-test/main/func_json.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 2218a976..f8a656c9 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -948,6 +948,22 @@ SELECT JSON_VALUE('["foo"]', '$**[0]') AS f;
SET @@COLLATION_CONNECTION= @old_collation_connection;
--echo #
+--echo # MDEV-32587 JSON_VALID fail to validate integer zero in scientific notation
+--echo #
+# Passing
+select JSON_VALID(' {"number": 1E-4}');
+select JSON_VALID(' {"number": 0E-4}');
+select JSON_VALID(' {"number": 0.0}');
+select JSON_VALID(' {"number": 0.1E-4}');
+select JSON_VALID(' {"number": 0e-4}');
+select JSON_VALID(' {"number": -0E-4}');
+select JSON_VALUE(' {"number": 0E-4}', '$.number');
+# Failing
+select JSON_VALID(' {"number": 00E-4}');
+select JSON_VALID(' {"number": 01E-4}');
+select JSON_VALID(' {"number": 0E-4.0}');
+
+--echo #
--echo # End of 10.4 tests
--echo #
@@ -1112,6 +1128,16 @@ SELECT JSON_OBJECTAGG('\"', 1);
SELECT JSON_OBJECTAGG('\\', 1);
--echo #
+--echo # MDEV-24784 JSON_ARRAYAGG charset issue
+--echo #
+--disable_service_connection
+set names utf8;
+select json_arrayagg('ä'), json_objectagg(1, 'ä');
+set names latin1;
+select json_arrayagg('ä'), json_objectagg(1, 'ä');
+--enable_service_connection
+
+--echo #
--echo # End of 10.5 tests
--echo #