List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:November 8 2011 10:06am
Subject:bzr push into mysql-5.5-cluster branch (magnus.blaudd:3640 to 3641)
View as plain text  
 3641 magnus.blaudd@stripped	2011-11-08
      ndb schema dist
       - move code to set share->flags from  shadow table in to 'open_shadow_table'

    modified:
      sql/ha_ndbcluster_binlog.cc
 3640 magnus.blaudd@stripped	2011-11-08
      ndb schema dist
       - remove uneccesary if

    modified:
      sql/ha_ndbcluster_binlog.cc
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-11-08 09:58:19 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-11-08 10:05:04 +0000
@@ -342,6 +342,13 @@ ndb_binlog_open_shadow_table(THD *thd, N
   /* We can't use 'use_all_columns()' as the file object is not setup yet */
   shadow_table->column_bitmaps_set_no_signal(&shadow_table->s->all_set,
                                              &shadow_table->s->all_set);
+
+  if (shadow_table->s->primary_key == MAX_KEY)
+   share->flags|= NSF_HIDDEN_PK;
+
+  if (shadow_table->s->blob_fields != 0)
+    share->flags|= NSF_BLOB_FLAG;
+
 #ifndef DBUG_OFF
   dbug_print_table("table", shadow_table);
 #endif
@@ -411,17 +418,8 @@ int ndbcluster_binlog_init_share(THD *th
     }
     DBUG_RETURN(error);
   }
-  while (1) 
-  {
-    if ((error= ndb_binlog_open_shadow_table(thd, share)))
-      break;
-    if (share->event_data->shadow_table->s->primary_key == MAX_KEY)
-      share->flags|= NSF_HIDDEN_PK;
-    if (share->event_data->shadow_table->s->blob_fields != 0)
-      share->flags|= NSF_BLOB_FLAG;
-    break;
-  }
-  DBUG_RETURN(error);
+
+  DBUG_RETURN(ndb_binlog_open_shadow_table(thd, share));
 }
 
 /*****************************************************************
@@ -2841,14 +2839,6 @@ class Ndb_schema_event_handler {
       }
       else
       {
-        if (share->event_data->shadow_table->s->primary_key == MAX_KEY)
-          share->flags|= NSF_HIDDEN_PK;
-        /*
-          Refresh share->flags to handle added BLOB columns
-        */
-        if (share->event_data->shadow_table->s->blob_fields != 0)
-          share->flags|= NSF_BLOB_FLAG;
-
         /*
           Start subscribing to data changes to the new table definition
         */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster branch (magnus.blaudd:3640 to 3641) magnus.blaudd11 Nov