You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unexpectedly, when using the index hint, the row is fetched:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
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> CREATE TABLE t0(c0 INT, c1 INT);
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE INDEX i0 ON t0(c0, c1);
Query OK, 0 rows affected (0.00 sec)
mysql> INSERT INTO t0 VALUES (0, 0);
Query OK, 1 row affected (0.00 sec)
mysql> SELECT /*+ USE_INDEX(t0, i0, i0)*/t0.c0 FROM t0 WHERE t0.c1;
+------+
| c0 |
+------+
| 0 |
+------+
1 row in set (0.00 sec)
When omitting the hint, or specifying i0 only once, the row is not fetched, as expected. I found this bug based on the latest master commit b6fcc157442894f048c1cc65cfcc7776e9ed1a72, and checked that it is also reproducible for the 4.0 RC.
The text was updated successfully, but these errors were encountered:
Consider the following statements:
Unexpectedly, when using the index hint, the row is fetched:
When omitting the hint, or specifying
i0
only once, the row is not fetched, as expected. I found this bug based on the latest master commit b6fcc157442894f048c1cc65cfcc7776e9ed1a72, and checked that it is also reproducible for the 4.0 RC.The text was updated successfully, but these errors were encountered: