1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-11436 CREATE TABLE .. AS SELECT JSON_OBJECT truncates data.

fix_length_and_dec() didn't calculate the length of the result
        properly.
This commit is contained in:
Alexey Botchkov
2016-12-04 14:22:01 +04:00
parent f391ab4f01
commit b4cbaf0b7c
3 changed files with 16 additions and 2 deletions

View File

@ -68,6 +68,10 @@ select json_remove(@j, '$.a');
select json_object();
select json_object("ki", 1, "mi", "ya");
create table t1 as select json_object('id', 87, 'name', 'carrot') as f;
show create table t1;
select * from t1;
drop table t1;
select json_exists('{"key1":"xxxx", "key2":[1, 2, 3]}', "$.key2");
select json_exists('{"key1":"xxxx", "key2":[1, 2, 3]}', "$.key2[1]");