summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.mysql.com>2007-02-08 00:00:14 +0700
committerunknown <tomas@poseidon.mysql.com>2007-02-08 00:00:14 +0700
commit1daa0e443566bb394ed4466874d0496db76b1a94 (patch)
tree7c3cc44e0e9a7491d319e73a7412f7dba4866558 /sql/ha_ndbcluster.cc
parentd3c1511a36f0c82f2aa707d74068d76fe84060bc (diff)
parenta11fb9ebc4f7ae71c4f73718ab159a04bfb032de (diff)
downloadmariadb-git-1daa0e443566bb394ed4466874d0496db76b1a94.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.mysql.com:/home/tomas/mysql-5.0-ndb sql/ha_ndbcluster.cc: Auto merged
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 30be53f1ddb..4f753ccea79 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -1995,8 +1995,7 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op,
DBUG_PRINT("error", ("key %d unknown flag %d", j, p.key->flag));
DBUG_ASSERT(FALSE);
// Stop setting bounds but continue with what we have
- op->end_of_bound(range_no);
- DBUG_RETURN(0);
+ DBUG_RETURN(op->end_of_bound(range_no));
}
}
}
@@ -2043,8 +2042,7 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op,
tot_len+= part_store_len;
}
- op->end_of_bound(range_no);
- DBUG_RETURN(0);
+ DBUG_RETURN(op->end_of_bound(range_no));
}
/*
@@ -3882,11 +3880,10 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
ERR_RETURN(ndb->getNdbError());
no_uncommitted_rows_reset(thd);
thd_ndb->stmt= trans;
+ thd_ndb->query_state&= NDB_QUERY_NORMAL;
trans_register_ha(thd, FALSE, &ndbcluster_hton);
}
- thd_ndb->query_state&= NDB_QUERY_NORMAL;
m_active_trans= trans;
-
// Start of statement
m_retrieve_all_fields= FALSE;
m_retrieve_primary_key= FALSE;
@@ -6365,7 +6362,7 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
}
else if ((scanOp= m_active_trans->getNdbIndexScanOperation(idx, tab))
&&!scanOp->readTuples(lm, 0, parallelism, sorted,
- FALSE, TRUE, need_pk)
+ FALSE, TRUE, need_pk, TRUE)
&&!generate_scan_filter(m_cond_stack, scanOp)
&&!define_read_attrs(end_of_buffer-reclength, scanOp))
{
@@ -6528,7 +6525,11 @@ close_scan:
}
if (multi_range_curr == multi_range_end)
+ {
+ Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
+ thd_ndb->query_state&= NDB_QUERY_NORMAL;
DBUG_RETURN(HA_ERR_END_OF_FILE);
+ }
/**
* Read remaining ranges