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
16e29700
Commit
16e29700
authored
Sep 15, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#21941
Fix so that scans closed before execute are removed from "scans to send list"
parent
bf94afa1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
20 deletions
+72
-20
ndb/include/ndbapi/NdbTransaction.hpp
ndb/include/ndbapi/NdbTransaction.hpp
+4
-1
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+20
-2
ndb/src/ndbapi/NdbTransaction.cpp
ndb/src/ndbapi/NdbTransaction.cpp
+48
-17
No files found.
ndb/include/ndbapi/NdbTransaction.hpp
View file @
16e29700
...
...
@@ -657,8 +657,11 @@ private:
// Release all cursor operations in connection
void
releaseOps
(
NdbOperation
*
);
void
releaseScanOperations
(
NdbIndexScanOperation
*
);
bool
releaseScanOperation
(
NdbIndexScanOperation
**
listhead
,
NdbIndexScanOperation
**
listtail
,
NdbIndexScanOperation
*
op
);
void
releaseExecutedScanOperation
(
NdbIndexScanOperation
*
);
// Set the transaction identity of the transaction
void
setTransactionId
(
Uint64
aTransactionId
);
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
16e29700
...
...
@@ -678,9 +678,27 @@ void NdbScanOperation::close(bool forceSend, bool releaseOp)
theNdbCon
=
NULL
;
m_transConnection
=
NULL
;
if
(
releaseOp
&&
tTransCon
)
{
if
(
tTransCon
)
{
NdbIndexScanOperation
*
tOp
=
(
NdbIndexScanOperation
*
)
this
;
tTransCon
->
releaseExecutedScanOperation
(
tOp
);
bool
ret
=
true
;
if
(
theStatus
!=
WaitResponse
)
{
/**
* Not executed yet
*/
ret
=
tTransCon
->
releaseScanOperation
(
&
tTransCon
->
m_theFirstScanOperation
,
&
tTransCon
->
m_theLastScanOperation
,
tOp
);
}
else
if
(
releaseOp
)
{
ret
=
tTransCon
->
releaseScanOperation
(
&
tTransCon
->
m_firstExecutedScanOp
,
0
,
tOp
);
}
assert
(
ret
);
}
tCon
->
theScanningOp
=
0
;
...
...
ndb/src/ndbapi/NdbTransaction.cpp
View file @
16e29700
...
...
@@ -978,27 +978,58 @@ void
NdbTransaction
::
releaseExecutedScanOperation
(
NdbIndexScanOperation
*
cursorOp
)
{
DBUG_ENTER
(
"NdbTransaction::releaseExecutedScanOperation"
);
DBUG_PRINT
(
"enter"
,
(
"this=0x%x op=0x%x"
,
(
UintPtr
)
this
,
(
UintPtr
)
cursorOp
))
DBUG_PRINT
(
"enter"
,
(
"this=0x%x op=0x%x"
,
(
UintPtr
)
this
,
(
UintPtr
)
cursorOp
));
releaseScanOperation
(
&
m_firstExecutedScanOp
,
0
,
cursorOp
);
DBUG_VOID_RETURN
;
}
//NdbTransaction::releaseExecutedScanOperation()
// here is one reason to make op lists doubly linked
if
(
m_firstExecutedScanOp
==
cursorOp
)
{
m_firstExecutedScanOp
=
(
NdbIndexScanOperation
*
)
cursorOp
->
theNext
;
cursorOp
->
release
();
theNdb
->
releaseScanOperation
(
cursorOp
);
}
else
if
(
m_firstExecutedScanOp
!=
NULL
)
{
NdbIndexScanOperation
*
tOp
=
m_firstExecutedScanOp
;
while
(
tOp
->
theNext
!=
NULL
)
{
if
(
tOp
->
theNext
==
cursorOp
)
{
tOp
->
theNext
=
cursorOp
->
theNext
;
cursorOp
->
release
();
theNdb
->
releaseScanOperation
(
cursorOp
);
break
;
bool
NdbTransaction
::
releaseScanOperation
(
NdbIndexScanOperation
**
listhead
,
NdbIndexScanOperation
**
listtail
,
NdbIndexScanOperation
*
op
)
{
if
(
*
listhead
==
op
)
{
*
listhead
=
(
NdbIndexScanOperation
*
)
op
->
theNext
;
if
(
listtail
&&
*
listtail
==
op
)
{
assert
(
*
listhead
==
0
);
*
listtail
=
0
;
}
}
else
{
NdbIndexScanOperation
*
tmp
=
*
listhead
;
while
(
tmp
!=
NULL
)
{
if
(
tmp
->
theNext
==
op
)
{
tmp
->
theNext
=
(
NdbIndexScanOperation
*
)
op
->
theNext
;
if
(
listtail
&&
*
listtail
==
op
)
{
assert
(
op
->
theNext
==
0
);
*
listtail
=
tmp
;
}
break
;
}
t
Op
=
(
NdbIndexScanOperation
*
)
tO
p
->
theNext
;
t
mp
=
(
NdbIndexScanOperation
*
)
tm
p
->
theNext
;
}
if
(
tmp
==
NULL
)
op
=
NULL
;
}
DBUG_VOID_RETURN
;
}
//NdbTransaction::releaseExecutedScanOperation()
if
(
op
!=
NULL
)
{
op
->
release
();
theNdb
->
releaseScanOperation
(
op
);
return
true
;
}
return
false
;
}
/*****************************************************************************
NdbOperation* getNdbOperation(const char* aTableName);
...
...
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