Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.2.2 , 10.3.0 , 10.4.0 , 10.5.0 , 10.6.0
A peculiar design constraint of MariaDB virtual columns is that evaluation errors for non-indexed virtual columns are allowed (only reported when attempting to read from the virtual column).
If an index on a virtual column exists, then an INSERT that causes (say) a division by 0 would be rejected, like the test case below shows. But, we are not consistently enforcing this rule during online CREATE INDEX : we wrongly allow erroneous data to be inserted into the secondary indexes as NULL values.
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
CREATE TABLE t(a INT , b INT AS (a/a) VIRTUAL) ENGINE=InnoDB;
INSERT INTO t SET a=0;
SELECT * FROM t;
DELETE FROM t;
ALTER TABLE t ADD INDEX (b);
--error ER_DIVISION_BY_ZERO
INSERT INTO t SET a=0;
ALTER TABLE t DROP INDEX b;
connect (con1,localhost,root,,);
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL scanned WAIT_FOR apply' ;
send ALTER TABLE t ADD INDEX (b);
connection default ;
SET DEBUG_SYNC = 'now WAIT_FOR scanned' ;
INSERT INTO t SET a=0;
SET DEBUG_SYNC = 'now SIGNAL apply' ;
connection con1;
--echo # ERROR 1: The ALTER TABLE fails to fail!
# --error ER_DIVISION_BY_ZERO
reap;
connection default ;
SELECT * FROM t;
CHECK TABLE t;
DELETE FROM t;
ALTER TABLE t DROP INDEX b;
connection con1;
SET DEBUG_SYNC = 'row_log_apply_after SIGNAL applied WAIT_FOR commit' ;
send ALTER TABLE t ADD INDEX (b);
connection default ;
SET DEBUG_SYNC = 'now WAIT_FOR applied' ;
INSERT INTO t SET a=0;
SET DEBUG_SYNC = 'now SIGNAL commit' ;
connection con1;
--echo # ERROR 2: The ALTER TABLE fails to fail!
# --error ER_DIVISION_BY_ZERO
reap;
connection default ;
CHECK TABLE t;
SELECT * FROM t;
SHOW CREATE TABLE t;
SET DEBUG_SYNC = RESET;
DROP TABLE t;
I think that the logic needs to be fixed so that both ERROR cases highlighted by the test will be reported correctly.
No workflow transitions have been executed yet.
{"report":{"fcp":1381.0999999046326,"ttfb":372.30000019073486,"pageVisibility":"visible","entityId":101554,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"313bbbdb-75b5-474d-aab6-dfdab8aea943","navigationType":0,"readyForUser":1480.5999999046326,"redirectCount":0,"resourceLoadedEnd":1780.9000000953674,"resourceLoadedStart":379.59999990463257,"resourceTiming":[{"duration":312.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":379.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":379.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":691.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":315.09999990463257,"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":379.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":379.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":694.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":403.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":380,"connectEnd":380,"connectStart":380,"domainLookupEnd":380,"domainLookupStart":380,"fetchStart":380,"redirectEnd":0,"redirectStart":0,"requestStart":380,"responseEnd":783.5,"responseStart":783.5,"secureConnectionStart":380},{"duration":498.1000003814697,"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":380.19999980926514,"connectEnd":380.19999980926514,"connectStart":380.19999980926514,"domainLookupEnd":380.19999980926514,"domainLookupStart":380.19999980926514,"fetchStart":380.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":380.19999980926514,"responseEnd":878.3000001907349,"responseStart":878.3000001907349,"secureConnectionStart":380.19999980926514},{"duration":502,"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":380.5,"connectEnd":380.5,"connectStart":380.5,"domainLookupEnd":380.5,"domainLookupStart":380.5,"fetchStart":380.5,"redirectEnd":0,"redirectStart":0,"requestStart":380.5,"responseEnd":882.5,"responseStart":882.5,"secureConnectionStart":380.5},{"duration":502.2000002861023,"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":380.69999980926514,"connectEnd":380.69999980926514,"connectStart":380.69999980926514,"domainLookupEnd":380.69999980926514,"domainLookupStart":380.69999980926514,"fetchStart":380.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":380.69999980926514,"responseEnd":882.9000000953674,"responseStart":882.9000000953674,"secureConnectionStart":380.69999980926514},{"duration":502.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":380.80000019073486,"connectEnd":380.80000019073486,"connectStart":380.80000019073486,"domainLookupEnd":380.80000019073486,"domainLookupStart":380.80000019073486,"fetchStart":380.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":380.80000019073486,"responseEnd":883.3000001907349,"responseStart":883.3000001907349,"secureConnectionStart":380.80000019073486},{"duration":595.3000001907349,"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":381,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":381,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":976.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":502.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":381.30000019073486,"connectEnd":381.30000019073486,"connectStart":381.30000019073486,"domainLookupEnd":381.30000019073486,"domainLookupStart":381.30000019073486,"fetchStart":381.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":381.30000019073486,"responseEnd":883.6999998092651,"responseStart":883.6999998092651,"secureConnectionStart":381.30000019073486},{"duration":595.9000000953674,"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":381.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":381.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":977.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":502.80000019073486,"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":381.59999990463257,"connectEnd":381.59999990463257,"connectStart":381.59999990463257,"domainLookupEnd":381.59999990463257,"domainLookupStart":381.59999990463257,"fetchStart":381.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":381.59999990463257,"responseEnd":884.4000000953674,"responseStart":884.4000000953674,"secureConnectionStart":381.59999990463257},{"duration":1186.1000003814697,"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":397.69999980926514,"connectEnd":397.69999980926514,"connectStart":397.69999980926514,"domainLookupEnd":397.69999980926514,"domainLookupStart":397.69999980926514,"fetchStart":397.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":397.69999980926514,"responseEnd":1583.8000001907349,"responseStart":1583.8000001907349,"secureConnectionStart":397.69999980926514},{"duration":1290.0999999046326,"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":397.80000019073486,"connectEnd":397.80000019073486,"connectStart":397.80000019073486,"domainLookupEnd":397.80000019073486,"domainLookupStart":397.80000019073486,"fetchStart":397.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":397.80000019073486,"responseEnd":1687.9000000953674,"responseStart":1687.9000000953674,"secureConnectionStart":397.80000019073486},{"duration":584.4000000953674,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":999.9000000953674,"connectEnd":999.9000000953674,"connectStart":999.9000000953674,"domainLookupEnd":999.9000000953674,"domainLookupStart":999.9000000953674,"fetchStart":999.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":999.9000000953674,"responseEnd":1584.3000001907349,"responseStart":1584.3000001907349,"secureConnectionStart":999.9000000953674},{"duration":338.2000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1369.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1369.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1707.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":247.59999990463257,"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":1601.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1601.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1849,"responseStart":0,"secureConnectionStart":0},{"duration":178.40000009536743,"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":1602.5,"connectEnd":1602.5,"connectStart":1602.5,"domainLookupEnd":1602.5,"domainLookupStart":1602.5,"fetchStart":1602.5,"redirectEnd":0,"redirectStart":0,"requestStart":1602.5,"responseEnd":1780.9000000953674,"responseStart":1780.9000000953674,"secureConnectionStart":1602.5},{"duration":185.40000009536743,"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":1603.5999999046326,"connectEnd":1603.5999999046326,"connectStart":1603.5999999046326,"domainLookupEnd":1603.5999999046326,"domainLookupStart":1603.5999999046326,"fetchStart":1603.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1603.5999999046326,"responseEnd":1789,"responseStart":1789,"secureConnectionStart":1603.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":200,"responseStart":372,"responseEnd":385,"domLoading":377,"domInteractive":1783,"domContentLoadedEventStart":1783,"domContentLoadedEventEnd":1848,"domComplete":2075,"loadEventStart":2076,"loadEventEnd":2076,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1693.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1694.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1694.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1695.1999998092651},{"name":"activityTabFullyLoaded","time":1866.0999999046326}],"measures":[],"correlationId":"a5989f027dcc4a","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}