Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4.11, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
-
Ubuntu 19.04
Description
Consider the following test case:
CREATE TABLE t0(c0 INT UNIQUE);
|
INSERT INTO t0 VALUES (NULL), (NULL), (NULL), (NULL), (1), (0);
|
SELECT * FROM t0 WHERE c0 < '\n2'; -- expected rows with c0=0 and c0=1, actual: only row with c0=0 is fetched
|
The query only fetches a single row. This is unexpected, because the expression in the WHERE clause evaluates to TRUE for two records:
SELECT c0 < '\n2' FROM t0; -- evaluates to TRUE for two rows
|
When removing the UNIQUE constraint from the column, or inserting fewer NULL values, the query works as expected.
Attachments
Issue Links
- relates to
-
MDEV-21029 Incorrect result for expression with the <=> operator and IS NULL
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Affects Version/s | 5.5 [ 15800 ] | |
Affects Version/s | 10.0 [ 16000 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] |
Fix Version/s | 5.5 [ 15800 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] |
Link |
This issue relates to |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Assignee | Igor Babaev [ igor ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Igor Babaev [ igor ] | Alexander Barkov [ bar ] |
issue.field.resolutiondate | 2019-12-16 12:46:36.0 | 2019-12-16 12:46:36.108 |
Component/s | Data types [ 13906 ] | |
Fix Version/s | 5.5.67 [ 23404 ] | |
Fix Version/s | 10.1.44 [ 23912 ] | |
Fix Version/s | 10.2.31 [ 24017 ] | |
Fix Version/s | 10.3.22 [ 24018 ] | |
Fix Version/s | 10.4.12 [ 24019 ] | |
Fix Version/s | 10.5.1 [ 24029 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 5.5 [ 15800 ] | |
Fix Version/s | 10.0 [ 16000 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link | This issue relates to TODO-2515 [ TODO-2515 ] |
Workflow | MariaDB v3 [ 101203 ] | MariaDB v4 [ 156984 ] |