Below is the list of changes that have just been committed into a local
5.1 repository of frazer. When frazer 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, 2008-03-25 13:29:53+00:00, frazer@stripped +1 -0
Fix bad merge
sql/ha_ndbcluster.cc@stripped, 2008-03-25 13:29:40+00:00, frazer@stripped +52 -46
Fix bad merge
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc 2008-03-20 15:43:59 +00:00
+++ b/sql/ha_ndbcluster.cc 2008-03-25 13:29:40 +00:00
@@ -10320,61 +10320,67 @@ ha_ndbcluster::read_multi_range_first(KE
buffer->end_of_used_area= row_buf;
- /* Get pointer to first range key operation (not scans) */
- const NdbOperation* rangeOp= lastOp ? lastOp->next() :
- m_thd_ndb->trans->getFirstDefinedOperation();
-
- if (!execute_no_commit_ie(this, m_thd_ndb->trans))
+ if (any_real_read)
{
- m_multi_range_result_ptr= buffer->buffer;
-
- /* We must check the result of any primary or unique key
- * ranges now, as these operations may be invalidated by
- * further execute+releaseOperations calls on this transaction by
- * different handler objects.
- */
- KEY_MULTI_RANGE* rangeInfo= multi_range_curr;
-
- for (;rangeInfo < m_multi_range_defined_end; rangeInfo++)
+ /* Get pointer to first range key operation (not scans) */
+ const NdbOperation* rangeOp= lastOp ? lastOp->next() :
+ trans->getFirstDefinedOperation();
+
+ if (execute_no_commit_ie(m_thd_ndb, trans) == 0)
{
- if (rangeInfo->range_flag & SKIP_RANGE)
- continue;
-
- if (rangeInfo->range_flag & UNIQUE_RANGE)
+ m_multi_range_result_ptr= buffer->buffer;
+
+ /* We must check the result of any primary or unique key
+ * ranges now, as these operations may be invalidated by
+ * further execute+releaseOperations calls on this transaction by
+ * different handler objects.
+ */
+ KEY_MULTI_RANGE* rangeInfo= multi_range_curr;
+
+ for (;rangeInfo < m_multi_range_defined_end; rangeInfo++)
{
- if (rangeOp->getNdbError().code == 0)
- {
- /* Successful read, results are in buffer.
- */
- rangeInfo->range_flag &= ~(uint)EMPTY_RANGE;
-
- DBUG_PRINT("info", ("Unique range op has result"));
- }
- else
+ DBUG_PRINT("info", ("range flag is %u", rangeInfo->range_flag));
+ if (rangeInfo->range_flag & SKIP_RANGE)
+ continue;
+
+ if ((rangeInfo->range_flag & UNIQUE_RANGE) &&
+ (!(rangeInfo->range_flag & READ_KEY_FROM_RANGE)))
{
- NdbError err= rangeOp->getNdbError();
-
- if (err.classification !=
- NdbError::NoDataFound)
- DBUG_RETURN(ndb_err(m_thd_ndb->trans));
-
- DBUG_PRINT("info", ("Unique range op has no result"));
- /* Indicate to read_multi_range_next that this
- * result is empty
- */
- rangeInfo->range_flag |= EMPTY_RANGE;
+ assert(rangeOp != NULL);
+ if (rangeOp->getNdbError().code == 0)
+ {
+ /* Successful read, results are in buffer.
+ */
+ rangeInfo->range_flag &= ~(uint)EMPTY_RANGE;
+
+ DBUG_PRINT("info", ("Unique range op has result"));
+ }
+ else
+ {
+ NdbError err= rangeOp->getNdbError();
+
+ if (err.classification !=
+ NdbError::NoDataFound)
+ DBUG_RETURN(ndb_err(trans));
+
+ DBUG_PRINT("info", ("Unique range op has no result"));
+ /* Indicate to read_multi_range_next that this
+ * result is empty
+ */
+ rangeInfo->range_flag |= EMPTY_RANGE;
+ }
+
+ /* Move to next completed operation */
+ rangeOp= trans->getNextCompletedOperation(rangeOp);
}
- /* Move to next completed operation */
- rangeOp= m_thd_ndb->trans->getNextCompletedOperation(rangeOp);
+ /* For scan ranges, do nothing here */
}
-
- /* For scan ranges, do nothing here */
}
+ else
+ ERR_RETURN(trans->getNdbError());
}
- else
- ERR_RETURN(m_thd_ndb->trans->getNdbError());
-
+
DBUG_RETURN(read_multi_range_next(found_range_p));
}
Thread |
---|
• bk commit into 5.1 tree (frazer:1.2586) | Frazer Clement | 25 Mar |