List:Commits« Previous MessageNext Message »
From:Martin Skold Date:February 14 2007 10:41am
Subject:bk commit into 5.0 tree (mskold:1.2416)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marty. When marty 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-02-14 11:41:39+01:00, mskold@stripped +1 -0
  Merge mskold@stripped:/home/bk/mysql-5.0-ndb
  into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
  MERGE: 1.2377.26.1

  sql/ha_ndbcluster.cc@stripped, 2007-02-14 11:41:31+01:00, mskold@stripped +0 -0
    Auto merged
    MERGE: 1.300.1.1

# 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:	mskold
# Host:	linux.site
# Root:	/windows/Linux_space/MySQL/mysql-5.0-ndb/RESYNC

--- 1.301/sql/ha_ndbcluster.cc	2007-02-14 11:41:48 +01:00
+++ 1.302/sql/ha_ndbcluster.cc	2007-02-14 11:41:48 +01:00
@@ -2523,8 +2523,11 @@ int ha_ndbcluster::update_row(const byte
       ERR_RETURN(op->getNdbError());
   }
 
-  // Execute update operation
-  if (!cursor && execute_no_commit(this,trans,false) != 0) {
+  // Execute update operation if we are not doing a scan for update
+  // and there exist UPDATE AFTER triggers
+
+  if ((!cursor || m_update_cannot_batch) && 
+      execute_no_commit(this,trans,false) != 0) {
     no_uncommitted_rows_execute_failure();
     DBUG_RETURN(ndb_err(trans));
   }
@@ -2565,7 +2568,7 @@ int ha_ndbcluster::delete_row(const byte
 
     no_uncommitted_rows_update(-1);
 
-    if (!m_primary_key_update)
+    if (!(m_primary_key_update || m_delete_cannot_batch))
       // If deleting from cursor, NoCommit will be handled in next_result
       DBUG_RETURN(0);
   }
@@ -3398,6 +3401,22 @@ int ha_ndbcluster::extra(enum ha_extra_f
     DBUG_PRINT("info", ("Turning OFF use of write instead of insert"));
     m_use_write= FALSE;
     break;
+  case HA_EXTRA_DELETE_CANNOT_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_DELETE_CANNOT_BATCH"));
+    m_delete_cannot_batch= TRUE;
+    break;
+  case HA_EXTRA_DELETE_CAN_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_DELETE_CAN_BATCH"));
+    m_delete_cannot_batch= FALSE;
+    break;
+  case HA_EXTRA_UPDATE_CANNOT_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CANNOT_BATCH"));
+    m_update_cannot_batch= TRUE;
+    break;
+  case HA_EXTRA_UPDATE_CAN_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CAN_BATCH"));
+    m_update_cannot_batch= FALSE;
+    break;
   }
   
   DBUG_RETURN(0);
@@ -4760,6 +4779,8 @@ ha_ndbcluster::ha_ndbcluster(TABLE *tabl
   m_bulk_insert_rows((ha_rows) 1024),
   m_rows_changed((ha_rows) 0),
   m_bulk_insert_not_flushed(FALSE),
+  m_delete_cannot_batch(FALSE),
+  m_update_cannot_batch(FALSE),
   m_ops_pending(0),
   m_skip_auto_increment(TRUE),
   m_blobs_pending(0),
@@ -7074,7 +7095,7 @@ void ndb_serialize_cond(const Item *item
             Check that the field is part of the table of the handler
             instance and that we expect a field with of this result type.
           */
-          if (context->table == field->table)
+          if (context->table->s == field->table->s)
           {       
             const NDBTAB *tab= (const NDBTAB *) context->ndb_table;
             DBUG_PRINT("info", ("FIELD_ITEM"));
Thread
bk commit into 5.0 tree (mskold:1.2416)Martin Skold14 Feb