MDEV-15230: column_json breaks cyrillic in 10.1.31
Use unsigned comparison.
This commit is contained in:
parent
cb5374801e
commit
b6455479e5
@ -1883,5 +1883,15 @@ SELECT COLUMN_JSON(COLUMN_CREATE('test','First line\nSecond line')) AS json;
|
||||
json
|
||||
{"test":"First line\u000ASecond line"}
|
||||
#
|
||||
# MDEV-15230: column_json breaks cyrillic in 10.1.31
|
||||
#
|
||||
set names utf8;
|
||||
create table t1 (b blob);
|
||||
insert into t1 values (column_create('description',column_create('title','Описание')));
|
||||
select column_json(b) from t1;
|
||||
column_json(b)
|
||||
{"description":{"title":"Описание"}}
|
||||
drop table t1;
|
||||
#
|
||||
# end of 10.0 tests
|
||||
#
|
||||
|
@ -928,6 +928,15 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('test','"\\\t\n\Z')) AS json;
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('test','First line\nSecond line')) AS json;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15230: column_json breaks cyrillic in 10.1.31
|
||||
--echo #
|
||||
set names utf8;
|
||||
create table t1 (b blob);
|
||||
insert into t1 values (column_create('description',column_create('title','Описание')));
|
||||
select column_json(b) from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # end of 10.0 tests
|
||||
--echo #
|
||||
|
@ -3834,7 +3834,7 @@ my_bool dynstr_append_json_quoted(DYNAMIC_STRING *str,
|
||||
for (i= 0; i < len; i++)
|
||||
{
|
||||
register char c= append[i];
|
||||
if (unlikely(c <= 0x1F))
|
||||
if (unlikely(((uchar)c) <= 0x1F))
|
||||
{
|
||||
if (lim < 5)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user