mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the
table ROW_FORMAT option is lost during CREATE/DROP INDEX. This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing mysql_alter_table() that ROW_FORMAT is not used during creating/dropping indexes. mysql-test/r/alter_table.result: A test case for bug#23404. mysql-test/t/alter_table.test: A test case for bug#23404. sql/sql_parse.cc: CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not used during alteration, and thus must be retained.
This commit is contained in:
@ -543,3 +543,18 @@ ERROR 3D000: No database selected
|
||||
alter table test.t1 rename test.t1;
|
||||
use test;
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
|
||||
CREATE INDEX i1 ON t1(a);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL,
|
||||
KEY `i1` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
|
||||
DROP INDEX i1 ON t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user