[MDEV-27633] Wrong result with different direction of index on Spider and underlying tables in handler mode Created: 2022-01-26  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.8
Fix Version/s: 10.11

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: not-10.10

Issue Links:
Problem/Incident
is caused by MDEV-13756 Implement descending index: KEY (a DE... Closed

 Description   

install soname 'ha_spider';
 
set spider_use_handler=3;
set spider_same_server_link= 1;
 
create table t (a int, b char(1), primary key(a));
insert into t VALUES (1,'f'),(2,'g'),(3,'j'), (4,'i'),(5,'h');
 
eval create server s foreign data wrapper mysql options 
(host '127.0.0.1', database 'test', user 'root', port $MASTER_MYPORT);
 
create table ts (a int, b char(1), primary key(a desc))
  engine=Spider COMMENT='wrapper "mysql", srv "s", table "t"';
 
select a, b from ts where a > 0 and b = 'g' order by a;

The query returns an empty result set.

preview-10.8-MDEV-13756-desc-indexes 1c4cbb94655

a	b

The expected result is (2, 'g') row.



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2022-06-09 ]

The variable spider_use_handler has been deleted by MDEV-27256. So, only 10.8 and 10.9 could be affected.

Generated at Thu Feb 08 09:54:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.