The same query returns different results if changing the configuration join_cache_incremental:
CREATE TABLE t0(c0 CHAR(100), c1 FLOAT UNIQUE);
|
CREATE TABLE t1(c0 CHAR(100), c1 FLOAT UNIQUE);
|
CREATE TABLE t2(c0 CHAR(100), c1 FLOAT UNIQUE);
|
INSERT INTO t2 VALUES ('a', 1);
|
INSERT INTO t1 VALUES ('b', 2);
|
INSERT INTO t1 VALUES ('', 3);
|
INSERT INTO t0 VALUES ('', 4);
|
INSERT INTO t0 VALUES ('c', 5);
|
|
SET SESSION optimizer_switch = 'join_cache_incremental=on';
|
SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {3}
|
SET SESSION optimizer_switch = 'join_cache_incremental=off';
|
SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {NULL}
|
{"report":{"fcp":872,"ttfb":155.19999992847443,"pageVisibility":"visible","entityId":124841,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6e4a09a0-b2c8-4cd4-9f20-e36ff0fde51c","navigationType":0,"readyForUser":947.5,"redirectCount":0,"resourceLoadedEnd":981.2999999523163,"resourceLoadedStart":159.89999997615814,"resourceTiming":[{"duration":246.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":159.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":406.39999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":246.30000007152557,"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":160.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":160.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":406.5,"responseStart":0,"secureConnectionStart":0},{"duration":259,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":160.29999995231628,"connectEnd":160.29999995231628,"connectStart":160.29999995231628,"domainLookupEnd":160.29999995231628,"domainLookupStart":160.29999995231628,"fetchStart":160.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":160.29999995231628,"responseEnd":419.2999999523163,"responseStart":419.2999999523163,"secureConnectionStart":160.29999995231628},{"duration":348.7000000476837,"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":160.29999995231628,"connectEnd":160.29999995231628,"connectStart":160.29999995231628,"domainLookupEnd":160.29999995231628,"domainLookupStart":160.29999995231628,"fetchStart":160.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":160.29999995231628,"responseEnd":509,"responseStart":509,"secureConnectionStart":160.29999995231628},{"duration":352.5,"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":160.5,"connectEnd":160.5,"connectStart":160.5,"domainLookupEnd":160.5,"domainLookupStart":160.5,"fetchStart":160.5,"redirectEnd":0,"redirectStart":0,"requestStart":160.5,"responseEnd":513,"responseStart":513,"secureConnectionStart":160.5},{"duration":353.2000000476837,"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":160.59999990463257,"connectEnd":160.59999990463257,"connectStart":160.59999990463257,"domainLookupEnd":160.59999990463257,"domainLookupStart":160.59999990463257,"fetchStart":160.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":160.59999990463257,"responseEnd":513.7999999523163,"responseStart":513.7999999523163,"secureConnectionStart":160.59999990463257},{"duration":352.90000009536743,"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":160.59999990463257,"connectEnd":160.59999990463257,"connectStart":160.59999990463257,"domainLookupEnd":160.59999990463257,"domainLookupStart":160.59999990463257,"fetchStart":160.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":160.59999990463257,"responseEnd":513.5,"responseStart":513.5,"secureConnectionStart":160.59999990463257},{"duration":353.8000000715256,"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":160.69999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":160.69999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":514.5,"responseStart":0,"secureConnectionStart":0},{"duration":353.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":160.79999995231628,"connectEnd":160.79999995231628,"connectStart":160.79999995231628,"domainLookupEnd":160.79999995231628,"domainLookupStart":160.79999995231628,"fetchStart":160.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":160.79999995231628,"responseEnd":514.2999999523163,"responseStart":514.1999999284744,"secureConnectionStart":160.79999995231628},{"duration":353.7999999523163,"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":161,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":161,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":514.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":353.8000000715256,"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":161.09999990463257,"connectEnd":161.09999990463257,"connectStart":161.09999990463257,"domainLookupEnd":161.09999990463257,"domainLookupStart":161.09999990463257,"fetchStart":161.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":161.09999990463257,"responseEnd":514.8999999761581,"responseStart":514.7999999523163,"secureConnectionStart":161.09999990463257},{"duration":479.39999997615814,"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":167,"connectEnd":167,"connectStart":167,"domainLookupEnd":167,"domainLookupStart":167,"fetchStart":167,"redirectEnd":0,"redirectStart":0,"requestStart":167,"responseEnd":646.3999999761581,"responseStart":646.3999999761581,"secureConnectionStart":167},{"duration":814.2000000476837,"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":167.09999990463257,"connectEnd":167.09999990463257,"connectStart":167.09999990463257,"domainLookupEnd":167.09999990463257,"domainLookupStart":167.09999990463257,"fetchStart":167.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":167.09999990463257,"responseEnd":981.2999999523163,"responseStart":981.2999999523163,"secureConnectionStart":167.09999990463257},{"duration":72.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":574.8999999761581,"connectEnd":574.8999999761581,"connectStart":574.8999999761581,"domainLookupEnd":574.8999999761581,"domainLookupStart":574.8999999761581,"fetchStart":574.8999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":574.8999999761581,"responseEnd":647.3999999761581,"responseStart":647.3999999761581,"secureConnectionStart":574.8999999761581}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":155,"responseEnd":165,"domLoading":158,"domInteractive":1008,"domContentLoadedEventStart":1009,"domContentLoadedEventEnd":1055,"domComplete":1423,"loadEventStart":1423,"loadEventEnd":1424,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":984.8999999761581},{"name":"bigPipe.sidebar-id.end","time":985.6999999284744},{"name":"bigPipe.activity-panel-pipe-id.start","time":985.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":988.3999999761581},{"name":"activityTabFullyLoaded","time":1073.0999999046326}],"measures":[],"correlationId":"5eac3831e1ac8a","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":85,"dbReadsTimeInMs":8,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
10.4-922db0642b6321ece41adb3232c1616812143573
MariaDB [test]> set statement optimizer_switch = 'join_cache_incremental=on' for SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0);
+------+
| c1 |
+------+
| 3 |
| 3 |
+------+
2 rows in set, 6 warnings (0.001 sec)
MariaDB [test]> show warnings;
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect DECIMAL value: 'b ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
6 rows in set (0.000 sec)
MariaDB [test]> set statement optimizer_switch = 'join_cache_incremental=off' for SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0);
+------+
| c1 |
+------+
| 3 |
| NULL |
+------+
2 rows in set, 5 warnings (0.001 sec)
MariaDB [test]> show warnings;
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect DECIMAL value: 'b ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: 'b ' |
| Warning | 1292 | Truncated incorrect DECIMAL value: ' ' |
+---------+------+-------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.000 sec)