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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b316b97b
Commit
b316b97b
authored
Apr 05, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
parents
f650e086
ed44321d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
10 deletions
+49
-10
ndb/include/ndbapi/NdbConnection.hpp
ndb/include/ndbapi/NdbConnection.hpp
+1
-0
ndb/include/ndbapi/NdbScanOperation.hpp
ndb/include/ndbapi/NdbScanOperation.hpp
+1
-1
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+31
-0
ndb/src/ndbapi/NdbResultSet.cpp
ndb/src/ndbapi/NdbResultSet.cpp
+1
-1
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+14
-7
ndb/tools/desc.cpp
ndb/tools/desc.cpp
+1
-1
No files found.
ndb/include/ndbapi/NdbConnection.hpp
View file @
b316b97b
...
...
@@ -542,6 +542,7 @@ private:
// Release all cursor operations in connection
void
releaseOps
(
NdbOperation
*
);
void
releaseScanOperations
(
NdbIndexScanOperation
*
);
void
releaseExecutedScanOperation
(
NdbIndexScanOperation
*
);
// Set the transaction identity of the transaction
void
setTransactionId
(
Uint64
aTransactionId
);
...
...
ndb/include/ndbapi/NdbScanOperation.hpp
View file @
b316b97b
...
...
@@ -93,7 +93,7 @@ protected:
int
nextResult
(
bool
fetchAllowed
=
true
,
bool
forceSend
=
false
);
virtual
void
release
();
void
closeScan
(
bool
forceSend
=
false
);
void
closeScan
(
bool
forceSend
=
false
,
bool
releaseOp
=
false
);
int
close_impl
(
class
TransporterFacade
*
,
bool
forceSend
=
false
);
// Overloaded methods from NdbCursorOperation
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
b316b97b
...
...
@@ -963,6 +963,37 @@ NdbConnection::releaseScanOperations(NdbIndexScanOperation* cursorOp)
}
}
//NdbConnection::releaseScanOperations()
/*****************************************************************************
void releaseExecutedScanOperation();
Remark: Release scan op when hupp'ed trans closed (save memory)
******************************************************************************/
void
NdbConnection
::
releaseExecutedScanOperation
(
NdbIndexScanOperation
*
cursorOp
)
{
DBUG_ENTER
(
"NdbConnection::releaseExecutedScanOperation"
);
DBUG_PRINT
(
"enter"
,
(
"this=0x%x op=0x%x"
,
(
UintPtr
)
this
,
(
UintPtr
)
cursorOp
))
// 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
;
}
tOp
=
(
NdbIndexScanOperation
*
)
tOp
->
theNext
;
}
}
DBUG_VOID_RETURN
;
}
//NdbConnection::releaseExecutedScanOperation()
/*****************************************************************************
NdbOperation* getNdbOperation(const char* aTableName);
...
...
ndb/src/ndbapi/NdbResultSet.cpp
View file @
b316b97b
...
...
@@ -69,7 +69,7 @@ int NdbResultSet::nextResult(bool fetchAllowed, bool forceSend)
void
NdbResultSet
::
close
(
bool
forceSend
)
{
m_operation
->
closeScan
(
forceSend
);
m_operation
->
closeScan
(
forceSend
,
true
);
}
NdbOperation
*
...
...
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
b316b97b
...
...
@@ -674,7 +674,7 @@ NdbScanOperation::doSend(int ProcessorId)
return
0
;
}
void
NdbScanOperation
::
closeScan
(
bool
forceSend
)
void
NdbScanOperation
::
closeScan
(
bool
forceSend
,
bool
releaseOp
)
{
if
(
m_transConnection
){
if
(
DEBUG_NEXT_RESULT
)
...
...
@@ -691,13 +691,20 @@ void NdbScanOperation::closeScan(bool forceSend)
Guard
guard
(
tp
->
theMutexPtr
);
close_impl
(
tp
,
forceSend
);
}
while
(
0
);
theNdbCon
->
theScanningOp
=
0
;
theNdb
->
closeTransaction
(
theNdbCon
);
}
theNdbCon
=
0
;
NdbConnection
*
tCon
=
theNdbCon
;
NdbConnection
*
tTransCon
=
m_transConnection
;
theNdbCon
=
NULL
;
m_transConnection
=
NULL
;
if
(
releaseOp
&&
tTransCon
)
{
NdbIndexScanOperation
*
tOp
=
(
NdbIndexScanOperation
*
)
this
;
tTransCon
->
releaseExecutedScanOperation
(
tOp
);
}
tCon
->
theScanningOp
=
0
;
theNdb
->
closeTransaction
(
tCon
);
}
void
...
...
ndb/tools/desc.cpp
View file @
b316b97b
...
...
@@ -89,7 +89,7 @@ int main(int argc, char** argv){
unsigned
j
;
for
(
j
=
0
;
(
int
)
j
<
pTab
->
getNoOfPrimaryKeys
();
j
++
)
{
const
NdbDictionary
::
Column
*
col
=
pTab
->
getColumn
(
j
);
const
NdbDictionary
::
Column
*
col
=
pTab
->
getColumn
(
pTab
->
getPrimaryKey
(
j
)
);
ndbout
<<
col
->
getName
();
if
((
int
)
j
<
pTab
->
getNoOfPrimaryKeys
()
-
1
)
ndbout
<<
", "
;
...
...
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