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
27997ef5
Commit
27997ef5
authored
Jan 25, 2008
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addresses #307
More tests. git-svn-id:
file:///svn/tokudb@1890
c7de825b-a66e-492c-adef-691d508d4ae1
parent
6564575c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
6 deletions
+27
-6
src/lock_tree/tests/Makefile
src/lock_tree/tests/Makefile
+1
-1
src/lock_tree/tests/test_00020_read.c
src/lock_tree/tests/test_00020_read.c
+26
-5
No files found.
src/lock_tree/tests/Makefile
View file @
27997ef5
...
@@ -10,7 +10,7 @@ ifeq ($(OSX),OSX)
...
@@ -10,7 +10,7 @@ ifeq ($(OSX),OSX)
#Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath.
#Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath.
LIBEXT
=
dylib
LIBEXT
=
dylib
VGRIND
=
VGRIND
=
CPPFLAGS
=
CPPFLAGS
=
-Wl
,-rpath,..,-rpath,../../range_tree
SETENV
=
export
DYLD_LIBRARY_PATH
=
..:../../range_tree
;
SETENV
=
export
DYLD_LIBRARY_PATH
=
..:../../range_tree
;
else
else
SETTOKUENV
=
SETTOKUENV
=
...
...
src/lock_tree/tests/test_00020_read.c
View file @
27997ef5
...
@@ -23,7 +23,8 @@ void close_tree(void) {
...
@@ -23,7 +23,8 @@ void close_tree(void) {
lt
=
NULL
;
lt
=
NULL
;
}
}
void
runtest
(
BOOL
dups
)
{
void
insert_1
(
BOOL
dups
,
int
key_l
,
int
key_r
,
int
data_l
,
int
data_r
,
const
void
*
kl
,
const
void
*
dl
,
const
void
*
kr
,
const
void
*
dr
)
{
DBT
_key_left
;
DBT
_key_left
;
DBT
_key_right
;
DBT
_key_right
;
DBT
_data_left
;
DBT
_data_left
;
...
@@ -33,12 +34,16 @@ void runtest(BOOL dups) {
...
@@ -33,12 +34,16 @@ void runtest(BOOL dups) {
DBT
*
data_left
=
dups
?
&
_data_left
:
NULL
;
DBT
*
data_left
=
dups
?
&
_data_left
:
NULL
;
DBT
*
data_right
=
dups
?
&
_data_right
:
NULL
;
DBT
*
data_right
=
dups
?
&
_data_right
:
NULL
;
dbt_init
(
key_left
,
&
nums
[
3
],
sizeof
(
nums
[
3
]));
dbt_init
(
key_left
,
&
nums
[
key_l
],
sizeof
(
nums
[
key_l
]));
dbt_init
(
key_right
,
&
nums
[
6
],
sizeof
(
nums
[
6
]));
dbt_init
(
key_right
,
&
nums
[
key_r
],
sizeof
(
nums
[
key_r
]));
if
(
dups
)
{
if
(
dups
)
{
dbt_init
(
data_left
,
&
nums
[
3
],
sizeof
(
nums
[
3
]));
dbt_init
(
data_left
,
&
nums
[
data_l
],
sizeof
(
nums
[
data_l
]));
dbt_init
(
data_right
,
&
nums
[
6
],
sizeof
(
nums
[
6
]));
dbt_init
(
data_right
,
&
nums
[
data_r
],
sizeof
(
nums
[
data_r
]));
if
(
dl
)
data_left
=
(
DBT
*
)
dl
;
if
(
dr
)
data_right
=
(
DBT
*
)
dr
;
}
}
if
(
kl
)
key_left
=
(
DBT
*
)
kl
;
if
(
kr
)
key_right
=
(
DBT
*
)
kr
;
setup_tree
(
dups
);
setup_tree
(
dups
);
...
@@ -53,6 +58,22 @@ void runtest(BOOL dups) {
...
@@ -53,6 +58,22 @@ void runtest(BOOL dups) {
close_tree
();
close_tree
();
}
}
void
runtest
(
BOOL
dups
)
{
int
i
;
const
DBT
*
choices
[
3
];
choices
[
0
]
=
toku_lt_neg_infinity
;
choices
[
1
]
=
NULL
;
choices
[
2
]
=
toku_lt_infinity
;
for
(
i
=
0
;
i
<
9
;
i
++
)
{
int
a
=
i
/
3
;
int
b
=
i
%
3
;
if
(
a
>
b
)
continue
;
insert_1
(
dups
,
3
,
3
,
7
,
7
,
choices
[
a
],
choices
[
a
],
choices
[
b
],
choices
[
b
]);
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
main
(
int
argc
,
const
char
*
argv
[])
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
i
++
)
nums
[
i
]
=
i
;
for
(
i
=
0
;
i
<
sizeof
(
nums
)
/
sizeof
(
nums
[
0
]);
i
++
)
nums
[
i
]
=
i
;
...
...
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