MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:guilhem Date:September 7 2005 2:44pm
Subject:bk commit into 5.0 tree (guilhem:1.1936)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.1936 05/09/07 16:44:37 guilhem@stripped +2 -0
  WL#1012: if Table_map_log_event::exec_event() on slave fails to open a table (e.g. table exists on master but not on slave, and include/exclude rules are not concerned),
  print the error to the slave's error log.

  sql/sql_class.cc
    1.204 05/09/07 16:44:33 guilhem@stripped +1 -1
    pending may be 0

  sql/log_event.cc
    1.197 05/09/07 16:44:33 guilhem@stripped +16 -0
    if Table_map_log_event::exec_event() on slave fails to open a table (e.g. table exists on master but not on slave, and include/exclude rules are not concerned),
    print the error to the slave's error log.

# 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.0-wl1012

--- 1.196/sql/log_event.cc	2005-09-06 14:56:53 +02:00
+++ 1.197/sql/log_event.cc	2005-09-07 16:44:33 +02:00
@@ -5447,7 +5447,23 @@
     {
       TABLE_LIST *tables= &table_list;
       if ((error= open_tables(thd, &tables, &count, 0)))
+      {
+        if (thd->query_error || thd->is_fatal_error)
+        {
+          /*
+            Error reporting borrowed from Query_log_event with many excessive
+            simplifications (we don't honour --slave-skip-errors)
+          */
+          uint actual_error= thd->net.last_errno;
+          slave_print_error(rli,actual_error,
+                            "Error '%s' on opening table `%s`.`%s`",
+                            (actual_error ? thd->net.last_error :
+                             "unexpected success or fatal error"),
+                            m_dbnam, m_tblnam);
+          thd->query_error= 1;
+        }
         DBUG_RETURN(error);
+      }
     } 
 
     /*

--- 1.203/sql/sql_class.cc	2005-09-06 14:56:53 +02:00
+++ 1.204/sql/sql_class.cc	2005-09-07 16:44:33 +02:00
@@ -2084,7 +2084,7 @@
 
   Rows_log_event* pending= binlog_get_pending_rows_event();
 
-  if (unlikely(!pending->is_valid()))
+  if (unlikely(pending && !pending->is_valid()))
     return NULL;
 
   /*
Thread
bk commit into 5.0 tree (guilhem:1.1936)guilhem7 Sep