Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.2.19, 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
openSUSE Leap 15, SLES15, SLES12
Description
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).
Attachments
Issue Links
- is caused by
-
MDEV-13671 InnoDB should use case-insensitive column name comparisons like the rest of the server
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Assignee | Marko Mäkelä [ marko ] | |
Labels | regression | |
Priority | Major [ 3 ] | Blocker [ 1 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Link |
This issue is caused by |
Assignee | Marko Mäkelä [ marko ] | Eugene Kosov [ kevg ] |
Assignee | Eugene Kosov [ kevg ] | Marko Mäkelä [ marko ] |
Status | Confirmed [ 10101 ] | In Review [ 10002 ] |
Summary | Database corruption after altering column name | Database corruption after renaming a prefix-indexed column |
issue.field.resolutiondate | 2018-12-29 21:30:32.0 | 2018-12-29 21:30:32.367 |
Fix Version/s | 10.4.2 [ 23229 ] | |
Fix Version/s | 10.2.21 [ 23213 ] | |
Fix Version/s | 10.3.12 [ 23214 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Assignee | Marko Mäkelä [ marko ] | Eugene Kosov [ kevg ] |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 91327 ] | MariaDB v4 [ 155383 ] |
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