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

MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters

Encode such characters in hex.
This commit is contained in:
Sergei Petrunia
2021-12-03 20:13:43 +03:00
parent 748b293c14
commit d8d57d2c27
4 changed files with 130 additions and 22 deletions

View File

@ -227,9 +227,12 @@ drop table t1;
--echo #
--echo # Another testcase: use a character that cannot be represented in utf8:
--echo # Also, now it's testcase for:
--echo # MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters
--echo #
create table t1 ( a varchar(100) character set cp1251);
insert into t1 values ( _cp1251 x'88'),( _cp1251 x'98');
insert into t1 values ( _cp1251 x'88'),( _cp1251 x'88'), ( _cp1251 x'88');
insert into t1 values ( _cp1251 x'98'),( _cp1251 x'98');
analyze table t1 persistent for all;
--source include/histogram_replaces.inc
@ -237,6 +240,8 @@ select hist_type, histogram
from mysql.column_stats
where db_name=database() and table_name='t1';
analyze select * from t1 where a=_cp1251 x'88';
drop table t1;
--echo #