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
005123f9
Commit
005123f9
authored
Nov 24, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/mysql-4.1-fix
into mysql.com:/home/jonas/src/mysql-5.0-ndb
parents
b22e9a0b
dfe4e29a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
22 deletions
+31
-22
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+5
-0
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+21
-20
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+5
-2
No files found.
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
005123f9
...
@@ -551,6 +551,11 @@ public:
...
@@ -551,6 +551,11 @@ public:
UintR
scanErrorCounter
;
UintR
scanErrorCounter
;
UintR
scanLocalFragid
;
UintR
scanLocalFragid
;
UintR
scanSchemaVersion
;
UintR
scanSchemaVersion
;
/**
* This is _always_ main table, even in range scan
* in which case scanTcrec->fragmentptr is different
*/
Uint32
fragPtrI
;
Uint32
fragPtrI
;
UintR
scanStoredProcId
;
UintR
scanStoredProcId
;
ScanState
scanState
;
ScanState
scanState
;
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
005123f9
...
@@ -7659,6 +7659,9 @@ void Dblqh::abort_scan(Signal* signal, Uint32 scan_ptr_i, Uint32 errcode){
...
@@ -7659,6 +7659,9 @@ void Dblqh::abort_scan(Signal* signal, Uint32 scan_ptr_i, Uint32 errcode){
jam
();
jam
();
scanptr
.
i
=
scan_ptr_i
;
scanptr
.
i
=
scan_ptr_i
;
c_scanRecordPool
.
getPtr
(
scanptr
);
c_scanRecordPool
.
getPtr
(
scanptr
);
fragptr
.
i
=
tcConnectptr
.
p
->
fragmentptr
;
ptrCheckGuard
(
fragptr
,
cfragrecFileSize
,
fragrecord
);
finishScanrec
(
signal
);
finishScanrec
(
signal
);
releaseScanrec
(
signal
);
releaseScanrec
(
signal
);
tcConnectptr
.
p
->
transactionState
=
TcConnectionrec
::
IDLE
;
tcConnectptr
.
p
->
transactionState
=
TcConnectionrec
::
IDLE
;
...
@@ -8639,10 +8642,12 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8639,10 +8642,12 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
/**
/**
* Used for scan take over
* Used for scan take over
*/
*/
FragrecordPtr
tFragPtr
;
{
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
FragrecordPtr
tFragPtr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
tFragPtr
.
i
=
fragptr
.
p
->
tableFragptr
;
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
scanptr
.
p
->
fragPtrI
=
fragptr
.
p
->
tableFragptr
;
}
/**
/**
* !idx uses 1 - (MAX_PARALLEL_SCANS_PER_FRAG - 1) = 1-11
* !idx uses 1 - (MAX_PARALLEL_SCANS_PER_FRAG - 1) = 1-11
...
@@ -8651,8 +8656,8 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8651,8 +8656,8 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
Uint32
start
=
(
idx
?
MAX_PARALLEL_SCANS_PER_FRAG
:
1
);
Uint32
start
=
(
idx
?
MAX_PARALLEL_SCANS_PER_FRAG
:
1
);
Uint32
stop
=
(
idx
?
MAX_PARALLEL_INDEX_SCANS_PER_FRAG
:
MAX_PARALLEL_SCANS_PER_FRAG
-
1
);
Uint32
stop
=
(
idx
?
MAX_PARALLEL_INDEX_SCANS_PER_FRAG
:
MAX_PARALLEL_SCANS_PER_FRAG
-
1
);
stop
+=
start
;
stop
+=
start
;
Uint32
free
=
tFragP
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
Uint32
free
=
fragp
tr
.
p
->
m_scanNumberMask
.
find
(
start
);
if
(
free
==
Fragrecord
::
ScanNumberMask
::
NotFound
||
free
>=
stop
){
if
(
free
==
Fragrecord
::
ScanNumberMask
::
NotFound
||
free
>=
stop
){
jam
();
jam
();
...
@@ -8666,16 +8671,16 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
...
@@ -8666,16 +8671,16 @@ Uint32 Dblqh::initScanrec(const ScanFragReq* scanFragReq)
*/
*/
scanptr
.
p
->
scanState
=
ScanRecord
::
IN_QUEUE
;
scanptr
.
p
->
scanState
=
ScanRecord
::
IN_QUEUE
;
LocalDLFifoList
<
ScanRecord
>
queue
(
c_scanRecordPool
,
LocalDLFifoList
<
ScanRecord
>
queue
(
c_scanRecordPool
,
tFragP
tr
.
p
->
m_queuedScans
);
fragp
tr
.
p
->
m_queuedScans
);
queue
.
add
(
scanptr
);
queue
.
add
(
scanptr
);
return
ZOK
;
return
ZOK
;
}
}
scanptr
.
p
->
scanNumber
=
free
;
scanptr
.
p
->
scanNumber
=
free
;
tFragP
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
fragp
tr
.
p
->
m_scanNumberMask
.
clear
(
free
);
// Update mask
LocalDLList
<
ScanRecord
>
active
(
c_scanRecordPool
,
tFragP
tr
.
p
->
m_activeScans
);
LocalDLList
<
ScanRecord
>
active
(
c_scanRecordPool
,
fragp
tr
.
p
->
m_activeScans
);
active
.
add
(
scanptr
);
active
.
add
(
scanptr
);
if
(
scanptr
.
p
->
scanKeyinfoFlag
){
if
(
scanptr
.
p
->
scanKeyinfoFlag
){
jam
();
jam
();
...
@@ -8737,12 +8742,8 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8737,12 +8742,8 @@ void Dblqh::finishScanrec(Signal* signal)
{
{
release_acc_ptr_list
(
scanptr
.
p
);
release_acc_ptr_list
(
scanptr
.
p
);
FragrecordPtr
tFragPtr
;
tFragPtr
.
i
=
scanptr
.
p
->
fragPtrI
;
ptrCheckGuard
(
tFragPtr
,
cfragrecFileSize
,
fragrecord
);
LocalDLFifoList
<
ScanRecord
>
queue
(
c_scanRecordPool
,
LocalDLFifoList
<
ScanRecord
>
queue
(
c_scanRecordPool
,
tFragP
tr
.
p
->
m_queuedScans
);
fragp
tr
.
p
->
m_queuedScans
);
if
(
scanptr
.
p
->
scanState
==
ScanRecord
::
IN_QUEUE
){
if
(
scanptr
.
p
->
scanState
==
ScanRecord
::
IN_QUEUE
){
jam
();
jam
();
...
@@ -8760,11 +8761,11 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8760,11 +8761,11 @@ void Dblqh::finishScanrec(Signal* signal)
ndbrequire
(
tmp
.
p
==
scanptr
.
p
);
ndbrequire
(
tmp
.
p
==
scanptr
.
p
);
}
}
LocalDLList
<
ScanRecord
>
scans
(
c_scanRecordPool
,
tFragP
tr
.
p
->
m_activeScans
);
LocalDLList
<
ScanRecord
>
scans
(
c_scanRecordPool
,
fragp
tr
.
p
->
m_activeScans
);
scans
.
release
(
scanptr
);
scans
.
release
(
scanptr
);
const
Uint32
scanNumber
=
scanptr
.
p
->
scanNumber
;
const
Uint32
scanNumber
=
scanptr
.
p
->
scanNumber
;
ndbrequire
(
!
tFragP
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ndbrequire
(
!
fragp
tr
.
p
->
m_scanNumberMask
.
get
(
scanNumber
));
ScanRecordPtr
restart
;
ScanRecordPtr
restart
;
/**
/**
...
@@ -8772,13 +8773,13 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8772,13 +8773,13 @@ void Dblqh::finishScanrec(Signal* signal)
*/
*/
if
(
scanNumber
==
NR_ScanNo
||
!
queue
.
first
(
restart
)){
if
(
scanNumber
==
NR_ScanNo
||
!
queue
.
first
(
restart
)){
jam
();
jam
();
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
return
;
}
}
if
(
ERROR_INSERTED
(
5034
)){
if
(
ERROR_INSERTED
(
5034
)){
jam
();
jam
();
tFragP
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
fragp
tr
.
p
->
m_scanNumberMask
.
set
(
scanNumber
);
return
;
return
;
}
}
...
@@ -8789,7 +8790,7 @@ void Dblqh::finishScanrec(Signal* signal)
...
@@ -8789,7 +8790,7 @@ void Dblqh::finishScanrec(Signal* signal)
ptrCheckGuard
(
tcConnectptr
,
ctcConnectrecFileSize
,
tcConnectionrec
);
ptrCheckGuard
(
tcConnectptr
,
ctcConnectrecFileSize
,
tcConnectionrec
);
restart
.
p
->
scanNumber
=
scanNumber
;
restart
.
p
->
scanNumber
=
scanNumber
;
restart
.
p
->
scanState
=
ScanRecord
::
WAIT_ACC_SCAN
;
restart
.
p
->
scanState
=
ScanRecord
::
WAIT_ACC_SCAN
;
queue
.
remove
(
restart
);
queue
.
remove
(
restart
);
scans
.
add
(
restart
);
scans
.
add
(
restart
);
if
(
restart
.
p
->
scanKeyinfoFlag
){
if
(
restart
.
p
->
scanKeyinfoFlag
){
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
005123f9
...
@@ -1121,8 +1121,11 @@ NdbConnection::getNdbIndexScanOperation(const NdbIndexImpl* index,
...
@@ -1121,8 +1121,11 @@ NdbConnection::getNdbIndexScanOperation(const NdbIndexImpl* index,
const
NdbTableImpl
*
indexTable
=
index
->
getIndexTable
();
const
NdbTableImpl
*
indexTable
=
index
->
getIndexTable
();
if
(
indexTable
!=
0
){
if
(
indexTable
!=
0
){
NdbIndexScanOperation
*
tOp
=
getNdbScanOperation
(
indexTable
);
NdbIndexScanOperation
*
tOp
=
getNdbScanOperation
(
indexTable
);
tOp
->
m_currentTable
=
table
;
if
(
tOp
)
if
(
tOp
)
tOp
->
m_cursor_type
=
NdbScanOperation
::
IndexCursor
;
{
tOp
->
m_currentTable
=
table
;
tOp
->
m_cursor_type
=
NdbScanOperation
::
IndexCursor
;
}
return
tOp
;
return
tOp
;
}
else
{
}
else
{
setOperationErrorCodeAbort
(
theNdb
->
theError
.
code
);
setOperationErrorCodeAbort
(
theNdb
->
theError
.
code
);
...
...
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