Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
--source include/have_innodb.inc
|
|
create or replace table t (pk int primary key, i int, key idx(i)) engine=InnoDB; |
show create table t; |
alter table t drop key idx, add key idx(i desc); |
show create table t; |
|
# This works:
|
alter table t drop key idx; |
alter table t add key idx(i desc); |
show create table t; |
|
# Cleanup
|
drop table t; |
preview-10.8-MDEV-13756-desc-indexes 383b51d68 |
alter table t drop key idx, add key idx(i desc); |
show create table t; |
Table Create Table |
t CREATE TABLE `t` ( |
`pk` int(11) NOT NULL, |
`i` int(11) DEFAULT NULL, |
PRIMARY KEY (`pk`), |
KEY `idx` (`i`) |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
Not reproducible with MyISAM, Aria.
When the two ALTERs are executed separately, it works:
alter table t drop key idx; |
alter table t add key idx(i desc); |
show create table t; |
Table Create Table |
t CREATE TABLE `t` ( |
`pk` int(11) NOT NULL, |
`i` int(11) DEFAULT NULL, |
PRIMARY KEY (`pk`), |
KEY `idx` (`i` DESC) |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
Attachments
Issue Links
- is caused by
-
MDEV-13756 Implement descending index: KEY (a DESC, b ASC)
- Closed