diff options
author | monty@narttu.mysql.fi <> | 2003-08-28 06:08:17 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-08-28 06:08:17 +0300 |
commit | 8a77f97079d0d51ccc58340c258c275de122dadd (patch) | |
tree | 41b52ce07c94e5878b59ffb52bf26ad79aa89469 /sql/log.cc | |
parent | c24e0fcc46c08d14a456e2b64ae7b9e43b988c99 (diff) | |
download | mariadb-git-8a77f97079d0d51ccc58340c258c275de122dadd.tar.gz |
Add detection of in_addr_t
Add pack_bits to pack_reclength for dynamic rows. This solves buffer a possible buffer overflow on update.
(This will probably solve bug #563)
Fix test for available file descriptors in mysqltest
Fixed core dump bug in replication tests when running without transactional table support
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/log.cc b/sql/log.cc index ce06092cfb7..bd5aeb02121 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1059,8 +1059,9 @@ bool MYSQL_LOG::write(Log_event* event_info) */ if (is_open()) { - bool should_rotate = 0; - const char *local_db = event_info->get_db(); + bool should_rotate= 0; + const char *local_db= event_info->get_db(); + IO_CACHE *file= &log_file; #ifdef USING_TRANSACTIONS /* Should we write to the binlog cache or to the binlog on disk? @@ -1071,13 +1072,11 @@ bool MYSQL_LOG::write(Log_event* event_info) trans/non-trans table types the best possible in binlogging) - or if the event asks for it (cache_stmt == true). */ - IO_CACHE *file = ((event_info->get_cache_stmt() || - my_b_tell(&thd->transaction.trans_log)) ? - &thd->transaction.trans_log : - &log_file); -#else - IO_CACHE *file = &log_file; -#endif + if (opt_using_transactions && + (event_info->get_cache_stmt() || + (thd && my_b_tell(&thd->transaction.trans_log)))) + file= &thd->transaction.trans_log; +#endif DBUG_PRINT("info",("event type=%d",event_info->get_type_code())); /* In the future we need to add to the following if tests like |