1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

WL 2826: Error handling of ALTER TABLE for partitioning

Introduce log entry to handle replace of frm file


sql/handler.h:
  Introduce log entry to handle replace of frm file
sql/sql_partition.cc:
  Introduce log entry to handle replace of frm file
sql/sql_table.cc:
  Introduce log entry to handle replace of frm file
This commit is contained in:
unknown
2006-02-13 13:52:23 +01:00
parent b517dbf718
commit 5d5eba2d33
3 changed files with 21 additions and 9 deletions

View File

@@ -1136,12 +1136,17 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags)
*/
VOID(pthread_mutex_lock(&LOCK_open));
if (my_delete(frm_name, MYF(MY_WME)) ||
inactivate_table_log_entry(part_info->frm_log_entry->entry_pos) ||
sync_table_log() ||
my_rename(shadow_frm_name, frm_name, MYF(MY_WME)) ||
lpt->table->file->create_handler_files(path, shadow_path, TRUE))
{
error= 1;
}
VOID(pthread_mutex_unlock(&LOCK_open));
inactivate_table_log_entry(part_info->frm_log_entry->entry_pos);
part_info->frm_log_entry= NULL;
VOID(sync_table_log());
}
end: