mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-26724 Endless loop in json_escape_to_string upon ... empty string
.. part#2: correctly pass the charset to JSON [un]escape functions
This commit is contained in:
@ -7898,6 +7898,34 @@ a
|
||||
|
||||
b
|
||||
drop table t1;
|
||||
create table t1 (a char(1)) character set latin1;
|
||||
insert into t1 values (0xD1);
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
D1
|
||||
set histogram_type='json_hb';
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
select decode_histogram(hist_type, histogram)
|
||||
from mysql.column_stats
|
||||
where db_name=database() and table_name='t1';
|
||||
decode_histogram(hist_type, histogram)
|
||||
{
|
||||
"histogram_hb_v2": [
|
||||
{
|
||||
"start": "Ñ",
|
||||
"end": "Ñ",
|
||||
"size": 1,
|
||||
"ndv": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
select * from t1;
|
||||
a
|
||||
Ñ
|
||||
drop table t1;
|
||||
#
|
||||
# ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivity ...
|
||||
# (Just the testcase)
|
||||
|
Reference in New Issue
Block a user