Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json_objectagg() is not compatible with MySQL on varbinary type #25053

Closed
Tracked by #36993
tangenta opened this issue Jun 2, 2021 · 1 comment · Fixed by #37337 · May be fixed by #27119
Closed
Tracked by #36993

json_objectagg() is not compatible with MySQL on varbinary type #25053

tangenta opened this issue Jun 2, 2021 · 1 comment · Fixed by #37337 · May be fixed by #27119
Assignees
Labels
component/json severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

tangenta commented Jun 2, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table if exists tbl_0;
create table tbl_0 (col_2 int, col_3 varbinary(163));
insert into tbl_0 values (1,'o');
select json_objectagg( col_2, col_3 ) from tbl_0;

2. What did you expect to see? (Required)

MySQL returns a strange string:

+--------------------------------+
| json_objectagg( col_2, col_3 ) |
+--------------------------------+
| {"1": "base64:type15:bw=="}    |
+--------------------------------+

3. What did you see instead (Required)

TiDB returns o for varbinary:

+--------------------------------+
| json_objectagg( col_2, col_3 ) |
+--------------------------------+
| {"1": "o"}                     |
+--------------------------------+

4. What is your TiDB version? (Required)

commit 0158f71cda6ccbbd382c6e8759904234baca259c (HEAD, upstream/master)
Author: tangenta <[email protected]>
Date:   Tue Jun 1 18:59:37 2021 +0800

    ddl: support type conversion between non-varchar and varchar (#24959)
@tangenta tangenta added the type/bug The issue is confirmed as a bug. label Jun 2, 2021
@tangenta tangenta changed the title json_objectagg() is not compatible with MySQL json_objectagg() is not compatible with MySQL on varbinary type Jun 2, 2021
@wzru
Copy link
Contributor

wzru commented Jul 14, 2021

/assign @wzru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/json severity/moderate sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
5 participants