Merging to 10.5 the following code change of MDEV-23632 causes the last step of the test gcol.innodb_virtual_stats to fail:
@@ -11189,44 +11237,19 @@ ha_innobase::commit_inplace_alter_table(
|
Currently dict_load_column_low() is the only place where
|
num_base for virtual columns is assigned to nonzero. */
|
if (ctx0->num_to_drop_vcol || ctx0->num_to_add_vcol
|
+ || (ctx0->new_table->n_v_cols && !new_clustered
|
+ && (ha_alter_info->alter_info->drop_list.elements
|
+ || ha_alter_info->alter_info->create_list.elements))
|
|| (ctx0->is_instant()
|
&& m_prebuilt->table->n_v_cols
|
&& ha_alter_info->handler_flags & ALTER_STORED_COLUMN_ORDER)) {
|
...
|
The table will lose all persistent statistics:
CURRENT_TEST: gcol.innodb_virtual_stats
|
--- /mariadb/10.5m/mysql-test/suite/gcol/r/innodb_virtual_stats.result 2020-11-18 08:34:35.136411687 +0200
|
+++ /mariadb/10.5m/mysql-test/suite/gcol/r/innodb_virtual_stats.reject 2021-01-11 12:57:24.756571844 +0200
|
@@ -121,19 +121,4 @@
|
FROM mysql.innodb_index_stats
|
WHERE database_name = 'test' AND table_name = 't';
|
index_name stat_name stat_description
|
-GEN_CLUST_INDEX n_diff_pfx01 DB_ROW_ID
|
-GEN_CLUST_INDEX n_leaf_pages Number of leaf pages in the index
|
-GEN_CLUST_INDEX size Number of pages in the index
|
-idxb n_diff_pfx01 b
|
-idxb n_diff_pfx02 b,DB_ROW_ID
|
-idxb n_leaf_pages Number of leaf pages in the index
|
-idxb size Number of pages in the index
|
-vidxe n_diff_pfx01 e
|
-vidxe n_diff_pfx02 e,DB_ROW_ID
|
-vidxe n_leaf_pages Number of leaf pages in the index
|
-vidxe size Number of pages in the index
|
-vidxf n_diff_pfx01 f
|
-vidxf n_diff_pfx02 f,DB_ROW_ID
|
-vidxf n_leaf_pages Number of leaf pages in the index
|
-vidxf size Number of pages in the index
|
DROP TABLE t;
|
|
mysqltest: Result length mismatch
|
In both 10.4 and 10.5, we counter-intuitively have ha_alter_info->alter_info->create_list.elements == 5 for the preceding statement:
ALTER TABLE t DROP INDEX vidxcd;
|
The reason why this fails in 10.5 appears to be a change to "Remove not needed open/close call at end of inline alter table." The ha_innobase::open() call is needed for initializing the persistent statistics after a native ALTER TABLE:
if (ib_table->is_readable()) {
|
dict_stats_init(ib_table);
|
} else {
|
ib_table->stat_initialized = 1;
|
}
|
I agree that this is not ideal, but that work-around was added in MySQL 5.7 and is not easy to remove without a major rewrite (MDEV-22363).
{"report":{"fcp":691.3999998569489,"ttfb":159,"pageVisibility":"visible","entityId":95813,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"5f0fa526-c0d7-46cb-930a-60d09f3335a0","navigationType":0,"readyForUser":763.5,"redirectCount":0,"resourceLoadedEnd":795.0999999046326,"resourceLoadedStart":164.5,"resourceTiming":[{"duration":6.700000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":164.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":164.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":171.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":6.400000095367432,"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":164.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":164.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":171.20000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":65.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":164.89999985694885,"connectEnd":164.89999985694885,"connectStart":164.89999985694885,"domainLookupEnd":164.89999985694885,"domainLookupStart":164.89999985694885,"fetchStart":164.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":164.89999985694885,"responseEnd":230.59999990463257,"responseStart":230.59999990463257,"secureConnectionStart":164.89999985694885},{"duration":133.70000004768372,"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":164.89999985694885,"connectEnd":164.89999985694885,"connectStart":164.89999985694885,"domainLookupEnd":164.89999985694885,"domainLookupStart":164.89999985694885,"fetchStart":164.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":164.89999985694885,"responseEnd":298.59999990463257,"responseStart":298.59999990463257,"secureConnectionStart":164.89999985694885},{"duration":137.59999990463257,"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":165,"connectEnd":165,"connectStart":165,"domainLookupEnd":165,"domainLookupStart":165,"fetchStart":165,"redirectEnd":0,"redirectStart":0,"requestStart":165,"responseEnd":302.59999990463257,"responseStart":302.59999990463257,"secureConnectionStart":165},{"duration":137.89999985694885,"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":165.20000004768372,"connectEnd":165.20000004768372,"connectStart":165.20000004768372,"domainLookupEnd":165.20000004768372,"domainLookupStart":165.20000004768372,"fetchStart":165.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":165.20000004768372,"responseEnd":303.09999990463257,"responseStart":303.09999990463257,"secureConnectionStart":165.20000004768372},{"duration":138.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":165.29999995231628,"connectEnd":165.29999995231628,"connectStart":165.29999995231628,"domainLookupEnd":165.29999995231628,"domainLookupStart":165.29999995231628,"fetchStart":165.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":165.29999995231628,"responseEnd":303.59999990463257,"responseStart":303.59999990463257,"secureConnectionStart":165.29999995231628},{"duration":138.5,"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":165.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":165.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":303.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":138.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":165.5,"connectEnd":165.5,"connectStart":165.5,"domainLookupEnd":165.5,"domainLookupStart":165.5,"fetchStart":165.5,"redirectEnd":0,"redirectStart":0,"requestStart":165.5,"responseEnd":304,"responseStart":304,"secureConnectionStart":165.5},{"duration":138.69999980926514,"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":165.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":165.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":304.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":138.70000004768372,"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":165.79999995231628,"connectEnd":165.79999995231628,"connectStart":165.79999995231628,"domainLookupEnd":165.79999995231628,"domainLookupStart":165.79999995231628,"fetchStart":165.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":165.79999995231628,"responseEnd":304.5,"responseStart":304.5,"secureConnectionStart":165.79999995231628},{"duration":371,"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":166.59999990463257,"connectEnd":166.59999990463257,"connectStart":166.59999990463257,"domainLookupEnd":166.59999990463257,"domainLookupStart":166.59999990463257,"fetchStart":166.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":166.59999990463257,"responseEnd":537.5999999046326,"responseStart":537.5999999046326,"secureConnectionStart":166.59999990463257},{"duration":413.5,"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":171.09999990463257,"connectEnd":171.09999990463257,"connectStart":171.09999990463257,"domainLookupEnd":171.09999990463257,"domainLookupStart":171.09999990463257,"fetchStart":171.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":171.09999990463257,"responseEnd":584.5999999046326,"responseStart":584.5999999046326,"secureConnectionStart":171.09999990463257},{"duration":126.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":443.89999985694885,"connectEnd":443.89999985694885,"connectStart":443.89999985694885,"domainLookupEnd":443.89999985694885,"domainLookupStart":443.89999985694885,"fetchStart":443.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":443.89999985694885,"responseEnd":570.5,"responseStart":570.5,"secureConnectionStart":443.89999985694885},{"duration":150.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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","startTime":639.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":639.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":789.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":149.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":640.5999999046326,"connectEnd":640.5999999046326,"connectStart":640.5999999046326,"domainLookupEnd":640.5999999046326,"domainLookupStart":640.5999999046326,"fetchStart":640.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":640.5999999046326,"responseEnd":789.8999998569489,"responseStart":789.8999998569489,"secureConnectionStart":640.5999999046326},{"duration":154.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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","startTime":641,"connectEnd":641,"connectStart":641,"domainLookupEnd":641,"domainLookupStart":641,"fetchStart":641,"redirectEnd":0,"redirectStart":0,"requestStart":641,"responseEnd":795.0999999046326,"responseStart":795.0999999046326,"secureConnectionStart":641},{"duration":208.89999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":671,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":671,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":879.8999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":5,"responseStart":159,"responseEnd":169,"domLoading":162,"domInteractive":836,"domContentLoadedEventStart":836,"domContentLoadedEventEnd":879,"domComplete":1109,"loadEventStart":1109,"loadEventEnd":1109,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":804.7000000476837},{"name":"bigPipe.sidebar-id.end","time":805.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":805.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":806.8999998569489},{"name":"activityTabFullyLoaded","time":896.0999999046326}],"measures":[],"correlationId":"6f568ec7ef31be","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":30,"dbConnsTimeInMs":39,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}