|
Probably affects other versions too.
The following test sends "select `d` from `test`.`t2` force index(d) order by `d` desc limit 1" to the data node, even though d is not the 0th key (c is). I am not sure why we need to indicate the idx number - it is not shown in show create table as claimed by [1] anyway
--echo #
|
--echo # tmp
|
--echo #
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_init.inc
|
--enable_result_log
|
--enable_query_log
|
|
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
|
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
|
|
create table t2 (c int, d int, primary key (c), key (d));
|
show create table t2;
|
create table t1 (c int, d int, primary key (c), key (d)) ENGINE=Spider
|
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2", idx000 "f d"';
|
show create table t1;
|
/* 13 */ insert into t1 values (42, 23), (37, 93);
|
select max(d) from t1;
|
|
drop table t1, t2;
|
|
drop server srv;
|
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_deinit.inc
|
--enable_result_log
|
--enable_query_log
|
--echo #
|
--echo # end of test tmp
|
--echo #
|
[1] https://mariadb.com/kb/en/spider-table-parameters/#idx000
|