Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.4(EOL) , 10.5 , 10.6 , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL)
CHECKSUM of a table with a virtual column may change, even though the contents and the structure remains visibly the same.
The first test case is seemingly deterministic, with checksum changing after restoration of mysqldump.
The second test case is highly non-deterministic (on unclear reasons), it shows how CHECKSUM changes after simple server restart, without dump restoration. It involves several features none of which I could remove, so I'm not sure it's the same problem, but it does involve virtual columns among others.
Test case with dump
CREATE TABLE t (a INT , b INT AS (a)) ENGINE=MyISAM;
INSERT INTO t (a) VALUES (1),(2);
--echo # Before dump
SHOW CREATE TABLE t;
SELECT * FROM t;
CHECKSUM TABLE t;
--exec $MYSQL_DUMP test --tables t > $MYSQL_TMP_DIR/t.dump
DROP TABLE t;
--exec $MYSQL test < $MYSQL_TMP_DIR/t.dump
--echo # After dump
SHOW CREATE TABLE t;
SELECT * FROM t;
CHECKSUM TABLE t;
DROP TABLE t;
Results with mysqldump, 10.4 900c4d69
# Before dump
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` int (11) DEFAULT NULL ,
`b` int (11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci
SELECT * FROM t;
a b
1 1
2 2
CHECKSUM TABLE t;
Table Checksum
test.t 2865344526
# After dump
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` int (11) DEFAULT NULL ,
`b` int (11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci
SELECT * FROM t;
a b
1 1
2 2
CHECKSUM TABLE t;
Table Checksum
test.t 1690939406
Test case with restart
--source include/have_innodb.inc
CREATE TABLE t (
id int (11) NOT NULL AUTO_INCREMENT,
va mediumint GENERATED ALWAYS AS (a),
a mediumint NOT NULL DEFAULT 0,
b char (1) DEFAULT NULL ,
PRIMARY KEY (id)
) ENGINE=InnoDB WITH SYSTEM VERSIONING;
INSERT INTO t (b) VALUES ( 'a' ),( 'b' ),( 'c' );
UPDATE t SET b = 'x' ;
CHECKSUM TABLE t EXTENDED;
--source include/restart_mysqld.inc
CHECKSUM TABLE t EXTENDED;
--source include/restart_mysqld.inc
CHECKSUM TABLE t EXTENDED;
--source include/restart_mysqld.inc
CHECKSUM TABLE t EXTENDED;
DROP TABLE t;
Results #1 with restart 10.4 900c4d69
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 4236583688
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 4236583688
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 1358680303
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 1358680303
Results #2 with restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 1428158860
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 1428158860
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 714221683
# restart
CHECKSUM TABLE t EXTENDED;
Table Checksum
test.t 1428158860
etc.
There are no comments yet on this issue.
{"report":{"fcp":2112.5,"ttfb":1033,"pageVisibility":"visible","entityId":124784,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f5668e3e-22b0-4e87-8b65-d125bc0543d8","navigationType":0,"readyForUser":2237.2000000476837,"redirectCount":0,"resourceLoadedEnd":2509.100000143051,"resourceLoadedStart":1040.3000001907349,"resourceTiming":[{"duration":386.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1040.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1040.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1427.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":386.7999999523163,"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":1040.6000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1040.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1427.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":470.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1040.8000001907349,"connectEnd":1040.8000001907349,"connectStart":1040.8000001907349,"domainLookupEnd":1040.8000001907349,"domainLookupStart":1040.8000001907349,"fetchStart":1040.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1040.8000001907349,"responseEnd":1510.9000000953674,"responseStart":1510.9000000953674,"secureConnectionStart":1040.8000001907349},{"duration":592.5,"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":1041.1000001430511,"connectEnd":1041.1000001430511,"connectStart":1041.1000001430511,"domainLookupEnd":1041.1000001430511,"domainLookupStart":1041.1000001430511,"fetchStart":1041.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1041.1000001430511,"responseEnd":1633.6000001430511,"responseStart":1633.6000001430511,"secureConnectionStart":1041.1000001430511},{"duration":602.6000001430511,"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":1041.2000000476837,"connectEnd":1041.2000000476837,"connectStart":1041.2000000476837,"domainLookupEnd":1041.2000000476837,"domainLookupStart":1041.2000000476837,"fetchStart":1041.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1041.2000000476837,"responseEnd":1643.8000001907349,"responseStart":1643.8000001907349,"secureConnectionStart":1041.2000000476837},{"duration":603,"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":1041.5,"connectEnd":1041.5,"connectStart":1041.5,"domainLookupEnd":1041.5,"domainLookupStart":1041.5,"fetchStart":1041.5,"redirectEnd":0,"redirectStart":0,"requestStart":1041.5,"responseEnd":1644.5,"responseStart":1644.5,"secureConnectionStart":1041.5},{"duration":603.7000000476837,"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":1041.7000000476837,"connectEnd":1041.7000000476837,"connectStart":1041.7000000476837,"domainLookupEnd":1041.7000000476837,"domainLookupStart":1041.7000000476837,"fetchStart":1041.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1041.7000000476837,"responseEnd":1645.4000000953674,"responseStart":1645.4000000953674,"secureConnectionStart":1041.7000000476837},{"duration":686.5999999046326,"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":1041.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1041.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1728.5,"responseStart":0,"secureConnectionStart":0},{"duration":604.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1042.1000001430511,"connectEnd":1042.1000001430511,"connectStart":1042.1000001430511,"domainLookupEnd":1042.1000001430511,"domainLookupStart":1042.1000001430511,"fetchStart":1042.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1042.1000001430511,"responseEnd":1646.2000000476837,"responseStart":1646.2000000476837,"secureConnectionStart":1042.1000001430511},{"duration":685.6000001430511,"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":1043,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1043,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1728.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":604.1999998092651,"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":1043.3000001907349,"connectEnd":1043.3000001907349,"connectStart":1043.3000001907349,"domainLookupEnd":1043.3000001907349,"domainLookupStart":1043.3000001907349,"fetchStart":1043.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1043.3000001907349,"responseEnd":1647.5,"responseStart":1647.4000000953674,"secureConnectionStart":1043.3000001907349},{"duration":1028.2999999523163,"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":1044.1000001430511,"connectEnd":1044.1000001430511,"connectStart":1044.1000001430511,"domainLookupEnd":1044.1000001430511,"domainLookupStart":1044.1000001430511,"fetchStart":1044.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1044.1000001430511,"responseEnd":2072.4000000953674,"responseStart":2072.4000000953674,"secureConnectionStart":1044.1000001430511},{"duration":1464.9000000953674,"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":1044.2000000476837,"connectEnd":1044.2000000476837,"connectStart":1044.2000000476837,"domainLookupEnd":1044.2000000476837,"domainLookupStart":1044.2000000476837,"fetchStart":1044.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1044.2000000476837,"responseEnd":2509.100000143051,"responseStart":2509.100000143051,"secureConnectionStart":1044.2000000476837},{"duration":318.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1754.1000001430511,"connectEnd":1754.1000001430511,"connectStart":1754.1000001430511,"domainLookupEnd":1754.1000001430511,"domainLookupStart":1754.1000001430511,"fetchStart":1754.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1754.1000001430511,"responseEnd":2072.9000000953674,"responseStart":2072.9000000953674,"secureConnectionStart":1754.1000001430511},{"duration":470.5,"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":2130.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2130.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2600.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":472.39999985694885,"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":2131.600000143051,"connectEnd":2131.600000143051,"connectStart":2131.600000143051,"domainLookupEnd":2131.600000143051,"domainLookupStart":2131.600000143051,"fetchStart":2131.600000143051,"redirectEnd":0,"redirectStart":0,"requestStart":2131.600000143051,"responseEnd":2604,"responseStart":2604,"secureConnectionStart":2131.600000143051}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":844,"responseStart":1033,"responseEnd":1038,"domLoading":1038,"domInteractive":2533,"domContentLoadedEventStart":2533,"domContentLoadedEventEnd":2594,"domComplete":2935,"loadEventStart":2935,"loadEventEnd":2935,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2520.4000000953674},{"name":"bigPipe.sidebar-id.end","time":2521.300000190735},{"name":"bigPipe.activity-panel-pipe-id.start","time":2521.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":2522},{"name":"activityTabFullyLoaded","time":2605.300000190735}],"measures":[],"correlationId":"f2d5932ead10f8","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":13,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}