1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-31147 json_normalize does not work correctly with MSAN build

json_normalize_number(): Avoid accessing str past str_len.
The function would seem to work incorrectly when some digits are
not followed by a decimal point (.) or an exponent (E or e).
This commit is contained in:
Marko Mäkelä
2023-04-28 12:15:45 +03:00
parent 5028b7c7c8
commit 7d967423fe
3 changed files with 36 additions and 7 deletions

View File

@@ -1673,3 +1673,16 @@ DROP TABLE t;
#
# End of 10.6 tests
#
#
# MDEV-31147 json_normalize does not work correctly with MSAN build
#
CREATE TABLE t1 (val JSON);
ALTER TABLE t1 ADD COLUMN normalized_json JSON AS (JSON_NORMALIZE(val));
INSERT INTO t1 (val) VALUES ('15');
SELECT * FROM t1;
val normalized_json
15 1.5E1
DROP TABLE t1;
#
# End of 10.8 tests
#