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() ...@@ -428,10 +428,6 @@ static uint read_ddl_log_header()
bool successful_open= FALSE; bool successful_open= FALSE;
DBUG_ENTER("read_ddl_log_header"); 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); create_ddl_log_file_name(file_name);
if ((global_ddl_log.file_id= my_open(file_name, if ((global_ddl_log.file_id= my_open(file_name,
O_RDWR | O_BINARY, MYF(MY_WME))) >= 0) O_RDWR | O_BINARY, MYF(MY_WME))) >= 0)
...@@ -1067,6 +1063,15 @@ void execute_ddl_log_recovery() ...@@ -1067,6 +1063,15 @@ void execute_ddl_log_recovery()
char file_name[FN_REFLEN]; char file_name[FN_REFLEN];
DBUG_ENTER("execute_ddl_log_recovery"); 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 To be able to run this from boot, we allocate a temporary THD
*/ */
...@@ -1130,7 +1135,8 @@ void release_ddl_log() ...@@ -1130,7 +1135,8 @@ void release_ddl_log()
my_free((char*)free_list, MYF(0)); my_free((char*)free_list, MYF(0));
free_list= tmp; free_list= tmp;
} }
VOID(my_close(global_ddl_log.file_id, MYF(0))); if (global_ddl_log.file_id != (File)-1)
VOID(my_close(global_ddl_log.file_id, MYF(0)));
pthread_mutex_unlock(&LOCK_gdl); pthread_mutex_unlock(&LOCK_gdl);
VOID(pthread_mutex_destroy(&LOCK_gdl)); VOID(pthread_mutex_destroy(&LOCK_gdl));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
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