1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-26711: Values in JSON histograms are not properly quoted

Escape values when serializing to JSON. Un-escape when reading back.
This commit is contained in:
Sergei Petrunia
2021-09-29 20:11:48 +03:00
parent d03daaf8a8
commit 61cd4f4412
6 changed files with 608 additions and 80 deletions

View File

@ -182,3 +182,14 @@ SET histogram_type= JSON_HB;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT * FROM t1;
drop table t1;
--echo #
--echo # MDEV-26711: Values in JSON histograms are not properly quoted
--echo #
create table t1 (a varchar(32));
insert into t1 values ('this is "quoted" text');
set histogram_type= JSON_HB;
analyze table t1 persistent for all;
select * from t1 where a = 'foo';
drop table t1;