Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.0.30 , 10.1.23 , 10.2.5 , 5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL)
With optimizer_switch materialization=on, the following test case fails with wrong results in MariaDB (tested 10.0.30, 10.1.23, and 10.2.5). This works with MySQL 5.6 and 5.7, and also with MariaDB if you set materialization=off.
Here is sample output from the sql file (attached) when piped into MariaDB 10.2.5:
>mysql -uroot -pxxx -P3317 -e"select @@version\Gselect @@optimizer_switch\G"
*************************** 1. row ***************************
@@version: 10.2.5-MariaDB
*************************** 1. row ***************************
@@optimizer_switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,
firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=
on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
C:\>mysql -uroot -pxxx -P3317 < test_case_obfuscated.sql
assignment_group
ebb4620037332000158bbfc8bcbe5d89
C:\>mysql -uroot -pxxx -P3317 -e"set @@global.optimizer_switch='materialization=off'"
C:\>mysql -uroot -pxxx -P3317 -e"select @@version\Gselect @@optimizer_switch\G"
*************************** 1. row ***************************
@@version: 10.2.5-MariaDB
*************************** 1. row ***************************
@@optimizer_switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,
firstmatch=on,loosescan=on,materialization=off,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=
on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
C:\>mysql -uroot -pxxx -P3317 < test_case_obfuscated.sql
assignment_group
ebb4620037332000158bbfc8bcbe5d89
ec70316637232000158bbfc8bcbe5d60
3120fd2637232000158bbfc8bcbe5d42
e08fad2637232000158bbfc8bcbe5d39
{"report":{"fcp":796.2999999523163,"ttfb":161.29999995231628,"pageVisibility":"visible","entityId":61419,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"f3ac741d-8ec1-4f3b-b22c-1cc4a4753723","navigationType":0,"readyForUser":863.3999999761581,"redirectCount":0,"resourceLoadedEnd":841,"resourceLoadedStart":170,"resourceTiming":[{"duration":152.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":170,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":152.70000004768372,"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":170.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":170.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":161.69999992847443,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":170.39999997615814,"connectEnd":170.39999997615814,"connectStart":170.39999997615814,"domainLookupEnd":170.39999997615814,"domainLookupStart":170.39999997615814,"fetchStart":170.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":170.39999997615814,"responseEnd":332.09999990463257,"responseStart":332.09999990463257,"secureConnectionStart":170.39999997615814},{"duration":236.29999995231628,"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":170.79999995231628,"connectEnd":170.79999995231628,"connectStart":170.79999995231628,"domainLookupEnd":170.79999995231628,"domainLookupStart":170.79999995231628,"fetchStart":170.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":170.79999995231628,"responseEnd":407.09999990463257,"responseStart":407.09999990463257,"secureConnectionStart":170.79999995231628},{"duration":239.79999995231628,"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":171,"connectEnd":171,"connectStart":171,"domainLookupEnd":171,"domainLookupStart":171,"fetchStart":171,"redirectEnd":0,"redirectStart":0,"requestStart":171,"responseEnd":410.7999999523163,"responseStart":410.7999999523163,"secureConnectionStart":171},{"duration":240.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":171.09999990463257,"connectEnd":171.09999990463257,"connectStart":171.09999990463257,"domainLookupEnd":171.09999990463257,"domainLookupStart":171.09999990463257,"fetchStart":171.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":171.09999990463257,"responseEnd":411.59999990463257,"responseStart":411.59999990463257,"secureConnectionStart":171.09999990463257},{"duration":241.30000007152557,"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":171.09999990463257,"connectEnd":171.09999990463257,"connectStart":171.09999990463257,"domainLookupEnd":171.09999990463257,"domainLookupStart":171.09999990463257,"fetchStart":171.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":171.09999990463257,"responseEnd":412.39999997615814,"responseStart":412.39999997615814,"secureConnectionStart":171.09999990463257},{"duration":242,"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":171.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":413.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":241.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":171.39999997615814,"connectEnd":171.39999997615814,"connectStart":171.39999997615814,"domainLookupEnd":171.39999997615814,"domainLookupStart":171.39999997615814,"fetchStart":171.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":171.39999997615814,"responseEnd":413.2999999523163,"responseStart":413.2999999523163,"secureConnectionStart":171.39999997615814},{"duration":242.5,"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":171.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414,"responseStart":0,"secureConnectionStart":0},{"duration":242.5,"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":171.59999990463257,"connectEnd":171.59999990463257,"connectStart":171.59999990463257,"domainLookupEnd":171.59999990463257,"domainLookupStart":171.59999990463257,"fetchStart":171.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":171.59999990463257,"responseEnd":414.09999990463257,"responseStart":414.09999990463257,"secureConnectionStart":171.59999990463257},{"duration":425.59999990463257,"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":181,"connectEnd":181,"connectStart":181,"domainLookupEnd":181,"domainLookupStart":181,"fetchStart":181,"redirectEnd":0,"redirectStart":0,"requestStart":181,"responseEnd":606.5999999046326,"responseStart":606.5999999046326,"secureConnectionStart":181},{"duration":658.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":182.79999995231628,"connectEnd":182.79999995231628,"connectStart":182.79999995231628,"domainLookupEnd":182.79999995231628,"domainLookupStart":182.79999995231628,"fetchStart":182.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":182.79999995231628,"responseEnd":841,"responseStart":841,"secureConnectionStart":182.79999995231628},{"duration":279.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":548,"connectEnd":548,"connectStart":548,"domainLookupEnd":548,"domainLookupStart":548,"fetchStart":548,"redirectEnd":0,"redirectStart":0,"requestStart":548,"responseEnd":827.7999999523163,"responseStart":827.6999999284744,"secureConnectionStart":548},{"duration":155.60000002384186,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":773.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":773.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":929.3999999761581,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":28,"responseStart":161,"responseEnd":182,"domLoading":164,"domInteractive":927,"domContentLoadedEventStart":927,"domContentLoadedEventEnd":970,"domComplete":1701,"loadEventStart":1701,"loadEventEnd":1702,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":908.5999999046326},{"name":"bigPipe.sidebar-id.end","time":909.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":909.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":911.8999999761581},{"name":"activityTabFullyLoaded","time":981.7999999523163}],"measures":[],"correlationId":"ef5fe6719ca1b3","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":71,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}