Commit 910bf380 authored by unknown's avatar unknown

WL 2826: Error handling for ALTER TABLE for partitioning

Most of the code for handling the table log is in place now, except
the action part at recovery and proper error handling in some places.


sql/mysql_priv.h:
  Removed internal methods from external table log interface
  Added and changed interface
sql/mysqld.cc:
  Added call to execute table log recovery
sql/sql_table.cc:
  Most of the code for handling the table log is in place now, except
  the action part at recovery and proper error handling in some places.
parent e09fb5ce
...@@ -1168,21 +1168,24 @@ typedef struct st_table_log_entry ...@@ -1168,21 +1168,24 @@ typedef struct st_table_log_entry
char entry_type; char entry_type;
} TABLE_LOG_ENTRY; } TABLE_LOG_ENTRY;
typedef struct st_table_log_memory_entry
{
uint entry_pos;
TABLE_LOG_MEMORY *next_log_entry;
TABLE_LOG_MEMORY *prev_log_entry;
TABLE_LOG_MEMORY *next_active_log_entry;
} TABLE_LOG_MEMORY_ENTRY;
bool write_table_log_entry(TABLE_LOG_ENTRY *table_log_entry, bool write_table_log_entry(TABLE_LOG_ENTRY *table_log_entry,
uint next_entry, TABLE_LOG_MEMORY_ENTRY **active_entry);
uint *entry_written); bool write_execute_table_log_entry(uint first_entry,
bool write_execute_table_log_entry(uint first_entry, uint *exec_entry); TABLE_LOG_MEMORY_ENTRY **active_entry);
uint read_table_log_header(); void release_table_log_memory_entry(TABLE_LOG_MEMORY_ENTRY *log_entry);
bool read_table_log_entry(uint read_entry, TABLE_LOG_ENTRY *table_log_entry);
bool init_table_log();
void release_table_log(); void release_table_log();
void execute_table_log_recovery(); void execute_table_log_recovery();
bool execute_table_log_entry(uint first_entry); bool execute_table_log_entry(uint first_entry);
bool execute_table_log_action(TABLE_LOG_ENTRY *table_log_entry);
void lock_global_table_log(); void lock_global_table_log();
void unlock_global_table_log(); void unlock_global_table_log();
bool sync_table_log();
bool write_log_shadow_frm(ALTER_PARTITION_PARAM_TYPE *lpt, bool install_flag); bool write_log_shadow_frm(ALTER_PARTITION_PARAM_TYPE *lpt, bool install_flag);
bool write_log_drop_partition(ALTER_PARTITION_PARAM_TYPE *lpt); bool write_log_drop_partition(ALTER_PARTITION_PARAM_TYPE *lpt);
......
...@@ -3676,7 +3676,7 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -3676,7 +3676,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
unireg_abort(1); unireg_abort(1);
} }
} }
execute_table_log_recovery();
init_events(); init_events();
create_shutdown_thread(); create_shutdown_thread();
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment