Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
N/A
Notes:
A fix for MDEV-31043 is already in the branch.
Reproducible with at least InnoDB, MyISAM, Aria. The test case is not applicable to HEAP.
The test case is non-deterministic, run with --repeat=N. It usually fails for me right away, but it can vary on different machines and builds. If it doesn't fail, try to change the sleep time or make it deterministic by synchronization. Don't put it into the regression suite with non-deterministic concurrency .
The extra logic with grepping the log is needed, because MTR globally suppresses this kind of errors in the log. The suppression was added in 2009. It may need to be reconsidered.
The behavior of SQL itself doesn't look wrong at the first glance, at least not wronger than it was before the "online" ALTER. The test case attempts to insert-ignore a row which violates the datatype of the generated column and alter the table to add a new column. If ALTER happens first, it of course succeeds, and then INSERT IGNORE converts a non-numeric value into 0, as it usually does. If INSERT IGNORE happens first, then ALTER fails. It still seems to be happening this way even with "online" ALTER, but while failing, it produces the error messages which this bug report is about, and which really shouldn't be there.
CREATE TABLE t (f CHAR (8) DEFAULT '0' , vf INT GENERATED ALWAYS AS (f) STORED);
INSERT INTO t (f) VALUES ( '1' );
--connect (con1,localhost,root,,)
--send
ALTER TABLE t ADD COLUMN a INT , ALGORITHM=COPY, LOCK=NONE;
--connection default
--sleep 0.001
INSERT IGNORE INTO t (f) VALUES ( '' );
--connection con1
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
--reap
--error 0,1
--exec grep 'Slave SQL' $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $err= $sys_errno
# Cleanup
DROP TABLE t;
--disconnect con1
if ($err == 0)
{
--die # Found Slave SQL errors in the log
}
bb-11.0-oalter 6f5427417eff with MyISAM
2023-04-16 14:33:29 5 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.t; Incorrect integer value: '' for column `test`.`t`.`vf` at row 2, Error_code: 1366; Got error 1 "Operation not permitted" from storage engine MyISAM, Error_code: 1030; handler error No Error!; the event's master log FIRST, end_log_pos 39, Internal MariaDB error code: 1366
with Aria
2023-04-16 14:34:02 5 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.t; Incorrect integer value: '' for column `test`.`t`.`vf` at row 2, Error_code: 1366; Got error 1 "Operation not permitted" from storage engine Aria, Error_code: 1030; handler error No Error!; the event's master log FIRST, end_log_pos 39, Internal MariaDB error code: 1366
with InnoDB
2023-04-16 14:34:27 5 [ERROR] Slave SQL: Could not execute Write_rows_v1 event on table test.t; Incorrect integer value: '' for column `test`.`t`.`vf` at row 2, Error_code: 1366; Got error 1 "Operation not permitted" from storage engine InnoDB, Error_code: 1030; handler error No Error!; the event's master log FIRST, end_log_pos 39, Internal MariaDB error code: 1366
{"report":{"fcp":1323.8999996185303,"ttfb":552,"pageVisibility":"visible","entityId":121111,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"0db33322-993e-4f66-8742-d8ce0ad23a16","navigationType":0,"readyForUser":1408.2999997138977,"redirectCount":0,"resourceLoadedEnd":2196.199999809265,"resourceLoadedStart":557.1999998092651,"resourceTiming":[{"duration":235.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":557.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":557.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":792.5,"responseStart":0,"secureConnectionStart":0},{"duration":236.2999997138977,"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":557.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":557.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":793.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":298.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":557.6999998092651,"connectEnd":557.6999998092651,"connectStart":557.6999998092651,"domainLookupEnd":557.6999998092651,"domainLookupStart":557.6999998092651,"fetchStart":557.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":557.6999998092651,"responseEnd":856.1999998092651,"responseStart":856.1999998092651,"secureConnectionStart":557.6999998092651},{"duration":376.40000009536743,"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":557.8999996185303,"connectEnd":557.8999996185303,"connectStart":557.8999996185303,"domainLookupEnd":557.8999996185303,"domainLookupStart":557.8999996185303,"fetchStart":557.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":557.8999996185303,"responseEnd":934.2999997138977,"responseStart":934.2999997138977,"secureConnectionStart":557.8999996185303},{"duration":380.3999996185303,"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":558,"connectEnd":558,"connectStart":558,"domainLookupEnd":558,"domainLookupStart":558,"fetchStart":558,"redirectEnd":0,"redirectStart":0,"requestStart":558,"responseEnd":938.3999996185303,"responseStart":938.3999996185303,"secureConnectionStart":558},{"duration":380.59999990463257,"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":558.2999997138977,"connectEnd":558.2999997138977,"connectStart":558.2999997138977,"domainLookupEnd":558.2999997138977,"domainLookupStart":558.2999997138977,"fetchStart":558.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":558.2999997138977,"responseEnd":938.8999996185303,"responseStart":938.8999996185303,"secureConnectionStart":558.2999997138977},{"duration":380.7999997138977,"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":558.5,"connectEnd":558.5,"connectStart":558.5,"domainLookupEnd":558.5,"domainLookupStart":558.5,"fetchStart":558.5,"redirectEnd":0,"redirectStart":0,"requestStart":558.5,"responseEnd":939.2999997138977,"responseStart":939.2999997138977,"secureConnectionStart":558.5},{"duration":445.19999980926514,"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":558.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":558.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1003.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":381,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":558.7999997138977,"connectEnd":558.7999997138977,"connectStart":558.7999997138977,"domainLookupEnd":558.7999997138977,"domainLookupStart":558.7999997138977,"fetchStart":558.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":558.7999997138977,"responseEnd":939.7999997138977,"responseStart":939.7999997138977,"secureConnectionStart":558.7999997138977},{"duration":445.09999990463257,"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":559,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":559,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1004.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":381.40000009536743,"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":559.0999999046326,"connectEnd":559.0999999046326,"connectStart":559.0999999046326,"domainLookupEnd":559.0999999046326,"domainLookupStart":559.0999999046326,"fetchStart":559.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":559.0999999046326,"responseEnd":940.5,"responseStart":940.5,"secureConnectionStart":559.0999999046326},{"duration":1101.0999999046326,"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":564.7999997138977,"connectEnd":564.7999997138977,"connectStart":564.7999997138977,"domainLookupEnd":564.7999997138977,"domainLookupStart":564.7999997138977,"fetchStart":564.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":564.7999997138977,"responseEnd":1665.8999996185303,"responseStart":1665.8999996185303,"secureConnectionStart":564.7999997138977},{"duration":1631.3000001907349,"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":564.8999996185303,"connectEnd":564.8999996185303,"connectStart":564.8999996185303,"domainLookupEnd":564.8999996185303,"domainLookupStart":564.8999996185303,"fetchStart":564.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":564.8999996185303,"responseEnd":2196.199999809265,"responseStart":2196.199999809265,"secureConnectionStart":564.8999996185303},{"duration":668.8999996185303,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1016,"connectEnd":1016,"connectStart":1016,"domainLookupEnd":1016,"domainLookupStart":1016,"fetchStart":1016,"redirectEnd":0,"redirectStart":0,"requestStart":1016,"responseEnd":1684.8999996185303,"responseStart":1684.8999996185303,"secureConnectionStart":1016},{"duration":897.5999999046326,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1317,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1317,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2214.5999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":384,"responseStart":552,"responseEnd":562,"domLoading":555,"domInteractive":2233,"domContentLoadedEventStart":2233,"domContentLoadedEventEnd":2276,"domComplete":2885,"loadEventStart":2885,"loadEventEnd":2886,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2198.199999809265},{"name":"bigPipe.sidebar-id.end","time":2199},{"name":"bigPipe.activity-panel-pipe-id.start","time":2199.199999809265},{"name":"bigPipe.activity-panel-pipe-id.end","time":2200},{"name":"activityTabFullyLoaded","time":2289.699999809265}],"measures":[],"correlationId":"dfd66382d35da6","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":101,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
064ec60235d is ok to push