List:Commits« Previous MessageNext Message »
From:Lars Thalmann Date:October 25 2006 3:10pm
Subject:bk commit into 5.0 tree (lars:1.2289)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of lthalmann. When lthalmann 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, 2006-10-25 17:10:18+02:00, lars@stripped +2 -0
  Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
  into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
  MERGE: 1.2258.71.4

  myisam/mi_open.c@stripped, 2006-10-25 17:10:14+02:00, lars@stripped +0 -0
    Auto merged
    MERGE: 1.95.1.1

  sql/slave.cc@stripped, 2006-10-25 17:10:14+02:00, lars@stripped +0 -1
    Auto merged
    MERGE: 1.279.1.1

# 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:	lars
# Host:	dl145h.mysql.com
# Root:	/users/lthalmann/bk/MERGE/mysql-5.0-merge/RESYNC

--- 1.96/myisam/mi_open.c	2006-10-25 17:10:28 +02:00
+++ 1.97/myisam/mi_open.c	2006-10-25 17:10:28 +02:00
@@ -208,7 +208,10 @@ MI_INFO *mi_open(const char *name, int m
 	 ((open_flags & HA_OPEN_ABORT_IF_CRASHED) &&
 	  (my_disable_locking && share->state.open_count))))
     {
-      DBUG_PRINT("error",("Table is marked as crashed"));
+      DBUG_PRINT("error",("Table is marked as crashed. open_flags: %u  "
+                          "changed: %u  open_count: %u  !locking: %d",
+                          open_flags, share->state.changed,
+                          share->state.open_count, my_disable_locking));
       my_errno=((share->state.changed & STATE_CRASHED_ON_REPAIR) ?
 		HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE);
       goto err;

--- 1.281/sql/slave.cc	2006-10-25 17:10:28 +02:00
+++ 1.282/sql/slave.cc	2006-10-25 17:10:28 +02:00
@@ -3345,9 +3345,9 @@ static int exec_relay_log_event(THD* thd
         const char *errmsg;
         /*
           We were in a transaction which has been rolled back because of a
-          deadlock (currently, InnoDB deadlock detected by InnoDB) or lock
-          wait timeout (innodb_lock_wait_timeout exceeded); let's seek back to
-          BEGIN log event and retry it all again.
+        Sonera  deadlock. if lock wait timeout (innodb_lock_wait_timeout exceeded)
+	  there is no rollback since 5.0.13 (ref: manual).
+	  let's seek back to BEGIN log event and retry it all again.
           We have to not only seek but also
           a) init_master_info(), to seek back to hot relay log's start for later
           (for when we will come back to this hot log after re-processing the
@@ -3369,6 +3369,7 @@ static int exec_relay_log_event(THD* thd
           else
           {
             exec_res= 0;
+	    end_trans(thd, ROLLBACK);
 	    /* chance for concurrent connection to get more locks */
             safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE),
 		       (CHECK_KILLED_FUNC)sql_slave_killed, (void*)rli);
@@ -3386,9 +3387,17 @@ static int exec_relay_log_event(THD* thd
                           "the slave_transaction_retries variable.",
                           slave_trans_retries);
       }
-      if (!((thd->options & OPTION_BEGIN) && opt_using_transactions))
-         rli->trans_retries= 0; // restart from fresh
-     }
+      else if (!((thd->options & OPTION_BEGIN) && opt_using_transactions))
+      {
+        /*
+          Only reset the retry counter if the event succeeded or
+          failed with a non-transient error.  On a successful event,
+          the execution will proceed as usual; in the case of a
+          non-transient error, the slave will stop with an error.
+	*/
+        rli->trans_retries= 0; // restart from fresh
+      }
+    }
     return exec_res;
   }
   else
Thread
bk commit into 5.0 tree (lars:1.2289)Lars Thalmann25 Oct