3353 Alfranio Correia 2009-06-11 [merge]
auto-merge mysql-6.0-bugteam (local) --> mysql-6.0-bugteam
modified:
sql/sql_repl.cc
3352 Davi Arnaut 2009-06-10 [merge]
Merge from mysql-5.1-bugteam.
=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc 2009-05-25 10:10:18 +0000
+++ b/sql/sql_repl.cc 2009-06-09 19:11:12 +0000
@@ -30,6 +30,7 @@ my_bool opt_sporadic_binlog_dump_fail =
static int binlog_dump_count = 0;
#endif
extern my_bool disable_slaves;
+static bool slave_start_inited= FALSE;
/*
fake_rotate_event() builds a fake (=which does not exist physically in any
@@ -1015,6 +1016,7 @@ void init_slave_start()
reason_slave_blocked.length= 0;
reason_slave_blocked.str= (char *)"";
pthread_mutex_unlock(&LOCK_slave_start);
+ slave_start_inited= TRUE;
}
@@ -1024,7 +1026,11 @@ void init_slave_start()
void end_slave_start()
{
- pthread_mutex_destroy(&LOCK_slave_start);
+ if (slave_start_inited)
+ /*
+ Note that is safe to destroy an initialized mutex that is unlocked.
+ */
+ pthread_mutex_destroy(&LOCK_slave_start);
}
Attachment: [text/bzr-bundle]
| Thread |
|---|
| • bzr push into mysql-pe branch (alfranio.correia:3352 to 3353) | Alfranio Correia | 11 Jun |