diff options
author | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2023-03-03 13:50:46 +0530 |
---|---|---|
committer | Rucha Deodhar <rucha.deodhar@mariadb.com> | 2023-04-26 11:00:09 +0530 |
commit | 4b67ff3b256a78994cb23dc4aa2ba531bbb06070 (patch) | |
tree | c2657db62d2677d65689f3dc8b9b02b53817d849 /mysql-test/main/func_json.test | |
parent | 2c4c7c8b02140ff3abb8325f6261ccf1ae18b477 (diff) | |
download | mariadb-git-4b67ff3b256a78994cb23dc4aa2ba531bbb06070.tar.gz |
MDEV-30705: JSON_SCHEMA_VALID: schema with multipleOf for big value
always return 1
Analysis: Implementation used double to store value. longlong is better
choice
Fix: Use longlong for multiple_of and the value to store it and num_flag to
check for decimals.
Diffstat (limited to 'mysql-test/main/func_json.test')
-rw-r--r-- | mysql-test/main/func_json.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 3d9a8e3116b..d5631c1578c 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -3533,4 +3533,15 @@ SET @schema= '{ "items" : ["str1"]}'; SELECT JSON_SCHEMA_VALID(@schema, '[]'); +--echo # +--echo # MDEV-30705: JSON_SCHEMA_VALID: schema with multipleOf for big value always return 1 +--echo # +SET @schema = '{ + "multipleOf": 2 + }'; +SELECT JSON_SCHEMA_VALID(@schema, '9007900000000001'); +SELECT JSON_SCHEMA_VALID(@schema, '9007900000000060'); +SELECT JSON_SCHEMA_VALID(@schema, '9007900000000061'); + + --echo # End of 11.1 test |