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
3d0300e4
Commit
3d0300e4
authored
Jul 01, 2009
by
Dave Wells
Committed by
Yoni Fogel
Apr 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo in args list
git-svn-id:
file:///svn/toku/tokudb@13013
c7de825b-a66e-492c-adef-691d508d4ae1
parent
6045ed00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
src/tests/x1.c
src/tests/x1.c
+9
-9
src/tests/x2.c
src/tests/x2.c
+9
-9
No files found.
src/tests/x1.c
View file @
3d0300e4
...
...
@@ -95,7 +95,7 @@ do_x1_recover (BOOL did_commit)
fprintf
(
stderr
,
"Both verified. Yay!
\n
"
);
}
else
{
// It wasn't commited (it also wasn't aborted), but a checkpoint happened.
// It wasn't commit
t
ed (it also wasn't aborted), but a checkpoint happened.
assert
(
ra
==
DB_NOTFOUND
);
assert
(
rb
==
DB_NOTFOUND
);
fprintf
(
stderr
,
"Neither present. Yay!
\n
"
);
...
...
@@ -131,7 +131,7 @@ do_test_internal (BOOL commit)
// Now find out what happend
if
(
0
==
(
pid
=
fork
()))
{
int
r
=
execl
(
cmd
,
verbose
?
"-v"
:
"-q"
,
commit
?
"--recover-commited"
:
"--recover-aborted"
,
NULL
);
int
r
=
execl
(
cmd
,
verbose
?
"-v"
:
"-q"
,
commit
?
"--recover-commit
t
ed"
:
"--recover-aborted"
,
NULL
);
assert
(
r
==-
1
);
printf
(
"execl failed: %d (%s)
\n
"
,
errno
,
strerror
(
errno
));
assert
(
0
);
...
...
@@ -151,7 +151,7 @@ do_test (void) {
do_test_internal
(
FALSE
);
}
BOOL
do_commit
=
FALSE
,
do_abort
=
FALSE
,
do_recover_commited
=
FALSE
,
do_recover_aborted
=
FALSE
;
BOOL
do_commit
=
FALSE
,
do_abort
=
FALSE
,
do_recover_commit
t
ed
=
FALSE
,
do_recover_aborted
=
FALSE
;
static
void
x1_parse_args
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -168,14 +168,14 @@ x1_parse_args (int argc, char *argv[]) {
do_abort
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--commit"
)
==
0
)
{
do_commit
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-commited"
)
==
0
)
{
do_recover_commited
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-commit
t
ed"
)
==
0
)
{
do_recover_commit
t
ed
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-aborted"
)
==
0
)
{
do_recover_aborted
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"-h"
)
==
0
)
{
resultcode
=
0
;
do_usage:
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-q]* [-h] {--abort | --commit | --recover-commited | --recover-aborted }
\n
"
,
cmd
);
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-q]* [-h] {--abort | --commit | --recover-commit
t
ed | --recover-aborted }
\n
"
,
cmd
);
exit
(
resultcode
);
}
else
{
fprintf
(
stderr
,
"Unknown arg: %s
\n
"
,
argv
[
0
]);
...
...
@@ -189,10 +189,10 @@ x1_parse_args (int argc, char *argv[]) {
int
n_specified
=
0
;
if
(
do_commit
)
n_specified
++
;
if
(
do_abort
)
n_specified
++
;
if
(
do_recover_commited
)
n_specified
++
;
if
(
do_recover_commit
t
ed
)
n_specified
++
;
if
(
do_recover_aborted
)
n_specified
++
;
if
(
n_specified
>
1
)
{
printf
(
"Specify only one of --commit or --abort or --recover-commited or --recover-aborted
\n
"
);
printf
(
"Specify only one of --commit or --abort or --recover-commit
t
ed or --recover-aborted
\n
"
);
resultcode
=
1
;
goto
do_usage
;
}
...
...
@@ -207,7 +207,7 @@ test_main (int argc, char *argv[])
do_x1_shutdown
(
TRUE
);
}
else
if
(
do_abort
)
{
do_x1_shutdown
(
FALSE
);
}
else
if
(
do_recover_commited
)
{
}
else
if
(
do_recover_commit
t
ed
)
{
do_x1_recover
(
TRUE
);
}
else
if
(
do_recover_aborted
)
{
do_x1_recover
(
FALSE
);
...
...
src/tests/x2.c
View file @
3d0300e4
...
...
@@ -45,7 +45,7 @@ do_x2_shutdown (BOOL do_commit)
r
=
dba
->
open
(
dbb
,
NULL
,
nameb
,
NULL
,
DB_BTREE
,
DB_AUTO_COMMIT
|
DB_CREATE
,
0666
);
CKERR
(
r
);
DB_TXN
*
txnU
,
*
txnV
;
r
=
env
->
txn_begin
(
env
,
NULL
,
&
txnU
,
0
);
CKERR
(
r
);
r
=
env
->
txn_begin
(
env
,
NULL
,
&
txnV
,
0
);
CKERR
(
r
);
r
=
env
->
txn_begin
(
env
,
NULL
,
&
txnV
,
0
);
CKERR
(
r
);
put
(
txnU
,
dba
,
"u.a"
,
"u.a.data"
);
put
(
txnV
,
dbb
,
"v.b"
,
"v.b.data"
);
r
=
env
->
txn_checkpoint
(
env
,
0
,
0
,
0
);
CKERR
(
r
);
...
...
@@ -134,7 +134,7 @@ do_test_internal (BOOL commit)
// Now find out what happend
if
(
0
==
(
pid
=
fork
()))
{
int
r
=
execl
(
cmd
,
verbose
?
"-v"
:
"-q"
,
commit
?
"--recover-commited"
:
"--recover-aborted"
,
NULL
);
int
r
=
execl
(
cmd
,
verbose
?
"-v"
:
"-q"
,
commit
?
"--recover-commit
t
ed"
:
"--recover-aborted"
,
NULL
);
assert
(
r
==-
1
);
printf
(
"execl failed: %d (%s)
\n
"
,
errno
,
strerror
(
errno
));
assert
(
0
);
...
...
@@ -154,7 +154,7 @@ do_test (void) {
do_test_internal
(
FALSE
);
}
BOOL
do_commit
=
FALSE
,
do_abort
=
FALSE
,
do_recover_commited
=
FALSE
,
do_recover_aborted
=
FALSE
;
BOOL
do_commit
=
FALSE
,
do_abort
=
FALSE
,
do_recover_commit
t
ed
=
FALSE
,
do_recover_aborted
=
FALSE
;
static
void
x1_parse_args
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -171,14 +171,14 @@ x1_parse_args (int argc, char *argv[]) {
do_abort
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--commit"
)
==
0
)
{
do_commit
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-commited"
)
==
0
)
{
do_recover_commited
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-commit
t
ed"
)
==
0
)
{
do_recover_commit
t
ed
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"--recover-aborted"
)
==
0
)
{
do_recover_aborted
=
1
;
}
else
if
(
strcmp
(
argv
[
0
],
"-h"
)
==
0
)
{
resultcode
=
0
;
do_usage:
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-q]* [-h] {--abort | --commit | --recover-commited | --recover-aborted }
\n
"
,
cmd
);
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-q]* [-h] {--abort | --commit | --recover-commit
t
ed | --recover-aborted }
\n
"
,
cmd
);
exit
(
resultcode
);
}
else
{
fprintf
(
stderr
,
"Unknown arg: %s
\n
"
,
argv
[
0
]);
...
...
@@ -192,10 +192,10 @@ x1_parse_args (int argc, char *argv[]) {
int
n_specified
=
0
;
if
(
do_commit
)
n_specified
++
;
if
(
do_abort
)
n_specified
++
;
if
(
do_recover_commited
)
n_specified
++
;
if
(
do_recover_commit
t
ed
)
n_specified
++
;
if
(
do_recover_aborted
)
n_specified
++
;
if
(
n_specified
>
1
)
{
printf
(
"Specify only one of --commit or --abort or --recover-commited or --recover-aborted
\n
"
);
printf
(
"Specify only one of --commit or --abort or --recover-commit
t
ed or --recover-aborted
\n
"
);
resultcode
=
1
;
goto
do_usage
;
}
...
...
@@ -210,7 +210,7 @@ test_main (int argc, char *argv[])
do_x2_shutdown
(
TRUE
);
}
else
if
(
do_abort
)
{
do_x2_shutdown
(
FALSE
);
}
else
if
(
do_recover_commited
)
{
}
else
if
(
do_recover_commit
t
ed
)
{
do_x1_recover
(
TRUE
);
}
else
if
(
do_recover_aborted
)
{
do_x1_recover
(
FALSE
);
...
...
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