List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 9 2010 6:50am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3963)
View as plain text  
#At file:///home/msvensson/mysql/tmp/mTiEIdurpp/7.1/ based on revid:magnus.blaudd@strippedol6ndq2

 3963 Magnus Blåudd	2010-11-09 [merge]
      Merge 7.0 -> 7.1

    removed:
      storage/ndb/include/portlib/PortDefs.h
    modified:
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_glue.h
      storage/ndb/include/portlib/prefetch.h
      storage/ndb/src/kernel/blocks/CMakeLists.txt
      storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2010-11-08 15:29:50 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2010-11-08 16:18:41 +0000
@@ -235,6 +235,19 @@ static void dbug_print_table(const char 
 #define dbug_print_table(a,b)
 #endif
 
+static inline void
+print_warning_list(const char* prefix, List<MYSQL_ERROR>& list)
+{
+  List_iterator_fast<MYSQL_ERROR> it(list);
+  MYSQL_ERROR *err;
+  while ((err= it++))
+  {
+    sql_print_warning("%s: (%d)%s",
+                      prefix,
+                      MYSQL_ERROR_get_sql_errno(err),
+                      MYSQL_ERROR_get_message_text(err));
+  }
+}
 
 /*
   Run a query through mysql_parse
@@ -2571,6 +2584,9 @@ static void ndb_binlog_query(THD *thd, C
   int errcode = query_error_code(thd, thd->killed == THD::NOT_KILLED);
   thd->binlog_query(THD::STMT_QUERY_TYPE, schema->query,
                     schema->query_length, FALSE,
+#ifdef NDB_THD_BINLOG_QUERY_HAS_DIRECT
+                    TRUE,
+#endif
                     schema->name[0] == 0 || thd->db[0] == 0,
                     errcode);
   thd->server_id= thd_server_id_save;
@@ -2766,10 +2782,7 @@ ndb_binlog_thread_handle_schema_event(TH
                             "my_errno: %d",
                             schema->db, schema->name, schema->query,
                             schema->node_id, my_errno);
-            List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
-            MYSQL_ERROR *err;
-            while ((err= it++))
-              sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
+            print_warning_list("NDB Binlog", thd_warn_list(thd));
           }
           mysql_mutex_unlock(&LOCK_open);
           log_query= 1;
@@ -3146,10 +3159,7 @@ ndb_binlog_thread_handle_schema_event_po
                             "binlog schema event '%s' from node %d. my_errno: %d",
                             schema->db, schema->name, schema->query,
                             schema->node_id, my_errno);
-            List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
-            MYSQL_ERROR *err;
-            while ((err= it++))
-              sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
+            print_warning_list("NDB Binlog", thd_warn_list(thd));
           }
           mysql_mutex_unlock(&LOCK_open);
         }
@@ -3328,10 +3338,7 @@ ndb_binlog_thread_handle_schema_event_po
                             "binlog schema event '%s' from node %d. my_errno: %d",
                             schema->db, schema->name, schema->query,
                             schema->node_id, my_errno);
-            List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
-            MYSQL_ERROR *err;
-            while ((err= it++))
-              sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
+            print_warning_list("NDB Binlog", thd_warn_list(thd));
           }
           mysql_mutex_unlock(&LOCK_open);
         }
@@ -4269,14 +4276,7 @@ err:
   if (do_set_binlog_flags)
     set_binlog_flags(share, NBT_DEFAULT);
   if (ndberror.code && opt_ndb_extra_logging)
-  {
-    List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
-    MYSQL_ERROR *err;
-    while ((err= it++))
-    {
-      sql_print_warning("NDB: %s Error_code: %d", err->msg, err->code);
-    }
-  }
+    print_warning_list("NDB", thd_warn_list(thd));
   DBUG_RETURN(ndberror.code);
 }
 #endif /* HAVE_NDB_BINLOG */

=== modified file 'sql/ha_ndbcluster_glue.h'
--- a/sql/ha_ndbcluster_glue.h	2010-11-08 15:29:50 +0000
+++ b/sql/ha_ndbcluster_glue.h	2010-11-08 16:34:07 +0000
@@ -38,7 +38,8 @@
 #include "transaction.h"
 #include "sql_test.h"       // print_where
 #include "sql_parse.h"      // mysql_parse
-#include "sql_truncate.h"      // mysql_truncate_table
+#include "sql_truncate.h"   // mysql_truncate_table
+#include "key.h"            // key_restore
 #else
 #include "mysql_priv.h"
 #endif
@@ -65,6 +66,12 @@ bool close_cached_tables(THD *thd, TABLE
   return close_cached_tables(thd, tables, wait_for_refresh, LONG_TIMEOUT);
 }
 
+/* simple_open_n_lock_tables has been removed */
+inline int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables)
+{
+  return open_and_lock_tables(thd, tables, FALSE, 0);
+}
+
 /* Online alter table not supported */
 #define NDB_WITHOUT_ONLINE_ALTER
 
@@ -87,6 +94,19 @@ enum column_format_type {
 /* thd has no version field anymore */
 #define NDB_THD_HAS_NO_VERSION
 
+/* thd->binlog_query has new parameter "direct" */
+#define NDB_THD_BINLOG_QUERY_HAS_DIRECT
+
+/*
+  Additional flags to use in multi range read flags
+  only used internally in ha_ndbcluster
+*/
+
+/* set when RBWR detects that read is just "memcpy" of the current key */
+#define READ_KEY_FROM_RANGE 512
+/* no more records in this range, try next if any */
+#define EMPTY_RANGE 1024
+
 #endif
 
 
@@ -102,6 +122,41 @@ ulonglong thd_options(const THD * thd)
 #endif
 }
 
+
+/* extract the list of warnings from THD */
+static inline
+List<MYSQL_ERROR>& thd_warn_list(const THD * thd)
+{
+#if MYSQL_VERSION_ID < 50500
+  return const_cast<THD*>(thd)->warn_list;
+#else
+  /* "options" has moved to "variables.option_bits" */
+  return thd->warning_info->warn_list();
+#endif
+}
+
+static inline
+const char* MYSQL_ERROR_get_message_text(const MYSQL_ERROR* err)
+{
+#if MYSQL_VERSION_ID < 50500
+  return err->msg;
+#else
+  /* "msg" is gone, use accessor */
+  return err->get_message_text();
+#endif
+}
+
+static inline
+uint MYSQL_ERROR_get_sql_errno(const MYSQL_ERROR* err)
+{
+#if MYSQL_VERSION_ID < 50500
+  return err->code;
+#else
+  /* "code" is gone, use accessor */
+  return err->get_sql_errno();
+#endif
+}
+
 #if MYSQL_VERSION_ID < 50500
 
 /*

=== removed file 'storage/ndb/include/portlib/PortDefs.h'
--- a/storage/ndb/include/portlib/PortDefs.h	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/include/portlib/PortDefs.h	1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; version 2 of the License.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
-*/
-
-#ifndef PORT_DEFS_H
-#define PORT_DEFS_H
-/*
-   This file contains varoius declarations/definitions needed in the port of AXEVM to NT, as well as backporting
-   to Solaris...
-
-  $Id: PortDefs.h,v 1.5 2003/10/07 07:59:59 mikael Exp $
-*/
-
-#ifdef NDB_ALPHA
-#ifdef NDB_GCC /* only for NDB_ALPHA */
-extern int gnuShouldNotUseRPCC();
-#define RPCC() gnuShouldNotUseRPCC();
-#else 
-#define RPCC() ((int)__asm(" rpcc v0;"))
-#define MB() __asm(" mb;");
-#define WMB() __asm(" wmb;");
-#ifdef USE_INITIALSP
-#define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
-#else /* USE_INITIALSP */
-#define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
-#endif
-#endif /* NDB_GCC */
-#else /* NDB_ALPHA */
-#if defined NDB_SPARC
-#define MB() asm ("membar 0x0;");  /* LoadLoad */
-#define WMB() asm ("membar 0x3;"); /* StoreStore */
-#else /* NDB_SPARC */
-#define MB()
-#define WMB()
-#endif /* NDB_SPARC */
-#define IS_IP() (1==1)
-extern int shouldNotUseRPCC();
-#define RPCC() shouldNotUseRPCC();
-#endif /* NDB_ALPHA */
-
-#endif

=== modified file 'storage/ndb/include/portlib/prefetch.h'
--- a/storage/ndb/include/portlib/prefetch.h	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/include/portlib/prefetch.h	2010-11-09 06:49:19 +0000
@@ -35,8 +35,6 @@
 #define WRITEHINT(addr)
 #endif
 
-#include "PortDefs.h"
-
 #ifdef NDB_FORTE6
 #pragma optimize("", off)
 #endif

=== modified file 'storage/ndb/src/kernel/blocks/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/CMakeLists.txt	2010-08-17 12:25:20 +0000
+++ b/storage/ndb/src/kernel/blocks/CMakeLists.txt	2010-11-08 16:26:18 +0000
@@ -21,6 +21,12 @@ ADD_SUBDIRECTORY(dbtup)
 
 INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
 
+IF(WIN32)
+  SET(EXTRA_SRC ndbfs/Win32AsyncFile.cpp)
+ELSE()
+  SET(EXTRA_SRC ndbfs/PosixAsyncFile.cpp)
+ENDIF()
+
 ADD_LIBRARY(ndbblocks STATIC
     tsman.cpp lgman.cpp pgman.cpp diskpage.cpp restore.cpp
     cmvmi/Cmvmi.cpp
@@ -39,8 +45,7 @@ ADD_LIBRARY(ndbblocks STATIC
     dbtup/DbtupDebug.cpp dbtup/DbtupScan.cpp
     dbtup/DbtupDiskAlloc.cpp dbtup/DbtupVarAlloc.cpp
     dbtup/tuppage.cpp dbtup/Undo_buffer.cpp
-    ndbfs/AsyncIoThread.cpp
-    ndbfs/Win32AsyncFile.cpp ndbfs/AsyncFile.cpp
+    ndbfs/AsyncIoThread.cpp ndbfs/AsyncFile.cpp
     ndbfs/Ndbfs.cpp
     ndbfs/VoidFs.cpp
     ndbfs/Filename.cpp
@@ -65,7 +70,7 @@ ADD_LIBRARY(ndbblocks STATIC
     dblqh/DblqhCommon.cpp
     PgmanProxy.cpp
     dbtup/DbtupClient.cpp
-)
+    ${EXTRA_SRC})
 
 ADD_EXECUTABLE(ndb_print_file
     print_file.cpp

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2010-10-07 05:39:39 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp	2010-11-08 16:25:48 +0000
@@ -169,7 +169,6 @@ done:
 void
 AsyncFile::writevReq(Request * request)
 {
-  // WriteFileGather on WIN32?
   writeReq(request);
 }
 

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3963) Magnus Blåudd9 Nov