List:Commits« Previous MessageNext Message »
From:guilhem Date:December 15 2005 2:28pm
Subject:bk commit into 5.1 tree (guilhem:1.1965)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of guilhem. When guilhem 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.1965 05/12/15 15:28:44 guilhem@stripped +4 -0
  WL#1012 "row-based replication": I diffed sql/ with 5.1-new and grepped for "bug", "!!", "??",
  "TODO", all occurences are ok. Removing old comments. Adding thd->clear_error() if a Rows_log_event succeeded
  (event may succeed even though for example a row was not found, this is idempotency).

  sql/sql_class.h
    1.276 05/12/15 15:28:38 guilhem@stripped +0 -4
    my old comment

  sql/sql_class.cc
    1.228 05/12/15 15:28:38 guilhem@stripped +0 -6
    my old comment, not so important that it deserves being in the main code.

  sql/log_event.h
    1.148 05/12/15 15:28:38 guilhem@stripped +0 -4
    old comment (is_valid() was fixed since)

  sql/log_event.cc
    1.204 05/12/15 15:28:38 guilhem@stripped +10 -8
    Let's be safe and call thd->clear_error() in case of an accepted error when executing a Rows_log_event.

# 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:	guilhem
# Host:	gbichot3.local
# Root:	/home/mysql_src/mysql-5.1-wl1012-v3

--- 1.203/sql/log_event.cc	2005-12-14 22:45:04 +01:00
+++ 1.204/sql/log_event.cc	2005-12-15 15:28:38 +01:00
@@ -5330,10 +5330,6 @@
       case HA_ERR_RECORD_CHANGED:
       case HA_ERR_KEY_NOT_FOUND:	/* Idempotency support: OK if
                                            tuple does not exist */
-	/*
-          ToDo: clear and warnings/errors that has been pushed to the
-          thread?
-        */
 	error= 0;
       case 0:
 	break;
@@ -5473,6 +5469,15 @@
   }
 
   DBUG_ASSERT(error == 0);
+  /*
+    Clear any errors pushed in thd->net.last_err* if for example "no key
+    found" (as this is allowed). This is a safety measure; apparently those
+    errors (e.g. when executing a Delete_rows_log_event of a non-existing row,
+    like in rpl_row_mystery22.test,
+    thd->net.last_error = "Can't find record in 't1'" and last_errno=1032)
+    do not become visible. We still prefer to wipe them out.
+  */
+  thd->clear_error();
   rli->inc_event_relay_log_pos();
   
   DBUG_RETURN(0);
@@ -6012,10 +6017,7 @@
   */
   thd->lex->sql_command= SQLCOM_REPLACE;
 
-  // needed for ndbcluster
-  table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
-  /* TODO: Ensure that myisam allow write_row() with duplicate key. */
-
+  table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);   // needed for ndbcluster
   /*
     TODO: the cluster team (Tomas?) says that it's better if the engine knows
     how many rows are going to be inserted, then it can allocate needed memory

--- 1.147/sql/log_event.h	2005-12-14 22:45:04 +01:00
+++ 1.148/sql/log_event.h	2005-12-15 15:28:38 +01:00
@@ -1997,10 +1997,6 @@
 
 private:
   virtual Log_event_type get_type_code() { return (Log_event_type)TYPE_CODE; }
-  /*
-    TODO: it should not always return 1 but rather perform checks on the event
-    (could all members be alloced etc).
-  */
 
 #ifdef MYSQL_CLIENT
   void print(FILE *file, PRINT_EVENT_INFO *print_event_info);

--- 1.227/sql/sql_class.cc	2005-12-13 16:10:49 +01:00
+++ 1.228/sql/sql_class.cc	2005-12-15 15:28:38 +01:00
@@ -2111,12 +2111,6 @@
   inserted/updated/deleted.
 */
 
-/*
-  Sounds strange to have ifndef MYSQL_CLIENT, as we don't put a copy of
-  sql_class.cc in client/. But this may happen in the future (for mysqlbinlog
-  to be able to "execute" row-based binlog events, so Mats has already put the
-  ifndef.
-*/
 #ifndef MYSQL_CLIENT
 #ifdef HAVE_ROW_BASED_REPLICATION
 

--- 1.275/sql/sql_class.h	2005-12-13 16:10:49 +01:00
+++ 1.276/sql/sql_class.h	2005-12-15 15:28:38 +01:00
@@ -1225,10 +1225,6 @@
   void *ha_data[MAX_HA];
 
 #ifdef HAVE_ROW_BASED_REPLICATION
-/*
-  When mysqlbinlog is made to understand Rows events, we may have
-  to include sql_class.h in client/ so Mats already put the ifndef below.
-*/
 #ifndef MYSQL_CLIENT
 
   /*
Thread
bk commit into 5.1 tree (guilhem:1.1965)guilhem15 Dec