Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

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


Below is the list of changes that have just been committed into a local 5.0 repository of cbell. When cbell does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository.
For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

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

+++ b/sql/log.cc 2007-08-30 15:34:48 -04:00
@@ -1842,8 +1842,13 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE /* Log "BEGIN" at the beginning of the transaction. which may contain more than 1 SQL statement.
+
+ We also need to write the "BEGIN" if we are using transactional
+ engines (nht == 1 whenever binlog_start_trans_and_stmt() is called)
+ indicated by nht > 1 in the st_thd_trans (THD_TRANS) structure.
*/

- 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.com
Received 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


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library