summaryrefslogtreecommitdiff
path: root/mysql-test/suite/json
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-03-25 00:15:11 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-03-25 00:32:14 +0400
commitad647cc84ebf331d59b24e81bffe89be2f5b1ed7 (patch)
tree9684920a47cd9c93959d121a65394af482af7a44 /mysql-test/suite/json
parent843b4148916e445405dde6f83f237e812f06e2f6 (diff)
downloadmariadb-git-ad647cc84ebf331d59b24e81bffe89be2f5b1ed7.tar.gz
MDEV-15561 json_extract returns NULL with numbers in scientific notation.
Scientific notation handling fixed. Conflicts: mysql-test/r/func_json.result mysql-test/t/func_json.test
Diffstat (limited to 'mysql-test/suite/json')
-rw-r--r--mysql-test/suite/json/r/json_no_table.result40
1 files changed, 10 insertions, 30 deletions
diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result
index 034a4e6c0a6..41150032e51 100644
--- a/mysql-test/suite/json/r/json_no_table.result
+++ b/mysql-test/suite/json/r/json_no_table.result
@@ -1061,9 +1061,7 @@ json_type(json_compact(3.14))
DOUBLE
select json_type(json_compact(3.14E30));
json_type(json_compact(3.14E30))
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 7
+DOUBLE
select json_type(json_compact(cast('10101abcde' as binary)));
json_type(json_compact(cast('10101abcde' as binary)))
INTEGER
@@ -3445,52 +3443,34 @@ JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END)
#
SELECT JSON_EXTRACT('-1E-36181012216111515851075235238', '$');
JSON_EXTRACT('-1E-36181012216111515851075235238', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33
+-1E-36181012216111515851075235238
SELECT JSON_EXTRACT('1E-36181012216111515851075235238', '$');
JSON_EXTRACT('1E-36181012216111515851075235238', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32
+1E-36181012216111515851075235238
SELECT JSON_EXTRACT('1E-325', '$');
JSON_EXTRACT('1E-325', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+1E-325
SELECT JSON_EXTRACT('1E-324', '$');
JSON_EXTRACT('1E-324', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+1E-324
SELECT JSON_EXTRACT('1E-323', '$');
JSON_EXTRACT('1E-323', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+1E-323
SELECT JSON_EXTRACT('1E+308', '$');
JSON_EXTRACT('1E+308', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+1E+308
error ER_INVALID_JSON_TEXT_IN_PARAM
SELECT JSON_EXTRACT('1E+309', '$');
JSON_EXTRACT('1E+309', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+1E+309
error ER_INVALID_JSON_TEXT_IN_PARAM
SELECT JSON_EXTRACT('1E+36181012216111515851075235238', '$');
JSON_EXTRACT('1E+36181012216111515851075235238', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32
+1E+36181012216111515851075235238
error ER_INVALID_JSON_TEXT_IN_PARAM
SELECT JSON_EXTRACT('-1E+36181012216111515851075235238', '$');
JSON_EXTRACT('-1E+36181012216111515851075235238', '$')
-NULL
-Warnings:
-Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33
+-1E+36181012216111515851075235238
#
# Bug#21383284: ASSERTION IN SELECT_LEX::SETUP_CONDS
#