List:Commits« Previous MessageNext Message »
From:tomas Date:July 12 2007 2:31pm
Subject:bk commit into 5.1 tree (tulin:1.2558)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mysqldev. When mysqldev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-07-12 16:31:31+02:00, tulin@stripped +4 -0
  Merge mysql.com:/data0/mysqldev/users/tomas/mysql-5.1-telco-6.2
  into  mysql.com:/data0/mysqldev/users/tomas/mysql-5.1-telco
  MERGE: 1.2514.1.66

  configure.in@stripped, 2007-07-12 16:31:14+02:00, tulin@stripped +2 -3
    bump up version
    MERGE: 1.459.1.3

  sql/ha_ndbcluster.cc@stripped, 2007-07-12 16:29:36+02:00, tulin@stripped +0 -0
    Auto merged
    MERGE: 1.472.1.9

  sql/ha_ndbcluster.h@stripped, 2007-07-12 16:29:38+02:00, tulin@stripped +0 -0
    Auto merged
    MERGE: 1.182.1.5

  sql/handler.h@stripped, 2007-07-12 16:29:38+02:00, tulin@stripped +0 -0
    Auto merged
    MERGE: 1.258.1.2

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tulin
# Host:	production.mysql.com
# Root:	/data0/mysqldev/users/tomas/mysql-5.1-telco/RESYNC

--- 1.462/configure.in	2007-07-12 16:31:45 +02:00
+++ 1.463/configure.in	2007-07-12 16:31:45 +02:00
@@ -10,12 +10,12 @@
 #
 # When changing major version number please also check switch statement
 # in mysqlbinlog::check_master_version().
-AM_INIT_AUTOMAKE(mysql, 5.1.19-ndb-6.3.1)
+AM_INIT_AUTOMAKE(mysql, 5.1.20-ndb-6.3.2)
 AM_CONFIG_HEADER(config.h)
 
 NDB_VERSION_MAJOR=6
 NDB_VERSION_MINOR=3
-NDB_VERSION_BUILD=1
+NDB_VERSION_BUILD=2
 NDB_VERSION_STATUS="-beta"
 
 PROTOCOL_VERSION=10

--- 1.260/sql/handler.h	2007-07-12 16:31:45 +02:00
+++ 1.261/sql/handler.h	2007-07-12 16:31:45 +02:00
@@ -1673,7 +1673,6 @@
     but we don't have a primary key
   */
   virtual void use_hidden_primary_key();
-
 private:
   /*
     Row-level primitives for storage engines.  These should be

--- 1.485/sql/ha_ndbcluster.cc	2007-07-12 16:31:45 +02:00
+++ 1.486/sql/ha_ndbcluster.cc	2007-07-12 16:31:45 +02:00
@@ -5438,14 +5438,16 @@
   return false;
 }
 
-static int create_ndb_column(NDBCOL &col,
+static int create_ndb_column(THD *thd,
+                             NDBCOL &col,
                              Field *field,
-                             HA_CREATE_INFO *info)
+                             HA_CREATE_INFO *create_info)
 {
+  DBUG_ENTER("create_ndb_column");
   // Set name
   if (col.setName(field->field_name))
   {
-    return (my_errno= errno);
+    DBUG_RETURN(my_errno= errno);
   }
   // Get char set
   CHARSET_INFO *cs= field->charset();
@@ -5602,7 +5604,7 @@
       }
       else
       {
-        return HA_ERR_UNSUPPORTED;
+        DBUG_RETURN(HA_ERR_UNSUPPORTED);
       }
       col.setLength(field->field_length);
     }
@@ -5701,7 +5703,7 @@
     goto mysql_type_unsupported;
   mysql_type_unsupported:
   default:
-    return HA_ERR_UNSUPPORTED;
+    DBUG_RETURN(HA_ERR_UNSUPPORTED);
   }
   // Set nullable and pk
   col.setNullable(field->maybe_null());
@@ -5713,14 +5715,154 @@
     char buff[22];
 #endif
     col.setAutoIncrement(TRUE);
-    ulonglong value= info->auto_increment_value ?
-      info->auto_increment_value : (ulonglong) 1;
+    ulonglong value= create_info->auto_increment_value ?
+      create_info->auto_increment_value : (ulonglong) 1;
     DBUG_PRINT("info", ("Autoincrement key, initial: %s", llstr(value, buff)));
     col.setAutoIncrementInitialValue(value);
   }
   else
     col.setAutoIncrement(FALSE);
-  return 0;
+ 
+  NDBCOL::StorageType type;
+  bool dynamic;
+
+  switch (field->field_storage_type()) {
+  case(HA_SM_DEFAULT):
+  default:
+    if (create_info->default_storage_media == HA_SM_DISK)
+      type= NDBCOL::StorageTypeDisk;
+    else
+      type= NDBCOL::StorageTypeMemory;
+    break;
+  case(HA_SM_DISK):
+    type= NDBCOL::StorageTypeDisk;
+    break;
+  case(HA_SM_MEMORY):
+    type= NDBCOL::StorageTypeMemory;
+    break;
+  }
+
+  switch (field->column_format()) {
+  case(COLUMN_FORMAT_TYPE_FIXED):
+    dynamic= FALSE;
+    break;
+  case(COLUMN_FORMAT_TYPE_DYNAMIC):
+    dynamic= TRUE;
+    break;
+  case(COLUMN_FORMAT_TYPE_DEFAULT):
+  default:
+    if (create_info->row_type == ROW_TYPE_DEFAULT)
+    {
+      bool is_dynamic= field_type_forces_var_part(field->type());
+      dynamic= is_dynamic;
+    }
+    else
+      dynamic= create_info->row_type == ROW_TYPE_DYNAMIC;
+    break;
+  }
+  DBUG_PRINT("info", ("Column %s is declared %s", field->field_name,
+                      (dynamic) ? "dynamic" : "static"));
+  if (type == NDBCOL::StorageTypeDisk)
+  {
+    if (dynamic)
+    {
+      DBUG_PRINT("info", ("Dynamic disk stored column %s changed to static",
+                          field->field_name));
+      dynamic= false;
+    }
+    if (thd && field->column_format() == COLUMN_FORMAT_TYPE_DYNAMIC)
+    {
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+                          ER_ILLEGAL_HA_CREATE_OPTION,
+                          "DYNAMIC column %s with "
+                          "STORAGE DISK is not supported, "
+                          "column will become FIXED",
+                          field->field_name);
+    }
+  }
+
+  switch (create_info->row_type) {
+  case ROW_TYPE_FIXED:
+    if (thd && field_type_forces_var_part(field->type()))
+    {
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                          ER_ILLEGAL_HA_CREATE_OPTION,
+                          ER(ER_ILLEGAL_HA_CREATE_OPTION),
+                          ndbcluster_hton_name,
+                          "Row format FIXED incompatible with "
+                          "variable sized attribute");
+      DBUG_RETURN(HA_ERR_UNSUPPORTED);
+    }
+    break;
+  case ROW_TYPE_DYNAMIC:
+    /*
+      Future: make columns dynamic in this case
+    */
+    break;
+  default:
+    break;
+  }
+
+  col.setStorageType(type);
+  col.setDynamic(dynamic);
+
+  DBUG_RETURN(0);
+}
+
+void ha_ndbcluster::update_create_info(HA_CREATE_INFO *create_info)
+{
+  DBUG_ENTER("update_create_info");
+  TABLE_SHARE *share= table->s;
+  if (share->mysql_version < MYSQL_VERSION_TABLESPACE_IN_FRM)
+  {
+     DBUG_PRINT("info", ("Restored an old table %s, pre-frm_version 7", 
+	                 share->table_name.str));
+     if (!create_info->tablespace && !share->tablespace)
+     {
+       DBUG_PRINT("info", ("Checking for tablespace in ndb"));
+       THD *thd= current_thd;
+       Ndb *ndb= check_ndb_in_thd(thd);
+       NDBDICT *ndbdict= ndb->getDictionary();
+       NdbError ndberr;
+       Uint32 id;
+       ndb->setDatabaseName(m_dbname);
+       const NDBTAB *ndbtab= m_table;
+       DBUG_ASSERT(ndbtab != NULL);
+       if (!ndbtab->getTablespace(&id))
+       {
+         DBUG_VOID_RETURN;
+       }
+       {
+         NdbDictionary::Tablespace ts= ndbdict->getTablespace(id);
+         ndberr= ndbdict->getNdbError();
+         if(ndberr.classification != NdbError::NoError)
+           goto err;
+	 const char *tablespace= ts.getName();
+         DBUG_PRINT("info", ("Found tablespace '%s'", tablespace));
+         uint tablespace_len= strlen(tablespace);
+         if (tablespace_len != 0) 
+         {
+           share->tablespace= (char *) alloc_root(&share->mem_root,
+                                                  tablespace_len+1);
+           strxmov(share->tablespace, tablespace, NullS);
+	   create_info->tablespace= share->tablespace;
+         }
+         DBUG_VOID_RETURN;
+       }
+err:
+       if (ndberr.status == NdbError::TemporaryError)
+         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                             ER_GET_TEMPORARY_ERRMSG, 
+                             ER(ER_GET_TEMPORARY_ERRMSG),
+                             ndberr.code, ndberr.message, "NDB");
+       else
+         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
+                             ndberr.code, ndberr.message, "NDB");
+    }
+  }
+
+  DBUG_VOID_RETURN;
 }
 
 /*
@@ -5738,7 +5880,8 @@
   const void *data= NULL, *pack_data= NULL;
   bool create_from_engine= (create_info->table_options & HA_OPTION_CREATE_FROM_ENGINE);
   bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE);
-  char tablespace[FN_LEN];
+  const char *tablespace= create_info->tablespace;
+  bool use_disk= FALSE;
   NdbDictionary::Table::SingleUserMode single_user_mode= NdbDictionary::Table::SingleUserModeLocked;
 
   DBUG_ENTER("ha_ndbcluster::create");
@@ -5754,14 +5897,13 @@
   Ndb *ndb= get_ndb();
   NDBDICT *dict= ndb->getDictionary();
 
+  DBUG_PRINT("info", ("Tablespace %s,%s", form->s->tablespace, create_info->tablespace));
   if (is_truncate)
   {
     {
       Ndb_table_guard ndbtab_g(dict, m_tabname);
       if (!(m_table= ndbtab_g.get_table()))
 	ERR_RETURN(dict->getNdbError());
-      if ((get_tablespace_name(thd, tablespace, FN_LEN)))
-	create_info->tablespace= tablespace;    
       m_table= NULL;
     }
     DBUG_PRINT("info", ("Dropping and re-creating table for TRUNCATE"));
@@ -5825,32 +5967,6 @@
   my_free((char*)pack_data, MYF(0));
   
   /*
-    Check for disk options
-  */
-  if (create_info->storage_media == HA_SM_DISK)
-  { 
-    if (create_info->tablespace)
-      tab.setTablespaceName(create_info->tablespace);
-    else
-      tab.setTablespaceName("DEFAULT-TS");
-  }
-  else if (create_info->tablespace)
-  {
-    if (create_info->storage_media == HA_SM_MEMORY)
-    {
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
-			  ER_ILLEGAL_HA_CREATE_OPTION,
-			  ER(ER_ILLEGAL_HA_CREATE_OPTION),
-			  ndbcluster_hton_name,
-			  "TABLESPACE currently only supported for "
-			  "STORAGE DISK");
-      DBUG_RETURN(HA_ERR_UNSUPPORTED);
-    }
-    tab.setTablespaceName(create_info->tablespace);
-    create_info->storage_media = HA_SM_DISK;  //if use tablespace, that also means store on disk
-  }
-
-  /*
     Handle table row type
 
     Default is to let table rows have var part reference so that online 
@@ -5878,38 +5994,19 @@
   for (i= 0; i < form->s->fields; i++) 
   {
     Field *field= form->field[i];
-    DBUG_PRINT("info", ("name: %s  type: %u  pack_length: %d", 
+    DBUG_PRINT("info", ("name: %s  type: %u  storage: %u  format: %u  "
+                        "pack_length: %d", 
                         field->field_name, field->real_type(),
+                        field->field_storage_type(),
+                        field->column_format(),
                         field->pack_length()));
-    if ((my_errno= create_ndb_column(col, field, create_info)))
+    if ((my_errno= create_ndb_column(thd, col, field, create_info)))
       DBUG_RETURN(my_errno);
- 
-    if (create_info->storage_media == HA_SM_DISK)
-      col.setStorageType(NdbDictionary::Column::StorageTypeDisk);
-    else
-      col.setStorageType(NdbDictionary::Column::StorageTypeMemory);
 
-    switch (create_info->row_type) {
-    case ROW_TYPE_FIXED:
-      if (field_type_forces_var_part(field->type()))
-      {
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
-                            ER_ILLEGAL_HA_CREATE_OPTION,
-                            ER(ER_ILLEGAL_HA_CREATE_OPTION),
-                            ndbcluster_hton_name,
-                            "Row format FIXED incompatible with "
-                            "variable sized attribute");
-        DBUG_RETURN(HA_ERR_UNSUPPORTED);
-      }
-      break;
-    case ROW_TYPE_DYNAMIC:
-      /*
-        Future: make columns dynamic in this case
-      */
-      break;
-    default:
-      break;
-    }
+    if (!use_disk &&
+        col.getStorageType() == NDBCOL::StorageTypeDisk)
+      use_disk= TRUE;
+
     if (tab.addColumn(col))
     {
       DBUG_RETURN(my_errno= errno);
@@ -5918,14 +6015,51 @@
       pk_length += (field->pack_length() + 3) / 4;
   }
 
+  if (use_disk)
+  { 
+    if (tablespace)
+      tab.setTablespaceName(tablespace);
+    else
+      tab.setTablespaceName("DEFAULT-TS");
+  }
+  else if (create_info->tablespace && 
+           create_info->default_storage_media == HA_SM_MEMORY)
+  {
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                        ER_ILLEGAL_HA_CREATE_OPTION,
+                        ER(ER_ILLEGAL_HA_CREATE_OPTION),
+                        ndbcluster_hton_name,
+                        "TABLESPACE currently only supported for "
+                        "STORAGE DISK"); 
+    DBUG_RETURN(HA_ERR_UNSUPPORTED);
+  }
+
+  DBUG_PRINT("info", ("Table %s is %s stored with tablespace %s",
+                      m_tabname,
+                      (use_disk) ? "disk" : "memory",
+                      (use_disk) ? tab.getTablespaceName() : "N/A"));
+ 
   KEY* key_info;
   for (i= 0, key_info= form->key_info; i < form->s->keys; i++, key_info++)
   {
     KEY_PART_INFO *key_part= key_info->key_part;
     KEY_PART_INFO *end= key_part + key_info->key_parts;
     for (; key_part != end; key_part++)
+    {
+      if (key_part->field->field_storage_type() == HA_SM_DISK)
+      {
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                            ER_ILLEGAL_HA_CREATE_OPTION,
+                            ER(ER_ILLEGAL_HA_CREATE_OPTION),
+                            ndbcluster_hton_name,
+                            "Index on field "
+                            "declared with "
+                            "STORAGE DISK is not supported");
+        DBUG_RETURN(HA_ERR_UNSUPPORTED);
+      }
       tab.getColumn(key_part->fieldnr-1)->setStorageType(
                              NdbDictionary::Column::StorageTypeMemory);
+    }
   }
 
   // No primary key, create shadow key as 64 bit, auto increment  
@@ -6304,6 +6438,17 @@
   for (; key_part != end; key_part++) 
   {
     Field *field= key_part->field;
+    if (field->field_storage_type() == HA_SM_DISK)
+    {
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                          ER_ILLEGAL_HA_CREATE_OPTION,
+                          ER(ER_ILLEGAL_HA_CREATE_OPTION),
+                          ndbcluster_hton_name,
+                          "Index on field "
+                          "declared with "
+                          "STORAGE DISK is not supported");
+      DBUG_RETURN(HA_ERR_UNSUPPORTED);
+    }
     DBUG_PRINT("info", ("attr: %s", field->field_name));
     if (ndb_index.addColumnName(field->field_name))
     {
@@ -10358,48 +10503,6 @@
 
 
 /*
-  get table space info for SHOW CREATE TABLE
-*/
-char* ha_ndbcluster::get_tablespace_name(THD *thd, char* name, uint name_len)
-{
-  Ndb *ndb= check_ndb_in_thd(thd);
-  NDBDICT *ndbdict= ndb->getDictionary();
-  NdbError ndberr;
-  Uint32 id;
-  ndb->setDatabaseName(m_dbname);
-  const NDBTAB *ndbtab= m_table;
-  DBUG_ASSERT(ndbtab != NULL);
-  if (!ndbtab->getTablespace(&id))
-  {
-    return 0;
-  }
-  {
-    NdbDictionary::Tablespace ts= ndbdict->getTablespace(id);
-    ndberr= ndbdict->getNdbError();
-    if(ndberr.classification != NdbError::NoError)
-      goto err;
-    DBUG_PRINT("info", ("Found tablespace '%s'", ts.getName()));
-    if (name)
-    {
-      strxnmov(name, name_len, ts.getName(), NullS);
-      return name;
-    }
-    else
-      return (my_strdup(ts.getName(), MYF(0)));
-  }
-err:
-  if (ndberr.status == NdbError::TemporaryError)
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
-			ER_GET_TEMPORARY_ERRMSG, ER(ER_GET_TEMPORARY_ERRMSG),
-			ndberr.code, ndberr.message, "NDB");
-  else
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
-			ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
-			ndberr.code, ndberr.message, "NDB");
-  return 0;
-}
-
-/*
   Implements the SHOW NDB STATUS command.
 */
 bool
@@ -10788,6 +10891,7 @@
   DBUG_ENTER("ha_ndbcluster::check_if_incompatible_data");
   uint i;
   const NDBTAB *tab= (const NDBTAB *) m_table;
+  NDBCOL new_col;
 
   if (current_thd->variables.ndb_use_copying_alter_table)
   {
@@ -10798,17 +10902,13 @@
   int pk= 0;
   int ai= 0;
 
-  if (create_info->tablespace)
-    create_info->storage_media = HA_SM_DISK;
-  else
-    create_info->storage_media = HA_SM_MEMORY;
-
   for (i= 0; i < table->s->fields; i++) 
   {
     Field *field= table->field[i];
     const NDBCOL *col= tab->getColumn(i);
-    if (col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY ||
-        col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK)
+
+    create_ndb_column(0, new_col, field, create_info);
+    if (col->getStorageType() != new_col.getStorageType())
     {
       DBUG_PRINT("info", ("Column storage media is changed"));
       DBUG_RETURN(COMPATIBLE_DATA_NO);
@@ -10832,35 +10932,28 @@
       ai=1;
   }
 
-  char tablespace_name[FN_LEN]; 
-  if (get_tablespace_name(current_thd, tablespace_name, FN_LEN))
+/*
+  char tablespace_name[FN_LEN];
+  if (get_tablespace_name(current_thd, tablespace_name, FN_LEN) != create_info->tablespace)
   {
-    if (create_info->tablespace) 
-    {
-      if (strcmp(create_info->tablespace, tablespace_name))
-      {
-        DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s",
-          tablespace_name, create_info->tablespace));
-        DBUG_RETURN(COMPATIBLE_DATA_NO);
-      }
-    }
-    else
+    if (get_tablespace_name(current_thd, tablespace_name, FN_LEN) == 0 ||
+        create_info->tablespace == 0 ||
+        strcmp(create_info->tablespace, tablespace_name))
     {
-      DBUG_PRINT("info", ("storage media is changed, old is DISK and tablespace=%s, new is MEM",
-        tablespace_name));
+      DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s",
+                          tablespace_name, create_info->tablespace));
       DBUG_RETURN(COMPATIBLE_DATA_NO);
     }
   }
-  else
+*/
+
+  if (create_info->default_storage_media !=  table->s->default_storage_media ||
+      create_info->tablespace != table->s->tablespace)
   {
-    if (create_info->storage_media != HA_SM_MEMORY)
-    {
-      DBUG_PRINT("info", ("storage media is changed, old is MEM, new is DISK and tablespace=%s",
-        create_info->tablespace));
-      DBUG_RETURN(COMPATIBLE_DATA_NO);
-    }
+    DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s",
+                         table->s->tablespace, create_info->tablespace));
+    DBUG_RETURN(COMPATIBLE_DATA_NO);
   }
-
   if (table_changes != IS_EQUAL_YES)
     DBUG_RETURN(COMPATIBLE_DATA_NO);
   

--- 1.185/sql/ha_ndbcluster.h	2007-07-12 16:31:45 +02:00
+++ 1.186/sql/ha_ndbcluster.h	2007-07-12 16:31:45 +02:00
@@ -41,6 +41,7 @@
 class NdbBlob;
 class NdbIndexStat;
 class NdbEventOperation;
+class NdbInterpretedCode;
 class ha_ndbcluster_cond;
 
 // connectstring to cluster if given by mysqld
@@ -120,6 +121,8 @@
 #ifdef HAVE_NDB_BINLOG
   uint32 connect_count;
   uint32 flags;
+  uint32 m_resolve_column;
+  uint32 m_resolve_size;
   NdbEventOperation *op;
   NdbEventOperation *op_old; // for rename table
   char *old_names; // for rename table
@@ -166,9 +169,30 @@
 
 #ifdef HAVE_NDB_BINLOG
 /* NDB_SHARE.flags */
-#define NSF_HIDDEN_PK 1 /* table has hidden primary key */
-#define NSF_BLOB_FLAG 2 /* table has blob attributes */
-#define NSF_NO_BINLOG 4 /* table should not be binlogged */
+#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)
+{ share->flags&= ~NSF_NO_BINLOG; }
+inline void set_binlog_nologging(NDB_SHARE *share)
+{ 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)
+{ share->flags&= ~NSF_BINLOG_FULL; }
+inline void set_binlog_full(NDB_SHARE *share)
+{ 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)
+{ share->flags&= ~NSF_BINLOG_USE_UPDATE; }
+inline void set_binlog_use_update(NDB_SHARE *share)
+{ 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
 
 typedef enum ndb_query_state_bits {
@@ -405,6 +429,10 @@
 				  uint table_changes);
 
 private:
+#ifdef HAVE_NDB_BINLOG
+  int update_row_timestamp_resolve(const byte *old_data, byte *new_data,
+                                   NdbInterpretedCode *);
+#endif
   friend int ndbcluster_drop_database_impl(const char *path);
   friend int ndb_handle_schema_change(THD *thd, 
                                       Ndb *ndb, NdbEventOperation *pOp,
@@ -508,6 +536,7 @@
                                  uint op_batch_size, bool & batch_full);
   char *copy_row_to_buffer(Thd_ndb *thd_ndb, const byte *record);
   char *get_row_buffer();
+  char *get_buffer(uint size);
   void clear_extended_column_set(uchar *mask);
   uchar *copy_column_set(MY_BITMAP *bitmap);
 
@@ -548,6 +577,7 @@
   void release_completed_operations(NdbTransaction*, bool);
 
   friend int execute_commit(ha_ndbcluster*, NdbTransaction*);
+  friend int execute_commit(NdbTransaction *, int, int);
   friend int execute_no_commit_ignore_no_key(ha_ndbcluster*, NdbTransaction*);
   friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*, bool);
   friend int execute_no_commit_ie(ha_ndbcluster*, NdbTransaction*, bool);
Thread
bk commit into 5.1 tree (tulin:1.2558)tomas12 Jul