Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Not a Bug
-
N/A
-
None
Description
Upon creation of Spider tables, indexes are accepted and stored with the table definition. Now with the addition of the DESC attribute, it is accepted and stored as well.
The redundancy isn't new – the indexes themselves apparently aren't used in any way, and why they are retained in the table definition is in itself questionable. But it's legacy now. For the DESC attribute however, the general tendency seems to be to only keep it when it has real effect, so maybe it shouldn't be there.
--source include/have_innodb.inc
|
|
install soname 'ha_spider'; |
set spider_same_server_link= on; |
|
eval create server s foreign data wrapper mysql options |
(host '127.0.0.1', database 'test', user 'root', port $MASTER_MYPORT); |
|
create or replace table t (id int primary key) engine=InnoDB; |
create or replace table t_sp (id int, key(id desc)) engine=Spider COMMENT='wrapper "mysql", srv "s", table "t"'; |
|
select * from t_sp; |
show create table t_sp; |
preview-10.8-MDEV-13756-desc-indexes 43444ff5 |
show create table t_sp; |
Table Create Table |
t_sp CREATE TABLE `t_sp` ( |
`id` int(11) DEFAULT NULL, |
KEY `id` (`id` DESC) |
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='wrapper "mysql", srv "s", table "t"' |
Attachments
Issue Links
- is caused by
-
MDEV-13756 Implement descending index: KEY (a DESC, b ASC)
- Closed
- relates to
-
MDEV-27590 Auto-increment on Spider tables with DESC PK does not work properly
- Closed