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

Bug Case in Left Join #58793

Open
curry-oss opened this issue Jan 8, 2025 · 1 comment
Open

Bug Case in Left Join #58793

curry-oss opened this issue Jan 8, 2025 · 1 comment
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;
DROP TABLE IF EXISTS t1;
CREATE TABLE t0(c0 TEXT(227));
CREATE TABLE t1 LIKE t0;
INSERT INTO t1 VALUES ('');
SELECT COUNT(*) FROM t1 LEFT JOIN t0 ON t0.c0 <> t1.c0 WHERE (NULL AND t1.c0) <=> (t0.c0 IS NOT NULL);

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 COUNT(*) FROM t1 LEFT JOIN t0 ON t0.c0 <> t1.c0 WHERE (NULL AND t1.c0) <=> (t0.c0 IS NOT NULL);
+----------+
| COUNT(*) |
+----------+
|        1 |
+----------+
1 row in set (0.01 sec)

// TiDB
mysql> SELECT COUNT(*) FROM t1 LEFT JOIN t0 ON t0.c0 <> t1.c0 WHERE (NULL AND t1.c0) <=> (t0.c0 IS NOT NULL);
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
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
@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
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