From: Date: December 7 2006 3:32pm Subject: bk commit into 4.1 tree (svoj:1.2563) BUG#23404 List-Archive: http://lists.mysql.com/commits/16595 X-Bug: 23404 Message-Id: <20061207143244.4DD487A9@april.pils.ru> Below is the list of changes that have just been committed into a local 4.1 repository of svoj. When svoj does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-12-07 18:32:40+04:00, svoj@stripped +3 -0 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@stripped, 2006-12-07 18:32:39+04:00, svoj@stripped +15 -0 A test case for bug#23404. mysql-test/t/alter_table.test@stripped, 2006-12-07 18:32:39+04:00, svoj@stripped +11 -0 A test case for bug#23404. sql/sql_parse.cc@stripped, 2006-12-07 18:32:39+04:00, svoj@stripped +2 -0 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 is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: svoj # Host: april.(none) # Root: /home/svoj/devel/mysql/BUG23404/mysql-4.1-engines --- 1.489/sql/sql_parse.cc 2006-12-07 18:32:43 +04:00 +++ 1.490/sql/sql_parse.cc 2006-12-07 18:32:43 +04:00 @@ -5481,6 +5481,7 @@ int mysql_create_index(THD *thd, TABLE_L bzero((char*) &create_info,sizeof(create_info)); create_info.db_type=DB_TYPE_DEFAULT; create_info.default_table_charset= thd->variables.collation_database; + create_info.row_type= ROW_TYPE_NOT_USED; DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->real_name, &create_info, table_list, fields, keys, 0, (ORDER*)0, @@ -5497,6 +5498,7 @@ int mysql_drop_index(THD *thd, TABLE_LIS bzero((char*) &create_info,sizeof(create_info)); create_info.db_type=DB_TYPE_DEFAULT; create_info.default_table_charset= thd->variables.collation_database; + create_info.row_type= ROW_TYPE_NOT_USED; alter_info->clear(); alter_info->flags= ALTER_DROP_INDEX; alter_info->is_simple= 0; --- 1.49/mysql-test/r/alter_table.result 2006-12-07 18:32:44 +04:00 +++ 1.50/mysql-test/r/alter_table.result 2006-12-07 18:32:44 +04:00 @@ -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; --- 1.39/mysql-test/t/alter_table.test 2006-12-07 18:32:44 +04:00 +++ 1.40/mysql-test/t/alter_table.test 2006-12-07 18:32:44 +04:00 @@ -392,4 +392,15 @@ alter table test.t1 rename test.t1; use test; drop table t1; +# +# BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the +# table +# +CREATE TABLE t1(a INT) ROW_FORMAT=FIXED; +CREATE INDEX i1 ON t1(a); +SHOW CREATE TABLE t1; +DROP INDEX i1 ON t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + # End of 4.1 tests