Spider seems to ignore syntax errors in the connection string that it parses from the table's COMMENT field.
e.g. if I do the following on the remote server:
CREATE DATABASE spider_test;
|
|
GRANT ALL PRIVILEGES ON spider_test.* TO spider_test@'%' IDENTIFIED BY 'password';
|
|
USE spider_test;
|
|
CREATE TABLE local_tab (
|
id int auto_increment primary key,
|
str varchar(50)
|
) ENGINE=InnoDB;
|
And then the following on the Spider server:
CREATE SERVER srv1
|
FOREIGN DATA WRAPPER mysql
|
OPTIONS(
|
HOST '172.30.0.249',
|
DATABASE 'spider_test',
|
USER 'spider_test',
|
PASSWORD 'password'
|
);
|
|
CREATE DATABASE spider_test;
|
|
USE spider_test;
|
|
CREATE TABLE spider_tab (
|
id int auto_increment primary key,
|
str varchar(50)
|
) ENGINE=Spider COMMENT='wrapper "mysql", srv "srv1" table "local_tab"';
|
Notice that there is a comma missing after "srv1" and before "table" in the COMMENT field. Regardless, Spider does not complain:
MariaDB [spider_test]> CREATE TABLE spider_tab (
|
-> id int auto_increment primary key,
|
-> str varchar(50)
|
-> ) ENGINE=Spider COMMENT='wrapper "mysql", srv "srv1" table "local_tab"';
|
Query OK, 0 rows affected (0.01 sec)
|
And when the table is queried, the resulting error doesn't make the problem obvious:
MariaDB [spider_test]> SELECT * FROM spider_tab;
|
ERROR 12702 (HY000): Remote table 'spider_test.spider_tab' is not found
|
{"report":{"fcp":1543.3000001907349,"ttfb":460.19999980926514,"pageVisibility":"visible","entityId":66555,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"af0a01ad-9e86-4cdb-afdc-638c7eebe35e","navigationType":0,"readyForUser":1629,"redirectCount":0,"resourceLoadedEnd":2098.300000190735,"resourceLoadedStart":476.5,"resourceTiming":[{"duration":421.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":476.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":476.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":897.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":421.29999923706055,"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":476.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":476.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":898.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":430.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":477,"connectEnd":477,"connectStart":477,"domainLookupEnd":477,"domainLookupStart":477,"fetchStart":477,"redirectEnd":0,"redirectStart":0,"requestStart":477,"responseEnd":907.1999998092651,"responseStart":907.1999998092651,"secureConnectionStart":477},{"duration":556,"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":477.5,"connectEnd":477.5,"connectStart":477.5,"domainLookupEnd":477.5,"domainLookupStart":477.5,"fetchStart":477.5,"redirectEnd":0,"redirectStart":0,"requestStart":477.5,"responseEnd":1033.5,"responseStart":1033.5,"secureConnectionStart":477.5},{"duration":560.1999998092651,"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":477.69999980926514,"connectEnd":477.69999980926514,"connectStart":477.69999980926514,"domainLookupEnd":477.69999980926514,"domainLookupStart":477.69999980926514,"fetchStart":477.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":477.69999980926514,"responseEnd":1037.8999996185303,"responseStart":1037.8000001907349,"secureConnectionStart":477.69999980926514},{"duration":560.3999996185303,"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":478,"connectEnd":478,"connectStart":478,"domainLookupEnd":478,"domainLookupStart":478,"fetchStart":478,"redirectEnd":0,"redirectStart":0,"requestStart":478,"responseEnd":1038.3999996185303,"responseStart":1038.3999996185303,"secureConnectionStart":478},{"duration":560.7000007629395,"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":478.0999994277954,"connectEnd":478.0999994277954,"connectStart":478.0999994277954,"domainLookupEnd":478.0999994277954,"domainLookupStart":478.0999994277954,"fetchStart":478.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":478.0999994277954,"responseEnd":1038.8000001907349,"responseStart":1038.8000001907349,"secureConnectionStart":478.0999994277954},{"duration":579.8000001907349,"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":478.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":478.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1058.5,"responseStart":0,"secureConnectionStart":0},{"duration":560.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":479,"connectEnd":479,"connectStart":479,"domainLookupEnd":479,"domainLookupStart":479,"fetchStart":479,"redirectEnd":0,"redirectStart":0,"requestStart":479,"responseEnd":1039.1999998092651,"responseStart":1039.1999998092651,"secureConnectionStart":479},{"duration":579.5,"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":479.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":479.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1058.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":560.5999994277954,"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":479.30000019073486,"connectEnd":479.30000019073486,"connectStart":479.30000019073486,"domainLookupEnd":479.30000019073486,"domainLookupStart":479.30000019073486,"fetchStart":479.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":479.30000019073486,"responseEnd":1039.8999996185303,"responseStart":1039.8999996185303,"secureConnectionStart":479.30000019073486},{"duration":653.5999994277954,"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":498.80000019073486,"connectEnd":498.80000019073486,"connectStart":498.80000019073486,"domainLookupEnd":498.80000019073486,"domainLookupStart":498.80000019073486,"fetchStart":498.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":498.80000019073486,"responseEnd":1152.3999996185303,"responseStart":1152.3999996185303,"secureConnectionStart":498.80000019073486},{"duration":1558.3000001907349,"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":503.8999996185303,"connectEnd":503.8999996185303,"connectStart":503.8999996185303,"domainLookupEnd":503.8999996185303,"domainLookupStart":503.8999996185303,"fetchStart":503.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":503.8999996185303,"responseEnd":2062.199999809265,"responseStart":2062.199999809265,"secureConnectionStart":503.8999996185303},{"duration":192,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1070.6999998092651,"connectEnd":1070.6999998092651,"connectStart":1070.6999998092651,"domainLookupEnd":1070.6999998092651,"domainLookupStart":1070.6999998092651,"fetchStart":1070.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1070.6999998092651,"responseEnd":1262.6999998092651,"responseStart":1262.6999998092651,"secureConnectionStart":1070.6999998092651},{"duration":645.3999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1452.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1452.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2097.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":645.2000007629395,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1453.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1453.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2098.300000190735,"responseStart":0,"secureConnectionStart":0},{"duration":668.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1454,"connectEnd":1454,"connectStart":1454,"domainLookupEnd":1454,"domainLookupStart":1454,"fetchStart":1454,"redirectEnd":0,"redirectStart":0,"requestStart":1454,"responseEnd":2122.8999996185303,"responseStart":2122.8999996185303,"secureConnectionStart":1454},{"duration":676.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1454.5,"connectEnd":1454.5,"connectStart":1454.5,"domainLookupEnd":1454.5,"domainLookupStart":1454.5,"fetchStart":1454.5,"redirectEnd":0,"redirectStart":0,"requestStart":1454.5,"responseEnd":2131.3999996185303,"responseStart":2131.3999996185303,"secureConnectionStart":1454.5},{"duration":677.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1455.3999996185303,"connectEnd":1455.3999996185303,"connectStart":1455.3999996185303,"domainLookupEnd":1455.3999996185303,"domainLookupStart":1455.3999996185303,"fetchStart":1455.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1455.3999996185303,"responseEnd":2132.8999996185303,"responseStart":2132.800000190735,"secureConnectionStart":1455.3999996185303},{"duration":649.7999992370605,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1535.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1535.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2185.0999994277954,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":301,"responseStart":461,"responseEnd":504,"domLoading":465,"domInteractive":2121,"domContentLoadedEventStart":2121,"domContentLoadedEventEnd":2180,"domComplete":2676,"loadEventStart":2676,"loadEventEnd":2677,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2076},{"name":"bigPipe.sidebar-id.end","time":2076.8999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":2077},{"name":"bigPipe.activity-panel-pipe-id.end","time":2078.0999994277954},{"name":"activityTabFullyLoaded","time":2200.5999994277954}],"measures":[],"correlationId":"830c1524d41944","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":93,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
As per the review comments, I have extended the new Spider infrastructure to include the parsing of UDF parameters, in addition to the parsing of connection information.
Fix is pushed to 10.3 and 10.2.