summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-01-26 22:26:24 -0700
committerunknown <sasha@mysql.sashanet.com>2002-01-26 22:26:24 -0700
commit83666b3e54fb1ae572f1125bfc171b42c9692436 (patch)
tree7805cfd6c7eb661c4f3022b7fc37478a0908a190 /sql/log.cc
parent845db7c20ba28e014c5a36a6c95afd8ed111f316 (diff)
downloadmariadb-git-83666b3e54fb1ae572f1125bfc171b42c9692436.tar.gz
misc replication bugfixes including some needed modifications in IO_CACHE
likely() and unlikely() branch prediction compiler hint macros clean-up of comments include/my_global.h: added likely() and unlikely() macros to help some compilers optimize the code for architecture-specific branch prediction policies include/my_sys.h: coverted my_b_append_tell() from macro to a function as it needed to be more complex to avoid a potential race condition mysql-test/mysql-test-run.sh: hostname-independent relay log name to have consistent SHOW SLAVE STATUS output mysql-test/r/rpl000014.result: result update mysql-test/r/rpl000015.result: result update mysql-test/r/rpl000016.result: result update mysql-test/r/rpl_log.result: result update mysql-test/t/rpl000017-slave.sh: proper cleanup of old logs mysys/mf_iocache.c: cosmetic changes + more debugging asserts mysys/mf_iocache2.c: my_b_append_tell() cleanup of comments sql/log.cc: fix potential bug - do not rotate log in the middle of event sql/slave.cc: do not write stop events when the server does not actually stop but just rotates the log fixed race between queue_event() and show_slave_status() clean-up of comments sql/slave.h: added ignore_stop_event flag to SLAVE_LOG_INFO
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/log.cc b/sql/log.cc
index d3ad4564a73..17b6ef4344c 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -742,12 +742,13 @@ bool MYSQL_LOG::appendv(const char* buf, uint len,...)
error = 1;
break;
}
- if ((uint)my_b_append_tell(&log_file) > max_binlog_size)
- {
- new_file(1);
- }
} while ((buf=va_arg(args,const char*)) && (len=va_arg(args,uint)));
+ if ((uint)my_b_append_tell(&log_file) > max_binlog_size)
+ {
+ new_file(1);
+ }
+
if (!error)
signal_update();
pthread_mutex_unlock(&LOCK_log);