MDEV-5721 is not fixed properly. This test case still fails:
CREATE TABLE t1 (i INT, state VARCHAR(995)) ENGINE=MyISAM;
|
INSERT INTO t1 VALUES (2,'Louisiana'),(9,'Maine');
|
|
CREATE TABLE t2 (state VARCHAR(995), j INT) ENGINE=MyISAM;
|
INSERT INTO t2 VALUES ('Louisiana',9),('Alaska',5);
|
INSERT INTO t2 SELECT t2.* FROM t2 JOIN t2 AS t3 JOIN t2 AS t4 JOIN t2 AS t5;
|
|
SET @@max_heap_table_size= 16384;
|
set @@optimizer_switch='derived_merge=OFF';
|
|
SELECT * FROM t1 AS t1_1 LEFT JOIN ( t1 AS t1_2 INNER JOIN (SELECT * FROM t2) v2 ON t1_2.i = j ) ON t1_1.state = v2.state;
|
|
DROP TABLE t1, t2;
|
Due to differences in:
1. key length computation: key_length() in check_tmp_key vs pack_length() in create_internal_tmp_table
2. key length comparing:
"key_len <= MI_MAX_KEY_LENGTH" in check_tmp_table
vs
"keyinfo->key_length >= table->file->max_key_length()" in create_internal_tmp_table
{"report":{"fcp":879.8000001907349,"ttfb":195.5,"pageVisibility":"visible","entityId":45700,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"af45bf6a-79e2-4787-837a-f2a41337cc10","navigationType":0,"readyForUser":974.6000003814697,"redirectCount":0,"resourceLoadedEnd":589.3000001907349,"resourceLoadedStart":205.69999980926514,"resourceTiming":[{"duration":32.90000057220459,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":205.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":205.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":238.60000038146973,"responseStart":0,"secureConnectionStart":0},{"duration":33.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":205.89999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":205.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":239.5,"responseStart":0,"secureConnectionStart":0},{"duration":229.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":206.10000038146973,"connectEnd":206.10000038146973,"connectStart":206.10000038146973,"domainLookupEnd":206.10000038146973,"domainLookupStart":206.10000038146973,"fetchStart":206.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":241.89999961853027,"responseEnd":435.6000003814697,"responseStart":256.69999980926514,"secureConnectionStart":206.10000038146973},{"duration":382.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":206.80000019073486,"connectEnd":206.80000019073486,"connectStart":206.80000019073486,"domainLookupEnd":206.80000019073486,"domainLookupStart":206.80000019073486,"fetchStart":206.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":242.19999980926514,"responseEnd":589.3000001907349,"responseStart":261.30000019073486,"secureConnectionStart":206.80000019073486},{"duration":64.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":207,"connectEnd":207,"connectStart":207,"domainLookupEnd":207,"domainLookupStart":207,"fetchStart":207,"redirectEnd":0,"redirectStart":0,"requestStart":246,"responseEnd":271.19999980926514,"responseStart":266.8999996185303,"secureConnectionStart":207},{"duration":65.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":207.10000038146973,"connectEnd":207.10000038146973,"connectStart":207.10000038146973,"domainLookupEnd":207.10000038146973,"domainLookupStart":207.10000038146973,"fetchStart":207.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":247.5,"responseEnd":273,"responseStart":269,"secureConnectionStart":207.10000038146973},{"duration":66.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":207.30000019073486,"connectEnd":207.30000019073486,"connectStart":207.30000019073486,"domainLookupEnd":207.30000019073486,"domainLookupStart":207.30000019073486,"fetchStart":207.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":247.69999980926514,"responseEnd":273.6000003814697,"responseStart":270,"secureConnectionStart":207.30000019073486},{"duration":43.20000076293945,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":207.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":250.60000038146973,"responseStart":0,"secureConnectionStart":0},{"duration":75.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":207.60000038146973,"connectEnd":207.60000038146973,"connectStart":207.60000038146973,"domainLookupEnd":207.60000038146973,"domainLookupStart":207.60000038146973,"fetchStart":207.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":255.89999961853027,"responseEnd":282.8999996185303,"responseStart":280.5,"secureConnectionStart":207.60000038146973},{"duration":44,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":207.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":251.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":77.20000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":207.89999961853027,"connectEnd":207.89999961853027,"connectStart":207.89999961853027,"domainLookupEnd":207.89999961853027,"domainLookupStart":207.89999961853027,"fetchStart":207.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":257.8999996185303,"responseEnd":285.1000003814697,"responseStart":283.3999996185303,"secureConnectionStart":207.89999961853027},{"duration":316.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":213.10000038146973,"connectEnd":213.10000038146973,"connectStart":213.10000038146973,"domainLookupEnd":213.10000038146973,"domainLookupStart":213.10000038146973,"fetchStart":213.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":305.6000003814697,"responseEnd":529.3000001907349,"responseStart":522.1000003814697,"secureConnectionStart":213.10000038146973},{"duration":314.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":215.19999980926514,"connectEnd":215.19999980926514,"connectStart":215.19999980926514,"domainLookupEnd":215.19999980926514,"domainLookupStart":215.19999980926514,"fetchStart":215.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":354.6000003814697,"responseEnd":530,"responseStart":524.6000003814697,"secureConnectionStart":215.19999980926514},{"duration":104.60000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":563.6999998092651,"connectEnd":563.6999998092651,"connectStart":563.6999998092651,"domainLookupEnd":563.6999998092651,"domainLookupStart":563.6999998092651,"fetchStart":563.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":630.6999998092651,"responseEnd":668.3000001907349,"responseStart":666.3000001907349,"secureConnectionStart":563.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":195,"responseEnd":214,"domLoading":198,"domInteractive":1040,"domContentLoadedEventStart":1040,"domContentLoadedEventEnd":1135,"domComplete":1786,"loadEventStart":1786,"loadEventEnd":1786,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1009.6000003814697},{"name":"bigPipe.sidebar-id.end","time":1010.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":1010.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1012.8000001907349},{"name":"activityTabFullyLoaded","time":1153.1000003814697}],"measures":[],"correlationId":"7a9a02a9731889","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":100,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Discovered thus far:
The table (v2), before being converted to aria, has a max_key_length() of 3072 and a key_length of either 1001 or 1002 (for 996 or 997 varchar length field respectively)
After it gets converted, the key_length remains the same, but the max_key_length supported by the ARIA engine is below the threshold.
Preliminary ideas for a fix: