diff options
author | unknown <monty@mashka.mysql.fi> | 2003-07-14 10:12:05 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-07-14 10:12:05 +0300 |
commit | e1a30696034b70e3bf78036aa75a6e8389ebb2c4 (patch) | |
tree | 85936c89d5a7b0f3d650ffa18d3d2990a7c252fa /sql/log_event.cc | |
parent | d1b9076e5102ffcffa86b488ecfcb26fd03b8884 (diff) | |
download | mariadb-git-e1a30696034b70e3bf78036aa75a6e8389ebb2c4.tar.gz |
Safety and speedup fixes:
Changed is_open() to work as before.
Added back inited argument to LOG
mysql-test/r/rpl_flush_log_loop.result:
Fixed results (probably bug in previous rpatch)
sql/handler.cc:
Changed is_open() to work as before
sql/item_func.cc:
Changed is_open() to work as before
sql/log.cc:
Part revert of previous patch.
The reason for adding back 'inited' is that is that we can't be 100 % sure that init_pthread_objects() is called before mysqld dies (for example on windows)
I removed mutex lock handling in is_open() as the new code didn't have ANY affect except beeing slower.
Added back checking of is_open() to some functions as we don't want to do a mutex lock when we are not using logging.
Indentation/comment fixes
sql/log_event.cc:
Changed is_open() to work as before
sql/repl_failsafe.cc:
Changed is_open() to work as before
sql/sql_base.cc:
Changed is_open() to work as before
sql/sql_class.h:
Changed is_open() to work as before. Added back 'inited' variable
sql/sql_db.cc:
Changed is_open() to work as before
sql/sql_delete.cc:
Changed is_open() to work as before
sql/sql_insert.cc:
Changed is_open() to work as before
sql/sql_load.cc:
Changed is_open() to work as before
sql/sql_parse.cc:
Changed is_open() to work as before
sql/sql_rename.cc:
Changed is_open() to work as before
sql/sql_repl.cc:
Changed is_open() to work as before
sql/sql_table.cc:
Changed is_open() to work as before
sql/sql_update.cc:
Changed is_open() to work as before
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 5a0a243c57b..a6d2abbf894 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(1)) + if (mysql_bin_log.is_open()) 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(1)) + if (mysql_bin_log.is_open()) 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(1)) + if (mysql_bin_log.is_open()) 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(1)) + if (mysql_bin_log.is_open()) 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(1)) + if (mysql_bin_log.is_open()) mysql_bin_log.write(this); error = 0; |