Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
CREATE TABLE t (a INT AUTO_INCREMENT, b INT, UNIQUE(b,a DESC)) ENGINE=MyISAM; |
INSERT IGNORE INTO t (b) VALUES (10),(10),(10); |
|
SELECT * FROM t; |
|
# Cleanup
|
DROP TABLE t; |
preview-10.8-MDEV-13756-desc-indexes 43444ff5 |
INSERT IGNORE INTO t (b) VALUES (10),(10),(10); |
Warnings:
|
Warning 1062 Duplicate entry '10-2' for key 'b' |
SELECT * FROM t; |
a b
|
2 10
|
1 10
|
Without the DESC attribute, the value of `a` would continue to be auto-incremented, no warnings/errors would occur upon INSERT, and there would be 3 values in the table at the end:
Expected result (apart from sorting in SELECT) |
INSERT IGNORE INTO t (b) VALUES (10),(10),(10); |
SELECT * FROM t; |
a b
|
1 10
|
2 10
|
3 10
|
Also reproducible with Aria.
Attachments
Issue Links
- is caused by
-
MDEV-13756 Implement descending index: KEY (a DESC, b ASC)
- Closed