[MDEV-15230] column_json breaks cyrillic in 10.1.31 Created: 2018-02-07  Updated: 2018-03-06  Resolved: 2018-02-07

Status: Closed
Project: MariaDB Server
Component/s: Dynamic Columns
Affects Version/s: 10.0, 10.1, 10.1.31
Fix Version/s: 10.0.35, 10.1.32, 10.2.13, 10.3.5

Type: Bug Priority: Blocker
Reporter: Anton Avramov Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: regression
Environment:

Debian jessie amd64



 Description   

We have upgraded some clients from 10.1.30 to 10.1.31 (the latest package)
Then our app suddenly stopped working on certain places.
After investigation it turns out that column_json started produced invalid data as this:

select column_json(details) from b_client_order_details where client_order_id = 808636
| {"description":{"title":"\u0000\u000.\u0000\u000/\u0000\u000(\u000!\u000!\u0000\u0000\u0000\u000-\u0000\u000(\u0000\u000%","value":"\u0000\u000$\u0000\u000.\u0000\u000/\u000!\u000*\u0000\u000+\u0000\u000-\u0000\u000(\u000!\u000"\u0000\u000%\u0000\u000+\u0000\u000-\u0000\u000. \u000!\u000)\u0000\u000% \u000!\u000!\u0000\u000% \u0000\u000*\u0000\u0000\u0000\u000&\u0000\u000% \u0000\u000*\u0000\u0000\u0000\u000*\u000!\u000*\u0000\u000" \u000!\u000&\u0000\u000"\u000!\u000/\u000!\u000" \u000!\u000)\u0000\u000% \u000!\u000!\u0000\u0000 \u000!\u000&\u0000\u000%\u0000\u000+\u000!\u000#\u0000\u000"\u0000\u000*\u0000\u000(\u000!\u000"\u0000\u000%"}} 

We've downgraded the package to 10.1.30 and it started working again:

select column_json(details) from b_client_order_details where client_order_id = 808636;
| {"description":{"title":"Описание","value":"Допълнително ще се каже какъв цвят ще са целувките"}} 

This is a major blocker since it renders the hole app unusable.



 Comments   
Comment by Elena Stepanova [ 2018-02-07 ]

Thanks for the report. Reproducible on 10.0 and 10.1

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;

Comment by Oleksandr Byelkin [ 2018-02-07 ]

revision-id: b6455479e588fe1309157e8cc77cca10b90942b6 (mariadb-10.0.34-12-gb6455479e58)
parent(s): cb5374801e594282b41883bf38892d4788668df1
author: Oleksandr Byelkin
committer: Oleksandr Byelkin
timestamp: 2018-02-07 18:14:45 +0100
message:

MDEV-15230: column_json breaks cyrillic in 10.1.31

Use unsigned comparison.

Generated at Thu Feb 08 08:19:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.