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/sql_insert.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/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 167ccf974c7..f94963f2570 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -308,7 +308,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields, if ((info.copied || info.deleted) && (error <= 0 || !transactional_table)) { mysql_update_log.write(thd, thd->query, thd->query_length); - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) { Query_log_event qinfo(thd, thd->query, thd->query_length, log_delayed); @@ -1143,7 +1143,7 @@ bool delayed_insert::handle_inserts(void) { int error; uint max_rows; - bool using_ignore=0, using_bin_log=mysql_bin_log.is_open(); + bool using_ignore=0, using_bin_log=mysql_bin_log.is_open(1); delayed_row *row; DBUG_ENTER("handle_inserts"); @@ -1361,7 +1361,7 @@ void select_insert::send_error(uint errcode,const char *err) if (last_insert_id) thd->insert_id(last_insert_id); // For binary log mysql_update_log.write(thd,thd->query,thd->query_length); - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) { Query_log_event qinfo(thd, thd->query, thd->query_length, table->file->has_transactions()); @@ -1387,7 +1387,7 @@ bool select_insert::send_eof() thd->insert_id(last_insert_id); // For binary log /* Write to binlog before commiting transaction */ mysql_update_log.write(thd,thd->query,thd->query_length); - if (mysql_bin_log.is_open()) + if (mysql_bin_log.is_open(1)) { Query_log_event qinfo(thd, thd->query, thd->query_length, table->file->has_transactions()); |