List:Commits« Previous MessageNext Message »
From:jonas oreland Date:December 1 2010 11:39am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4036)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped

 4036 jonas oreland	2010-12-01 [merge]
      ndb - merge 63 to 70

    modified:
      sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-11-30 10:35:37 +0000
+++ b/sql/ha_ndbcluster.cc	2010-12-01 11:39:42 +0000
@@ -3309,12 +3309,6 @@ int ha_ndbcluster::ordered_index_scan(co
   if (m_active_cursor && (error= close_scan()))
     DBUG_RETURN(error);
 
-  if (m_thd_ndb->m_unsent_bytes)
-  {
-    if ((error = flush_bulk_insert()) != 0)
-      DBUG_RETURN(error);
-  }
-
   const NdbOperation::LockMode lm = get_ndb_lock_mode(m_lock.type);
 
   NdbScanOperation::ScanOptions options;
@@ -3433,12 +3427,6 @@ int ha_ndbcluster::full_table_scan(const
   DBUG_ENTER("full_table_scan");  
   DBUG_PRINT("enter", ("Starting new scan on %s", m_tabname));
 
-  if (m_thd_ndb->m_unsent_bytes)
-  {
-    if ((error = flush_bulk_insert()) != 0)
-      DBUG_RETURN(error);
-  }
-
   if (m_use_partition_pruning && m_user_defined_partitioning)
   {
     part_spec.start_part= 0;
@@ -4491,7 +4479,8 @@ int ha_ndbcluster::ndb_update_row(const 
                    have_pk &&
                    bitmap_is_overlapping(table->write_set, m_pk_bitmap_p) &&
                    primary_key_cmp(old_data, new_data));
-  bool batch_allowed= is_bulk_update || thd_allow_batch(thd);
+  bool batch_allowed= !m_update_cannot_batch && 
+    (is_bulk_update || thd_allow_batch(thd));
   NdbOperation::SetValueSpec sets[1];
 
   DBUG_ENTER("ndb_update_row");
@@ -4780,7 +4769,9 @@ int ha_ndbcluster::ndb_delete_row(const 
   const NdbOperation *op;
   uint32 part_id= ~uint32(0);
   int error;
-  bool allow_batch= m_is_bulk_delete || thd_allow_batch(thd);
+  bool allow_batch= !m_delete_cannot_batch &&
+    (m_is_bulk_delete || thd_allow_batch(thd));
+
   DBUG_ENTER("ndb_delete_row");
   DBUG_ASSERT(trans);
 
@@ -11766,12 +11757,6 @@ ha_ndbcluster::read_multi_range_first(KE
   DBUG_ENTER("ha_ndbcluster::read_multi_range_first");
   DBUG_PRINT("info", ("blob fields=%d read_set=0x%x", table_share->blob_fields, table->read_set->bitmap[0]));
 
-  if (m_thd_ndb->m_unsent_bytes)
-  {
-    if ((error = flush_bulk_insert()) != 0)
-      DBUG_RETURN(error);
-  }
-
   /**
    * blobs and unique hash index with NULL can't be batched currently
    */

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4036) jonas oreland1 Dec