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_table.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_table.cc')
-rw-r--r-- | sql/sql_table.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index cf430aec35d..2d024ded5db 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -235,7 +235,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, if (!dont_log_query) { 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, tmp_table_deleted && !some_tables_deleted); @@ -766,7 +766,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, { // Must be written before unlock 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, test(create_info->options & @@ -1548,7 +1548,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, if (!error) { 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, 0); mysql_bin_log.write(&qinfo); @@ -1918,7 +1918,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, goto err; } 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, 0); mysql_bin_log.write(&qinfo); @@ -2050,7 +2050,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } thd->proc_info="end"; 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, 0); mysql_bin_log.write(&qinfo); |