List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:October 27 2011 9:05am
Subject:bzr push into mysql-5.5-cluster branch (magnus.blaudd:3626 to 3628)
View as plain text  
 3628 Magnus Blåudd	2011-10-27
      ndbcluster
       - remove unused function 'set_binlog_flags'
       - NOTE, there is static function set_binlog_flags in ha_ndbcluster_binlog.cc with different args

    modified:
      sql/ha_ndbcluster_binlog.h
 3627 Magnus Blåudd	2011-10-27
      ndbcluster
       - move  functions for setting of flags in NDB_SHARE to ndb_share.h

    modified:
      sql/ha_ndbcluster.h
      sql/ndb_share.h
 3626 Magnus Blåudd	2011-10-27
      ndbcluster
       - move NdbValue,  'ndb_pack_varchar' and 'get_ndb_blobs_value' to ndb_ndbapi_util.h
       - change use of ERR_RETURN -> DBUG_RETURN(-1), callers only check for 0 as in success anyway.

    added:
      sql/ndb_ndbapi_util.cc
      sql/ndb_ndbapi_util.h
    modified:
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster.h
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbcluster_binlog.h
      storage/ndb/CMakeLists.txt
=== modified file 'sql/ha_ndbcluster.h'
--- a/sql/ha_ndbcluster.h	2011-10-27 08:27:44 +0000
+++ b/sql/ha_ndbcluster.h	2011-10-27 08:50:09 +0000
@@ -124,50 +124,6 @@ struct Ndb_tuple_id_range_guard {
   Ndb::TupleIdRange& range;
 };
 
-/* NDB_SHARE.flags */
-#define NSF_HIDDEN_PK   1u /* table has hidden primary key */
-#define NSF_BLOB_FLAG   2u /* table has blob attributes */
-#define NSF_NO_BINLOG   4u /* table should not be binlogged */
-#define NSF_BINLOG_FULL 8u /* table should be binlogged with full rows */
-#define NSF_BINLOG_USE_UPDATE 16u  /* table update should be binlogged using
-                                     update log event */
-inline void set_binlog_logging(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_logging"));
-  share->flags&= ~NSF_NO_BINLOG;
-}
-inline void set_binlog_nologging(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_nologging"));
-  share->flags|= NSF_NO_BINLOG;
-}
-inline my_bool get_binlog_nologging(NDB_SHARE *share)
-{ return (share->flags & NSF_NO_BINLOG) != 0; }
-inline void set_binlog_updated_only(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_updated_only"));
-  share->flags&= ~NSF_BINLOG_FULL;
-}
-inline void set_binlog_full(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_full"));
-  share->flags|= NSF_BINLOG_FULL;
-}
-inline my_bool get_binlog_full(NDB_SHARE *share)
-{ return (share->flags & NSF_BINLOG_FULL) != 0; }
-inline void set_binlog_use_write(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_use_write"));
-  share->flags&= ~NSF_BINLOG_USE_UPDATE;
-}
-inline void set_binlog_use_update(NDB_SHARE *share)
-{
-  DBUG_PRINT("info", ("set_binlog_use_update"));
-  share->flags|= NSF_BINLOG_USE_UPDATE;
-}
-inline my_bool get_binlog_use_update(NDB_SHARE *share)
-{ return (share->flags & NSF_BINLOG_USE_UPDATE) != 0; }
-
 enum enum_slave_trans_conflict_apply_state
 {
   /* Normal with optional row-level conflict detection */

=== modified file 'sql/ha_ndbcluster_binlog.h'
--- a/sql/ha_ndbcluster_binlog.h	2011-10-27 08:27:44 +0000
+++ b/sql/ha_ndbcluster_binlog.h	2011-10-27 08:53:55 +0000
@@ -244,8 +244,6 @@ inline void free_share(NDB_SHARE **share
   ndbcluster_free_share(share, have_lock);
 }
 
-void set_binlog_flags(NDB_SHARE *share);
-
 /*
   Helper functions
 */

=== modified file 'sql/ndb_share.h'
--- a/sql/ndb_share.h	2011-09-09 09:30:43 +0000
+++ b/sql/ndb_share.h	2011-10-27 08:50:09 +0000
@@ -212,4 +212,49 @@ set_ndb_share_state(NDB_SHARE *share, ND
   pthread_mutex_unlock(&share->mutex);
 }
 
+
+/* NDB_SHARE.flags */
+#define NSF_HIDDEN_PK   1u /* table has hidden primary key */
+#define NSF_BLOB_FLAG   2u /* table has blob attributes */
+#define NSF_NO_BINLOG   4u /* table should not be binlogged */
+#define NSF_BINLOG_FULL 8u /* table should be binlogged with full rows */
+#define NSF_BINLOG_USE_UPDATE 16u  /* table update should be binlogged using
+                                     update log event */
+inline void set_binlog_logging(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_logging"));
+  share->flags&= ~NSF_NO_BINLOG;
+}
+inline void set_binlog_nologging(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_nologging"));
+  share->flags|= NSF_NO_BINLOG;
+}
+inline my_bool get_binlog_nologging(NDB_SHARE *share)
+{ return (share->flags & NSF_NO_BINLOG) != 0; }
+inline void set_binlog_updated_only(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_updated_only"));
+  share->flags&= ~NSF_BINLOG_FULL;
+}
+inline void set_binlog_full(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_full"));
+  share->flags|= NSF_BINLOG_FULL;
+}
+inline my_bool get_binlog_full(NDB_SHARE *share)
+{ return (share->flags & NSF_BINLOG_FULL) != 0; }
+inline void set_binlog_use_write(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_use_write"));
+  share->flags&= ~NSF_BINLOG_USE_UPDATE;
+}
+inline void set_binlog_use_update(NDB_SHARE *share)
+{
+  DBUG_PRINT("info", ("set_binlog_use_update"));
+  share->flags|= NSF_BINLOG_USE_UPDATE;
+}
+inline my_bool get_binlog_use_update(NDB_SHARE *share)
+{ return (share->flags & NSF_BINLOG_USE_UPDATE) != 0; }
+
 #endif

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