List:Commits« Previous MessageNext Message »
From:cbell Date:February 27 2007 4:33pm
Subject:bk commit into 5.0 tree (cbell:1.2425) BUG#20141
View as plain text  
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@stripped, 2007-02-27 10:32:45-05:00, cbell@mysql_cab_desk. +1 -0
  BUG#20141 "User-defined variables are not replicated properly for 
            SF/Triggers in SBR mode."
  BUG#14914 "SP: Uses of session variables in routines are not always replicated"
  BUG#25167 "Dupl. usage of user-variables in trigger/function is not replicated
            correctly"
  
  This patch corrects a minor error in the previous patch for BUG#20141. This patch
  corrects an errant code change to sp_head.cc. The comments for the first patch follow:
  
  User-defined variables used inside of stored functions/triggers in
  statements which did not update tables directly were not replicated.
  We also had problems with replication of user-defined variables which
  were used in triggers (or stored functions called from table-updating
  statements) more than once.
  
  This patch addresses the first issue by enabling logging of all
  references to user-defined variables in triggers/stored functions
  and not only references from table-updating statements.
  
  The second issue stemmed from the fact that for user-defined
  variables used from triggers or stored functions called from
  table-updating statements we were writing binlog events for each
  reference instead of only one event for the first reference.
  This problem is already solved for stored functions called from
  non-updating statements with help of "event unioning" mechanism.
  So the patch simply extends this mechanism to the case affected.
  It also fixes small problem in this mechanism which caused wrong
  logging of references to user-variables in cases when non-updating
  statement called several stored functions which used the same
  variable and some of these function calls were omitted from binlog
  as they were not updating any tables.

  sql/sp_head.cc@stripped, 2007-02-27 10:32:40-05:00, cbell@mysql_cab_desk. +1 -1
    BUG#20141 "User-defined variables are not replicated properly for 
              SF/Triggers in SBR mode."
    
    This patch corrects a minor error in the previous patch for BUG#20141. The code:
    
    q= ::query_id; 
    
    was an errant line of code that was not intended to be in the patch. Instead, the
    correct line of code is:
    
    q= global_query_id;

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	cbell
# Host:	mysql_cab_desk.
# Root:	C:/source/c++/mysql-5.0_BUG_20141_fix

--- 1.233/sql/sp_head.cc	2007-02-27 10:32:56 -05:00
+++ 1.234/sql/sp_head.cc	2007-02-27 10:32:56 -05:00
@@ -1477,7 +1477,7 @@
       each invocation.
     */
     VOID(pthread_mutex_lock(&LOCK_thread_count));
-    q= ::query_id;
+    q= global_query_id;
     VOID(pthread_mutex_unlock(&LOCK_thread_count));
     mysql_bin_log.start_union_events(thd, q + 1);
   }

Thread
bk commit into 5.0 tree (cbell:1.2425) BUG#20141cbell27 Feb