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
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is caused by |
Description |
{code:sql}
--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; {code} {code:sql|title=preview-10.8- 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 {code} When the two ALTERs are executed separately, it works: {code:sql} 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 {code} Not reproducible with MyISAM, Aria. |
{code:sql}
--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; {code} {code:sql|title=preview-10.8- 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 {code} Not reproducible with MyISAM, Aria. When the two ALTERs are executed separately, it works: {code:sql} 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 {code} |
Assignee | Marko Mäkelä [ marko ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Elena Stepanova [ elenst ] |
Fix Version/s | 10.8.1 [ 26815 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Assignee | Elena Stepanova [ elenst ] |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
cannot repeat on c13c1079b7d, likely fixed by commit for
MDEV-27432