It seems that under certain conditions a simple "alter table" statement to rename a column can cause the database to go bad. This is what I do to reproduce the issue:
(Basically creating a table with the primary key on two columns, after that renaming one of the columns)
-------------------
create database test42;
use test42;
create table `test` ( `test_old` varchar(255) NOT NULL,
`other` varchar(255) NOT NULL,
PRIMARY KEY (`test_old`,`other`) );
alter table `test` CHANGE COLUMN `test_old` `test_new` varchar(255) NOT NULL;
select * from test;
-------------------
Up to here it works fine. Now after I restart the server (systemctl restart mariadb). I get this after rerunning the select statement.
---------------------
select * from test;
ERROR 1932 (42S02): Table 'test42.test' doesn't exist in engine
---------------------
So something went wrong with that "test" table.
BTW, the above is just a minimized test case, we orginally noticed this issue when trying to use 10.2.19 with openstack-neutron (which needs to run schemamigrations similar to the above).
- is caused by
-
MDEV-13671
InnoDB should use case-insensitive column name comparisons like the rest of the server
-
-
Closed
{"report":{"fcp":1182.2999997138977,"ttfb":252.69999980926514,"pageVisibility":"visible","entityId":71505,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5e2c546d-74ae-41fe-9654-54154e0e2e63","navigationType":0,"readyForUser":1287.7999997138977,"redirectCount":0,"resourceLoadedEnd":813.7999997138977,"resourceLoadedStart":273.19999980926514,"resourceTiming":[{"duration":85.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":273.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":273.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":358.5,"responseStart":0,"secureConnectionStart":0},{"duration":89.40000009536743,"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":273.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":273.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":363,"responseStart":0,"secureConnectionStart":0},{"duration":353,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":273.90000009536743,"connectEnd":273.90000009536743,"connectStart":273.90000009536743,"domainLookupEnd":273.90000009536743,"domainLookupStart":273.90000009536743,"fetchStart":273.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":368.7999997138977,"responseEnd":626.9000000953674,"responseStart":381.09999990463257,"secureConnectionStart":273.90000009536743},{"duration":518.0999999046326,"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":274.59999990463257,"connectEnd":274.59999990463257,"connectStart":274.59999990463257,"domainLookupEnd":274.59999990463257,"domainLookupStart":274.59999990463257,"fetchStart":274.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":371.90000009536743,"responseEnd":792.6999998092651,"responseStart":389.40000009536743,"secureConnectionStart":274.59999990463257},{"duration":121.59999990463257,"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":274.69999980926514,"connectEnd":274.69999980926514,"connectStart":274.69999980926514,"domainLookupEnd":274.69999980926514,"domainLookupStart":274.69999980926514,"fetchStart":274.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":372.09999990463257,"responseEnd":396.2999997138977,"responseStart":394,"secureConnectionStart":274.69999980926514},{"duration":122.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":275,"connectEnd":275,"connectStart":275,"domainLookupEnd":275,"domainLookupStart":275,"fetchStart":275,"redirectEnd":0,"redirectStart":0,"requestStart":373.2999997138977,"responseEnd":397.59999990463257,"responseStart":395.09999990463257,"secureConnectionStart":275},{"duration":125.19999980926514,"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":275.09999990463257,"connectEnd":275.09999990463257,"connectStart":275.09999990463257,"domainLookupEnd":275.09999990463257,"domainLookupStart":275.09999990463257,"fetchStart":275.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":373.59999990463257,"responseEnd":400.2999997138977,"responseStart":396.40000009536743,"secureConnectionStart":275.09999990463257},{"duration":97.60000038146973,"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":275.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":275.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":372.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":145.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":275.59999990463257,"connectEnd":275.59999990463257,"connectStart":275.59999990463257,"domainLookupEnd":275.59999990463257,"domainLookupStart":275.59999990463257,"fetchStart":275.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":402.40000009536743,"responseEnd":421.5,"responseStart":419.7999997138977,"secureConnectionStart":275.59999990463257},{"duration":120.10000038146973,"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":275.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":275.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":395.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":147.59999990463257,"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":276,"connectEnd":276,"connectStart":276,"domainLookupEnd":276,"domainLookupStart":276,"fetchStart":276,"redirectEnd":0,"redirectStart":0,"requestStart":405,"responseEnd":423.59999990463257,"responseStart":422.2999997138977,"secureConnectionStart":276},{"duration":534.5,"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":278.5,"connectEnd":278.5,"connectStart":278.5,"domainLookupEnd":278.5,"domainLookupStart":278.5,"fetchStart":278.5,"redirectEnd":0,"redirectStart":0,"requestStart":565.7999997138977,"responseEnd":813,"responseStart":805.5999999046326,"secureConnectionStart":278.5},{"duration":533.6999998092651,"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":280.09999990463257,"connectEnd":280.09999990463257,"connectStart":280.09999990463257,"domainLookupEnd":280.09999990463257,"domainLookupStart":280.09999990463257,"fetchStart":280.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":603.9000000953674,"responseEnd":813.7999997138977,"responseStart":807.5999999046326,"secureConnectionStart":280.09999990463257},{"duration":102,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":778.9000000953674,"connectEnd":778.9000000953674,"connectStart":778.9000000953674,"domainLookupEnd":778.9000000953674,"domainLookupStart":778.9000000953674,"fetchStart":778.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":841,"responseEnd":880.9000000953674,"responseStart":880.2999997138977,"secureConnectionStart":778.9000000953674},{"duration":137.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1068.2999997138977,"connectEnd":1068.2999997138977,"connectStart":1068.2999997138977,"domainLookupEnd":1068.2999997138977,"domainLookupStart":1068.2999997138977,"fetchStart":1068.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1167.2999997138977,"responseEnd":1205.6999998092651,"responseStart":1204.9000000953674,"secureConnectionStart":1068.2999997138977}],"fetchStart":0,"domainLookupStart":54,"domainLookupEnd":64,"connectStart":65,"connectEnd":83,"secureConnectionStart":73,"requestStart":85,"responseStart":253,"responseEnd":280,"domLoading":259,"domInteractive":1423,"domContentLoadedEventStart":1423,"domContentLoadedEventEnd":1507,"domComplete":1755,"loadEventStart":1755,"loadEventEnd":1756,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1365.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1366.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1366.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1369},{"name":"activityTabFullyLoaded","time":1526.7999997138977}],"measures":[],"correlationId":"fc126b7e378cee","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report and test case, reproducible as described.
Here is an MTR version of the same:
--source include/have_innodb.inc
) ENGINE=InnoDB;
--source include/restart_mysqld.inc
# Cleanup
Reproducible on 10.2+, not reproducible on 10.1. However, it seems to have appeared in 10.2 tree with this merge:
commit 32062cc61cd00e4cd3b7939c8a09f9c3ac34ec76
Merge: af9649c bae21bf
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date: Tue Nov 6 08:41:48 2018 +0200
Merge 10.1 into 10.2