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
256f6e31
Commit
256f6e31
authored
Jan 31, 2008
by
pekka@sama.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#34107 - ndb api test case
parent
e2f23fb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
4 deletions
+93
-4
ndb/test/ndbapi/testInterpreter.cpp
ndb/test/ndbapi/testInterpreter.cpp
+89
-0
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-4
No files found.
ndb/test/ndbapi/testInterpreter.cpp
View file @
256f6e31
...
@@ -77,6 +77,11 @@ int runTestIncValue32(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -77,6 +77,11 @@ int runTestIncValue32(NDBT_Context* ctx, NDBT_Step* step){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
GETNDB
(
step
);
Ndb
*
pNdb
=
GETNDB
(
step
);
if
(
strcmp
(
pTab
->
getName
(),
"T1"
)
!=
0
)
{
g_err
<<
"runTestBug19537: skip, table != T1"
<<
endl
;
return
NDBT_OK
;
}
NdbConnection
*
pTrans
=
pNdb
->
startTransaction
();
NdbConnection
*
pTrans
=
pNdb
->
startTransaction
();
if
(
pTrans
==
NULL
){
if
(
pTrans
==
NULL
){
...
@@ -258,6 +263,84 @@ int runTestBug19537(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -258,6 +263,84 @@ int runTestBug19537(NDBT_Context* ctx, NDBT_Step* step){
}
}
int
runTestBug34107
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
GETNDB
(
step
);
int
i
;
for
(
i
=
0
;
i
<=
1
;
i
++
)
{
g_info
<<
"bug34107:"
<<
(
i
==
0
?
" small"
:
" too big"
)
<<
endl
;
NdbConnection
*
pTrans
=
pNdb
->
startTransaction
();
if
(
pTrans
==
NULL
){
ERR
(
pNdb
->
getNdbError
());
return
NDBT_FAILED
;
}
NdbScanOperation
*
pOp
=
pTrans
->
getNdbScanOperation
(
pTab
->
getName
());
if
(
pOp
==
NULL
)
{
ERR
(
pTrans
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
if
(
pOp
->
readTuples
()
==
-
1
)
{
ERR
(
pOp
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
int
n
=
i
==
0
?
10000
:
30000
;
int
k
;
for
(
k
=
0
;
k
<
n
;
k
++
)
{
// inserts 1 word ATTRINFO
if
(
pOp
->
interpret_exit_ok
()
==
-
1
)
{
ERR
(
pOp
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
}
if
(
pTrans
->
execute
(
NoCommit
)
==
-
1
)
{
ERR
(
pTrans
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
int
ret
;
while
((
ret
=
pOp
->
nextResult
())
==
0
)
;
g_info
<<
"ret="
<<
ret
<<
" err="
<<
pOp
->
getNdbError
().
code
<<
endl
;
if
(
i
==
0
&&
ret
!=
1
)
{
ERR
(
pTrans
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
if
(
i
==
1
&&
ret
!=
-
1
)
{
g_err
<<
"unexpected big filter success"
<<
endl
;
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
if
(
i
==
1
&&
pOp
->
getNdbError
().
code
!=
874
)
{
g_err
<<
"unexpected big filter error code, wanted 874"
<<
endl
;
ERR
(
pTrans
->
getNdbError
());
pNdb
->
closeTransaction
(
pTrans
);
return
NDBT_FAILED
;
}
pNdb
->
closeTransaction
(
pTrans
);
}
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testInterpreter
);
NDBT_TESTSUITE
(
testInterpreter
);
TESTCASE
(
"IncValue32"
,
TESTCASE
(
"IncValue32"
,
"Test incValue for 32 bit integer
\n
"
){
"Test incValue for 32 bit integer
\n
"
){
...
@@ -277,6 +360,12 @@ TESTCASE("Bug19537",
...
@@ -277,6 +360,12 @@ TESTCASE("Bug19537",
INITIALIZER
(
runTestBug19537
);
INITIALIZER
(
runTestBug19537
);
FINALIZER
(
runClearTable
);
FINALIZER
(
runClearTable
);
}
}
TESTCASE
(
"Bug34107"
,
"Test too big scan filter (error 874)
\n
"
){
INITIALIZER
(
runLoadTable
);
INITIALIZER
(
runTestBug34107
);
FINALIZER
(
runClearTable
);
}
#if 0
#if 0
TESTCASE("MaxTransactions",
TESTCASE("MaxTransactions",
"Start transactions until no more can be created\n"){
"Start transactions until no more can be created\n"){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
256f6e31
...
@@ -649,10 +649,10 @@ max-time: 1000
...
@@ -649,10 +649,10 @@ max-time: 1000
cmd: testNdbApi
cmd: testNdbApi
args: -n Bug28443
args: -n Bug28443
#
max-time: 500
max-time: 500
#
cmd: testInterpreter
cmd: testInterpreter
#
args: T1
args: T1
#
max-time: 150000
max-time: 150000
cmd: testOperations
cmd: testOperations
args:
args:
...
...
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