Commit d98fe8b7 authored by mikael@zim.(none)'s avatar mikael@zim.(none)

Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  zim.(none):/home/mikael/bug19313
parents 55ccf0fe fdb8043e
......@@ -428,10 +428,6 @@ static uint read_ddl_log_header()
bool successful_open= FALSE;
DBUG_ENTER("read_ddl_log_header");
bzero(file_entry_buf, sizeof(global_ddl_log.file_entry_buf));
global_ddl_log.inited= FALSE;
global_ddl_log.recovery_phase= TRUE;
global_ddl_log.io_size= IO_SIZE;
create_ddl_log_file_name(file_name);
if ((global_ddl_log.file_id= my_open(file_name,
O_RDWR | O_BINARY, MYF(MY_WME))) >= 0)
......@@ -1067,6 +1063,15 @@ void execute_ddl_log_recovery()
char file_name[FN_REFLEN];
DBUG_ENTER("execute_ddl_log_recovery");
/*
Initialise global_ddl_log struct
*/
bzero(global_ddl_log.file_entry_buf, sizeof(global_ddl_log.file_entry_buf));
global_ddl_log.inited= FALSE;
global_ddl_log.recovery_phase= TRUE;
global_ddl_log.io_size= IO_SIZE;
global_ddl_log.file_id=(File)-1;
/*
To be able to run this from boot, we allocate a temporary THD
*/
......@@ -1130,6 +1135,7 @@ void release_ddl_log()
my_free((char*)free_list, MYF(0));
free_list= tmp;
}
if (global_ddl_log.file_id != (File)-1)
VOID(my_close(global_ddl_log.file_id, MYF(0)));
pthread_mutex_unlock(&LOCK_gdl);
VOID(pthread_mutex_destroy(&LOCK_gdl));
......
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