ConnectSE does not send the WHERE part of an statement in opposite to the docs (https://kb.askmonty.org/en/connect-table-types-mysql-table-type-accessing-mysqlmariadb-tables/) to the remote server.
Given:
CREATE TABLE `federatedconnect` (
|
`id` int(11) NOT NULL,
|
`id2` int(11) DEFAULT NULL
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`='mysql' `TABNAME`='aha' `DBNAME`='test' `OPTION_LIST`='user=me,host=10.0.3.191'
|
Regarding to the docs select * from federatedconnect where id=1 should be sent as: SELECT id,id2 FROM aha WHERE id=1 to the remote server.
Using ngrep I see only: SELECT `id`, `id2` FROM `aha` So all rows are send instead of only one.
The table aha has about 1000 rows. So even another 'proof'.
MariaDB [test]> show status like 'handler_read_rnd_next'; select * from federate_classic where id=1; show status like 'handler_read_rnd_next';
|
+-----------------------+-------+
|
| Variable_name | Value |
|
+-----------------------+-------+
|
| Handler_read_rnd_next | 7347 |
|
+-----------------------+-------+
|
1 row in set (0.00 sec)
|
|
+------+------+
|
| id | id2 |
|
+------+------+
|
| 1 | 4 |
|
+------+------+
|
1 row in set (0.00 sec)
|
|
+-----------------------+-------+
|
| Variable_name | Value |
|
+-----------------------+-------+
|
| Handler_read_rnd_next | 8356 |
|
+-----------------------+-------+
|
1 row in set (0.00 sec)
|
|
So we see all rows are send.
Regads
Erkan
{"report":{"fcp":831.3999999761581,"ttfb":247.89999997615814,"pageVisibility":"visible","entityId":25041,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"29b7d3f8-c1a0-4795-837e-a284de9d5403","navigationType":0,"readyForUser":938.5,"redirectCount":0,"resourceLoadedEnd":551.2000000476837,"resourceLoadedStart":274.60000002384186,"resourceTiming":[{"duration":10.299999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":274.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":274.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":9.899999976158142,"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":275,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":275,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":284.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":165.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":275.10000002384186,"connectEnd":275.10000002384186,"connectStart":275.10000002384186,"domainLookupEnd":275.10000002384186,"domainLookupStart":275.10000002384186,"fetchStart":275.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":290.5,"responseEnd":440.60000002384186,"responseStart":311.10000002384186,"secureConnectionStart":275.10000002384186},{"duration":275.3000000715256,"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":275.89999997615814,"connectEnd":275.89999997615814,"connectStart":275.89999997615814,"domainLookupEnd":275.89999997615814,"domainLookupStart":275.89999997615814,"fetchStart":275.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":290.8000000715256,"responseEnd":551.2000000476837,"responseStart":313,"secureConnectionStart":275.89999997615814},{"duration":36.700000047683716,"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":276,"connectEnd":276,"connectStart":276,"domainLookupEnd":276,"domainLookupStart":276,"fetchStart":276,"redirectEnd":0,"redirectStart":0,"requestStart":291.8000000715256,"responseEnd":312.7000000476837,"responseStart":306.8000000715256,"secureConnectionStart":276},{"duration":44.5,"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":276.10000002384186,"connectEnd":276.10000002384186,"connectStart":276.10000002384186,"domainLookupEnd":276.10000002384186,"domainLookupStart":276.10000002384186,"fetchStart":276.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":293.2000000476837,"responseEnd":320.60000002384186,"responseStart":316.3000000715256,"secureConnectionStart":276.10000002384186},{"duration":44.59999990463257,"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":276.3000000715256,"connectEnd":276.3000000715256,"connectStart":276.3000000715256,"domainLookupEnd":276.3000000715256,"domainLookupStart":276.3000000715256,"fetchStart":276.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":294.5,"responseEnd":320.89999997615814,"responseStart":317.3000000715256,"secureConnectionStart":276.3000000715256},{"duration":17.100000023841858,"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":276.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":276.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":293.5,"responseStart":0,"secureConnectionStart":0},{"duration":76.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":276.39999997615814,"connectEnd":276.39999997615814,"connectStart":276.39999997615814,"domainLookupEnd":276.39999997615814,"domainLookupStart":276.39999997615814,"fetchStart":276.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":303.39999997615814,"responseEnd":352.5,"responseStart":350.2000000476837,"secureConnectionStart":276.39999997615814},{"duration":18.300000071525574,"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":276.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":276.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":294.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":25.200000047683716,"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":276.60000002384186,"connectEnd":276.60000002384186,"connectStart":276.60000002384186,"domainLookupEnd":276.60000002384186,"domainLookupStart":276.60000002384186,"fetchStart":276.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":276.60000002384186,"responseEnd":301.8000000715256,"responseStart":301.8000000715256,"secureConnectionStart":276.60000002384186},{"duration":255.29999995231628,"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":279.60000002384186,"connectEnd":279.60000002384186,"connectStart":279.60000002384186,"domainLookupEnd":279.60000002384186,"domainLookupStart":279.60000002384186,"fetchStart":279.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":328.7000000476837,"responseEnd":534.8999999761581,"responseStart":528.8999999761581,"secureConnectionStart":279.60000002384186},{"duration":255.60000002384186,"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":279.7000000476837,"connectEnd":279.7000000476837,"connectStart":279.7000000476837,"domainLookupEnd":279.7000000476837,"domainLookupStart":279.7000000476837,"fetchStart":279.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":352.7000000476837,"responseEnd":535.3000000715256,"responseStart":530.1000000238419,"secureConnectionStart":279.7000000476837},{"duration":82.09999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":587.8000000715256,"connectEnd":587.8000000715256,"connectStart":587.8000000715256,"domainLookupEnd":587.8000000715256,"domainLookupStart":587.8000000715256,"fetchStart":587.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":637.7000000476837,"responseEnd":669.8999999761581,"responseStart":669.3000000715256,"secureConnectionStart":587.8000000715256},{"duration":153.80000007152557,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":821.8999999761581,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":821.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":975.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":178.89999997615814,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":828.7000000476837,"connectEnd":828.7000000476837,"connectStart":828.7000000476837,"domainLookupEnd":828.7000000476837,"domainLookupStart":828.7000000476837,"fetchStart":828.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":976.3000000715256,"responseEnd":1007.6000000238419,"responseStart":1006.3999999761581,"secureConnectionStart":828.7000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":56,"responseStart":248,"responseEnd":279,"domLoading":252,"domInteractive":997,"domContentLoadedEventStart":997,"domContentLoadedEventEnd":1037,"domComplete":1356,"loadEventStart":1356,"loadEventEnd":1356,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":976.2000000476837},{"name":"bigPipe.sidebar-id.end","time":977},{"name":"bigPipe.activity-panel-pipe-id.start","time":977.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":978.6000000238419},{"name":"activityTabFullyLoaded","time":1057.3999999761581}],"measures":[],"correlationId":"bc44518e49ef64","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":94,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
To get the where clause, CONNECT must be called from MariaDB to do so. This depends on the condition
--engine_condition_pushdown=on
Be sure it is ON because it is sometimes OFF by default.