1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-26589: Assertion failure upon DECODE_HISTOGRAM with NULLs

Item_func_decode_histogram::val_str should correctly set null_value
when "decoding" JSON histogram.
This commit is contained in:
Sergei Petrunia
2021-10-01 14:24:41 +03:00
parent 5c709ef18c
commit 5ef350a7f1
3 changed files with 40 additions and 0 deletions

View File

@ -184,6 +184,16 @@ SELECT * FROM t1;
drop table t1;
--echo #
--echo # MDEV-26589: Assertion failure upon DECODE_HISTOGRAM with NULLs in first column
--echo # (Just the testcase)
--echo #
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (NULL,1), (NULL,2);
SET histogram_type = JSON_HB;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT DECODE_HISTOGRAM(hist_type, histogram) from mysql.column_stats;
drop table t1;
--echo # MDEV-26711: Values in JSON histograms are not properly quoted
--echo #
create table t1 (a varchar(32));