List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:October 27 2011 1:57pm
Subject:bzr push into mysql-5.5-cluster branch (magnus.blaudd:3634 to 3637)
View as plain text  
 3637 Magnus Blåudd	2011-10-27
      ndbcluster
       - make 'ndbcluster_print_error' static, move it before the two places where it's used.

    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
 3636 Magnus Blåudd	2011-10-27
      ndbcluster
       - make ndbcluster_table_exists_in_engine static

    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
 3635 Magnus Blr_discover' function static, only called as handlerton callback

    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
 3634 Magnus Blåudd	2011-10-27
      ndbcluster
       - forward portability fix, remove use of COND in favor of Item

    modified:
      sql/ha_ndbcluster_connection.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-10-27 11:57:04 +0000
+++ b/sql/ha_ndbcluster.cc	2011-10-27 12:43:16 +0000
@@ -8760,6 +8760,31 @@ ha_ndbcluster::start_transaction_part_id
    
 
 /**
+  Static error print function called from static handler method
+  ndbcluster_commit and ndbcluster_rollback.
+*/
+static void
+ndbcluster_print_error(int error, const NdbOperation *error_op)
+{
+  DBUG_ENTER("ndbcluster_print_error");
+  TABLE_SHARE share;
+  const char *tab_name= (error_op) ? error_op->getTableName() : "";
+  if (tab_name == NULL)
+  {
+    DBUG_ASSERT(tab_name != NULL);
+    tab_name= "";
+  }
+  share.db.str= (char*) "";
+  share.db.length= 0;
+  share.table_name.str= (char *) tab_name;
+  share.table_name.length= strlen(tab_name);
+  ha_ndbcluster error_handler(ndbcluster_hton, &share);
+  error_handler.print_error(error, MYF(0));
+  DBUG_VOID_RETURN;
+}
+
+
+/**
   Commit a transaction started in NDB.
 */
 
@@ -11841,7 +11866,7 @@ static int ndbcluster_close_connection(h
 /**
   Try to discover one table from NDB.
 */
-
+static
 int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, 
                         const char *name,
                         uchar **frmblob, 
@@ -11962,7 +11987,7 @@ err:
 /**
   Check if a table exists in NDB.
 */
-
+static
 int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd, 
                                       const char *db,
                                       const char *name)
@@ -12751,30 +12776,6 @@ void ha_ndbcluster::print_error(int erro
 
 
 /**
-  Static error print function called from static handler method
-  ndbcluster_commit and ndbcluster_rollback.
-*/
-
-void ndbcluster_print_error(int error, const NdbOperation *error_op)
-{
-  DBUG_ENTER("ndbcluster_print_error");
-  TABLE_SHARE share;
-  const char *tab_name= (error_op) ? error_op->getTableName() : "";
-  if (tab_name == NULL) 
-  {
-    DBUG_ASSERT(tab_name != NULL);
-    tab_name= "";
-  }
-  share.db.str= (char*) "";
-  share.db.length= 0;
-  share.table_name.str= (char *) tab_name;
-  share.table_name.length= strlen(tab_name);
-  ha_ndbcluster error_handler(ndbcluster_hton, &share);
-  error_handler.print_error(error, MYF(0));
-  DBUG_VOID_RETURN;
-}
-
-/**
   Set a given location from full pathname to database name.
 */
 

=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h	2011-10-27 11:48:43 +0000
+++ b/sql/ha_ndbcluster.h	2011-10-27 12:43:16 +0000
@@ -42,7 +42,6 @@ class NdbBlob;
 class NdbIndexStat;
 class NdbEventOperation;
 class ha_ndbcluster_cond;
-class Ndb_event_data;
 class NdbQuery;
 class NdbQueryOperation;
 class NdbQueryOperationTypeWrapper;
@@ -814,12 +813,6 @@ private:
   int add_handler_to_open_tables(THD*, Thd_ndb*, ha_ndbcluster* handler);
 };
 
-int ndbcluster_discover(THD* thd, const char* dbname, const char* name,
-                        const void** frmblob, uint* frmlen);
-int ndbcluster_table_exists_in_engine(THD* thd,
-                                      const char *db, const char *name);
-void ndbcluster_print_error(int error, const NdbOperation *error_op);
-
 static const char ndbcluster_hton_name[]= "ndbcluster";
 static const int ndbcluster_hton_name_length=sizeof(ndbcluster_hton_name)-1;
 extern int ndbcluster_terminating;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster branch (magnus.blaudd:3634 to 3637) Magnus Blåudd28 Oct