#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped
3356 jonas oreland 2010-12-01
ndb - different solution to bug-58538
modified:
sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2010-11-30 10:19:52 +0000
+++ b/sql/ha_ndbcluster.cc 2010-12-01 11:24:31 +0000
@@ -2931,12 +2931,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);
- }
-
NdbOperation::LockMode lm=
(NdbOperation::LockMode)get_ndb_lock_type(m_lock.type, table->read_set);
@@ -3059,12 +3053,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)
{
part_spec.start_part= 0;
@@ -4046,7 +4034,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->options & OPTION_ALLOW_BATCH);
+ bool batch_allowed= !m_update_cannot_batch &&
+ (is_bulk_update || (thd->options & OPTION_ALLOW_BATCH));
NdbOperation::SetValueSpec sets[1];
DBUG_ENTER("ndb_update_row");
@@ -4339,7 +4328,9 @@ int ha_ndbcluster::ndb_delete_row(const
const NdbOperation *op;
uint32 part_id= ~uint32(0);
int error;
- bool allow_batch= is_bulk_delete || (thd->options & OPTION_ALLOW_BATCH);
+ bool allow_batch= !m_delete_cannot_batch &&
+ (is_bulk_delete || (thd->options & OPTION_ALLOW_BATCH));
+
DBUG_ENTER("ndb_delete_row");
DBUG_ASSERT(trans);
@@ -11002,12 +10993,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
*/
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20101201112431-tmdg2qua09cbc4hs.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (jonas:3356) | jonas oreland | 1 Dec |