From 98d3ef960df6a691fc4b86a4ab127e8f75eab3e7 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Thu, 2 Feb 2012 12:47:17 +0100 Subject: Bug#13593865 - 64037: CRASH IN HA_PARTITION::CREATE_HANDLERS ON ALTER TABLE AFTER DROP PARTITION Bug#13608188 - 64038: CRASH IN HANDLER::HA_THD ON ALTER TABLE AFTER REPAIR NON-EXISTING PARTITION Backport of bug#13357766 from -trunk to -5.5. The state of some partitions was not reset on failure, leading to invalid states of partitions in consequent statements. Fixed by reverting back to original state for all partitions if not all partition names was resolved. Also adding extra security by forcing tables to be reopened in case of error in mysql_alter_table. (There is also removal of \r at the end of some lines.) --- sql/sql_partition.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_partition.h') diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 7a7b73e9f01..998e4b25f0b 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -254,7 +254,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, char *db, const char *table_name, TABLE *fast_alter_table); -uint set_part_state(Alter_info *alter_info, partition_info *tab_part_info, +bool set_part_state(Alter_info *alter_info, partition_info *tab_part_info, enum partition_state part_state); uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, HA_CREATE_INFO *create_info, -- cgit v1.2.1