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":1848.199999988079,"ttfb":815.0999999642372,"pageVisibility":"visible","entityId":128519,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"201e418b-fe51-4654-bd3d-58a495bd528f","navigationType":0,"readyForUser":1987.5999999642372,"redirectCount":0,"resourceLoadedEnd":1629.3999999761581,"resourceLoadedStart":822.1999999880791,"resourceTiming":[{"duration":517.3000000119209,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":822.1999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":822.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1339.5,"responseStart":0,"secureConnectionStart":0},{"duration":517.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":822.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":822.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1340.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":651.0999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":822.6999999880791,"connectEnd":822.6999999880791,"connectStart":822.6999999880791,"domainLookupEnd":822.6999999880791,"domainLookupStart":822.6999999880791,"fetchStart":822.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":1342.3999999761581,"responseEnd":1473.7999999523163,"responseStart":1359.2999999523163,"secureConnectionStart":822.6999999880791},{"duration":754.6999999880791,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":822.8999999761581,"connectEnd":822.8999999761581,"connectStart":822.8999999761581,"domainLookupEnd":822.8999999761581,"domainLookupStart":822.8999999761581,"fetchStart":822.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1354.0999999642372,"responseEnd":1577.5999999642372,"responseStart":1368.5999999642372,"secureConnectionStart":822.8999999761581},{"duration":548.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":823,"connectEnd":823,"connectStart":823,"domainLookupEnd":823,"domainLookupStart":823,"fetchStart":823,"redirectEnd":0,"redirectStart":0,"requestStart":1354.2999999523163,"responseEnd":1371.2999999523163,"responseStart":1370.0999999642372,"secureConnectionStart":823},{"duration":549.6999999880791,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":823.1999999880791,"connectEnd":823.1999999880791,"connectStart":823.1999999880791,"domainLookupEnd":823.1999999880791,"domainLookupStart":823.1999999880791,"fetchStart":823.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":1356.0999999642372,"responseEnd":1372.8999999761581,"responseStart":1371.699999988079,"secureConnectionStart":823.1999999880791},{"duration":550.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":823.3999999761581,"connectEnd":823.3999999761581,"connectStart":823.3999999761581,"domainLookupEnd":823.3999999761581,"domainLookupStart":823.3999999761581,"fetchStart":823.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1356.5,"responseEnd":1374.2999999523163,"responseStart":1373.199999988079,"secureConnectionStart":823.3999999761581},{"duration":532,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":823.5999999642372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":823.5999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1355.5999999642372,"responseStart":0,"secureConnectionStart":0},{"duration":555,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":823.7999999523163,"connectEnd":823.7999999523163,"connectStart":823.7999999523163,"domainLookupEnd":823.7999999523163,"domainLookupStart":823.7999999523163,"fetchStart":823.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1361.3999999761581,"responseEnd":1378.7999999523163,"responseStart":1377.5999999642372,"secureConnectionStart":823.7999999523163},{"duration":536.6999999880791,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":824,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":824,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1360.699999988079,"responseStart":0,"secureConnectionStart":0},{"duration":558.1000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":824.0999999642372,"connectEnd":824.0999999642372,"connectStart":824.0999999642372,"domainLookupEnd":824.0999999642372,"domainLookupStart":824.0999999642372,"fetchStart":824.0999999642372,"redirectEnd":0,"redirectStart":0,"requestStart":1365.5999999642372,"responseEnd":1382.199999988079,"responseStart":1380.699999988079,"secureConnectionStart":824.0999999642372},{"duration":800.1999999880791,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":827.8999999761581,"connectEnd":827.8999999761581,"connectStart":827.8999999761581,"domainLookupEnd":827.8999999761581,"domainLookupStart":827.8999999761581,"fetchStart":827.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1616.8999999761581,"responseEnd":1628.0999999642372,"responseStart":1627.3999999761581,"secureConnectionStart":827.8999999761581},{"duration":801.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":827.8999999761581,"connectEnd":827.8999999761581,"connectStart":827.8999999761581,"domainLookupEnd":827.8999999761581,"domainLookupStart":827.8999999761581,"fetchStart":827.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":1618.0999999642372,"responseEnd":1629.3999999761581,"responseStart":1628.5999999642372,"secureConnectionStart":827.8999999761581},{"duration":168.80000001192093,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1603.2999999523163,"connectEnd":1603.2999999523163,"connectStart":1603.2999999523163,"domainLookupEnd":1603.2999999523163,"domainLookupStart":1603.2999999523163,"fetchStart":1603.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1741.199999988079,"responseEnd":1772.0999999642372,"responseStart":1771.5,"secureConnectionStart":1603.2999999523163}],"fetchStart":0,"domainLookupStart":495,"domainLookupEnd":558,"connectStart":559,"connectEnd":579,"secureConnectionStart":567,"requestStart":580,"responseStart":815,"responseEnd":824,"domLoading":818,"domInteractive":2052,"domContentLoadedEventStart":2052,"domContentLoadedEventEnd":2101,"domComplete":3188,"loadEventStart":3188,"loadEventEnd":3189,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2026.5},{"name":"bigPipe.sidebar-id.end","time":2027.199999988079},{"name":"bigPipe.activity-panel-pipe-id.start","time":2027.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":2029.699999988079},{"name":"activityTabFullyLoaded","time":2121.399999976158}],"measures":[],"correlationId":"b2b030d02e6001","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":156,"dbReadsTimeInMs":14,"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.