Interestingly, in MySQL 5.7 / MariaDB 10.2 it assumes 'DYNAMIC', but otherwise the result is the same – the checksum for the table is different from both COMPACT and DYNAMIC.
Elena Stepanova
added a comment - Reproducible with MySQL 5.6 / 5.7 as well.
Interestingly, in MySQL 5.7 / MariaDB 10.2 it assumes 'DYNAMIC', but otherwise the result is the same – the checksum for the table is different from both COMPACT and DYNAMIC.
create table t1 (c varchar (100)) engine=InnoDB;
create table t2 (c varchar (100)) engine=InnoDB row_format=compact;
create table t3 (c varchar (100)) engine=InnoDB row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT= DYNAMIC .
create table t4 (c varchar (100)) engine=InnoDB row_format= dynamic ;
insert into t1 values ( 'Hello' );
insert into t2 values ( 'Hello' );
insert into t3 values ( 'Hello' );
insert into t4 values ( 'Hello' );
checksum table t1, t2, t3, t4;
Table Checksum
test.t1 2947131221
test.t2 2947131221
test.t3 691918331
test.t4 2947131221
I got an identical result with 10.5 d8ba2930d665579e4da1f795094ab7396b453d49 as well.
For the record, SHOW TABLE STATUS would indicate that the actual Row_format of both InnoDB tables is Dynamic. The DYNAMIC and COMPACT format should be identical in this case, because nothing will be stored off-page. I tried also REDUNDANT, and it is yielding the same checksum 2947131221, even though the internal storage format is a little different. The data would be converted to the TABLE::record buffer anyway.
One thing that I might suspect is the uninitialized tail of the VARCHAR buffer, but the following patch did not make any difference:
Marko Mäkelä
added a comment - It turns out that the problem specifically affects ROW_FORMAT=FIXED and CHECKSUM TABLE , even in other storage engines:
--source include/have_innodb.inc
SET @save_strict=@@ GLOBAL .innodb_strict_mode;
SET GLOBAL innodb_strict_mode= OFF ;
create temporary table t1 (c varchar (100)) engine=InnoDB;
create temporary table t2 (c varchar (100)) engine=InnoDB row_format=fixed;
create temporary table t3 (c varchar (100)) engine=Aria row_format= dynamic ;
create temporary table t4 (c varchar (100)) engine=Aria row_format=fixed;
insert into t1 values ( 'Hello' );
insert into t2 values ( 'Hello' );
insert into t3 values ( 'Hello' );
insert into t4 values ( 'Hello' );
checksum table t1, t2, t3, t4;
SET GLOBAL innodb_strict_mode=@save_strict;
Aria and InnoDB are acting consistently here:
10.2 8cf8ad86d4b6f3479d80f3d8e8c2bcf463966924
SET @save_strict=@@GLOBAL.innodb_strict_mode;
SET GLOBAL innodb_strict_mode=OFF;
create temporary table t1 (c varchar(100)) engine=InnoDB;
create temporary table t2 (c varchar(100)) engine=InnoDB row_format=fixed;
Warnings:
Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create temporary table t3 (c varchar(100)) engine=Aria row_format=dynamic;
create temporary table t4 (c varchar(100)) engine=Aria row_format=fixed;
insert into t1 values ('Hello');
insert into t2 values ('Hello');
insert into t3 values ('Hello');
insert into t4 values ('Hello');
checksum table t1, t2, t3, t4;
Table Checksum
test.t1 2947131221
test.t2 691918331
test.t3 2947131221
test.t4 691918331
SET GLOBAL innodb_strict_mode=@save_strict;
I got an identical result with 10.5 d8ba2930d665579e4da1f795094ab7396b453d49 as well.
For the record, SHOW TABLE STATUS would indicate that the actual Row_format of both InnoDB tables is Dynamic . The DYNAMIC and COMPACT format should be identical in this case, because nothing will be stored off-page. I tried also REDUNDANT , and it is yielding the same checksum 2947131221, even though the internal storage format is a little different. The data would be converted to the TABLE::record buffer anyway.
One thing that I might suspect is the uninitialized tail of the VARCHAR buffer, but the following patch did not make any difference:
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index 9340d5060d9..ed9c2c534db 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -2815,6 +2815,9 @@ row_sel_field_store_in_mysql_format_func(
ut_ad(len != UNIV_SQL_NULL);
MEM_CHECK_DEFINED(data, len);
MEM_CHECK_ADDRESSABLE(dest, templ->mysql_col_len);
+ for (ulint i = templ->mysql_col_len; i--; ) {
+ dest[i] = static_cast<byte>(ut_rnd_gen());
+ }
#ifdef HAVE_valgrind_or_MSAN
MEM_UNDEFINED(dest, templ->mysql_col_len);
#endif /* HAVE_valgrind_or_MSAN */
People
Oleksandr Byelkin
Nirbhay Choubey (Inactive)
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1688.0999999940395,"ttfb":492.29999999701977,"pageVisibility":"visible","entityId":58471,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e7c02e88-aeba-4477-bb37-afcdc79e83b1","navigationType":0,"readyForUser":1833.3999999910593,"redirectCount":0,"resourceLoadedEnd":1469.7999999970198,"resourceLoadedStart":501.29999999701977,"resourceTiming":[{"duration":452.3999999910593,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":501.29999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":501.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":953.6999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":452.79999999701977,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":501.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":501.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":954.2999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":690.1000000089407,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":501.69999998807907,"connectEnd":956.2999999970198,"connectStart":956.2999999970198,"domainLookupEnd":956.2999999970198,"domainLookupStart":956.2999999970198,"fetchStart":501.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":956.5999999940395,"responseEnd":1191.7999999970198,"responseStart":973.7999999970198,"secureConnectionStart":956.2999999970198},{"duration":834.7999999970198,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":502.59999999403954,"connectEnd":502.59999999403954,"connectStart":502.59999999403954,"domainLookupEnd":502.59999999403954,"domainLookupStart":502.59999999403954,"fetchStart":502.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":958.6999999880791,"responseEnd":1337.3999999910593,"responseStart":982.2999999970198,"secureConnectionStart":502.59999999403954},{"duration":485.70000000298023,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":502.69999998807907,"connectEnd":502.69999998807907,"connectStart":502.69999998807907,"domainLookupEnd":502.69999998807907,"domainLookupStart":502.69999998807907,"fetchStart":502.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":960.0999999940395,"responseEnd":988.3999999910593,"responseStart":986.6999999880791,"secureConnectionStart":502.69999998807907},{"duration":486.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":502.8999999910593,"connectEnd":502.8999999910593,"connectStart":502.8999999910593,"domainLookupEnd":502.8999999910593,"domainLookupStart":502.8999999910593,"fetchStart":502.8999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":960.7999999970198,"responseEnd":989.7999999970198,"responseStart":987.5999999940395,"secureConnectionStart":502.8999999910593},{"duration":487.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":503.09999999403954,"connectEnd":503.09999999403954,"connectStart":503.09999999403954,"domainLookupEnd":503.09999999403954,"domainLookupStart":503.09999999403954,"fetchStart":503.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":962.1999999880791,"responseEnd":990.1999999880791,"responseStart":988.5999999940395,"secureConnectionStart":503.09999999403954},{"duration":458.20000000298023,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":503.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":503.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":961.3999999910593,"responseStart":0,"secureConnectionStart":0},{"duration":489.1000000089407,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":503.3999999910593,"connectEnd":503.3999999910593,"connectStart":503.3999999910593,"domainLookupEnd":503.3999999910593,"domainLookupStart":503.3999999910593,"fetchStart":503.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":963.5999999940395,"responseEnd":992.5,"responseStart":989.1999999880791,"secureConnectionStart":503.3999999910593},{"duration":475.20000000298023,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":503.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":503.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":978.7999999970198,"responseStart":0,"secureConnectionStart":0},{"duration":502,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":503.69999998807907,"connectEnd":503.69999998807907,"connectStart":503.69999998807907,"domainLookupEnd":503.69999998807907,"domainLookupStart":503.69999998807907,"fetchStart":503.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":975.0999999940395,"responseEnd":1005.6999999880791,"responseStart":1001.8999999910593,"secureConnectionStart":503.69999998807907},{"duration":814.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":505.59999999403954,"connectEnd":505.59999999403954,"connectStart":505.59999999403954,"domainLookupEnd":505.59999999403954,"domainLookupStart":505.59999999403954,"fetchStart":505.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":1196.699999988079,"responseEnd":1320.0999999940395,"responseStart":1318.0999999940395,"secureConnectionStart":505.59999999403954},{"duration":959.1000000089407,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":510.69999998807907,"connectEnd":510.69999998807907,"connectStart":510.69999998807907,"domainLookupEnd":510.69999998807907,"domainLookupStart":510.69999998807907,"fetchStart":510.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":1457.7999999970198,"responseEnd":1469.7999999970198,"responseStart":1469.2999999970198,"secureConnectionStart":510.69999998807907},{"duration":241.19999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1329,"connectEnd":1329,"connectStart":1329,"domainLookupEnd":1329,"domainLookupStart":1329,"fetchStart":1329,"redirectEnd":0,"redirectStart":0,"requestStart":1537.5,"responseEnd":1570.199999988079,"responseStart":1569.5,"secureConnectionStart":1329},{"duration":295.79999999701977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1628.3999999910593,"connectEnd":1628.3999999910593,"connectStart":1628.3999999910593,"domainLookupEnd":1628.3999999910593,"domainLookupStart":1628.3999999910593,"fetchStart":1628.3999999910593,"redirectEnd":0,"redirectStart":0,"requestStart":1891.7999999970198,"responseEnd":1924.199999988079,"responseStart":1923.5999999940395,"secureConnectionStart":1628.3999999910593},{"duration":372.79999999701977,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1679.2999999970198,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1679.2999999970198,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2052.0999999940395,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":307,"responseStart":492,"responseEnd":510,"domLoading":496,"domInteractive":1984,"domContentLoadedEventStart":1984,"domContentLoadedEventEnd":2047,"domComplete":2616,"loadEventStart":2616,"loadEventEnd":2617,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1938.199999988079},{"name":"bigPipe.sidebar-id.end","time":1939},{"name":"bigPipe.activity-panel-pipe-id.start","time":1939.199999988079},{"name":"bigPipe.activity-panel-pipe-id.end","time":1942.7999999970198},{"name":"activityTabFullyLoaded","time":2063.3999999910593}],"measures":[],"correlationId":"9bd1cb37558420","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Reproducible with MySQL 5.6 / 5.7 as well.
Interestingly, in MySQL 5.7 / MariaDB 10.2 it assumes 'DYNAMIC', but otherwise the result is the same – the checksum for the table is different from both COMPACT and DYNAMIC.
Warnings:
test.t1 2947131221
test.t2 2947131221
test.t3 691918331
test.t4 2947131221