Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5.24, 10.4(EOL)
-
None
Description
When using Spider storage engine on MariaDB 10.5 to connect to a MariaDB 10.6 remote server, if the spider table in your query has an index and is used as part of the query you will get
ERROR 12710 (HY000): Invalid information from remote table 'employees.dept_emp'
|
If you run the following command you get the same error
show index from emp_spider.dept_emp;
|
ERROR 12710 (HY000): Invalid information from remote table 'employees.dept_emp'
|
This issue easily reproducible.
- Create a 10.6 server and load the following schema onto it https://github.com/datacharmer/test_db
- Create a user to use for spider access
- Then build a 10.5 server
- Load the emp_spider_repro.sql
schema onto the 10.5 server
- Be sure use the correct details for creating the server for Spider engine to use
- Run the following commands on the 10.5 server
show index from emp_spider.dept_emp; |
select count(*) from emp_spider.employees; |
select count(*) from emp_spider.employees where emp_no between 1 and 40000; |
The first and last command will return with an error but the second command will succeed
Attachments
Issue Links
- relates to
-
MDEV-7317 Make an index ignorable to the optimizer
-
- Closed
-
Below is a minimal testcase.
Start a 10.6 server with
mtr --start-and-exit && ./client/mysql -uroot -S./mysql-test/var/tmp/mysqld.1.sock test
{shell}
and note the socket. Then run these queries
{code:sql}
create table t (c int, key (c));
create table t1 (c int); # not needed for bug reprod, but just for comparison
create an mtr testcase in a 10.5 build and call mtr on it:
# adjust the socket accordingly
--error 12710
# adjust the socket accordingly
And updating the check on num_fields in {{ spider_db_mbase_result::fetch_table_cardinality()}} fixes it.