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
c9e34f19
Commit
c9e34f19
authored
Jun 16, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl1671 - bug fixes
parent
14d00843
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
13 deletions
+67
-13
ndb/include/ndbapi/NdbConnection.hpp
ndb/include/ndbapi/NdbConnection.hpp
+13
-5
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+31
-1
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+17
-1
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+2
-2
ndb/test/src/HugoTransactions.cpp
ndb/test/src/HugoTransactions.cpp
+1
-1
ndb/test/src/UtilTransactions.cpp
ndb/test/src/UtilTransactions.cpp
+2
-2
ndb/tools/delete_all.cpp
ndb/tools/delete_all.cpp
+1
-1
No files found.
ndb/include/ndbapi/NdbConnection.hpp
View file @
c9e34f19
...
@@ -309,6 +309,16 @@ public:
...
@@ -309,6 +309,16 @@ public:
*/
*/
void
close
();
void
close
();
/**
* Restart transaction
*
* Once a transaction has been completed successfully
* it can be started again wo/ calling closeTransaction/startTransaction
*
* Note this method also releases completed operations
*/
int
restart
();
/** @} *********************************************************************/
/** @} *********************************************************************/
/**
/**
...
@@ -417,16 +427,14 @@ public:
...
@@ -417,16 +427,14 @@ public:
*/
*/
const
NdbOperation
*
getNextCompletedOperation
(
const
NdbOperation
*
op
)
const
;
const
NdbOperation
*
getNextCompletedOperation
(
const
NdbOperation
*
op
)
const
;
/** @} *********************************************************************/
private:
/**
/**
* Release completed operations
* Release completed operations
*/
*/
void
releaseCompletedOperations
();
void
releaseCompletedOperations
();
/** @} *********************************************************************/
private:
typedef
Uint64
TimeMillis_t
;
typedef
Uint64
TimeMillis_t
;
/**************************************************************************
/**************************************************************************
* These methods are service methods to other classes in the NDBAPI. *
* These methods are service methods to other classes in the NDBAPI. *
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
c9e34f19
...
@@ -64,6 +64,8 @@
...
@@ -64,6 +64,8 @@
#define DEBUG(x)
#define DEBUG(x)
#endif
#endif
//#define MARKER_TRACE 1
const
Uint32
NR_ScanNo
=
0
;
const
Uint32
NR_ScanNo
=
0
;
void
Dblqh
::
execACC_COM_BLOCK
(
Signal
*
signal
)
void
Dblqh
::
execACC_COM_BLOCK
(
Signal
*
signal
)
...
@@ -2404,6 +2406,9 @@ Dblqh::execREMOVE_MARKER_ORD(Signal* signal)
...
@@ -2404,6 +2406,9 @@ Dblqh::execREMOVE_MARKER_ORD(Signal* signal)
CommitAckMarkerPtr
removedPtr
;
CommitAckMarkerPtr
removedPtr
;
m_commitAckMarkerHash
.
release
(
removedPtr
,
key
);
m_commitAckMarkerHash
.
release
(
removedPtr
,
key
);
ndbrequire
(
removedPtr
.
i
!=
RNIL
);
ndbrequire
(
removedPtr
.
i
!=
RNIL
);
#ifdef MARKER_TRACE
ndbout_c
(
"Rem marker[%.8x %.8x]"
,
key
.
transid1
,
key
.
transid2
);
#endif
}
}
...
@@ -3198,6 +3203,9 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
...
@@ -3198,6 +3203,9 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
CommitAckMarkerPtr
tmp
;
CommitAckMarkerPtr
tmp
;
#ifdef VM_TRACE
#ifdef VM_TRACE
#ifdef MARKER_TRACE
ndbout_c
(
"Add marker[%.8x %.8x]"
,
markerPtr
.
p
->
transid1
,
markerPtr
.
p
->
transid2
);
#endif
ndbrequire
(
!
m_commitAckMarkerHash
.
find
(
tmp
,
*
markerPtr
.
p
));
ndbrequire
(
!
m_commitAckMarkerHash
.
find
(
tmp
,
*
markerPtr
.
p
));
#endif
#endif
m_commitAckMarkerHash
.
add
(
markerPtr
);
m_commitAckMarkerHash
.
add
(
markerPtr
);
...
@@ -5668,7 +5676,23 @@ void Dblqh::execABORT(Signal* signal)
...
@@ -5668,7 +5676,23 @@ void Dblqh::execABORT(Signal* signal)
}
//if
}
//if
regTcPtr
->
abortState
=
TcConnectionrec
::
ABORT_FROM_TC
;
regTcPtr
->
abortState
=
TcConnectionrec
::
ABORT_FROM_TC
;
regTcPtr
->
activeCreat
=
ZFALSE
;
regTcPtr
->
activeCreat
=
ZFALSE
;
const
Uint32
commitAckMarker
=
regTcPtr
->
commitAckMarker
;
if
(
commitAckMarker
!=
RNIL
){
jam
();
#ifdef MARKER_TRACE
{
CommitAckMarkerPtr
tmp
;
m_commitAckMarkerHash
.
getPtr
(
tmp
,
commitAckMarker
);
ndbout_c
(
"Ab2 marker[%.8x %.8x]"
,
tmp
.
p
->
transid1
,
tmp
.
p
->
transid2
);
}
#endif
m_commitAckMarkerHash
.
release
(
commitAckMarker
);
regTcPtr
->
commitAckMarker
=
RNIL
;
}
abortStateHandlerLab
(
signal
);
abortStateHandlerLab
(
signal
);
return
;
return
;
}
//Dblqh::execABORT()
}
//Dblqh::execABORT()
...
@@ -6026,7 +6050,13 @@ void Dblqh::abortCommonLab(Signal* signal)
...
@@ -6026,7 +6050,13 @@ void Dblqh::abortCommonLab(Signal* signal)
* There is no NR ongoing and we have a marker
* There is no NR ongoing and we have a marker
*/
*/
jam
();
jam
();
#ifdef MARKER_TRACE
{
CommitAckMarkerPtr
tmp
;
m_commitAckMarkerHash
.
getPtr
(
tmp
,
commitAckMarker
);
ndbout_c
(
"Abo marker[%.8x %.8x]"
,
tmp
.
p
->
transid1
,
tmp
.
p
->
transid2
);
}
#endif
m_commitAckMarkerHash
.
release
(
commitAckMarker
);
m_commitAckMarkerHash
.
release
(
commitAckMarker
);
regTcPtr
->
commitAckMarker
=
RNIL
;
regTcPtr
->
commitAckMarker
=
RNIL
;
}
}
...
...
ndb/src/ndbapi/NdbConnection.cpp
View file @
c9e34f19
...
@@ -193,6 +193,23 @@ NdbConnection::setErrorCode(int anErrorCode)
...
@@ -193,6 +193,23 @@ NdbConnection::setErrorCode(int anErrorCode)
theError
.
code
=
anErrorCode
;
theError
.
code
=
anErrorCode
;
}
//NdbConnection::setErrorCode()
}
//NdbConnection::setErrorCode()
int
NdbConnection
::
restart
(){
if
(
theCompletionStatus
==
CompletedSuccess
){
releaseCompletedOperations
();
Uint64
tTransid
=
theNdb
->
theFirstTransId
;
theTransactionId
=
tTransid
;
if
((
Uint32
)
tTransid
==
((
Uint32
)
~
0
)){
theNdb
->
theFirstTransId
=
(
tTransid
>>
32
)
<<
32
;
}
else
{
theNdb
->
theFirstTransId
=
tTransid
+
1
;
}
theCompletionStatus
=
NotCompleted
;
return
0
;
}
return
-
1
;
}
/*****************************************************************************
/*****************************************************************************
void handleExecuteCompletion(void);
void handleExecuteCompletion(void);
...
@@ -1307,7 +1324,6 @@ from other transactions.
...
@@ -1307,7 +1324,6 @@ from other transactions.
if
(
tCommitFlag
==
1
)
{
if
(
tCommitFlag
==
1
)
{
theCommitStatus
=
Committed
;
theCommitStatus
=
Committed
;
theGlobalCheckpointId
=
tGCI
;
theGlobalCheckpointId
=
tGCI
;
theTransactionId
++
;
}
else
if
((
tNoComp
>=
tNoSent
)
&&
}
else
if
((
tNoComp
>=
tNoSent
)
&&
(
theLastExecOpInList
->
theCommitIndicator
==
1
)){
(
theLastExecOpInList
->
theCommitIndicator
==
1
)){
/**********************************************************************/
/**********************************************************************/
...
...
ndb/src/ndbapi/Ndbif.cpp
View file @
c9e34f19
...
@@ -1308,8 +1308,8 @@ void
...
@@ -1308,8 +1308,8 @@ void
NdbConnection
::
sendTC_COMMIT_ACK
(
NdbApiSignal
*
aSignal
,
NdbConnection
::
sendTC_COMMIT_ACK
(
NdbApiSignal
*
aSignal
,
Uint32
transId1
,
Uint32
transId2
,
Uint32
transId1
,
Uint32
transId2
,
Uint32
aTCRef
){
Uint32
aTCRef
){
#if
0
#if
def MARKER_TRACE
ndbout_c("Sending TC_COMMIT_ACK(0x%
x, 0x%
x) to -> %d",
ndbout_c
(
"Sending TC_COMMIT_ACK(0x%
.8x, 0x%.8
x) to -> %d"
,
transId1
,
transId1
,
transId2
,
transId2
,
refToNode
(
aTCRef
));
refToNode
(
aTCRef
));
...
...
ndb/test/src/HugoTransactions.cpp
View file @
c9e34f19
...
@@ -654,7 +654,7 @@ HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
...
@@ -654,7 +654,7 @@ HugoTransactions::scanUpdateRecords3(Ndb* pNdb,
if
(
check
!=
-
1
){
if
(
check
!=
-
1
){
check
=
pTrans
->
execute
(
Commit
);
check
=
pTrans
->
execute
(
Commit
);
pTrans
->
re
leaseCompletedOperations
();
pTrans
->
re
start
();
}
}
const
NdbError
err
=
pTrans
->
getNdbError
();
const
NdbError
err
=
pTrans
->
getNdbError
();
...
...
ndb/test/src/UtilTransactions.cpp
View file @
c9e34f19
...
@@ -412,7 +412,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
...
@@ -412,7 +412,7 @@ UtilTransactions::clearTable3(Ndb* pNdb,
if
(
check
!=
-
1
){
if
(
check
!=
-
1
){
check
=
pTrans
->
execute
(
Commit
);
check
=
pTrans
->
execute
(
Commit
);
pTrans
->
re
leaseCompletedOperations
();
pTrans
->
re
start
();
}
}
err
=
pTrans
->
getNdbError
();
err
=
pTrans
->
getNdbError
();
...
@@ -536,7 +536,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
...
@@ -536,7 +536,7 @@ UtilTransactions::copyTableData(Ndb* pNdb,
}
while
((
eof
=
rs
->
nextResult
(
false
))
==
0
);
}
while
((
eof
=
rs
->
nextResult
(
false
))
==
0
);
check
=
pTrans
->
execute
(
Commit
);
check
=
pTrans
->
execute
(
Commit
);
pTrans
->
re
leaseCompletedOperations
();
pTrans
->
re
start
();
if
(
check
==
-
1
)
{
if
(
check
==
-
1
)
{
const
NdbError
err
=
pTrans
->
getNdbError
();
const
NdbError
err
=
pTrans
->
getNdbError
();
ERR
(
err
);
ERR
(
err
);
...
...
ndb/tools/delete_all.cpp
View file @
c9e34f19
...
@@ -143,7 +143,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism)
...
@@ -143,7 +143,7 @@ int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab, int parallelism)
if
(
check
!=
-
1
){
if
(
check
!=
-
1
){
check
=
pTrans
->
execute
(
Commit
);
check
=
pTrans
->
execute
(
Commit
);
pTrans
->
re
leaseCompletedOperations
();
pTrans
->
re
start
();
}
}
err
=
pTrans
->
getNdbError
();
err
=
pTrans
->
getNdbError
();
...
...
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