List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:November 10 2011 8:43am
Subject:bzr push into mysql-5.5-cluster branch (magnus.blaudd:3649 to 3650)
View as plain text  
 3650 magnus.blaudd@stripped	2011-11-10
      ndb schema dist
       - remove handling of SOT_RENAME_TABLE_NEW which hasnt been used in a long time.

    modified:
      sql/ha_ndbcluster_binlog.cc
      sql/ndb_schema_dist.cc
      sql/ndb_schema_dist.h
 3649 magnus.blaudd@stripped	2011-11-10
      ndb schema dist
       - move print function for share to NDB_SHARE
       - improve printout
       - split out the part which prints Ndb_event_data
       - add acessor function to get Ndb_event_data* from share

    modified:
      sql/ha_ndbcluster.cc
      sql/ndb_event_data.cc
      sql/ndb_event_data.h
      sql/ndb_share.cc
      sql/ndb_share.h
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-11-09 07:37:30 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-11-10 08:29:32 +0000
@@ -2948,7 +2948,6 @@ class Ndb_schema_event_handler {
         switch (schema_type)
         {
         case SOT_RENAME_TABLE:
-        case SOT_RENAME_TABLE_NEW:
         case SOT_DROP_TABLE:
         {
           if (!is_local_table(schema->db, schema->name))
@@ -3196,46 +3195,6 @@ class Ndb_schema_event_handler {
         handle_online_alter_table_commit(schema);
         break;
 
-      case SOT_RENAME_TABLE_NEW:
-      {
-        write_schema_op_to_binlog(thd, schema);
-        NDB_SHARE *share= get_share(schema);
-        if (ndb_binlog_running && (!share || !share->op))
-        {
-          /*
-            we need to free any share here as command below
-            may need to call handle_trailing_share
-          */
-          if (share)
-          {
-            /* ndb_share reference temporary free */
-            DBUG_PRINT("NDB_SHARE", ("%s temporary free  use_count: %u",
-                                     share->key, share->use_count));
-            free_share(&share);
-            share= 0;
-          }
-
-          if (is_local_table(schema->db, schema->name))
-          {
-            DBUG_PRINT("info", ("NDB Binlog: Skipping locally defined table '%s.%s'",
-                                schema->db, schema->name));
-            sql_print_error("NDB Binlog: Skipping locally defined table '%s.%s' from "
-                            "binlog schema event '%s' from node %d. ",
-                            schema->db, schema->name, schema->query,
-                            schema->node_id);
-          }
-          else if (ndb_create_table_from_engine(thd, schema->db, schema->name))
-          {
-            print_could_not_discover_error(thd, schema);
-          }
-        }
-        if (share)
-        {
-          free_share(&share);
-        }
-        break;
-      }
-
       default:
         DBUG_ASSERT(FALSE);
       }

=== modified file 'sql/ndb_schema_dist.cc'
--- a/sql/ndb_schema_dist.cc	2011-11-02 09:28:48 +0000
+++ b/sql/ndb_schema_dist.cc	2011-11-10 08:29:32 +0000
@@ -26,8 +26,6 @@ get_schema_type_name(uint type)
     return "DROP_TABLE";
   case SOT_CREATE_TABLE:
     return "CREATE_TABLE";
-  case SOT_RENAME_TABLE_NEW:
-    return "RENAME_TABLE_NEW";
   case SOT_ALTER_TABLE_COMMIT:
     return "ALTER_TABLE_COMMIT";
   case SOT_DROP_DB:

=== modified file 'sql/ndb_schema_dist.h'
--- a/sql/ndb_schema_dist.h	2011-11-02 09:28:48 +0000
+++ b/sql/ndb_schema_dist.h	2011-11-10 08:29:32 +0000
@@ -40,7 +40,7 @@ enum SCHEMA_OP_TYPE
 {
   SOT_DROP_TABLE= 0,
   SOT_CREATE_TABLE= 1,
-  SOT_RENAME_TABLE_NEW= 2,
+  SOT_RENAME_TABLE_NEW= 2, // Unused, but still reserved
   SOT_ALTER_TABLE_COMMIT= 3,
   SOT_DROP_DB= 4,
   SOT_CREATE_DB= 5,

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