Details
-
Bug
-
Status: In Progress (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.8.1, 10.5, 10.6, 10.11, 11.4
Description
I run the following statements, in which the query returns an incorrect result.
CREATE TABLE t1 (c1 TINYBLOB, UNIQUE (c1(2))); |
INSERT INTO t1 (c1) VALUES (1); |
SELECT c1 FROM t1 WHERE 'a' BETWEEN 0 AND (c1); -- actual: {}, expected: {1} |
I got the following query plan.
mysql> EXPLAIN SELECT c1 FROM t1 WHERE 'a' BETWEEN 0 AND (c1);
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
| 1 | SIMPLE | t1 | range | c1 | c1 | 5 | NULL | 1 | Using where |
|
+------+-------------+-------+-------+---------------+------+---------+------+------+-------------+
|
Attachments
Issue Links
- relates to
-
MDEV-36211 Incorrect query result for the BLOB type with NOT NULL constraint
-
- Confirmed
-