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

 3955 Magnus Blåudd	2010-11-05 [merge]
      Merge 7.0 -> 7.1

    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
      sql/ha_ndbcluster_glue.h
      sql/ha_partition.cc
      storage/ndb/Makefile.am
      storage/ndb/ndb_configure.cmake
      storage/ndb/src/kernel/CMakeLists.txt
      storage/ndb/src/kernel/vm/CMakeLists.txt
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-10-22 14:25:43 +0000
+++ b/sql/ha_ndbcluster.cc	2010-11-05 09:06:56 +0000
@@ -258,10 +258,12 @@ static uint ndbcluster_partition_flags()
           HA_CAN_PARTITION_UNIQUE | HA_USE_AUTO_PARTITION);
 }
 
+#ifndef NDB_WITHOUT_ONLINE_ALTER
 static uint ndbcluster_alter_partition_flags()
 {
   return HA_PARTITION_FUNCTION_SUPPORTED;
 }
+#endif
 
 #define NDB_AUTO_INCREMENT_RETRIES 100
 #define BATCH_FLUSH_SIZE (32768)
@@ -8732,28 +8734,6 @@ void ha_ndbcluster::get_auto_increment(u
   Constructor for the NDB Cluster table handler .
 */
 
-/*
-  Normal flags for binlogging is that ndb has HA_HAS_OWN_BINLOGGING
-  and preferes HA_BINLOG_ROW_CAPABLE
-  Other flags are set under certain circumstaces in table_flags()
-*/
-#define HA_NDBCLUSTER_TABLE_FLAGS \
-                HA_REC_NOT_IN_SEQ | \
-                HA_NULL_IN_KEY | \
-                HA_AUTO_PART_KEY | \
-                HA_NO_PREFIX_CHAR_KEYS | \
-                HA_NEED_READ_RANGE_BUFFER | \
-                HA_CAN_GEOMETRY | \
-                HA_CAN_BIT_FIELD | \
-                HA_PRIMARY_KEY_REQUIRED_FOR_POSITION | \
-                HA_PRIMARY_KEY_REQUIRED_FOR_DELETE | \
-                HA_PARTIAL_COLUMN_READ | \
-                HA_HAS_OWN_BINLOGGING | \
-                HA_BINLOG_ROW_CAPABLE | \
-                HA_HAS_RECORDS | \
-                HA_ONLINE_ALTER
-
-
 ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg):
   handler(hton, table_arg),
   m_thd_ndb(NULL),
@@ -8762,7 +8742,6 @@ ha_ndbcluster::ha_ndbcluster(handlerton 
   m_ndb_record(0),
   m_ndb_hidden_key_record(0),
   m_table_info(NULL),
-  m_table_flags(HA_NDBCLUSTER_TABLE_FLAGS),
   m_share(0),
   m_key_fields(NULL),
   m_part_info(NULL),
@@ -10134,8 +10113,12 @@ static int ndbcluster_init(void *p)
     h->show_status=      ndbcluster_show_status;    /* Show status */
     h->alter_tablespace= ndbcluster_alter_tablespace;    /* Show status */
     h->partition_flags=  ndbcluster_partition_flags; /* Partition flags */
+#ifndef NDB_WITHOUT_ONLINE_ALTER
     h->alter_partition_flags=
       ndbcluster_alter_partition_flags;             /* Alter table flags */
+#else
+    /* Should install alter_table_flags */
+#endif
     h->fill_files_table= ndbcluster_fill_files_table;
     ndbcluster_binlog_init_handlerton();
     h->flags=            HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
@@ -10480,7 +10463,25 @@ ha_ndbcluster::records_in_range(uint inx
 ulonglong ha_ndbcluster::table_flags(void) const
 {
   THD *thd= current_thd;
-  ulonglong f= m_table_flags;
+  ulonglong f=
+    HA_REC_NOT_IN_SEQ |
+    HA_NULL_IN_KEY |
+    HA_AUTO_PART_KEY |
+    HA_NO_PREFIX_CHAR_KEYS |
+    HA_NEED_READ_RANGE_BUFFER |
+    HA_CAN_GEOMETRY |
+    HA_CAN_BIT_FIELD |
+    HA_PRIMARY_KEY_REQUIRED_FOR_POSITION |
+    HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
+    HA_PARTIAL_COLUMN_READ |
+    HA_HAS_OWN_BINLOGGING |
+    HA_BINLOG_ROW_CAPABLE |
+    HA_HAS_RECORDS |
+#ifndef NDB_WITHOUT_ONLINE_ALTER
+    HA_ONLINE_ALTER |
+#endif
+    0;
+
   /*
     To allow for logging of ndb tables during stmt based logging;
     flag cabablity, but also turn off flag for OWN_BINLOGGING
@@ -10489,6 +10490,7 @@ ulonglong ha_ndbcluster::table_flags(voi
     f= (f | HA_BINLOG_STMT_CAPABLE) & ~HA_HAS_OWN_BINLOGGING;
   return f;
 }
+
 const char * ha_ndbcluster::table_type() const 
 {
   return("NDBCLUSTER");
@@ -13000,7 +13002,8 @@ uint ha_ndbcluster::set_up_partition_inf
   DBUG_RETURN(0);
 }
 
-
+#ifndef NDB_WITHOUT_ONLINE_ALTER
+static
 HA_ALTER_FLAGS supported_alter_operations()
 {
   HA_ALTER_FLAGS alter_flags;
@@ -13650,7 +13653,7 @@ int ha_ndbcluster::alter_table_phase3(TH
   alter_info->data= 0;
   DBUG_RETURN(0);
 }
-
+#endif
 
 bool set_up_tablespace(st_alter_tablespace *alter_info,
                        NdbDictionary::Tablespace *ndb_ts)

=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h	2010-10-22 14:13:23 +0000
+++ b/sql/ha_ndbcluster.h	2010-11-05 09:06:56 +0000
@@ -558,6 +558,7 @@ static void set_tabname(const char *path
                                      qc_engine_callback *engine_callback,
                                      ulonglong *engine_data);
 
+#ifndef NDB_WITHOUT_ONLINE_ALTER
   int check_if_supported_alter(TABLE *altered_table,
                                HA_CREATE_INFO *create_info,
                                HA_ALTER_FLAGS *alter_flags,
@@ -579,6 +580,7 @@ static void set_tabname(const char *path
                          HA_CREATE_INFO *create_info,
                          HA_ALTER_INFO *alter_info,
                          HA_ALTER_FLAGS *alter_flags);
+#endif
 
 private:
 #ifdef HAVE_NDB_BINLOG
@@ -668,7 +670,9 @@ private:
 
   int ndb_optimize_table(THD* thd, uint delay);
 
+#ifndef NDB_WITHOUT_ONLINE_ALTER
   int alter_frm(THD *thd, const char *file, NDB_ALTER_DATA *alter_data);
+#endif
 
   bool check_all_operations_for_error(NdbTransaction *trans,
                                       const NdbOperation *first,
@@ -802,7 +806,6 @@ private:
   char m_dbname[FN_HEADLEN];
   //char m_schemaname[FN_HEADLEN];
   char m_tabname[FN_HEADLEN];
-  ulonglong m_table_flags;
   THR_LOCK_DATA m_lock;
   bool m_lock_tuple;
   NDB_SHARE *m_share;

=== modified file 'sql/ha_ndbcluster_glue.h'
--- a/sql/ha_ndbcluster_glue.h	2010-10-22 12:35:05 +0000
+++ b/sql/ha_ndbcluster_glue.h	2010-11-05 09:06:56 +0000
@@ -63,6 +63,9 @@ bool close_cached_tables(THD *thd, TABLE
   return close_cached_tables(thd, tables, wait_for_refresh, LONG_TIMEOUT);
 }
 
+/* Online alter table not supported */
+#define NDB_WITHOUT_ONLINE_ALTER
+
 #endif
 
 

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-11-02 12:50:55 +0000
+++ b/sql/ha_partition.cc	2010-11-05 09:22:28 +0000
@@ -91,7 +91,6 @@ static int partition_initialize(void *p)
   partition_hton->create= partition_create_handler;
   partition_hton->partition_flags= partition_flags;
   partition_hton->alter_partition_flags= alter_partition_flags;
-  partition_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN;
   //partition_hton->alter_table_flags= alter_table_flags; marty
   partition_hton->flags= HTON_NOT_USER_SELECTABLE |
                          HTON_HIDDEN |

=== modified file 'storage/ndb/Makefile.am'
--- a/storage/ndb/Makefile.am	2010-10-11 07:05:03 +0000
+++ b/storage/ndb/Makefile.am	2010-11-05 09:31:57 +0000
@@ -16,7 +16,7 @@
 
 SUBDIRS = include src tools . @ndb_opt_subdirs@
 DIST_SUBDIRS = src tools include test docs clusterj
-EXTRA_DIST = config cmake ndbapi-examples plug.in CMakeLists.txt
+EXTRA_DIST = config cmake ndbapi-examples plug.in CMakeLists.txt ndb_configure.cmake
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 
 include $(top_srcdir)/storage/ndb/config/common.mk.am

=== modified file 'storage/ndb/ndb_configure.cmake'
--- a/storage/ndb/ndb_configure.cmake	2010-11-03 21:13:01 +0000
+++ b/storage/ndb/ndb_configure.cmake	2010-11-05 08:39:22 +0000
@@ -123,7 +123,7 @@ IF(WITH_NDBMTD)
     read_barrier_depends();
     return a;
   }"
-  BUILD_NDBMTD)
+  NDB_BUILD_NDBMTD)
 
 ENDIF()
 

=== modified file 'storage/ndb/src/kernel/CMakeLists.txt'
--- a/storage/ndb/src/kernel/CMakeLists.txt	2010-10-29 14:07:45 +0000
+++ b/storage/ndb/src/kernel/CMakeLists.txt	2010-11-05 08:39:22 +0000
@@ -57,7 +57,7 @@ ADD_EXECUTABLE(ndbd
 TARGET_LINK_LIBRARIES(ndbd ${NDBD_LIBS} ndbsched)
 INSTALL(TARGETS ndbd DESTINATION libexec)
 
-IF(BUILD_NDBMTD)
+IF(NDB_BUILD_NDBMTD)
   ADD_EXECUTABLE(ndbmtd
     main.cpp ndbd.cpp angel.cpp SimBlockList.cpp ${NDBD_EXTRA_SRC})
   TARGET_LINK_LIBRARIES(ndbmtd ${NDBD_LIBS} ndbsched_mt)

=== modified file 'storage/ndb/src/kernel/vm/CMakeLists.txt'
--- a/storage/ndb/src/kernel/vm/CMakeLists.txt	2010-10-29 14:07:45 +0000
+++ b/storage/ndb/src/kernel/vm/CMakeLists.txt	2010-11-05 08:39:22 +0000
@@ -51,7 +51,7 @@ ADD_LIBRARY(ndbsched STATIC
     dummy_nonmt.cpp
 )
 
-IF(BUILD_NDBMTD)
+IF(NDB_BUILD_NDBMTD)
   ADD_LIBRARY(ndbsched_mt STATIC
     SimulatedBlock_mt.cpp
     TransporterCallback_mt.cpp

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