List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:November 14 2011 11:51am
Subject:bzr push into mysql-trunk-cluster branch (magnus.blaudd:3396 to 3402)
Bug#54316 WL#5881
View as plain text  
 3402 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove MCP tags for BUG#54316
       - fix review comments

    modified:
      client/mysqldump.c
 3401 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove the MCP patch for BUG#59948 and instead
         patch the problem in ha_ndbcluster::print_error
         (cherrypick fix from 5.5-cluster)

    modified:
      sql/ha_ndbcluster.cc
      sql/handler.cc
 3400 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove MCP_NDB_BUILD_INTEGRATION patch from cmake/configure.pl
       - remove small changes in BUILD/

    modified:
      BUILD/compile-ndb-autotest
      BUILD/compile-pentium-debug-max-no-ndb
      cmake/configure.pl
 3399 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove MCP tags from patch that signals server started also in
          embedded library

    modified:
      libmysqld/lib_sql.cc
 3398 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove MCP tags from mtr.pl

    modified:
      mysql-test/mysql-test-run.pl
 3397 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - Remove MCP tags around fix for compilation error inside
         HAVE_NDB_BINLOG

    modified:
      sql/rpl_reporting.cc
 3396 magnus.blaudd@stripped	2011-11-14
      WL#5881
       - remove MCP tags around patch for bug#33984 since it's been approved and will be merged in soon.

    modified:
      scripts/mysqld_safe.sh
=== modified file 'BUILD/compile-ndb-autotest'
--- a/BUILD/compile-ndb-autotest	2011-04-14 15:40:04 +0000
+++ b/BUILD/compile-ndb-autotest	2011-11-14 10:09:35 +0000
@@ -19,17 +19,6 @@ path=`dirname $0`
 . "$path/SETUP.sh"
 
 extra_configs="$max_configs --with-ndb-test --with-ndb-ccflags='-DERROR_INSERT'"
-if [ "$full_debug" ]
-then
-    extra_flags="$debug_cflags"
-    c_warnings="$c_warnings $debug_extra_warnings"
-    cxx_warnings="$cxx_warnings $debug_extra_warnings"
-    extra_configs="$debug_configs $extra_configs"
-else
-    extra_flags="$fast_cflags"
-fi
-
-extra_flags="$extra_flags $max_cflags -g"
-extra_configs="$extra_configs $NDB_AUTOTEST_CONFIGURE_OPTIONS"
+extra_flags="$fast_cflags $max_cflags -g"
 
 . "$path/FINISH.sh"

=== modified file 'BUILD/compile-pentium-debug-max-no-ndb'
--- a/BUILD/compile-pentium-debug-max-no-ndb	2011-03-14 15:13:48 +0000
+++ b/BUILD/compile-pentium-debug-max-no-ndb	2011-11-14 10:09:35 +0000
@@ -16,7 +16,6 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 path=`dirname $0`
-set -- "$@" --with-debug=full
 . "$path/SETUP.sh"
 
 extra_flags="$pentium_cflags $debug_cflags"

=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	2011-09-07 10:08:09 +0000
+++ b/client/mysqldump.c	2011-11-14 10:28:24 +0000
@@ -3876,12 +3876,11 @@ static int dump_tablespaces(char* ts_whe
 }
 
 
-#ifndef MCP_BUG54316
 static int
 is_ndbinfo(MYSQL* mysql, const char* dbname)
 {
-  static int checked_ndbinfo = 0;
-  static int have_ndbinfo = 0;
+  static int checked_ndbinfo= 0;
+  static int have_ndbinfo= 0;
 
   if (!checked_ndbinfo)
   {
@@ -3893,7 +3892,7 @@ is_ndbinfo(MYSQL* mysql, const char* dbn
                 "SHOW VARIABLES LIKE %s",
                 quote_for_like("ndbinfo_version", buf));
 
-    checked_ndbinfo = 1;
+    checked_ndbinfo= 1;
 
     if (mysql_query_with_error_report(mysql, &res, query))
       return 0;
@@ -3905,7 +3904,7 @@ is_ndbinfo(MYSQL* mysql, const char* dbn
       return 0;
     }
 
-    have_ndbinfo = 1;
+    have_ndbinfo= 1;
     mysql_free_result(res);
   }
 
@@ -3917,7 +3916,6 @@ is_ndbinfo(MYSQL* mysql, const char* dbn
 
   return 0;
 }
-#endif
 
 
 static int dump_all_databases()
@@ -3938,10 +3936,8 @@ static int dump_all_databases()
         !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
       continue;
 
-#ifndef MCP_BUG54316
     if (is_ndbinfo(mysql, row[0]))
       continue;
-#endif
 
     if (dump_all_tables_in_db(row[0]))
       result=1;
@@ -3965,10 +3961,8 @@ static int dump_all_databases()
           !my_strcasecmp(&my_charset_latin1, row[0], PERFORMANCE_SCHEMA_DB_NAME))
         continue;
 
-#ifndef MCP_BUG54316
-    if (is_ndbinfo(mysql, row[0]))
-      continue;
-#endif
+      if (is_ndbinfo(mysql, row[0]))
+        continue;
 
       if (dump_all_views_in_db(row[0]))
         result=1;
@@ -4076,13 +4070,11 @@ int init_dumping_tables(char *qdatabase)
 
 static int init_dumping(char *database, int init_func(char*))
 {
-#ifndef MCP_BUG54316
   if (is_ndbinfo(mysql, database))
   {
     verbose_msg("-- Skipping dump of ndbinfo database\n");
     return 0;
   }
-#endif
 
   if (mysql_select_db(mysql, database))
   {

=== modified file 'cmake/configure.pl'
--- a/cmake/configure.pl	2011-09-28 09:38:22 +0000
+++ b/cmake/configure.pl	2011-11-14 10:09:35 +0000
@@ -211,23 +211,6 @@ foreach my $option (@ARGV)
     $cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\""; 
     next;
   }
-#ifndef MCP_NDB_BUILD_INTEGRATION
-  if ($option =~ /with-classpath=/)
-  {
-    $cmakeargs = $cmakeargs." \"-DWITH_CLASSPATH=".substr($option,15)."\"";
-    next;
-  }
-  if ($option =~ /with-debug=/)
-  {
-    $cmakeargs = $cmakeargs." -DWITH_DEBUG=1";
-    next;
-  }
-  if ($option =~ /with-ndb-ccflags=/)
-  {
-    $cmakeargs = $cmakeargs." \"-DWITH_NDB_CCFLAGS=".substr($option,17)."\"";
-    next;
-  }
-#endif
   if ($option =~ /with-gcov/)
   {
       $cmakeargs = $cmakeargs." -DENABLE_GCOV=ON"; 

=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc	2011-09-07 10:08:09 +0000
+++ b/libmysqld/lib_sql.cc	2011-11-14 09:50:34 +0000
@@ -624,13 +624,11 @@ int init_embedded_server(int argc, char 
 
   execute_ddl_log_recovery();
 
-#ifndef MCP_BUGXXX
   /* Signal successful initialization */
   mysql_mutex_lock(&LOCK_server_started);
   mysqld_server_started= 1;
   mysql_cond_signal(&COND_server_started);
   mysql_mutex_unlock(&LOCK_server_started);
-#endif
 
 #ifndef MCP_BUG46955
 #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-09-28 13:20:31 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-11-14 09:46:10 +0000
@@ -2949,7 +2949,7 @@ sub ndb_mgmd_start ($$) {
   mtr_add_arg($args, "--defaults-group-suffix=%s", $cluster->suffix());
   mtr_add_arg($args, "--mycnf");
   mtr_add_arg($args, "--nodaemon");
-  mtr_add_arg($args, "--configdir=%s", "$dir"); # MCP_MTRPL
+  mtr_add_arg($args, "--configdir=%s", "$dir");
 
   my $path_ndb_mgmd_log= "$dir/ndb_mgmd.log";
 

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-09-30 10:24:10 +0000
+++ b/sql/ha_ndbcluster.cc	2011-11-14 10:18:52 +0000
@@ -12064,7 +12064,27 @@ void ha_ndbcluster::print_error(int erro
   if (error == HA_ERR_NO_PARTITION_FOUND)
     m_part_info->print_no_partition_found(table);
   else
+  {
+    if (error == HA_ERR_FOUND_DUPP_KEY &&
+        (table == NULL || table->file == NULL))
+    {
+      /*
+        This is a sideffect of 'ndbcluster_print_error' (called from
+        'ndbcluster_commit' and 'ndbcluster_rollback') which realises
+        that it "knows nothing" and creates a brand new ha_ndbcluster
+        in order to be able to call the print_error() function.
+        Unfortunately the new ha_ndbcluster hasn't been open()ed
+        and thus table pointer etc. is not set. Since handler::print_error()
+        will use that pointer without checking for NULL(it naturally
+        assumes an error can only be returned when the handler is open)
+        this would crash the mysqld unless it's handled here.
+      */
+      my_error(ER_DUP_KEY, errflag, table_share->table_name.str, error);
+      DBUG_VOID_RETURN;
+    }
+
     handler::print_error(error, errflag);
+  }
   DBUG_VOID_RETURN;
 }
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-09-28 08:58:03 +0000
+++ b/sql/handler.cc	2011-11-14 10:18:52 +0000
@@ -3325,19 +3325,6 @@ uint handler::get_dup_key(int error)
   DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
               m_lock_type != F_UNLCK);
   DBUG_ENTER("handler::get_dup_key");
-#ifndef MCP_BUG59948
-  if (table == NULL || table->file == NULL)
-  {
-    /*
-      This is a sideffect of the ndbcluster_print_error() (called from
-      ndbcluster_commit and ndbcluster_rollback). The function realises that
-      it "knows nothing" so it creates brand new ha_ndbcluster in order to be
-      able to call print_error() function. Unfortunately the handler hasn't
-      been open()ed and thus table pointer is not set.
-     */
-    DBUG_RETURN(-1);
-  }
-#endif
   table->file->errkey  = (uint) -1;
   if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOREIGN_DUPLICATE_KEY ||
       error == HA_ERR_FOUND_DUPP_UNIQUE || error == HA_ERR_NULL_IN_SPATIAL ||

=== modified file 'sql/rpl_reporting.cc'
--- a/sql/rpl_reporting.cc	2011-09-28 10:21:55 +0000
+++ b/sql/rpl_reporting.cc	2011-11-14 09:39:45 +0000
@@ -79,14 +79,9 @@ int Slave_reporting_capability::has_temp
   /*
     currently temporary error set in ndbcluster
   */
-#ifndef MCP_FIX_COMPILER_ERROR_INSIDE_HAVE_NDB_BINLOG
   Diagnostics_area::Sql_condition_iterator it=
     thd->get_stmt_da()->sql_conditions();
   const Sql_condition *err;
-#else
-  List_iterator_fast<Sql_condition> it(thd->warning_info->warn_list());
-  Sql_condition *err;
-#endif
   while ((err= it++))
   {
     DBUG_PRINT("info", ("has condition %d %s", err->get_sql_errno(),

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-cluster branch (magnus.blaudd:3396 to 3402)Bug#54316 WL#5881magnus.blaudd14 Nov