You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
droptable if exists t,blobs,tinyblobs,mediumblobs,longblobs,year,varbin,bin,enum,sett,varchar_binary;
createtablet(c varchar(30) not null, j json, key(c));
createtableblobs(b blob); insert into blobs values(x'cafebabe');
createtabletinyblobs(b tinyblob); insert into tinyblobs values(x'cafebabe');
createtablemediumblobs(b mediumblob); insert into mediumblobs values(x'cafebabe');
createtablelongblobs(b longblob); insert into longblobs values(x'cafebabe');
createtableyear(y year); insert into year values('1992');
createtablevarbin(b varbinary(40)); insert into varbin values(x'cafebabe');
createtablebin(b binary(40)); insert into varbin values(x'cafebabe');
createtableenum(e enum('a', 'b', 'c')); insert into enum values ('b');
createtablesett(e set('a', 'b', 'c')); insert into sett values ('b,c');
createtablevarchar_binary(c varchar(30) character set'binary'); insert into varchar_binary values ('foo');
insert into t(c,j) (select'opaque_mysql_type_enum', cast(e as json) from enum);
insert into t(c,j) (select'opaque_mysql_type_bit' ,cast(x'cafe'as json));
insert into t(c,j) (select'opaque_mysql_type_blob' ,cast(b as json) from blobs);
insert into t(c,j) (select'opaque_mysql_type_longblob',cast(b as json) from longblobs);
insert into t(c,j) (select'opaque_mysql_type_mediumblob',cast(b as json) from mediumblobs);
insert into t(c,j) (select'opaque_mysql_type_tinyblob' ,cast(b as json) from tinyblobs);
insert into t(c,j) (select'opaque_mysql_type_varchar' ,cast(c as json) from varchar_binary);
..
mysql>insert into t(c,j) (select'opaque_mysql_type_enum', cast(e as json) from enum);
ERROR 3140 (22032): Invalid JSON text: The document root must not be followed by other values.
mysql>select tidb_version()\G
***************************1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-859-gccfc9b2ad
Edition: Community
Git Commit Hash: ccfc9b2ad0dcf8e447210de5f559d7fc208db968
Git Branch: master
UTC Build Time: 2020-07-2909:37:45
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row inset (0.00 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
In MySQL
In TiDB
The text was updated successfully, but these errors were encountered: