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

Wrong Result in Cast Blob to Json #58777

Open
curry-oss opened this issue Jan 8, 2025 · 3 comments
Open

Wrong Result in Cast Blob to Json #58777

curry-oss opened this issue Jan 8, 2025 · 3 comments
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. type/bug The issue is confirmed as a bug.

Comments

@curry-oss
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 BLOB);
INSERT INTO t0 VALUES ('1xx');

SELECT t0.c0 FROM t0 WHERE CAST(t0.c0 AS JSON);

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

see the following case:

3. What did you see instead (Required)

// MySQL 8.4.1
MySQL [test]> SELECT t0.c0 FROM t0 WHERE CAST(t0.c0 AS JSON);
+------+
| c0   |
+------+
| 1xx  |
+------+
1 row in set, 1 warning (0.00 sec)

// TiDB
mysql> SELECT t0.c0 FROM t0 WHERE CAST(t0.c0 AS JSON);
+------------+
| c0         |
+------------+
| 0x317878   |
+------------+
1 row in set (0.04 sec)

4. What is your TiDB version? (Required)

TiDB v8.5.0

@curry-oss curry-oss added the type/bug The issue is confirmed as a bug. label Jan 8, 2025
Copy link

ti-chi-bot bot commented Jan 8, 2025

@curry-oss: The label(s) affect-8.5.0 cannot be applied. These labels are supported: fuzz/sqlancer, fuzz/comp, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-8.1, needs-cherry-pick-release-8.5, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, affects-8.1, affects-8.4, affects-8.5, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-8.1, may-affects-8.5.

In response to this:

/label affect-8.5.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@curry-oss
Copy link
Author

/label affects-8.5

@ti-chi-bot ti-chi-bot bot added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Jan 8, 2025
Copy link

ti-chi-bot bot commented Jan 8, 2025

@curry-oss: The label(s) affect-8.5.0 cannot be applied. These labels are supported: fuzz/sqlancer, fuzz/comp, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, needs-more-info, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-8.1, needs-cherry-pick-release-8.5, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, affects-8.1, affects-8.4, affects-8.5, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-8.1, may-affects-8.5.

In response to this:

/label affect-8.5.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant