|
|||||||||||
|
bk commit into 5.0 tree (cbell:1.2499) BUG#26395
From: <cbell(at)mysql.com>
Date: Thu Aug 30 2007 - 15:35:32 EDT
ChangeSet@1.2499, 2007-08-30 15:34:50-04:00, cbell@mysql_cab_desk. +1 -0 BUG#26395 : if crash during autocommit update to transactional table on master, slave fails This patch ensures that a BEGIN statement is written every time the method MYSQL_LOG::write() there is called with a transactional engine present. sql/log.cc@1.221, 2007-08-30 15:34:48-04:00, cbell@mysql_cab_desk. +6 -2 BUG#26395 : if crash during autocommit update to transactional table on master, slave fails This patch adds a condition to the code to write the "BEGIN" statement every time the method MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event) is called with a transactional engine present. diff -Nrup a/sql/log.cc b/sql/log.cc --- a/sql/log.cc 2007-07-30 11:27:30 -04:00 - if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) + if ((thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) || + (thd->transaction.stmt.nht > 1))
{
Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, FALSE);
/*
@@ -1871,7 +1876,6 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE
goto err;
length= my_b_bytes_in_cache(cache);
- DBUG_EXECUTE_IF("half_binlogged_transaction", length-=100;);
/*
The events in the buffer have incorrect end_log_pos data
-- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Thu Aug 30 15:36:25 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 08:59:36 EDT |
||||||||||
|
|||||||||||