Type:
Task
Priority:
Major
Resolution:
Fixed
There are two similar pieces of the code not friendly to user defined plugins in
opt_subselect.cc:
if (field->flags & BLOB_FLAG)
recinfo->type= FIELD_BLOB;
else if (use_packed_rows &&
field->real_type() == MYSQL_TYPE_STRING &&
length >= MIN_STRING_LENGTH_TO_PACK_ROWS)
recinfo->type=FIELD_SKIP_ENDSPACE;
else
recinfo->type=FIELD_NORMAL;
sql_select.cc:
if (field->flags & BLOB_FLAG)
recinfo->type= FIELD_BLOB;
else if (use_packed_rows &&
field->real_type() == MYSQL_TYPE_STRING &&
length >= MIN_STRING_LENGTH_TO_PACK_ROWS)
recinfo->type= FIELD_SKIP_ENDSPACE;
else if (field->real_type() == MYSQL_TYPE_VARCHAR)
recinfo->type= FIELD_VARCHAR;
else
recinfo->type= FIELD_NORMAL;
We'll split this code into a new virtual method in Field:
virtual en_fieldtype tmp_engine_column_type( bool use_packed_rows) const ;
so user data types will be able to redefine behaviour as they wish.
Note, originally these two pieces were equal, but then the sql_select.cc version was later extended to handle MYSQL_TYPE_VARCHAR in a special way.
According to SergeP, these two pieces were indended to be equal. So there is probably a bug in the opt_subselect.cc version. This change will fix this problem.
blocks
MDEV-4912
Data type plugin API version 1
Closed
Transition
Time In Source Status
Execution Times
Open
Closed
1m 29s
1
{"report":{"fcp":886.4000000953674,"ttfb":166.90000009536743,"pageVisibility":"visible","entityId":76714,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"01860f7f-cbcb-4fe6-bf02-c1a9c5d4258c","navigationType":0,"readyForUser":958.7000002861023,"redirectCount":0,"resourceLoadedEnd":934.7000002861023,"resourceLoadedStart":171.80000019073486,"resourceTiming":[{"duration":256.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":171.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":171.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":428.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":256.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":172,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":428.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":265,"initiatorType":"script","name":"https://jira.mariadb.org/s/c54b129276d75dc2a3460e1d78f37913-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":172.2000002861023,"connectEnd":172.2000002861023,"connectStart":172.2000002861023,"domainLookupEnd":172.2000002861023,"domainLookupStart":172.2000002861023,"fetchStart":172.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":172.2000002861023,"responseEnd":437.2000002861023,"responseStart":437.2000002861023,"secureConnectionStart":172.2000002861023},{"duration":349.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/f867843cd2fdb209d4d1d4f760f86346-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":172.30000019073486,"connectEnd":172.30000019073486,"connectStart":172.30000019073486,"domainLookupEnd":172.30000019073486,"domainLookupStart":172.30000019073486,"fetchStart":172.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":172.30000019073486,"responseEnd":521.7000002861023,"responseStart":521.7000002861023,"secureConnectionStart":172.30000019073486},{"duration":352.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/ffdb17665775c5b4d6f097f3974ee359-CDN/lu2bsh/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":172.40000009536743,"connectEnd":172.40000009536743,"connectStart":172.40000009536743,"domainLookupEnd":172.40000009536743,"domainLookupStart":172.40000009536743,"fetchStart":172.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":172.40000009536743,"responseEnd":525,"responseStart":525,"secureConnectionStart":172.40000009536743},{"duration":353.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":172.5,"connectEnd":172.5,"connectStart":172.5,"domainLookupEnd":172.5,"domainLookupStart":172.5,"fetchStart":172.5,"redirectEnd":0,"redirectStart":0,"requestStart":172.5,"responseEnd":525.6000003814697,"responseStart":525.6000003814697,"secureConnectionStart":172.5},{"duration":353.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":172.60000038146973,"connectEnd":172.60000038146973,"connectStart":172.60000038146973,"domainLookupEnd":172.60000038146973,"domainLookupStart":172.60000038146973,"fetchStart":172.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":172.60000038146973,"responseEnd":526.1000003814697,"responseStart":526.1000003814697,"secureConnectionStart":172.60000038146973},{"duration":353.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bsh/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":172.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":526.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":354.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bsh/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":172.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":172.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":527.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":353.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":172.80000019073486,"connectEnd":172.80000019073486,"connectStart":172.80000019073486,"domainLookupEnd":172.80000019073486,"domainLookupStart":172.80000019073486,"fetchStart":172.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":172.80000019073486,"responseEnd":526.6000003814697,"responseStart":526.6000003814697,"secureConnectionStart":172.80000019073486},{"duration":354.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/81b5d7c27af3ebc078cc4a36383678ba-CDN/lu2bsh/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":173,"connectEnd":173,"connectStart":173,"domainLookupEnd":173,"domainLookupStart":173,"fetchStart":173,"redirectEnd":0,"redirectStart":0,"requestStart":173,"responseEnd":527.3000001907349,"responseStart":527.3000001907349,"secureConnectionStart":173},{"duration":461.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":178.90000009536743,"connectEnd":178.90000009536743,"connectStart":178.90000009536743,"domainLookupEnd":178.90000009536743,"domainLookupStart":178.90000009536743,"fetchStart":178.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":178.90000009536743,"responseEnd":640,"responseStart":640,"secureConnectionStart":178.90000009536743},{"duration":754,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":180.7000002861023,"connectEnd":180.7000002861023,"connectStart":180.7000002861023,"domainLookupEnd":180.7000002861023,"domainLookupStart":180.7000002861023,"fetchStart":180.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":180.7000002861023,"responseEnd":934.7000002861023,"responseStart":934.7000002861023,"secureConnectionStart":180.7000002861023},{"duration":50.200000286102295,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":590.5,"connectEnd":590.5,"connectStart":590.5,"domainLookupEnd":590.5,"domainLookupStart":590.5,"fetchStart":590.5,"redirectEnd":0,"redirectStart":0,"requestStart":590.5,"responseEnd":640.7000002861023,"responseStart":640.7000002861023,"secureConnectionStart":590.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":40,"responseStart":167,"responseEnd":180,"domLoading":170,"domInteractive":1007,"domContentLoadedEventStart":1007,"domContentLoadedEventEnd":1045,"domComplete":1424,"loadEventStart":1424,"loadEventEnd":1425,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":991.5},{"name":"bigPipe.sidebar-id.end","time":992.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":992.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":993.4000000953674},{"name":"activityTabFullyLoaded","time":1057.5}],"measures":[],"correlationId":"83f2c23a234a2f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":68,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}