mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
report parse error when parsing JSON histogram fails
Signed-off-by: Michael Okoko <okokomichaels@outlook.com>
This commit is contained in:
committed by
Sergei Petrunia
parent
fe2e516a50
commit
e778d12f83
@ -28,6 +28,19 @@ set histogram_size=10;
|
||||
|
||||
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||
SELECT * FROM mysql.column_stats WHERE table_name='t1';
|
||||
SELECT * FROM t1;
|
||||
|
||||
# We then test different valid JSON strings that are invalid histograms.
|
||||
UPDATE mysql.column_stats SET histogram='["1", {"a": "b"}, "2"]' WHERE table_name='t1';
|
||||
FLUSH TABLES;
|
||||
--error ER_JSON_HISTOGRAM_PARSE_FAILED
|
||||
SELECT * FROM t1;
|
||||
|
||||
UPDATE mysql.column_stats SET histogram='{}' WHERE table_name='t1';
|
||||
FLUSH TABLES;
|
||||
--error ER_JSON_HISTOGRAM_PARSE_FAILED
|
||||
SELECT * FROM t1;
|
||||
|
||||
DELETE FROM mysql.column_stats;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
Reference in New Issue
Block a user