Type:
Bug
Priority:
Major
Resolution:
Duplicate
Affects Version/s:
10.5
Environment:
Debian 10, Ubuntu 20.04, Windows
After starting to install 10.5 on some instances we've noticed a problem with inserting and upgrading old databases.
Meaning the same procedure would work on 10.4 but it would throw and error Unknown column on 10.5.
We've striped down a simple SQL to reproduce the problem:
CREATE TABLE `A` (
`AC1` int (11) PRIMARY KEY ,
`U_ID` int (11) NOT NULL ,
`U_N` int (11) GENERATED ALWAYS AS (`U_ID`) STORED
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS B(
B_ID int (11) AUTO_INCREMENT PRIMARY KEY ,
BC1 int (11) NOT NULL
);
DELIMITER ;;
CREATE OR REPLACE PROCEDURE proc_migrate()
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE p_AC1 int (11);
DECLARE cur1 CURSOR FOR SELECT AC1 FROM A BU;
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
OPEN cur1;
REPEAT
FETCH cur1 INTO p_AC1;
IF NOT done THEN
BEGIN
INSERT INTO B (BC1) VALUES (p_AC1);
END ;
END IF ;
UNTIL done END REPEAT;
CLOSE cur1;
END ;;
DELIMITER ;
CALL proc_migrate();
ALTER TABLE A MODIFY COLUMN AC1 int (11) NOT NULL ;
This would throw 'Unknown column '`MDEV_NEW`.`BU`.`U_ID`' in 'GENERATED ALWAYS' on 10.5, but will work fine on 10.4
is duplicated by
MDEV-25672
table alias from previous statement interferes later commands
Closed
{"report":{"fcp":849.3999998569489,"ttfb":209.19999980926514,"pageVisibility":"visible","entityId":100339,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"b6bcfacd-f40b-48f0-bd4a-0b75c01bfbc6","navigationType":0,"readyForUser":921.2999999523163,"redirectCount":0,"resourceLoadedEnd":804.7999999523163,"resourceLoadedStart":217.39999985694885,"resourceTiming":[{"duration":160.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":217.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":217.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":378.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":160.59999990463257,"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":217.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":217.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":378.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":169.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":217.89999985694885,"connectEnd":217.89999985694885,"connectStart":217.89999985694885,"domainLookupEnd":217.89999985694885,"domainLookupStart":217.89999985694885,"fetchStart":217.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":217.89999985694885,"responseEnd":387.39999985694885,"responseStart":387.39999985694885,"secureConnectionStart":217.89999985694885},{"duration":236.59999990463257,"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":218.29999995231628,"connectEnd":218.29999995231628,"connectStart":218.29999995231628,"domainLookupEnd":218.29999995231628,"domainLookupStart":218.29999995231628,"fetchStart":218.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":218.29999995231628,"responseEnd":454.89999985694885,"responseStart":454.89999985694885,"secureConnectionStart":218.29999995231628},{"duration":240.60000014305115,"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":218.39999985694885,"connectEnd":218.39999985694885,"connectStart":218.39999985694885,"domainLookupEnd":218.39999985694885,"domainLookupStart":218.39999985694885,"fetchStart":218.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":218.39999985694885,"responseEnd":459,"responseStart":459,"secureConnectionStart":218.39999985694885},{"duration":241,"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":218.5,"connectEnd":218.5,"connectStart":218.5,"domainLookupEnd":218.5,"domainLookupStart":218.5,"fetchStart":218.5,"redirectEnd":0,"redirectStart":0,"requestStart":218.5,"responseEnd":459.5,"responseStart":459.5,"secureConnectionStart":218.5},{"duration":241.29999995231628,"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":218.59999990463257,"connectEnd":218.59999990463257,"connectStart":218.59999990463257,"domainLookupEnd":218.59999990463257,"domainLookupStart":218.59999990463257,"fetchStart":218.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":218.59999990463257,"responseEnd":459.89999985694885,"responseStart":459.89999985694885,"secureConnectionStart":218.59999990463257},{"duration":241.70000004768372,"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":218.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":218.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":241.79999995231628,"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":218.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":218.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":241.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":218.89999985694885,"connectEnd":218.89999985694885,"connectStart":218.89999985694885,"domainLookupEnd":218.89999985694885,"domainLookupStart":218.89999985694885,"fetchStart":218.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":218.89999985694885,"responseEnd":460.2999999523163,"responseStart":460.2999999523163,"secureConnectionStart":218.89999985694885},{"duration":241.89999985694885,"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":219,"connectEnd":219,"connectStart":219,"domainLookupEnd":219,"domainLookupStart":219,"fetchStart":219,"redirectEnd":0,"redirectStart":0,"requestStart":219,"responseEnd":460.89999985694885,"responseStart":460.89999985694885,"secureConnectionStart":219},{"duration":575,"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":229.29999995231628,"connectEnd":229.29999995231628,"connectStart":229.29999995231628,"domainLookupEnd":229.29999995231628,"domainLookupStart":229.29999995231628,"fetchStart":229.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":229.29999995231628,"responseEnd":804.2999999523163,"responseStart":804.2999999523163,"secureConnectionStart":229.29999995231628},{"duration":567.1000001430511,"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":237.69999980926514,"connectEnd":237.69999980926514,"connectStart":237.69999980926514,"domainLookupEnd":237.69999980926514,"domainLookupStart":237.69999980926514,"fetchStart":237.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":237.69999980926514,"responseEnd":804.7999999523163,"responseStart":804.7999999523163,"secureConnectionStart":237.69999980926514},{"duration":180.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":601.6999998092651,"connectEnd":601.6999998092651,"connectStart":601.6999998092651,"domainLookupEnd":601.6999998092651,"domainLookupStart":601.6999998092651,"fetchStart":601.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":601.6999998092651,"responseEnd":782,"responseStart":782,"secureConnectionStart":601.6999998092651}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":78,"responseStart":210,"responseEnd":238,"domLoading":213,"domInteractive":982,"domContentLoadedEventStart":982,"domContentLoadedEventEnd":1023,"domComplete":1741,"loadEventStart":1741,"loadEventEnd":1743,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":961.5},{"name":"bigPipe.sidebar-id.end","time":962.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":962.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":964.7999999523163},{"name":"activityTabFullyLoaded","time":1034.7999999523163}],"measures":[],"correlationId":"d4b0dedfebbb3a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":74,"dbReadsTimeInMs":9,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}