List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:February 4 2011 3:06pm
Subject:bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:4080)
View as plain text  
#At file:///home/msvensson/mysql/tmp/UUUpxipVnK/7.1/ based on revid:craig.russell@strippedaiwh68xznc

 4080 Magnus Blåudd	2011-02-04 [merge]
      Merge 7.0 -> 7.1

    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_glue.h
      sql/handler.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-01-31 17:50:41 +0000
+++ b/sql/ha_ndbcluster.cc	2011-02-04 15:06:06 +0000
@@ -254,8 +254,6 @@ static MYSQL_THDVAR_UINT(
 */
 static const int max_transactions= 4;
 
-static uint ndbcluster_partition_flags();
-static int ndbcluster_init(void *);
 static int ndbcluster_end(handlerton *hton, ha_panic_function flag);
 static bool ndbcluster_show_status(handlerton *hton, THD*,
                                    stat_print_fn *,
@@ -300,17 +298,30 @@ static handler *ndbcluster_create_handle
   return new (mem_root) ha_ndbcluster(hton, table);
 }
 
-static uint ndbcluster_partition_flags()
+static uint
+ndbcluster_partition_flags()
 {
   return (HA_CAN_PARTITION | HA_CAN_UPDATE_PARTITION_KEY |
           HA_CAN_PARTITION_UNIQUE | HA_USE_AUTO_PARTITION);
 }
 
 #ifndef NDB_WITHOUT_ONLINE_ALTER
-static uint ndbcluster_alter_partition_flags()
+static uint
+ndbcluster_alter_partition_flags()
 {
   return HA_PARTITION_FUNCTION_SUPPORTED;
 }
+#else
+static uint
+ndbcluster_alter_table_flags(uint flags)
+{
+  if (flags & ALTER_DROP_PARTITION)
+    return 0;
+  else
+    return (HA_ONLINE_ADD_INDEX | HA_ONLINE_DROP_INDEX |
+            HA_ONLINE_ADD_UNIQUE_INDEX | HA_ONLINE_DROP_UNIQUE_INDEX |
+            HA_PARTITION_FUNCTION_SUPPORTED);
+}
 #endif
 
 #define NDB_AUTO_INCREMENT_RETRIES 100
@@ -10423,9 +10434,10 @@ static int ndbcluster_init(void *p)
     h->partition_flags=  ndbcluster_partition_flags; /* Partition flags */
 #ifndef NDB_WITHOUT_ONLINE_ALTER
     h->alter_partition_flags=
-      ndbcluster_alter_partition_flags;             /* Alter table flags */
+      ndbcluster_alter_partition_flags;             /* Alter partition flags */
 #else
-    /* Should install alter_table_flags */
+    h->alter_table_flags=
+      ndbcluster_alter_table_flags;                 /* Alter table flags */
 #endif
 #if MYSQL_VERSION_ID >= 50501
     h->fill_is_table=    ndbcluster_fill_is_table;
@@ -14965,23 +14977,15 @@ static MYSQL_SYSVAR_BOOL(
   1                                  /* default */
 );
 
-#ifndef NDB_NO_LOG_EMPTY_EPOCHS
-#define LOG_EMPTY_EPOCHS_OPTS PLUGIN_VAR_OPCMDARG
-#define LOG_EMPTY_EPOCHS_DEFAULT 0
-#else
-#define LOG_EMPTY_EPOCHS_OPTS PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY
-#define LOG_EMPTY_EPOCHS_DEFAULT 1
-#endif
-
 static my_bool opt_ndb_log_empty_epochs;
 static MYSQL_SYSVAR_BOOL(
   log_empty_epochs,                  /* name */
   opt_ndb_log_empty_epochs,          /* var */
-  LOG_EMPTY_EPOCHS_OPTS,
+  PLUGIN_VAR_OPCMDARG,
   "",
   NULL,                              /* check func. */
   NULL,                              /* update func. */
-  LOG_EMPTY_EPOCHS_DEFAULT           /* default */
+  0                                  /* default */
 );
 
 bool ndb_log_empty_epochs(void)

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-01-28 08:13:59 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-02-04 08:57:52 +0000
@@ -6699,7 +6699,6 @@ restart_cluster_failure:
                 (! (opt_ndb_log_apply_status &&
                     trans_slave_row_count) ))
             {
-#ifndef NDB_NO_LOG_EMPTY_EPOCHS
               /* nothing to commit, rollback instead */
               if (int r= trans.rollback())
               {
@@ -6709,9 +6708,6 @@ restart_cluster_failure:
                 /* TODO: Further handling? */
               }
               break;
-#else
-              abort(); // Should not come here, log-empty-epochs is always on
-#endif
             }
           }
       commit_to_binlog:

=== modified file 'sql/ha_ndbcluster_glue.h'
--- a/sql/ha_ndbcluster_glue.h	2011-01-14 15:12:39 +0000
+++ b/sql/ha_ndbcluster_glue.h	2011-02-04 08:57:52 +0000
@@ -100,9 +100,6 @@ enum column_format_type {
 /* Global schema lock not available */
 #define NDB_NO_GLOBAL_SCHEMA_LOCK
 
-/* Missing functionality in injector -> no --ndb-log-empty-epochs */
-#define NDB_NO_LOG_EMPTY_EPOCHS
-
 /* No support for --ndb-wait_setup */
 #define NDB_NO_WAIT_SETUP
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-10-01 13:34:24 +0000
+++ b/sql/handler.cc	2011-02-04 14:49:48 +0000
@@ -3002,8 +3002,10 @@ err:
 uint handler::get_dup_key(int error)
 {
   DBUG_ENTER("handler::get_dup_key");
+#ifndef MCP_BUG59948
   if (!table || !table->file)
     DBUG_RETURN((uint) -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 ||

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