Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
SET max_statement_time= 2; # Just so that if it hangs, then not forever |
|
DROP TABLE IF EXISTS t3; |
CREATE TABLE t (c CHAR(8), KEY(c DESC)) ENGINE=MyISAM CHARACTER SET utf8mb4; |
INSERT INTO t VALUES (''),('foo'),(NULL),(''),('bar'); |
SELECT DISTINCT c FROM t; |
SELECT c FROM t; |
|
# Cleanup
|
DROP TABLE t; |
The first query returns three values, without NULL:
preview-10.8-MDEV-13756-desc-indexes 47c18283 |
SELECT DISTINCT c FROM t; |
c
|
|
bar
|
foo
|
If count is added, it claims there are 3 empty strings instead of 2.
The second query, plain SELECT without DISTINCT, hangs (subject to max_statement_time).
Reproducible with MyISAM and Aria. Not reproducible with InnoDB.
Reproducible with big5, utf8mb4, utf8mb3. Not reproducible with latin1. I didn't try other charsets.
Not reproducible without DESC index.
Attachments
Issue Links
- is caused by
-
MDEV-13756 Implement descending index: KEY (a DESC, b ASC)
- Closed
- relates to
-
MDEV-27347 MyISAM/Aria table is marked as crashed upon updating NULL values in DESC index
- Closed