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
47e831ca
Commit
47e831ca
authored
Apr 21, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added skip create option to bank test program
parent
0bdfbfe8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
storage/ndb/test/ndbapi/bank/Bank.hpp
storage/ndb/test/ndbapi/bank/Bank.hpp
+2
-0
storage/ndb/test/ndbapi/bank/BankLoad.cpp
storage/ndb/test/ndbapi/bank/BankLoad.cpp
+2
-2
storage/ndb/test/ndbapi/bank/bankCreator.cpp
storage/ndb/test/ndbapi/bank/bankCreator.cpp
+3
-0
No files found.
storage/ndb/test/ndbapi/bank/Bank.hpp
View file @
47e831ca
...
...
@@ -29,6 +29,7 @@ public:
Bank
(
Ndb_cluster_connection
&
,
bool
init
=
true
,
const
char
*
dbase
=
"BANK"
);
int
setSkipCreate
(
bool
skip
)
{
m_skip_create
=
skip
;
}
int
createAndLoadBank
(
bool
overWrite
,
bool
disk
=
false
,
int
num_accounts
=
10
);
int
dropBank
();
...
...
@@ -140,6 +141,7 @@ private:
Ndb
m_ndb
;
int
m_maxAccount
;
bool
m_initialized
;
bool
m_skip_create
;
};
#endif
storage/ndb/test/ndbapi/bank/BankLoad.cpp
View file @
47e831ca
...
...
@@ -58,7 +58,7 @@ int Bank::createAndLoadBank(bool ovrWrt, bool disk, int num_accounts){
m_ndb
.
init
();
if
(
m_ndb
.
waitUntilReady
()
!=
0
)
return
NDBT_FAILED
;
const
NdbDictionary
::
Table
*
pSysValTab
=
m_ndb
.
getDictionary
()
->
getTable
(
"SYSTEM_VALUES"
);
if
(
pSysValTab
!=
NULL
){
...
...
@@ -69,7 +69,7 @@ int Bank::createAndLoadBank(bool ovrWrt, bool disk, int num_accounts){
}
}
if
(
createTables
(
disk
)
!=
NDBT_OK
)
if
(
!
m_skip_create
&&
createTables
(
disk
)
!=
NDBT_OK
)
return
NDBT_FAILED
;
if
(
clearTables
()
!=
NDBT_OK
)
...
...
storage/ndb/test/ndbapi/bank/bankCreator.cpp
View file @
47e831ca
...
...
@@ -31,10 +31,12 @@ int main(int argc, const char** argv){
int
_help
=
0
;
char
*
_database
=
"BANK"
;
int
disk
=
0
;
int
skip_create
=
0
;
struct
getargs
args
[]
=
{
{
"database"
,
'd'
,
arg_string
,
&
_database
,
"Database name"
,
""
},
{
"disk"
,
0
,
arg_flag
,
&
disk
,
"Use disk tables"
,
""
},
{
"skip-create"
,
0
,
arg_flag
,
&
skip_create
,
"Skip create"
,
""
},
{
"usage"
,
'?'
,
arg_flag
,
&
_help
,
"Print help"
,
""
}
};
int
num_args
=
sizeof
(
args
)
/
sizeof
(
args
[
0
]);
...
...
@@ -55,6 +57,7 @@ int main(int argc, const char** argv){
Bank
bank
(
con
,
_database
);
int
overWriteExisting
=
true
;
bank
.
setSkipCreate
(
skip_create
);
if
(
bank
.
createAndLoadBank
(
overWriteExisting
,
disk
)
!=
NDBT_OK
)
return
NDBT_ProgramExit
(
NDBT_FAILED
);
return
NDBT_ProgramExit
(
NDBT_OK
);
...
...
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