Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas 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
1.2128 06/06/28 08:37:04 jonas@stripped +6 -0
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/50-jonas
ndb/src/ndbapi/NdbScanOperation.cpp
1.72 06/06/28 08:37:01 jonas@stripped +0 -0
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp
1.76 06/06/28 08:37:01 jonas@stripped +0 -0
Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
1.95 06/06/28 08:37:01 jonas@stripped +0 -0
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
1.89 06/06/28 08:37:00 jonas@stripped +0 -0
Auto merged
ndb/include/ndbapi/NdbScanOperation.hpp
1.37 06/06/28 08:37:00 jonas@stripped +0 -0
Auto merged
ndb/include/ndbapi/NdbIndexScanOperation.hpp
1.21 06/06/28 08:37:00 jonas@stripped +0 -0
Auto merged
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/50-jonas/RESYNC
--- 1.20/ndb/include/ndbapi/NdbIndexScanOperation.hpp 2006-06-12 09:37:05 +02:00
+++ 1.21/ndb/include/ndbapi/NdbIndexScanOperation.hpp 2006-06-28 08:37:00 +02:00
@@ -41,7 +41,9 @@ public:
* @param parallel No of fragments to scan in parallel (0=max)
*/
virtual int readTuples(LockMode lock_mode = LM_Read,
- Uint32 scan_flags = 0, Uint32 parallel = 0);
+ Uint32 scan_flags = 0,
+ Uint32 parallel = 0,
+ Uint32 batch = 0);
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
/**
@@ -69,7 +71,7 @@ public:
(SF_ReadRangeNo & -(Int32)read_range_no) |
(SF_KeyInfo & -(Int32)keyinfo);
- return readTuples(lock_mode, scan_flags, parallel);
+ return readTuples(lock_mode, scan_flags, parallel, batch);
}
#endif
--- 1.36/ndb/include/ndbapi/NdbScanOperation.hpp 2006-06-14 13:33:56 +02:00
+++ 1.37/ndb/include/ndbapi/NdbScanOperation.hpp 2006-06-28 08:37:00 +02:00
@@ -57,7 +57,9 @@ public:
*/
virtual
int readTuples(LockMode lock_mode = LM_Read,
- Uint32 scan_flags = 0, Uint32 parallel = 0);
+ Uint32 scan_flags = 0,
+ Uint32 parallel = 0,
+ Uint32 batch = 0);
#ifndef DOXYGEN_SHOULD_SKIP_DEPRECATED
/**
--- 1.75/ndb/src/mgmsrv/ConfigInfo.cpp 2006-06-20 10:27:46 +02:00
+++ 1.76/ndb/src/mgmsrv/ConfigInfo.cpp 2006-06-28 08:37:01 +02:00
@@ -30,6 +30,7 @@ extern my_bool opt_core;
#define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0
#define MAX_INT_RNIL 0xfffffeff
+#define MAX_PORT_NO 65535
#define _STR_VALUE(x) #x
#define STR_VALUE(x) _STR_VALUE(x)
@@ -422,7 +423,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
UNDEFINED,
"1",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_DB_NO_REPLICAS,
@@ -1462,7 +1463,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
NDB_PORT,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
KEY_INTERNAL,
@@ -1474,7 +1475,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
UNDEFINED,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_NODE_ARBIT_RANK,
@@ -1616,7 +1617,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_TCP_SEND_BUFFER_SIZE,
@@ -1722,7 +1723,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_SHM_SIGNUM,
@@ -1944,7 +1945,7 @@ const ConfigInfo::ParamInfo ConfigInfo::
ConfigInfo::CI_INT,
MANDATORY,
"0",
- STR_VALUE(MAX_INT_RNIL) },
+ STR_VALUE(MAX_PORT_NO) },
{
CFG_SCI_HOST1_ID_0,
--- 1.88/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-27 10:02:29 +02:00
+++ 1.89/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-06-28 08:37:00 +02:00
@@ -7373,15 +7373,15 @@ void Dblqh::scanLockReleasedLab(Signal*
scanptr.p->m_curr_batch_size_rows = 0;
scanptr.p->m_curr_batch_size_bytes = 0;
closeScanLab(signal);
+ } else if (scanptr.p->m_last_row && !scanptr.p->scanLockHold) {
+ jam();
+ closeScanLab(signal);
+ return;
} else if (scanptr.p->check_scan_batch_completed() &&
scanptr.p->scanLockHold != ZTRUE) {
jam();
scanptr.p->scanState = ScanRecord::WAIT_SCAN_NEXTREQ;
sendScanFragConf(signal, ZFALSE);
- } else if (scanptr.p->m_last_row && !scanptr.p->scanLockHold) {
- jam();
- closeScanLab(signal);
- return;
} else {
jam();
/*
--- 1.71/ndb/src/ndbapi/NdbScanOperation.cpp 2006-06-12 09:37:05 +02:00
+++ 1.72/ndb/src/ndbapi/NdbScanOperation.cpp 2006-06-28 08:37:01 +02:00
@@ -117,7 +117,8 @@ NdbScanOperation::init(const NdbTableImp
int
NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
Uint32 scan_flags,
- Uint32 parallel)
+ Uint32 parallel,
+ Uint32 batch)
{
m_ordered = m_descending = false;
Uint32 fragCount = m_currentTable->m_fragmentCount;
@@ -181,9 +182,12 @@ NdbScanOperation::readTuples(NdbScanOper
bool tupScan = (scan_flags & SF_TupScan);
if (tupScan && rangeScan)
tupScan = false;
-
- theParallelism = parallel;
+ if (rangeScan && (scan_flags & SF_OrderBy))
+ parallel = fragCount;
+
+ theParallelism = parallel;
+
if(fix_receivers(parallel) == -1){
setErrorCodeAbort(4000);
return -1;
@@ -202,6 +206,7 @@ NdbScanOperation::readTuples(NdbScanOper
req->tableSchemaVersion = m_accessTable->m_version;
req->storedProcId = 0xFFFF;
req->buddyConPtr = theNdbCon->theBuddyConPtr;
+ req->first_batch_size = batch; // Save user specified batch size
Uint32 reqInfo = 0;
ScanTabReq::setParallelism(reqInfo, parallel);
@@ -750,13 +755,14 @@ int NdbScanOperation::prepareSendScan(Ui
* The number of records sent by each LQH is calculated and the kernel
* is informed of this number by updating the SCAN_TABREQ signal
*/
- Uint32 batch_size, batch_byte_size, first_batch_size;
+ ScanTabReq * req = CAST_PTR(ScanTabReq, theSCAN_TABREQ->getDataPtrSend());
+ Uint32 batch_size = req->first_batch_size; // User specified
+ Uint32 batch_byte_size, first_batch_size;
theReceiver.calculate_batch_size(key_size,
theParallelism,
batch_size,
batch_byte_size,
first_batch_size);
- ScanTabReq * req = CAST_PTR(ScanTabReq, theSCAN_TABREQ->getDataPtrSend());
ScanTabReq::setScanBatch(req->requestInfo, batch_size);
req->batch_byte_size= batch_byte_size;
req->first_batch_size= first_batch_size;
@@ -1216,13 +1222,14 @@ error:
int
NdbIndexScanOperation::readTuples(LockMode lm,
Uint32 scan_flags,
- Uint32 parallel)
+ Uint32 parallel,
+ Uint32 batch)
{
const bool order_by = scan_flags & SF_OrderBy;
const bool order_desc = scan_flags & SF_Descending;
const bool read_range_no = scan_flags & SF_ReadRangeNo;
-
- int res = NdbScanOperation::readTuples(lm, scan_flags, 0);
+
+ int res = NdbScanOperation::readTuples(lm, scan_flags, parallel, batch);
if(!res && read_range_no)
{
m_read_range_no = 1;
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.2128) | jonas | 28 Jun |