WL 2826: Error handling of ALTER TABLE for partitioning

Final review fixes
parent 14d75e5b
...@@ -1282,9 +1282,6 @@ typedef struct st_ddl_log_memory_entry ...@@ -1282,9 +1282,6 @@ typedef struct st_ddl_log_memory_entry
} DDL_LOG_MEMORY_ENTRY; } DDL_LOG_MEMORY_ENTRY;
#define DDL_LOG_HANDLER_TYPE_LEN 32
bool write_ddl_log_entry(DDL_LOG_ENTRY *ddl_log_entry, bool write_ddl_log_entry(DDL_LOG_ENTRY *ddl_log_entry,
DDL_LOG_MEMORY_ENTRY **active_entry); DDL_LOG_MEMORY_ENTRY **active_entry);
bool write_execute_ddl_log_entry(uint first_entry, bool write_execute_ddl_log_entry(uint first_entry,
...@@ -1474,9 +1471,6 @@ extern ulong delayed_insert_timeout; ...@@ -1474,9 +1471,6 @@ extern ulong delayed_insert_timeout;
extern ulong delayed_insert_limit, delayed_queue_size; extern ulong delayed_insert_limit, delayed_queue_size;
extern ulong delayed_insert_threads, delayed_insert_writes; extern ulong delayed_insert_threads, delayed_insert_writes;
extern ulong delayed_rows_in_use,delayed_insert_errors; extern ulong delayed_rows_in_use,delayed_insert_errors;
#ifdef ERROR_INJECT_SUPPORT
extern ulong error_inject_value;
#endif
extern ulong slave_open_temp_tables; extern ulong slave_open_temp_tables;
extern ulong query_cache_size, query_cache_min_res_unit; extern ulong query_cache_size, query_cache_min_res_unit;
extern ulong slow_launch_threads, slow_launch_time; extern ulong slow_launch_threads, slow_launch_time;
......
...@@ -764,20 +764,20 @@ bool write_ddl_log_entry(DDL_LOG_ENTRY *ddl_log_entry, ...@@ -764,20 +764,20 @@ bool write_ddl_log_entry(DDL_LOG_ENTRY *ddl_log_entry,
int4store(&global_ddl_log.file_entry_buf[DDL_LOG_NEXT_ENTRY_POS], int4store(&global_ddl_log.file_entry_buf[DDL_LOG_NEXT_ENTRY_POS],
ddl_log_entry->next_entry); ddl_log_entry->next_entry);
DBUG_ASSERT(strlen(ddl_log_entry->name) < FN_LEN); DBUG_ASSERT(strlen(ddl_log_entry->name) < FN_LEN);
strncpy(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS], strmake(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS],
ddl_log_entry->name, FN_LEN); ddl_log_entry->name, FN_LEN - 1);
if (ddl_log_entry->action_type == DDL_LOG_RENAME_ACTION || if (ddl_log_entry->action_type == DDL_LOG_RENAME_ACTION ||
ddl_log_entry->action_type == DDL_LOG_REPLACE_ACTION) ddl_log_entry->action_type == DDL_LOG_REPLACE_ACTION)
{ {
DBUG_ASSERT(strlen(ddl_log_entry->from_name) < FN_LEN); DBUG_ASSERT(strlen(ddl_log_entry->from_name) < FN_LEN);
strncpy(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + FN_LEN], strmake(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + FN_LEN],
ddl_log_entry->from_name, FN_LEN); ddl_log_entry->from_name, FN_LEN - 1);
} }
else else
global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + FN_LEN]= 0; global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + FN_LEN]= 0;
DBUG_ASSERT(strlen(ddl_log_entry->handler_name) < FN_LEN); DBUG_ASSERT(strlen(ddl_log_entry->handler_name) < FN_LEN);
strncpy(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + (2*FN_LEN)], strmake(&global_ddl_log.file_entry_buf[DDL_LOG_NAME_POS + (2*FN_LEN)],
ddl_log_entry->handler_name, FN_LEN); ddl_log_entry->handler_name, FN_LEN - 1);
if (get_free_ddl_log_entry(active_entry, &write_header)) if (get_free_ddl_log_entry(active_entry, &write_header))
{ {
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
......
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