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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user