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
91a04d18
Commit
91a04d18
authored
Dec 30, 2004
by
joreland@mysql.com
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
d737ba98
5de6bf24
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
20 deletions
+44
-20
ndb/test/ndbapi/testBitfield.cpp
ndb/test/ndbapi/testBitfield.cpp
+7
-2
ndb/test/ndbapi/testDataBuffers.cpp
ndb/test/ndbapi/testDataBuffers.cpp
+10
-3
ndb/test/ndbapi/testNdbApi.cpp
ndb/test/ndbapi/testNdbApi.cpp
+13
-13
ndb/test/ndbapi/testReadPerf.cpp
ndb/test/ndbapi/testReadPerf.cpp
+7
-1
ndb/test/ndbapi/testScanPerf.cpp
ndb/test/ndbapi/testScanPerf.cpp
+7
-1
No files found.
ndb/test/ndbapi/testBitfield.cpp
View file @
91a04d18
...
@@ -66,10 +66,15 @@ main(int argc, char** argv){
...
@@ -66,10 +66,15 @@ main(int argc, char** argv){
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
if
((
ho_error
=
handle_options
(
&
argc
,
&
argv
,
my_long_options
,
get_one_option
)))
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
return
NDBT_ProgramExit
(
NDBT_WRONGARGS
);
Ndb
::
setConnectString
(
opt_connect_str
);
Ndb_cluster_connection
con
(
opt_connect_str
);
if
(
con
.
connect
(
12
,
5
,
1
))
{
return
NDBT_ProgramExit
(
NDBT_FAILED
);
}
Ndb
*
pNdb
;
Ndb
*
pNdb
;
pNdb
=
new
Ndb
(
_dbname
);
pNdb
=
new
Ndb
(
&
con
,
_dbname
);
pNdb
->
init
();
pNdb
->
init
();
while
(
pNdb
->
waitUntilReady
()
!=
0
);
while
(
pNdb
->
waitUntilReady
()
!=
0
);
int
res
=
NDBT_FAILED
;
int
res
=
NDBT_FAILED
;
...
...
ndb/test/ndbapi/testDataBuffers.cpp
View file @
91a04d18
...
@@ -209,7 +209,7 @@ makeOff(int k)
...
@@ -209,7 +209,7 @@ makeOff(int k)
}
}
static
int
static
int
testcase
(
int
flag
)
testcase
(
Ndb_cluster_connection
&
cc
,
int
flag
)
{
{
ndbout
<<
"--- case "
<<
flag
<<
" ---"
<<
endl
;
ndbout
<<
"--- case "
<<
flag
<<
" ---"
<<
endl
;
sprintf
(
tab
,
"TB%02d"
,
flag
);
sprintf
(
tab
,
"TB%02d"
,
flag
);
...
@@ -254,7 +254,7 @@ testcase(int flag)
...
@@ -254,7 +254,7 @@ testcase(int flag)
ndbout
<<
"tab="
<<
tab
<<
" cols="
<<
attrcnt
ndbout
<<
"tab="
<<
tab
<<
" cols="
<<
attrcnt
<<
" size max="
<<
smax
<<
" tot="
<<
stot
<<
endl
;
<<
" size max="
<<
smax
<<
" tot="
<<
stot
<<
endl
;
ndb
=
new
Ndb
(
"TEST_DB"
);
ndb
=
new
Ndb
(
&
cc
,
"TEST_DB"
);
if
(
ndb
->
init
()
!=
0
)
if
(
ndb
->
init
()
!=
0
)
return
ndberror
(
"init"
);
return
ndberror
(
"init"
);
if
(
ndb
->
waitUntilReady
(
30
)
<
0
)
if
(
ndb
->
waitUntilReady
(
30
)
<
0
)
...
@@ -606,10 +606,17 @@ NDB_COMMAND(testDataBuffers, "testDataBuffers", "testDataBuffers", "testDataBuff
...
@@ -606,10 +606,17 @@ NDB_COMMAND(testDataBuffers, "testDataBuffers", "testDataBuffers", "testDataBuff
}
}
}
}
unsigned
ok
=
true
;
unsigned
ok
=
true
;
Ndb_cluster_connection
con
;
if
(
con
.
connect
(
12
,
5
,
1
))
{
return
NDBT_ProgramExit
(
NDBT_FAILED
);
}
for
(
i
=
1
;
0
==
loopcnt
||
i
<=
loopcnt
;
i
++
)
{
for
(
i
=
1
;
0
==
loopcnt
||
i
<=
loopcnt
;
i
++
)
{
ndbout
<<
"=== loop "
<<
i
<<
" ==="
<<
endl
;
ndbout
<<
"=== loop "
<<
i
<<
" ==="
<<
endl
;
for
(
int
flag
=
0
;
flag
<
(
1
<<
testbits
);
flag
++
)
{
for
(
int
flag
=
0
;
flag
<
(
1
<<
testbits
);
flag
++
)
{
if
(
testcase
(
flag
)
<
0
)
{
if
(
testcase
(
con
,
flag
)
<
0
)
{
ok
=
false
;
ok
=
false
;
if
(
!
kontinue
)
if
(
!
kontinue
)
goto
out
;
goto
out
;
...
...
ndb/test/ndbapi/testNdbApi.cpp
View file @
91a04d18
...
@@ -56,7 +56,7 @@ int runTestMaxNdb(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -56,7 +56,7 @@ int runTestMaxNdb(NDBT_Context* ctx, NDBT_Step* step){
int
init
=
0
;
int
init
=
0
;
do
{
do
{
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
errors
++
;
errors
++
;
...
@@ -108,7 +108,7 @@ int runTestMaxTransaction(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -108,7 +108,7 @@ int runTestMaxTransaction(NDBT_Context* ctx, NDBT_Step* step){
int
oldi
=
0
;
int
oldi
=
0
;
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -201,7 +201,7 @@ int runTestMaxOperations(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -201,7 +201,7 @@ int runTestMaxOperations(NDBT_Context* ctx, NDBT_Step* step){
int
maxOpsLimit
=
1
;
int
maxOpsLimit
=
1
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -273,7 +273,7 @@ int runTestGetValue(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -273,7 +273,7 @@ int runTestGetValue(NDBT_Context* ctx, NDBT_Step* step){
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -373,7 +373,7 @@ int runTestEqual(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -373,7 +373,7 @@ int runTestEqual(NDBT_Context* ctx, NDBT_Step* step){
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -494,7 +494,7 @@ int runTestDeleteNdb(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -494,7 +494,7 @@ int runTestDeleteNdb(NDBT_Context* ctx, NDBT_Step* step){
// Create 5 ndb objects
// Create 5 ndb objects
for
(
int
i
=
0
;
i
<
5
;
i
++
){
for
(
int
i
=
0
;
i
<
5
;
i
++
){
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
result
=
NDBT_FAILED
;
result
=
NDBT_FAILED
;
...
@@ -575,7 +575,7 @@ int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -575,7 +575,7 @@ int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
int
runTestWaitUntilReady
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runTestWaitUntilReady
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
// Forget about calling pNdb->init();
// Forget about calling pNdb->init();
...
@@ -596,7 +596,7 @@ int runTestWaitUntilReady(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -596,7 +596,7 @@ int runTestWaitUntilReady(NDBT_Context* ctx, NDBT_Step* step){
int
runGetNdbOperationNoTab
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runGetNdbOperationNoTab
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -637,7 +637,7 @@ int runMissingOperation(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -637,7 +637,7 @@ int runMissingOperation(NDBT_Context* ctx, NDBT_Step* step){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -687,7 +687,7 @@ int runMissingOperation(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -687,7 +687,7 @@ int runMissingOperation(NDBT_Context* ctx, NDBT_Step* step){
int
runGetValueInUpdate
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
runGetValueInUpdate
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -753,7 +753,7 @@ int runUpdateWithoutValues(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -753,7 +753,7 @@ int runUpdateWithoutValues(NDBT_Context* ctx, NDBT_Step* step){
HugoOperations
hugoOps
(
*
pTab
);
HugoOperations
hugoOps
(
*
pTab
);
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -819,7 +819,7 @@ int runUpdateWithoutKeys(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -819,7 +819,7 @@ int runUpdateWithoutKeys(NDBT_Context* ctx, NDBT_Step* step){
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -873,7 +873,7 @@ int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){
...
@@ -873,7 +873,7 @@ int runCheckGetNdbErrorOperation(NDBT_Context* ctx, NDBT_Step* step){
int
result
=
NDBT_OK
;
int
result
=
NDBT_OK
;
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
const
NdbDictionary
::
Table
*
pTab
=
ctx
->
getTab
();
Ndb
*
pNdb
=
new
Ndb
(
"TEST_DB"
);
Ndb
*
pNdb
=
new
Ndb
(
&
ctx
->
m_cluster_connection
,
"TEST_DB"
);
if
(
pNdb
==
NULL
){
if
(
pNdb
==
NULL
){
ndbout
<<
"pNdb == NULL"
<<
endl
;
ndbout
<<
"pNdb == NULL"
<<
endl
;
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
...
ndb/test/ndbapi/testReadPerf.cpp
View file @
91a04d18
...
@@ -119,7 +119,13 @@ main(int argc, const char** argv){
...
@@ -119,7 +119,13 @@ main(int argc, const char** argv){
myRandom48Init
(
NdbTick_CurrentMillisecond
());
myRandom48Init
(
NdbTick_CurrentMillisecond
());
memset
(
g_times
,
0
,
sizeof
(
g_times
));
memset
(
g_times
,
0
,
sizeof
(
g_times
));
g_ndb
=
new
Ndb
(
"TEST_DB"
);
Ndb_cluster_connection
con
;
if
(
con
.
connect
(
12
,
5
,
1
))
{
return
NDBT_ProgramExit
(
NDBT_FAILED
);
}
g_ndb
=
new
Ndb
(
&
con
,
"TEST_DB"
);
if
(
g_ndb
->
init
()
!=
0
){
if
(
g_ndb
->
init
()
!=
0
){
g_err
<<
"init() failed"
<<
endl
;
g_err
<<
"init() failed"
<<
endl
;
goto
error
;
goto
error
;
...
...
ndb/test/ndbapi/testScanPerf.cpp
View file @
91a04d18
...
@@ -99,7 +99,13 @@ main(int argc, const char** argv){
...
@@ -99,7 +99,13 @@ main(int argc, const char** argv){
myRandom48Init
(
NdbTick_CurrentMillisecond
());
myRandom48Init
(
NdbTick_CurrentMillisecond
());
g_ndb
=
new
Ndb
(
"TEST_DB"
);
Ndb_cluster_connection
con
;
if
(
con
.
connect
(
12
,
5
,
1
))
{
return
NDBT_ProgramExit
(
NDBT_FAILED
);
}
g_ndb
=
new
Ndb
(
&
con
,
"TEST_DB"
);
if
(
g_ndb
->
init
()
!=
0
){
if
(
g_ndb
->
init
()
!=
0
){
g_err
<<
"init() failed"
<<
endl
;
g_err
<<
"init() failed"
<<
endl
;
goto
error
;
goto
error
;
...
...
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