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
4915b228
Commit
4915b228
authored
Jun 22, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl1671 - bug fixes for negative tests
parent
84883229
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
71 deletions
+58
-71
ndb/src/ndbapi/NdbScanOperation.cpp
ndb/src/ndbapi/NdbScanOperation.cpp
+9
-2
ndb/test/ndbapi/ScanFunctions.hpp
ndb/test/ndbapi/ScanFunctions.hpp
+48
-51
ndb/test/ndbapi/testScan.cpp
ndb/test/ndbapi/testScan.cpp
+1
-18
No files found.
ndb/src/ndbapi/NdbScanOperation.cpp
View file @
4915b228
...
...
@@ -448,6 +448,8 @@ NdbScanOperation::executeCursor(int nodeId){
return
-
1
;
}
#define DEBUG_NEXT_RESULT 0
int
NdbScanOperation
::
nextResult
(
bool
fetchAllowed
)
{
if
(
m_ordered
)
...
...
@@ -460,6 +462,9 @@ int NdbScanOperation::nextResult(bool fetchAllowed)
Uint32
idx
=
m_current_api_receiver
;
Uint32
last
=
m_api_receivers_count
;
if
(
DEBUG_NEXT_RESULT
)
ndbout_c
(
"nextResult(%d) idx=%d last=%d"
,
fetchAllowed
,
idx
,
last
);
/**
* Check next buckets
*/
...
...
@@ -498,6 +503,9 @@ int NdbScanOperation::nextResult(bool fetchAllowed)
Uint32
cnt
=
m_conf_receivers_count
;
Uint32
sent
=
m_sent_receivers_count
;
if
(
DEBUG_NEXT_RESULT
)
ndbout_c
(
"idx=%d last=%d cnt=%d sent=%d"
,
idx
,
last
,
cnt
,
sent
);
if
(
cnt
>
0
){
/**
* Just move completed receivers
...
...
@@ -527,6 +535,7 @@ int NdbScanOperation::nextResult(bool fetchAllowed)
theNdb
->
theWaiter
.
m_state
=
WAIT_SCAN
;
int
return_code
=
theNdb
->
receiveResponse
(
WAITFOR_SCAN_TIMEOUT
);
if
(
return_code
==
0
&&
seq
==
tp
->
getNodeSequence
(
nodeId
))
{
theError
.
code
=
-
1
;
// make sure user gets error if he tries again
return
1
;
}
retVal
=
-
1
;
//return_code;
...
...
@@ -1193,8 +1202,6 @@ NdbIndexScanOperation::compare(Uint32 skip, Uint32 cols,
return
0
;
}
#define DEBUG_NEXT_RESULT 0
int
NdbIndexScanOperation
::
next_result_ordered
(
bool
fetchAllowed
){
...
...
ndb/test/ndbapi/ScanFunctions.hpp
View file @
4915b228
...
...
@@ -79,9 +79,9 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
const
int
retryMax
=
100
;
int
sleepTime
=
10
;
int
check
;
NdbConnection
*
pTrans
;
NdbScanOperation
*
pOp
;
NdbResultSet
*
rs
;
NdbConnection
*
pTrans
=
0
;
NdbScanOperation
*
pOp
=
0
;
NdbResultSet
*
rs
=
0
;
while
(
true
){
if
(
retryAttempt
>=
retryMax
){
...
...
@@ -104,8 +104,6 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
}
// Execute the scan without defining a scan operation
if
(
action
!=
ExecuteScanWithOutOpenScan
){
pOp
=
pTrans
->
getNdbScanOperation
(
tab
.
getName
());
if
(
pOp
==
NULL
)
{
ERR
(
pTrans
->
getNdbError
());
...
...
@@ -158,7 +156,7 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
return
NDBT_FAILED
;
}
}
}
check
=
pTrans
->
execute
(
NoCommit
);
if
(
check
==
-
1
)
{
ERR
(
pTrans
->
getNdbError
());
...
...
@@ -166,7 +164,6 @@ ScanFunctions::scanReadFunctions(Ndb* pNdb,
return
NDBT_FAILED
;
}
int
abortCount
=
records
/
10
;
bool
abortTrans
=
(
action
==
CloseWithoutStop
);
int
eof
;
...
...
ndb/test/ndbapi/testScan.cpp
View file @
4915b228
...
...
@@ -805,26 +805,9 @@ int runOnlyOneOpInScanTrans(NDBT_Context* ctx, NDBT_Step* step){
}
int
runExecuteScanWithoutOpenScan
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
int
records
=
ctx
->
getNumRecords
();
int
numFailed
=
0
;
ScanFunctions
scanF
(
*
pTab
);
if
(
scanF
.
scanReadFunctions
(
GETNDB
(
step
),
records
,
1
,
ScanFunctions
::
ExecuteScanWithOutOpenScan
,
false
)
==
0
){
numFailed
++
;
}
if
(
numFailed
>
0
)
return
NDBT_FAILED
;
else
return
NDBT_OK
;
}
int
runOnlyOneOpBeforeOpenScan
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
int
records
=
ctx
->
getNumRecords
();
...
...
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