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
- relates to
-
MDEV-7317
Make an index ignorable to the optimizer
-
-
Closed
{"report":{"fcp":899.1999998092651,"ttfb":219.5,"pageVisibility":"visible","entityId":128519,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":1,"journeyId":"362ea48e-9fd8-47f7-882a-77cd14719ac0","navigationType":0,"readyForUser":967.1999998092651,"redirectCount":0,"resourceLoadedEnd":682.4000000953674,"resourceLoadedStart":229.59999990463257,"resourceTiming":[{"duration":83.2000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":229.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":312.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":83.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":229.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":229.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":313.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":129.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":230,"connectEnd":230,"connectStart":230,"domainLookupEnd":230,"domainLookupStart":230,"fetchStart":230,"redirectEnd":0,"redirectStart":0,"requestStart":318.09999990463257,"responseEnd":359.69999980926514,"responseStart":334.19999980926514,"secureConnectionStart":230},{"duration":192.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":230.19999980926514,"connectEnd":230.19999980926514,"connectStart":230.19999980926514,"domainLookupEnd":230.19999980926514,"domainLookupStart":230.19999980926514,"fetchStart":230.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":321,"responseEnd":422.90000009536743,"responseStart":346.19999980926514,"secureConnectionStart":230.19999980926514},{"duration":125.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":230.30000019073486,"connectEnd":230.30000019073486,"connectStart":230.30000019073486,"domainLookupEnd":230.30000019073486,"domainLookupStart":230.30000019073486,"fetchStart":230.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":323.5,"responseEnd":355.40000009536743,"responseStart":354.90000009536743,"secureConnectionStart":230.30000019073486},{"duration":128.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":230.5,"connectEnd":230.5,"connectStart":230.5,"domainLookupEnd":230.5,"domainLookupStart":230.5,"fetchStart":230.5,"redirectEnd":0,"redirectStart":0,"requestStart":324.59999990463257,"responseEnd":359.40000009536743,"responseStart":358.80000019073486,"secureConnectionStart":230.5},{"duration":138.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":230.69999980926514,"connectEnd":230.69999980926514,"connectStart":230.69999980926514,"domainLookupEnd":230.69999980926514,"domainLookupStart":230.69999980926514,"fetchStart":230.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":327.5,"responseEnd":368.80000019073486,"responseStart":367.19999980926514,"secureConnectionStart":230.69999980926514},{"duration":95,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":230.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":325.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":112.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":231,"connectEnd":330.19999980926514,"connectStart":330.19999980926514,"domainLookupEnd":330.19999980926514,"domainLookupStart":330.19999980926514,"fetchStart":231,"redirectEnd":0,"redirectStart":0,"requestStart":330.40000009536743,"responseEnd":343.80000019073486,"responseStart":342.69999980926514,"secureConnectionStart":330.19999980926514},{"duration":96.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":231.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":231.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":327.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":116.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":231.30000019073486,"connectEnd":231.30000019073486,"connectStart":231.30000019073486,"domainLookupEnd":231.30000019073486,"domainLookupStart":231.30000019073486,"fetchStart":231.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":331.30000019073486,"responseEnd":347.5,"responseStart":344,"secureConnectionStart":231.30000019073486},{"duration":433.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":248.40000009536743,"connectEnd":248.40000009536743,"connectStart":248.40000009536743,"domainLookupEnd":248.40000009536743,"domainLookupStart":248.40000009536743,"fetchStart":248.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":422.5,"responseEnd":682.3000001907349,"responseStart":678.3000001907349,"secureConnectionStart":248.40000009536743},{"duration":409.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":272.59999990463257,"connectEnd":272.59999990463257,"connectStart":272.59999990463257,"domainLookupEnd":272.59999990463257,"domainLookupStart":272.59999990463257,"fetchStart":272.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":431.09999990463257,"responseEnd":682.4000000953674,"responseStart":679.4000000953674,"secureConnectionStart":272.59999990463257},{"duration":195.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":630,"connectEnd":630,"connectStart":630,"domainLookupEnd":630,"domainLookupStart":630,"fetchStart":630,"redirectEnd":0,"redirectStart":0,"requestStart":790.9000000953674,"responseEnd":825.6999998092651,"responseStart":824.8000001907349,"secureConnectionStart":630},{"duration":141.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":870.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":870.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1012.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":134.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":885.5,"connectEnd":885.5,"connectStart":885.5,"domainLookupEnd":885.5,"domainLookupStart":885.5,"fetchStart":885.5,"redirectEnd":0,"redirectStart":0,"requestStart":982.0999999046326,"responseEnd":1020.4000000953674,"responseStart":1019.8000001907349,"secureConnectionStart":885.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":52,"responseStart":219,"responseEnd":258,"domLoading":223,"domInteractive":1111,"domContentLoadedEventStart":1111,"domContentLoadedEventEnd":1161,"domComplete":1298,"loadEventStart":1298,"loadEventEnd":1298,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1014.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1015.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1015.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1017.8000001907349},{"name":"activityTabFullyLoaded","time":1186.8000001907349}],"measures":[],"correlationId":"17423641dda87","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
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.