mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release
Don't fail when an frm is inconsistent (legacy DB_TYPE_xxx code doesn't match the engine name), use the engine name, ignore the legacy code.
This commit is contained in:
parent
197bdbae4d
commit
f89e6c442c
7 changed files with 25 additions and 2 deletions
|
@ -1,2 +1,13 @@
|
|||
show create table t1;
|
||||
ERROR 42000: Unknown storage engine 'InnoDB'
|
||||
call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria");
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
||||
KEY `a` (`a`),
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
|
||||
drop table t1;
|
||||
|
|
BIN
mysql-test/std_data/mdev5029_2.MAD
Normal file
BIN
mysql-test/std_data/mdev5029_2.MAD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mdev5029_2.MAI
Normal file
BIN
mysql-test/std_data/mdev5029_2.MAI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/mdev5029_2.frm
Normal file
BIN
mysql-test/std_data/mdev5029_2.frm
Normal file
Binary file not shown.
|
@ -4,8 +4,17 @@
|
|||
# a.k.a. fail to open an frm with indexes:
|
||||
|
||||
let $datadir=`select @@datadir`;
|
||||
copy_file std_data/mdev5029.frm $datadir/test/t1.frm;
|
||||
|
||||
# normal innodb table (but innodb is disabled here)
|
||||
copy_file std_data/mdev5029_1.frm $datadir/test/t1.frm;
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
show create table t1;
|
||||
remove_file $datadir/test/t1.frm;
|
||||
|
||||
# Aria table, incorrect typecode
|
||||
call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria");
|
||||
copy_file std_data/mdev5029_2.frm $datadir/test/t1.frm;
|
||||
copy_file std_data/mdev5029_2.MAI $datadir/test/t1.MAI;
|
||||
copy_file std_data/mdev5029_2.MAD $datadir/test/t1.MAD;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
|
|
@ -1093,7 +1093,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
|||
plugin_data(tmp_plugin, handlerton *)))
|
||||
{
|
||||
/* bad file, legacy_db_type did not match the name */
|
||||
goto err;
|
||||
sql_print_warning("%s.frm is inconsistent: engine typecode %d, engine name %s (%d)",
|
||||
share->normalized_path.str, legacy_db_type,
|
||||
plugin_name(tmp_plugin)->str,
|
||||
ha_legacy_type(plugin_data(tmp_plugin, handlerton *)));
|
||||
}
|
||||
/*
|
||||
tmp_plugin is locked with a local lock.
|
||||
|
|
Loading…
Reference in a new issue