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
32d08508
Commit
32d08508
authored
Dec 15, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
17472067
ba0e1d01
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
13 deletions
+121
-13
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+4
-13
storage/ndb/src/ndbapi/NdbTransaction.cpp
storage/ndb/src/ndbapi/NdbTransaction.cpp
+9
-0
storage/ndb/src/ndbapi/Ndbif.cpp
storage/ndb/src/ndbapi/Ndbif.cpp
+1
-0
storage/ndb/test/ndbapi/testBasic.cpp
storage/ndb/test/ndbapi/testBasic.cpp
+33
-0
storage/ndb/test/ndbapi/testIndex.cpp
storage/ndb/test/ndbapi/testIndex.cpp
+66
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+8
-0
No files found.
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
32d08508
...
@@ -5058,7 +5058,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
...
@@ -5058,7 +5058,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
ptrAss
(
tcConnectptr
,
tcConnectRecord
);
ptrAss
(
tcConnectptr
,
tcConnectRecord
);
TcConnectRecord
*
const
regTcPtr
=
tcConnectptr
.
p
;
TcConnectRecord
*
const
regTcPtr
=
tcConnectptr
.
p
;
if
(
regTcPtr
->
tcConnectstate
==
OS_OPERATING
)
{
if
(
regTcPtr
->
tcConnectstate
==
OS_OPERATING
)
{
apiConnectptr
.
i
=
regTcPtr
->
apiConnect
;
Uint32
save
=
apiConnectptr
.
i
=
regTcPtr
->
apiConnect
;
ptrCheckGuard
(
apiConnectptr
,
capiConnectFilesize
,
apiConnectRecord
);
ptrCheckGuard
(
apiConnectptr
,
capiConnectFilesize
,
apiConnectRecord
);
ApiConnectRecord
*
const
regApiPtr
=
apiConnectptr
.
p
;
ApiConnectRecord
*
const
regApiPtr
=
apiConnectptr
.
p
;
compare_transid1
=
regApiPtr
->
transid
[
0
]
^
lqhKeyRef
->
transId1
;
compare_transid1
=
regApiPtr
->
transid
[
0
]
^
lqhKeyRef
->
transId1
;
...
@@ -5182,7 +5182,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
...
@@ -5182,7 +5182,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
regApiPtr
->
lqhkeyreqrec
--
;
// Compensate for extra during read
regApiPtr
->
lqhkeyreqrec
--
;
// Compensate for extra during read
tcKeyRef
->
connectPtr
=
indexOp
;
tcKeyRef
->
connectPtr
=
indexOp
;
EXECUTE_DIRECT
(
DBTC
,
GSN_TCKEYREF
,
signal
,
TcKeyRef
::
SignalLength
);
EXECUTE_DIRECT
(
DBTC
,
GSN_TCKEYREF
,
signal
,
TcKeyRef
::
SignalLength
);
apiConnectptr
.
i
=
regTcPtr
->
apiConnect
;
apiConnectptr
.
i
=
save
;
apiConnectptr
.
p
=
regApiPtr
;
apiConnectptr
.
p
=
regApiPtr
;
}
else
{
}
else
{
jam
();
jam
();
...
@@ -5207,6 +5207,8 @@ void Dbtc::execLQHKEYREF(Signal* signal)
...
@@ -5207,6 +5207,8 @@ void Dbtc::execLQHKEYREF(Signal* signal)
jam
();
jam
();
sendtckeyconf
(
signal
,
1
);
sendtckeyconf
(
signal
,
1
);
regApiPtr
->
apiConnectstate
=
CS_CONNECTED
;
regApiPtr
->
apiConnectstate
=
CS_CONNECTED
;
regApiPtr
->
m_transaction_nodes
.
clear
();
setApiConTimer
(
apiConnectptr
.
i
,
0
,
__LINE__
);
}
}
return
;
return
;
}
else
if
(
regApiPtr
->
tckeyrec
>
0
||
regApiPtr
->
m_exec_flag
)
{
}
else
if
(
regApiPtr
->
tckeyrec
>
0
||
regApiPtr
->
m_exec_flag
)
{
...
@@ -11864,17 +11866,6 @@ void Dbtc::execTCKEYREF(Signal* signal)
...
@@ -11864,17 +11866,6 @@ void Dbtc::execTCKEYREF(Signal* signal)
case
(
IOS_INDEX_ACCESS_WAIT_FOR_TRANSID_AI
):
case
(
IOS_INDEX_ACCESS_WAIT_FOR_TRANSID_AI
):
case
(
IOS_INDEX_ACCESS_WAIT_FOR_TCKEYCONF
):
{
case
(
IOS_INDEX_ACCESS_WAIT_FOR_TCKEYCONF
):
{
jam
();
jam
();
// If we fail index access for a non-read operation during commit
// we abort transaction
if
(
commitFlg
==
1
)
{
jam
();
releaseIndexOperation
(
regApiPtr
,
indexOp
);
apiConnectptr
.
i
=
indexOp
->
connectionIndex
;
ptrCheckGuard
(
apiConnectptr
,
capiConnectFilesize
,
apiConnectRecord
);
terrorCode
=
tcKeyRef
->
errorCode
;
abortErrorLab
(
signal
);
break
;
}
/**
/**
* Increase count as it will be decreased below...
* Increase count as it will be decreased below...
* (and the code is written to handle failing lookup on "real" table
* (and the code is written to handle failing lookup on "real" table
...
...
storage/ndb/src/ndbapi/NdbTransaction.cpp
View file @
32d08508
...
@@ -477,6 +477,7 @@ NdbTransaction::executeNoBlobs(ExecType aTypeOfExec,
...
@@ -477,6 +477,7 @@ NdbTransaction::executeNoBlobs(ExecType aTypeOfExec,
* This timeout situation can occur if NDB crashes.
* This timeout situation can occur if NDB crashes.
*/
*/
ndbout
<<
"This timeout should never occur, execute(..)"
<<
endl
;
ndbout
<<
"This timeout should never occur, execute(..)"
<<
endl
;
theError
.
code
=
4012
;
setOperationErrorCodeAbort
(
4012
);
// Error code for "Cluster Failure"
setOperationErrorCodeAbort
(
4012
);
// Error code for "Cluster Failure"
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
}
//if
}
//if
...
@@ -1979,6 +1980,14 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
...
@@ -1979,6 +1980,14 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
}
}
}
else
if
((
tNoComp
>=
tNoSent
)
&&
}
else
if
((
tNoComp
>=
tNoSent
)
&&
(
theLastExecOpInList
->
theCommitIndicator
==
1
)){
(
theLastExecOpInList
->
theCommitIndicator
==
1
)){
if
(
m_abortOption
==
AO_IgnoreError
&&
theError
.
code
!=
0
){
/**
* There's always a TCKEYCONF when using IgnoreError
*/
return
-
1
;
}
/**********************************************************************/
/**********************************************************************/
// We sent the transaction with Commit flag set and received a CONF with
// We sent the transaction with Commit flag set and received a CONF with
// no Commit flag set. This is clearly an anomaly.
// no Commit flag set. This is clearly an anomaly.
...
...
storage/ndb/src/ndbapi/Ndbif.cpp
View file @
32d08508
...
@@ -1089,6 +1089,7 @@ Ndb::check_send_timeout()
...
@@ -1089,6 +1089,7 @@ Ndb::check_send_timeout()
//abort();
//abort();
#endif
#endif
a_con
->
theReleaseOnClose
=
true
;
a_con
->
theReleaseOnClose
=
true
;
a_con
->
theError
.
code
=
4012
;
a_con
->
setOperationErrorCodeAbort
(
4012
);
a_con
->
setOperationErrorCodeAbort
(
4012
);
a_con
->
theCommitStatus
=
NdbTransaction
::
NeedAbort
;
a_con
->
theCommitStatus
=
NdbTransaction
::
NeedAbort
;
a_con
->
theCompletionStatus
=
NdbTransaction
::
CompletedFailure
;
a_con
->
theCompletionStatus
=
NdbTransaction
::
CompletedFailure
;
...
...
storage/ndb/test/ndbapi/testBasic.cpp
View file @
32d08508
...
@@ -1250,6 +1250,29 @@ runInsertError2(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -1250,6 +1250,29 @@ runInsertError2(NDBT_Context* ctx, NDBT_Step* step){
return
NDBT_OK
;
return
NDBT_OK
;
}
}
int
runBug25090
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
Ndb
*
pNdb
=
GETNDB
(
step
);
NdbDictionary
::
Dictionary
*
dict
=
pNdb
->
getDictionary
();
HugoOperations
ops
(
*
ctx
->
getTab
());
int
loops
=
ctx
->
getNumLoops
();
const
int
rows
=
ctx
->
getNumRecords
();
while
(
loops
--
)
{
ops
.
startTransaction
(
pNdb
);
ops
.
pkReadRecord
(
pNdb
,
1
,
1
);
ops
.
execute_Commit
(
pNdb
,
AO_IgnoreError
);
sleep
(
10
);
ops
.
closeTransaction
(
pNdb
);
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testBasic
);
NDBT_TESTSUITE
(
testBasic
);
TESTCASE
(
"PkInsert"
,
TESTCASE
(
"PkInsert"
,
"Verify that we can insert and delete from this table using PK"
"Verify that we can insert and delete from this table using PK"
...
@@ -1510,6 +1533,16 @@ TESTCASE("InsertError", "" ){
...
@@ -1510,6 +1533,16 @@ TESTCASE("InsertError", "" ){
TESTCASE
(
"InsertError2"
,
""
){
TESTCASE
(
"InsertError2"
,
""
){
INITIALIZER
(
runInsertError2
);
INITIALIZER
(
runInsertError2
);
}
}
TESTCASE
(
"Fill"
,
"Verify what happens when we fill the db"
){
INITIALIZER
(
runFillTable
);
INITIALIZER
(
runPkRead
);
FINALIZER
(
runClearTable2
);
}
TESTCASE
(
"Bug25090"
,
"Verify what happens when we fill the db"
){
STEP
(
runBug25090
);
}
NDBT_TESTSUITE_END
(
testBasic
);
NDBT_TESTSUITE_END
(
testBasic
);
#if 0
#if 0
...
...
storage/ndb/test/ndbapi/testIndex.cpp
View file @
32d08508
...
@@ -1239,7 +1239,65 @@ runBug21384(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -1239,7 +1239,65 @@ runBug21384(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
return
NDBT_OK
;
}
}
int
runBug25059
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
Ndb
*
pNdb
=
GETNDB
(
step
);
NdbDictionary
::
Dictionary
*
dict
=
pNdb
->
getDictionary
();
const
NdbDictionary
::
Index
*
idx
=
dict
->
getIndex
(
pkIdxName
,
ctx
->
getTab
()
->
getName
());
HugoOperations
ops
(
*
ctx
->
getTab
(),
idx
);
int
res
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
const
int
rows
=
ctx
->
getNumRecords
();
while
(
res
==
NDBT_OK
&&
loops
--
)
{
ops
.
startTransaction
(
pNdb
);
ops
.
pkReadRecord
(
pNdb
,
10
+
rand
()
%
rows
,
rows
);
int
tmp
;
if
(
tmp
=
ops
.
execute_Commit
(
pNdb
,
AO_IgnoreError
))
{
if
(
tmp
==
4012
)
res
=
NDBT_FAILED
;
else
if
(
ops
.
getTransaction
()
->
getNdbError
().
code
==
4012
)
res
=
NDBT_FAILED
;
}
ops
.
closeTransaction
(
pNdb
);
}
loops
=
ctx
->
getNumLoops
();
while
(
res
==
NDBT_OK
&&
loops
--
)
{
ops
.
startTransaction
(
pNdb
);
ops
.
pkUpdateRecord
(
pNdb
,
10
+
rand
()
%
rows
,
rows
);
int
tmp
;
int
arg
;
switch
(
rand
()
%
2
){
case
0
:
arg
=
AbortOnError
;
break
;
case
1
:
arg
=
AO_IgnoreError
;
ndbout_c
(
"ignore error"
);
break
;
}
if
(
tmp
=
ops
.
execute_Commit
(
pNdb
,
(
AbortOption
)
arg
))
{
if
(
tmp
==
4012
)
res
=
NDBT_FAILED
;
else
if
(
ops
.
getTransaction
()
->
getNdbError
().
code
==
4012
)
res
=
NDBT_FAILED
;
}
ops
.
closeTransaction
(
pNdb
);
}
return
res
;
}
NDBT_TESTSUITE
(
testIndex
);
NDBT_TESTSUITE
(
testIndex
);
TESTCASE
(
"CreateAll"
,
TESTCASE
(
"CreateAll"
,
...
@@ -1564,6 +1622,14 @@ TESTCASE("Bug21384",
...
@@ -1564,6 +1622,14 @@ TESTCASE("Bug21384",
FINALIZER
(
createPkIndex_Drop
);
FINALIZER
(
createPkIndex_Drop
);
FINALIZER
(
runClearTable
);
FINALIZER
(
runClearTable
);
}
}
TESTCASE
(
"Bug25059"
,
"Test that unique indexes and nulls"
){
TC_PROPERTY
(
"LoggedIndexes"
,
(
unsigned
)
0
);
INITIALIZER
(
createPkIndex
);
INITIALIZER
(
runLoadTable
);
STEP
(
runBug25059
);
FINALIZER
(
createPkIndex_Drop
);
}
NDBT_TESTSUITE_END
(
testIndex
);
NDBT_TESTSUITE_END
(
testIndex
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
32d08508
...
@@ -231,6 +231,14 @@ max-time: 500
...
@@ -231,6 +231,14 @@ max-time: 500
cmd: testTimeout
cmd: testTimeout
args: T1
args: T1
max-time: 500
cmd: testBasic
args: -n Bug25090 T1
max-time: 500
cmd: testIndex
args: -n Bug25059 -r 3000 T1
# SCAN TESTS
# SCAN TESTS
#
#
max-time: 500
max-time: 500
...
...
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