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
b15fdabb
Commit
b15fdabb
authored
Dec 20, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/home/jonas/src/mysql-5.0-ndb
parents
d6b9e4c4
310fb781
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
ndb/src/ndbapi/NdbConnection.cpp
ndb/src/ndbapi/NdbConnection.cpp
+20
-5
ndb/src/ndbapi/Ndbif.cpp
ndb/src/ndbapi/Ndbif.cpp
+1
-0
ndb/test/ndbapi/testNodeRestart.cpp
ndb/test/ndbapi/testNodeRestart.cpp
+1
-1
No files found.
ndb/src/ndbapi/NdbConnection.cpp
View file @
b15fdabb
...
@@ -1447,6 +1447,7 @@ NdbConnection::receiveTC_COMMITREF(NdbApiSignal* aSignal)
...
@@ -1447,6 +1447,7 @@ NdbConnection::receiveTC_COMMITREF(NdbApiSignal* aSignal)
setOperationErrorCodeAbort
(
ref
->
errorCode
);
setOperationErrorCodeAbort
(
ref
->
errorCode
);
theCommitStatus
=
Aborted
;
theCommitStatus
=
Aborted
;
theCompletionStatus
=
CompletedFailure
;
theCompletionStatus
=
CompletedFailure
;
theReturnStatus
=
ReturnFailure
;
return
0
;
return
0
;
}
else
{
}
else
{
#ifdef NDB_NO_DROPPED_SIGNAL
#ifdef NDB_NO_DROPPED_SIGNAL
...
@@ -1496,6 +1497,7 @@ NdbConnection::receiveTCROLLBACKREF(NdbApiSignal* aSignal)
...
@@ -1496,6 +1497,7 @@ NdbConnection::receiveTCROLLBACKREF(NdbApiSignal* aSignal)
setOperationErrorCodeAbort
(
aSignal
->
readData
(
4
));
setOperationErrorCodeAbort
(
aSignal
->
readData
(
4
));
theCommitStatus
=
Aborted
;
theCommitStatus
=
Aborted
;
theCompletionStatus
=
CompletedFailure
;
theCompletionStatus
=
CompletedFailure
;
theReturnStatus
=
ReturnFailure
;
return
0
;
return
0
;
}
else
{
}
else
{
#ifdef NDB_NO_DROPPED_SIGNAL
#ifdef NDB_NO_DROPPED_SIGNAL
...
@@ -1584,6 +1586,7 @@ from other transactions.
...
@@ -1584,6 +1586,7 @@ from other transactions.
done
=
1
;
done
=
1
;
tOp
->
setErrorCode
(
4119
);
tOp
->
setErrorCode
(
4119
);
theCompletionStatus
=
CompletedFailure
;
theCompletionStatus
=
CompletedFailure
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
}
}
}
}
tNoComp
+=
done
;
tNoComp
+=
done
;
...
@@ -1613,6 +1616,7 @@ from other transactions.
...
@@ -1613,6 +1616,7 @@ from other transactions.
/**********************************************************************/
/**********************************************************************/
theError
.
code
=
4011
;
theError
.
code
=
4011
;
theCompletionStatus
=
CompletedFailure
;
theCompletionStatus
=
CompletedFailure
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
theCommitStatus
=
Aborted
;
theCommitStatus
=
Aborted
;
return
0
;
return
0
;
}
//if
}
//if
...
@@ -1672,6 +1676,7 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
...
@@ -1672,6 +1676,7 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
case
NdbOperation
:
:
OpenScanRequest
:
case
NdbOperation
:
:
OpenScanRequest
:
case
NdbOperation
:
:
OpenRangeScanRequest
:
case
NdbOperation
:
:
OpenRangeScanRequest
:
theCompletionStatus
=
CompletedFailure
;
theCompletionStatus
=
CompletedFailure
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
setOperationErrorCodeAbort
(
4115
);
setOperationErrorCodeAbort
(
4115
);
tOp
=
NULL
;
tOp
=
NULL
;
break
;
break
;
...
@@ -1720,6 +1725,7 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal)
...
@@ -1720,6 +1725,7 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal)
*/
*/
theCompletionStatus
=
NdbConnection
::
CompletedSuccess
;
theCompletionStatus
=
NdbConnection
::
CompletedSuccess
;
}
else
{
}
else
{
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theError
.
code
=
4031
;
theError
.
code
=
4031
;
}
//if
}
//if
...
@@ -1779,6 +1785,7 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf,
...
@@ -1779,6 +1785,7 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf,
theError
.
code
=
4011
;
theError
.
code
=
4011
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCommitStatus
=
NdbConnection
::
Aborted
;
theCommitStatus
=
NdbConnection
::
Aborted
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
return
0
;
return
0
;
}
//if
}
//if
if
(
tNoComp
>=
tNoSent
)
{
if
(
tNoComp
>=
tNoSent
)
{
...
@@ -1818,6 +1825,7 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal)
...
@@ -1818,6 +1825,7 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal)
/**********************************************************************/
/**********************************************************************/
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCommitStatus
=
NdbConnection
::
Aborted
;
theCommitStatus
=
NdbConnection
::
Aborted
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
return
0
;
return
0
;
}
else
{
}
else
{
#ifdef NDB_NO_DROPPED_SIGNAL
#ifdef NDB_NO_DROPPED_SIGNAL
...
@@ -1891,6 +1899,7 @@ NdbConnection::OpCompleteSuccess()
...
@@ -1891,6 +1899,7 @@ NdbConnection::OpCompleteSuccess()
setOperationErrorCodeAbort
(
4113
);
// Too many operations,
setOperationErrorCodeAbort
(
4113
);
// Too many operations,
// stop waiting for more
// stop waiting for more
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
return
0
;
return
0
;
}
//if
}
//if
}
//NdbConnection::OpCompleteSuccess()
}
//NdbConnection::OpCompleteSuccess()
...
@@ -2020,22 +2029,28 @@ NdbConnection::report_node_failure(Uint32 id){
...
@@ -2020,22 +2029,28 @@ NdbConnection::report_node_failure(Uint32 id){
const
Uint32
len
=
TcKeyConf
::
SimpleReadBit
|
id
;
const
Uint32
len
=
TcKeyConf
::
SimpleReadBit
|
id
;
Uint32
tNoComp
=
theNoOfOpCompleted
;
Uint32
tNoComp
=
theNoOfOpCompleted
;
Uint32
tNoSent
=
theNoOfOpSent
;
Uint32
tNoSent
=
theNoOfOpSent
;
Uint32
count
=
0
;
while
(
tmp
!=
0
)
while
(
tmp
!=
0
)
{
{
if
(
tmp
->
theReceiver
.
m_expected_result_length
==
len
&&
if
(
tmp
->
theReceiver
.
m_expected_result_length
==
len
&&
tmp
->
theReceiver
.
m_received_result_length
==
0
)
tmp
->
theReceiver
.
m_received_result_length
==
0
)
{
{
tNoComp
++
;
count
++
;
tmp
->
theError
.
code
=
4119
;
tmp
->
theError
.
code
=
4119
;
}
}
tmp
=
tmp
->
next
();
tmp
=
tmp
->
next
();
}
}
tNoComp
+=
count
;
theNoOfOpCompleted
=
tNoComp
;
theNoOfOpCompleted
=
tNoComp
;
if
(
count
)
{
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
if
(
tNoComp
==
tNoSent
)
if
(
tNoComp
==
tNoSent
)
{
{
theError
.
code
=
4119
;
theError
.
code
=
4119
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
theCompletionStatus
=
NdbConnection
::
CompletedFailure
;
return
1
;
return
1
;
}
}
}
return
0
;
return
0
;
}
}
ndb/src/ndbapi/Ndbif.cpp
View file @
b15fdabb
...
@@ -301,6 +301,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
...
@@ -301,6 +301,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
intact since the node was failing and they were aborted. Thus we
intact since the node was failing and they were aborted. Thus we
set commit state to Aborted and set state to release on close.
set commit state to Aborted and set state to release on close.
*/
*/
localCon
->
theReturnStatus
=
NdbConnection
::
ReturnFailure
;
localCon
->
theCommitStatus
=
NdbConnection
::
Aborted
;
localCon
->
theCommitStatus
=
NdbConnection
::
Aborted
;
localCon
->
theReleaseOnClose
=
true
;
localCon
->
theReleaseOnClose
=
true
;
completedTransaction
(
localCon
);
completedTransaction
(
localCon
);
...
...
ndb/test/ndbapi/testNodeRestart.cpp
View file @
b15fdabb
...
@@ -311,7 +311,7 @@ int runDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -311,7 +311,7 @@ int runDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
int
id
=
i
%
restarter
.
getNumDbNodes
();
int
id
=
i
%
restarter
.
getNumDbNodes
();
int
nodeId
=
restarter
.
getDbNodeId
(
id
);
int
nodeId
=
restarter
.
getDbNodeId
(
id
);
ndbout
<<
"Restart node "
<<
nodeId
<<
endl
;
ndbout
<<
"Restart node "
<<
nodeId
<<
endl
;
restarter
.
insertErrorIn
AllNodes
(
5041
);
restarter
.
insertErrorIn
Node
(
nodeId
,
5041
);
restarter
.
insertErrorInAllNodes
(
8048
+
(
i
&
1
));
restarter
.
insertErrorInAllNodes
(
8048
+
(
i
&
1
));
for
(
int
j
=
0
;
j
<
records
;
j
++
){
for
(
int
j
=
0
;
j
<
records
;
j
++
){
...
...
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