Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b6455479
Commit
b6455479
authored
Feb 07, 2018
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-15230: column_json breaks cyrillic in 10.1.31
Use unsigned comparison.
parent
cb537480
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
mysql-test/r/dyncol.result
mysql-test/r/dyncol.result
+10
-0
mysql-test/t/dyncol.test
mysql-test/t/dyncol.test
+9
-0
mysys/ma_dyncol.c
mysys/ma_dyncol.c
+1
-1
No files found.
mysql-test/r/dyncol.result
View file @
b6455479
...
...
@@ -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
#
mysql-test/t/dyncol.test
View file @
b6455479
...
...
@@ -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
#
mysys/ma_dyncol.c
View file @
b6455479
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment