summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-08-28 06:08:17 +0300
committerunknown <monty@narttu.mysql.fi>2003-08-28 06:08:17 +0300
commit26bb50a19b8c3a79a745d052c14f73a5a06e466e (patch)
tree41b52ce07c94e5878b59ffb52bf26ad79aa89469 /sql
parentad4fdb79cd4c6f06a1a09e0ded07cb7e8c76f07c (diff)
downloadmariadb-git-26bb50a19b8c3a79a745d052c14f73a5a06e466e.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 acconfig.h: Add detection of in_addr_t acinclude.m4: Add detection of in_addr_t configure.in: Add detection of in_addr_t extra/my_print_defaults.c: Cleanup extra/resolveip.c: Add detection of in_addr_t libmysql/dll.c: Fixed C++ commments myisam/mi_dynrec.c: Add ASSERT if allocated record length is to small myisam/mi_open.c: Add pack_bits to pack_reclength for dynamic rows. This solves buffer a possible buffer overflow on update. myisam/mi_test_all.sh: Added valgrind option to make it easier to verify tests mysql-test/include/check_var_limit.inc: Fix test for available file descriptors mysql-test/r/myisam.result: More tests mysql-test/t/myisam.test: More tests mysql-test/t/query_cache_merge.test: Fix test for available file descriptors mysys/default.c: Cleanup mysys/my_pthread.c: Remove C++ comments sql/log.cc: Code cleanup Fixed core dump bug in replication tests when running without transactional table support.
Diffstat (limited to 'sql')
-rw-r--r--sql/log.cc17
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