Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
552d53bb
Commit
552d53bb
authored
Jun 27, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work
parents
33339fdf
c59fac93
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
16 deletions
+35
-16
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp
+4
-2
storage/ndb/include/ndbapi/NdbScanOperation.hpp
storage/ndb/include/ndbapi/NdbScanOperation.hpp
+3
-1
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+4
-4
storage/ndb/src/ndbapi/NdbReceiver.cpp
storage/ndb/src/ndbapi/NdbReceiver.cpp
+9
-1
storage/ndb/src/ndbapi/NdbScanOperation.cpp
storage/ndb/src/ndbapi/NdbScanOperation.cpp
+15
-8
No files found.
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp
View file @
552d53bb
...
...
@@ -42,7 +42,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
/**
...
...
@@ -70,7 +72,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
...
...
storage/ndb/include/ndbapi/NdbScanOperation.hpp
View file @
552d53bb
...
...
@@ -58,7 +58,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
/**
...
...
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
552d53bb
...
...
@@ -8059,15 +8059,15 @@ void Dblqh::scanLockReleasedLab(Signal* 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
();
/*
...
...
storage/ndb/src/ndbapi/NdbReceiver.cpp
View file @
552d53bb
...
...
@@ -121,7 +121,15 @@ NdbReceiver::calculate_batch_size(Uint32 key_size,
* no more than MAX_SCAN_BATCH_SIZE is sent from all nodes in total per
* batch.
*/
batch_byte_size
=
max_batch_byte_size
;
if
(
batch_size
==
0
)
{
batch_byte_size
=
max_batch_byte_size
;
}
else
{
batch_byte_size
=
batch_size
*
tot_size
;
}
if
(
batch_byte_size
*
parallelism
>
max_scan_batch_size
)
{
batch_byte_size
=
max_scan_batch_size
/
parallelism
;
}
...
...
storage/ndb/src/ndbapi/NdbScanOperation.cpp
View file @
552d53bb
...
...
@@ -119,7 +119,8 @@ NdbScanOperation::init(const NdbTableImpl* tab, NdbTransaction* myConnection)
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
;
...
...
@@ -191,8 +192,11 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
tupScan
=
false
;
}
theParallelism
=
parallel
;
if
(
rangeScan
&&
(
scan_flags
&
SF_OrderBy
))
parallel
=
fragCount
;
theParallelism
=
parallel
;
if
(
fix_receivers
(
parallel
)
==
-
1
){
setErrorCodeAbort
(
4000
);
return
-
1
;
...
...
@@ -211,6 +215,7 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
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
);
...
...
@@ -768,13 +773,14 @@ int NdbScanOperation::prepareSendScan(Uint32 aTC_ConnectPtr,
* 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
;
...
...
@@ -1268,13 +1274,14 @@ NdbIndexScanOperation::getKeyFromSCANTABREQ(Uint32* data, Uint32 size)
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment