Open mrigger opened 4 years ago
Could you please try 4.0.0 rc version? https://github.com/pingcap/tidb/releases/tag/v4.0.0-rc
I can reproduce it based on this version:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.25-TiDB- TiDB Server (Apache License 2.0), MySQL 5.7 compatible
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> DROP DATABASE db0;
Query OK, 0 rows affected (0.02 sec)
mysql> CREATE DATABASE db0;
Query OK, 0 rows affected (0.00 sec)
mysql> USE db0;
Database changed
mysql>
mysql> CREATE TABLE t0(c0 CHAR);
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE TABLE t1(c0 CHAR UNIQUE);
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t1(c0) VALUES ('');
Query OK, 1 row affected (0.00 sec)
mysql> SELECT t0.c0 FROM t0 RIGHT JOIN t1 ON true WHERE t1.c0; -- expected: {}, actual: {NULL}
+------+
| c0 |
+------+
| NULL |
+------+
1 row in set (0.00 sec)
mysql> select tidb_version();
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version:
Git Commit Hash:
Git Branch:
UTC Build Time: 2020-04-15 06:06:10
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
I noticed that I haven't received points for this issue yet. I also checked MySQL 5.7 (using http://sqlfiddle.com), which computes the result I would expect.
/bug P1
Consider the following statements:
Unexpectedly, the query fetches a row:
When removing the
UNIQUE
constraint, theNULL
value is not fetched. MySQL 8.0.19 computes the result I would expect:Environment:
I propose P0 as a bug level, since it matches the following description:
wrong results returned by the query, and inconsistent results returned by the SQL output.