List:Commits« Previous MessageNext Message »
From:tomas Date:January 9 2006 5:04pm
Subject:bk commit into 5.1 tree (tomas:1.2030)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2030 06/01/09 18:04:10 tomas@stripped +9 -0
  post review fixes

  sql/slave.cc
    1.262 06/01/09 18:04:02 tomas@stripped +13 -3
    post review fixes

  sql/set_var.cc
    1.158 06/01/09 18:04:02 tomas@stripped +4 -0
    post review fixes

  sql/mysqld.cc
    1.516 06/01/09 18:04:02 tomas@stripped +10 -5
    post review fixes

  BitKeeper/etc/ignore
    1.220 06/01/09 18:04:02 tomas@stripped +2 -0
    Added libmysqld/ha_ndbcluster_binlog.cc libmysqld/rpl_injector.cc to the ignore list

  sql/log_event.cc
    1.195 06/01/09 18:04:01 tomas@stripped +2 -1
    post review fixes

  sql/handler.h
    1.177 06/01/09 18:04:01 tomas@stripped +1 -1
    post review fixes

  sql/handler.cc
    1.204 06/01/09 18:04:01 tomas@stripped +1 -1
    post review fixes

  sql/ha_ndbcluster.h
    1.103 06/01/09 18:04:01 tomas@stripped +2 -4
    post review fixes

  config/ac-macros/ha_ndbcluster.m4
    1.12 06/01/09 18:04:01 tomas@stripped +24 -0
    post review fixes

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-wl2325-v6

--- 1.203/sql/handler.cc	2006-01-09 15:05:22 +01:00
+++ 1.204/sql/handler.cc	2006-01-09 18:04:01 +01:00
@@ -2391,7 +2391,7 @@
   DBUG_RETURN(error);
 }
 
-#ifdef HAVE_ROW_BASED_REPLICATION
+#ifdef HAVE_NDB_BINLOG
 int ha_reset_logs(THD *thd)
 {
   bool result= 0;

--- 1.176/sql/handler.h	2006-01-09 15:05:22 +01:00
+++ 1.177/sql/handler.h	2006-01-09 18:04:01 +01:00
@@ -1629,7 +1629,7 @@
                                my_off_t end_offset);
 int ha_repl_report_replication_stop(THD *thd);
 
-#ifdef HAVE_ROW_BASED_REPLICATION
+#ifdef HAVE_NDB_BINLOG
 int ha_reset_logs(THD *thd);
 int ha_binlog_index_purge_file(THD *thd, const char *file);
 void ha_reset_slave(THD *thd);

--- 1.194/sql/log_event.cc	2006-01-09 15:05:22 +01:00
+++ 1.195/sql/log_event.cc	2006-01-09 18:04:01 +01:00
@@ -79,6 +79,7 @@
 
 inline int ignored_error_code(int err_code)
 {
+#ifdef HAVE_NDB_BINLOG
   /*
     The following error codes are hard-coded and will always be ignored.
   */
@@ -91,7 +92,7 @@
     /* Nothing to do */
     break;
   }
-
+#endif
   return ((err_code == ER_SLAVE_IGNORED_TABLE) ||
           (use_slave_mask && bitmap_is_set(&slave_error_mask, err_code)));
 }

--- 1.515/sql/mysqld.cc	2006-01-09 15:05:23 +01:00
+++ 1.516/sql/mysqld.cc	2006-01-09 18:04:02 +01:00
@@ -416,8 +416,10 @@
 ulong opt_ndb_cache_check_time;
 const char *opt_ndb_mgmd;
 ulong opt_ndb_nodeid;
+#ifdef HAVE_NDB_BINLOG
 ulong ndb_report_thresh_binlog_epoch_slip;
 ulong ndb_report_thresh_binlog_mem_usage;
+#endif
 
 extern SHOW_VAR ndb_status_variables[];
 extern const char *ndb_distribution_names[];
@@ -3111,12 +3113,9 @@
   }
   if (opt_binlog_format_id == BF_UNSPECIFIED)
   {
-#ifdef HAVE_ROW_BASED_REPLICATION
+#ifdef HAVE_NDB_BINLOG
     if (have_ndbcluster == SHOW_OPTION_YES)
-    {
-      rpl_filter->add_ignore_table("cluster_replication.binlog_index");
       opt_binlog_format_id= BF_ROW;
-    }
     else
 #endif
       opt_binlog_format_id= BF_STMT;
@@ -4856,7 +4855,11 @@
    "Tell the master the form of binary logging to use: either 'row' for "
    "row-based binary logging (which automatically turns on "
    "innodb_locks_unsafe_for_binlog as it is safe in this case), or "
-   "'statement' for statement-based logging. ",
+   "'statement' for statement-based logging. "
+#ifdef HAVE_NDB_BINLOG
+   "If ndbcluster is enabled, the default will be set to 'row'."
+#endif
+   ,
 #else
    "Tell the master the form of binary logging to use: this release build "
    "supports only statement-based binary logging, so only 'statement' is "
@@ -5307,6 +5310,7 @@
    (gptr*) &global_system_variables.ndb_force_send,
    (gptr*) &global_system_variables.ndb_force_send,
    0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+#ifdef HAVE_NDB_BINLOG
   {"ndb-report-thresh-binlog-epoch-slip", OPT_NDB_REPORT_THRESH_BINLOG_EPOCH_SLIP,
    "Threshold on number of epochs to be behind before reporting binlog status. "
    "E.g. 3 means that if the difference between what epoch has been received "
@@ -5323,6 +5327,7 @@
    (gptr*) &ndb_report_thresh_binlog_mem_usage,
    (gptr*) &ndb_report_thresh_binlog_mem_usage,
    0, GET_ULONG, REQUIRED_ARG, 10, 0, 100, 0, 0, 0},
+#endif
   {"ndb-use-exact-count", OPT_NDB_USE_EXACT_COUNT,
    "Use exact records count during query planning and for fast "
    "select count(*), disable for faster queries.",

--- 1.261/sql/slave.cc	2006-01-05 12:01:58 +01:00
+++ 1.262/sql/slave.cc	2006-01-09 18:04:02 +01:00
@@ -2885,6 +2885,13 @@
   return 0;
 }
 
+/*
+  Check if the current error is of temporary nature of not.
+  Some errors are temporary in nature, such as
+  ER_LOCK_DEADLOCK and ER_LOCK_WAIT_TIMEOUT.  Ndb also signals
+  that the error is temporary by pushing a warning with the error code
+  ER_GET_TEMPORARY_ERRMSG, if the originating error is temporary.
+*/
 static int has_temporary_error(THD *thd)
 {
   if (thd->is_fatal_error)
@@ -2899,6 +2906,7 @@
       thd->net.last_errno == ER_LOCK_WAIT_TIMEOUT)
     return 1;
 
+#ifdef HAVE_NDB_BINLOG
   /*
     currently temporary error set in ndbcluster
   */
@@ -2915,6 +2923,7 @@
       break;
     }
   }
+#endif
   return 0;
 }
 
@@ -3557,9 +3566,6 @@
     }
   }
 
-  /* WITH_NDBCLUSTER_STORAGE_ENGINE */
-  thd->variables.ndb_use_exact_count= 0;
-
   /* Read queries from the IO/THREAD until this thread is killed */
 
   while (!sql_slave_killed(thd,rli))
@@ -3572,6 +3578,10 @@
       // do not scare the user if SQL thread was simply killed or stopped
       if (!sql_slave_killed(thd,rli))
       {
+        /*
+          retrieve as much info as possible from the thd and, error codes and warnings
+          and print this to the error log as to allow the user to locate the error
+        */
         if (thd->net.last_errno != 0)
         {
           if (rli->last_slave_errno == 0)

--- 1.11/config/ac-macros/ha_ndbcluster.m4	2006-01-05 12:01:56 +01:00
+++ 1.12/config/ac-macros/ha_ndbcluster.m4	2006-01-09 18:04:01 +01:00
@@ -87,6 +87,11 @@
                            [Extra CFLAGS for ndb compile]),
               [ndb_ccflags=${withval}],
               [ndb_ccflags=""])
+  AC_ARG_WITH([ndb-binlog],
+              [
+  --without-ndb-binlog       Disable ndb binlog],
+              [ndb_binlog="$withval"],
+              [ndb_binlog="default"])
 
   case "$ndb_ccflags" in
     "yes")
@@ -220,6 +225,25 @@
     ndb_port="1186"
   fi
   
+  have_ndb_binlog="no"
+  if test X"$ndb_binlog" = Xdefault ||
+     test X"$ndb_binlog" = Xyes
+  then
+    if test X"$have_row_based" = Xyes
+    then
+      have_ndb_binlog="yes"
+    fi
+  fi
+
+  if test X"$have_ndb_binlog" = Xyes
+  then
+    AC_DEFINE([HAVE_NDB_BINLOG], [1],
+              [Including Ndb Cluster Binlog])
+    AC_MSG_RESULT([Including Ndb Cluster Binlog])
+  else
+    AC_MSG_RESULT([Not including Ndb Cluster Binlog])
+  fi
+
   ndb_transporter_opt_objs=""
   if test "$ac_cv_func_shmget" = "yes" &&
      test "$ac_cv_func_shmat" = "yes" &&

--- 1.102/sql/ha_ndbcluster.h	2006-01-09 15:05:22 +01:00
+++ 1.103/sql/ha_ndbcluster.h	2006-01-09 18:04:01 +01:00
@@ -25,10 +25,6 @@
 #pragma interface                       /* gcc class implementation */
 #endif
 
-#ifdef HAVE_ROW_BASED_REPLICATION
-#define HAVE_NDB_BINLOG
-#endif
-
 #include <NdbApi.hpp>
 #include <ndbapi_limits.h>
 
@@ -46,8 +42,10 @@
 // connectstring to cluster if given by mysqld
 extern const char *ndbcluster_connectstring;
 extern ulong ndb_cache_check_time;
+#ifdef HAVE_NDB_BINLOG
 extern ulong ndb_report_thresh_binlog_epoch_slip;
 extern ulong ndb_report_thresh_binlog_mem_usage;
+#endif
 
 typedef enum ndb_index_type {
   UNDEFINED_INDEX = 0,

--- 1.157/sql/set_var.cc	2006-01-09 15:05:23 +01:00
+++ 1.158/sql/set_var.cc	2006-01-09 18:04:02 +01:00
@@ -101,6 +101,10 @@
 
 /* WITH_NDBCLUSTER_STORAGE_ENGINE */
 extern ulong ndb_cache_check_time;
+#ifdef HAVE_NDB_BINLOG
+extern ulong ndb_report_thresh_binlog_epoch_slip;
+extern ulong ndb_report_thresh_binlog_mem_usage;
+#endif
 
 
 

--- 1.219/BitKeeper/etc/ignore	2005-12-26 09:15:44 +01:00
+++ 1.220/BitKeeper/etc/ignore	2006-01-09 18:04:02 +01:00
@@ -1661,3 +1661,5 @@
 client/mysqlslap
 storage/archive/archive_test
 item_xmlfunc.cc
+libmysqld/ha_ndbcluster_binlog.cc
+libmysqld/rpl_injector.cc
Thread
bk commit into 5.1 tree (tomas:1.2030)tomas9 Jan