Commit b6455479 authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

MDEV-15230: column_json breaks cyrillic in 10.1.31

Use unsigned comparison.
parent cb537480
......@@ -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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment