SET sql_mode=DEFAULT;
|
DROP PROCEDURE IF EXISTS p1;
|
DROP TABLE IF EXISTS t1,t2;
|
DELIMITER $$
|
CREATE PROCEDURE p1()
|
BEGIN
|
DECLARE a INT DEFAULT 10;
|
DECLARE cur1 CURSOR FOR SELECT a;
|
BEGIN
|
DECLARE rec1 ROW TYPE OF cur1;
|
CREATE TABLE t2 AS SELECT rec1.a;
|
SHOW CREATE TABLE t2;
|
DROP TABLE t2;
|
END;
|
END;
|
$$
|
DELIMITER ;
|
CALL p1();
|
+-------+-----------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+-----------------------------------------------------------------------------------------------+
|
| t2 | CREATE TABLE `t2` (
|
`rec1.a` bigint(20) DEFAULT NULL
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
|
+-------+-----------------------------------------------------------------------------------------------+
|
Notice, it created a BIGINT(20) column. Looks wrong. The expected type is INT(11)), as in the declaration of the procedure variable a.
The problem happens at the cursor materialization time, when create_tmp_field_from_item() is called.
It calls Item::create_tmp_field(), which erroneously makes a BIGINT field for Item_splocal with INT data and max_length=11.
The execution path should not go through Item::create_tmp_field() to avoid conversion from INT(11) to BIGINT(11).
- blocks
-
MDEV-4912
Data type plugin API version 1
-
-
Closed
{"report":{"fcp":839.3000001907349,"ttfb":201.0999994277954,"pageVisibility":"visible","entityId":61528,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"39ca82f3-c5f4-4c73-8493-a2d41ab0669c","navigationType":0,"readyForUser":930.6999998092651,"redirectCount":0,"resourceLoadedEnd":866.5999994277954,"resourceLoadedStart":207,"resourceTiming":[{"duration":23.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":207,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":230.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":23.800000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":207.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":231.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":80.40000057220459,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":207.5999994277954,"connectEnd":207.5999994277954,"connectStart":207.5999994277954,"domainLookupEnd":207.5999994277954,"domainLookupStart":207.5999994277954,"fetchStart":207.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":207.5999994277954,"responseEnd":288,"responseStart":288,"secureConnectionStart":207.5999994277954},{"duration":174.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":207.69999980926514,"connectEnd":207.69999980926514,"connectStart":207.69999980926514,"domainLookupEnd":207.69999980926514,"domainLookupStart":207.69999980926514,"fetchStart":207.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":207.69999980926514,"responseEnd":382.0999994277954,"responseStart":382.0999994277954,"secureConnectionStart":207.69999980926514},{"duration":178.70000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":208.0999994277954,"connectEnd":208.0999994277954,"connectStart":208.0999994277954,"domainLookupEnd":208.0999994277954,"domainLookupStart":208.0999994277954,"fetchStart":208.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":208.0999994277954,"responseEnd":386.80000019073486,"responseStart":386.80000019073486,"secureConnectionStart":208.0999994277954},{"duration":179.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":208.19999980926514,"connectEnd":208.19999980926514,"connectStart":208.19999980926514,"domainLookupEnd":208.19999980926514,"domainLookupStart":208.19999980926514,"fetchStart":208.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":208.19999980926514,"responseEnd":387.3999996185303,"responseStart":387.3999996185303,"secureConnectionStart":208.19999980926514},{"duration":179.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":208.39999961853027,"connectEnd":208.39999961853027,"connectStart":208.39999961853027,"domainLookupEnd":208.39999961853027,"domainLookupStart":208.39999961853027,"fetchStart":208.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":208.39999961853027,"responseEnd":387.8999996185303,"responseStart":387.8999996185303,"secureConnectionStart":208.39999961853027},{"duration":229.10000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":208.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":437.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":179.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":208.80000019073486,"connectEnd":208.80000019073486,"connectStart":208.80000019073486,"domainLookupEnd":208.80000019073486,"domainLookupStart":208.80000019073486,"fetchStart":208.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":208.80000019073486,"responseEnd":388.30000019073486,"responseStart":388.30000019073486,"secureConnectionStart":208.80000019073486},{"duration":228.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":209,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":209,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":437.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":179.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":209,"connectEnd":209,"connectStart":209,"domainLookupEnd":209,"domainLookupStart":209,"fetchStart":209,"redirectEnd":0,"redirectStart":0,"requestStart":209,"responseEnd":388.8999996185303,"responseStart":388.8999996185303,"secureConnectionStart":209},{"duration":273.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":210,"connectEnd":210,"connectStart":210,"domainLookupEnd":210,"domainLookupStart":210,"fetchStart":210,"redirectEnd":0,"redirectStart":0,"requestStart":210,"responseEnd":483.8999996185303,"responseStart":483.8999996185303,"secureConnectionStart":210},{"duration":321.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":210,"connectEnd":210,"connectStart":210,"domainLookupEnd":210,"domainLookupStart":210,"fetchStart":210,"redirectEnd":0,"redirectStart":0,"requestStart":210,"responseEnd":531.8999996185303,"responseStart":531.8999996185303,"secureConnectionStart":210},{"duration":64.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":450.69999980926514,"connectEnd":450.69999980926514,"connectStart":450.69999980926514,"domainLookupEnd":450.69999980926514,"domainLookupStart":450.69999980926514,"fetchStart":450.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":450.69999980926514,"responseEnd":514.8000001907349,"responseStart":514.8000001907349,"secureConnectionStart":450.69999980926514},{"duration":41.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":744.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":744.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.5,"responseStart":0,"secureConnectionStart":0},{"duration":41.39999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":745.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":745.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":786.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":114.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":746.1999998092651,"connectEnd":746.1999998092651,"connectStart":746.1999998092651,"domainLookupEnd":746.1999998092651,"domainLookupStart":746.1999998092651,"fetchStart":746.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":746.1999998092651,"responseEnd":860.8000001907349,"responseStart":860.8000001907349,"secureConnectionStart":746.1999998092651},{"duration":117.90000057220459,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":746.5999994277954,"connectEnd":746.5999994277954,"connectStart":746.5999994277954,"domainLookupEnd":746.5999994277954,"domainLookupStart":746.5999994277954,"fetchStart":746.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":746.5999994277954,"responseEnd":864.5,"responseStart":864.5,"secureConnectionStart":746.5999994277954},{"duration":119.59999942779541,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":747,"connectEnd":747,"connectStart":747,"domainLookupEnd":747,"domainLookupStart":747,"fetchStart":747,"redirectEnd":0,"redirectStart":0,"requestStart":747,"responseEnd":866.5999994277954,"responseStart":866.5999994277954,"secureConnectionStart":747},{"duration":157.10000038146973,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":831.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":831.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":988.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":212.5999994277954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":856.8000001907349,"connectEnd":856.8000001907349,"connectStart":856.8000001907349,"domainLookupEnd":856.8000001907349,"domainLookupStart":856.8000001907349,"fetchStart":856.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":856.8000001907349,"responseEnd":1069.3999996185303,"responseStart":1069.3999996185303,"secureConnectionStart":856.8000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":38,"responseStart":201,"responseEnd":205,"domLoading":204,"domInteractive":1024,"domContentLoadedEventStart":1024,"domContentLoadedEventEnd":1092,"domComplete":1624,"loadEventStart":1624,"loadEventEnd":1626,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":990.6999998092651},{"name":"bigPipe.sidebar-id.end","time":991.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":991.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":994.3000001907349},{"name":"activityTabFullyLoaded","time":1102}],"measures":[],"correlationId":"b98bf68c033e48","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":21,"dbConnsTimeInMs":30,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}