diff options
author | guilhem@mysql.com <> | 2003-07-11 14:26:44 +0200 |
---|---|---|
committer | guilhem@mysql.com <> | 2003-07-11 14:26:44 +0200 |
commit | fbebac9a484bf08a6f557c40bd502045db6d2356 (patch) | |
tree | 34a41398a9e8bce12d2127daa5a9368be53ca798 /sql/log_event.cc | |
parent | 2ca501f7ea66e862ad4b064a175a83bad930f8ba (diff) | |
download | mariadb-git-fbebac9a484bf08a6f557c40bd502045db6d2356.tar.gz |
Fix for BUG#791:
a safer way of initing the mutexes in MYSQL_LOG.
is_open() is now always thread-safe.
See each file for details.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index a6d2abbf894..5a0a243c57b 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2167,7 +2167,7 @@ int Rand_log_event::exec_event(struct st_relay_log_info* rli) int Slave_log_event::exec_event(struct st_relay_log_info* rli) { - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) mysql_bin_log.write(this); return Log_event::exec_event(rli); } @@ -2217,7 +2217,7 @@ int Create_file_log_event::exec_event(struct st_relay_log_info* rli) slave_print_error(rli,my_errno, "Write to '%s' failed", fname_buf); goto err; } - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) mysql_bin_log.write(this); error=0; // Everything is ok @@ -2237,7 +2237,7 @@ int Delete_file_log_event::exec_event(struct st_relay_log_info* rli) (void) my_delete(fname, MYF(MY_WME)); memcpy(p, ".info", 6); (void) my_delete(fname, MYF(MY_WME)); - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) mysql_bin_log.write(this); return Log_event::exec_event(rli); } @@ -2260,7 +2260,7 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli) slave_print_error(rli,my_errno, "Write to '%s' failed", fname); goto err; } - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) mysql_bin_log.write(this); error=0; @@ -2319,7 +2319,7 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli) (void) my_delete(fname, MYF(MY_WME)); memcpy(p, ".data", 6); (void) my_delete(fname, MYF(MY_WME)); - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) mysql_bin_log.write(this); error = 0; |