-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
contributionThis PR is from a community contributor.This PR is from a community contributor.fuzz/sqlancerseverity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
1. Minimal reproduce step (Required)
CREATE TABLE test1(c0 VARCHAR(4));
INSERT INTO test1 VALUES ('11');
CREATE VIEW v AS (SELECT HEX(CAST(c0 AS BINARY)) AS c0 FROM test1);
SELECT c0 FROM v;
DROP VIEW v;
SELECT c0 FROM (SELECT HEX(CAST(c0 AS BINARY)) AS c0 FROM test1) AS v;
2. What did you expect to see? (Required)
Both queries should produce the same results
In MySQL, both approaches return the same result 3131
3. What did you see instead (Required)
+----------+
| c0 |
+----------+
| 31310000 |
+----------+
+------+
| c0 |
+------+
| 3131 |
+------+
4. What is your TiDB version? (Required)
tiup playground nightly --host 0.0.0.0 --kv 3 --tiflash 3
8.0.11-TiDB-v9.0.0-beta.2.pre-384-g5fab436
Metadata
Metadata
Assignees
Labels
contributionThis PR is from a community contributor.This PR is from a community contributor.fuzz/sqlancerseverity/moderatesig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.