List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:February 9 2011 11:19am
Subject:bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3200)
View as plain text  
#At file:///home/msvensson/mysql/5.5-telco-7.0-run-query/ based on revid:magnus.blaudd@strippedaqelsfy65qtllem

 3200 Magnus Blåudd	2011-02-09
      ndb
       - Use Ndb_local_connection to flush tables before creating the ndb_* system tables

    modified:
      sql/ha_ndbcluster_binlog.cc
=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-02-09 11:18:42 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-02-09 11:19:34 +0000
@@ -1228,6 +1228,8 @@ static int ndbcluster_create_ndb_apply_s
   if (opt_ndb_extra_logging)
     sql_print_information("NDB: Creating " NDB_REP_DB "." NDB_APPLY_TABLE);
 
+  Ndb_local_connection mysqld(thd);
+
   /*
     Check if apply status table exists in MySQL "dictionary"
     if so, remove it since there is none in Ndb
@@ -1247,9 +1249,9 @@ static int ndbcluster_create_ndb_apply_s
       if (opt_ndb_extra_logging)
         sql_print_information("NDB: Flushing " NDB_REP_DB "." NDB_APPLY_TABLE);
 
-      end= strmov(buf, "FLUSH TABLE " NDB_REP_DB "." NDB_APPLY_TABLE);
-      const int no_print_error[1]= {0};
-      run_query(thd, buf, end, no_print_error, TRUE, TRUE);
+      /* Flush mysql.ndb_apply_status table, ignore all errors */
+      (void)mysqld.flush_table(STRING_WITH_LEN("mysql"),
+                               STRING_WITH_LEN("ndb_apply_status"));
     }
   }
 
@@ -1301,6 +1303,8 @@ static int ndbcluster_create_schema_tabl
   if (opt_ndb_extra_logging)
     sql_print_information("NDB: Creating " NDB_REP_DB "." NDB_SCHEMA_TABLE);
 
+  Ndb_local_connection mysqld(thd);
+
   /*
     Check if schema table exists in MySQL "dictionary"
     if so, remove it since there is none in Ndb
@@ -1320,9 +1324,9 @@ static int ndbcluster_create_schema_tabl
       if (opt_ndb_extra_logging)
         sql_print_information("NDB: Flushing " NDB_REP_DB "." NDB_SCHEMA_TABLE);
 
-      end= strmov(buf, "FLUSH TABLE " NDB_REP_DB "." NDB_SCHEMA_TABLE);
-      const int no_print_error[1]= {0};
-      run_query(thd, buf, end, no_print_error, TRUE, TRUE);
+      /* Flush mysql.ndb_schema table, ignore all errors */
+      (void)mysqld.flush_table(STRING_WITH_LEN("mysql"),
+                               STRING_WITH_LEN("ndb_schema"));
     }
   }
 

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110209111934-vx7lag3gshy4e9fl.bundle
Thread
bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3200) Magnus Blåudd9 Feb