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
3f038902
Commit
3f038902
authored
Jan 05, 2013
by
John Esmet
Committed by
Yoni Fogel
Apr 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refs #5723 fix test leaks
git-svn-id:
file:///svn/toku/tokudb@51728
c7de825b-a66e-492c-adef-691d508d4ae1
parent
4e2c93bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
ft/tests/ft-bfe-query.cc
ft/tests/ft-bfe-query.cc
+2
-2
ft/tests/ft-serialize-test.cc
ft/tests/ft-serialize-test.cc
+13
-13
ft/tests/verify-bad-msn.cc
ft/tests/verify-bad-msn.cc
+1
-1
ft/tests/verify-dup-pivots.cc
ft/tests/verify-dup-pivots.cc
+1
-1
No files found.
ft/tests/ft-bfe-query.cc
View file @
3f038902
...
...
@@ -300,8 +300,8 @@ test_prefetching(void) {
MALLOC_N
(
sn
.
n_children
,
sn
.
bp
);
MALLOC_N
(
sn
.
n_children
-
1
,
sn
.
childkeys
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
0
],
toku_xmemdup
(
&
key1
,
sizeof
(
key1
)),
sizeof
key1
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
1
],
toku_xmemdup
(
&
key2
,
sizeof
(
key2
)),
sizeof
key2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
0
],
&
key1
,
sizeof
(
key1
)
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
1
],
&
key2
,
sizeof
(
key2
)
);
sn
.
totalchildkeylens
=
sizeof
(
key1
)
+
sizeof
(
key2
);
BP_BLOCKNUM
(
&
sn
,
0
).
b
=
30
;
BP_BLOCKNUM
(
&
sn
,
1
).
b
=
35
;
...
...
ft/tests/ft-serialize-test.cc
View file @
3f038902
...
...
@@ -226,7 +226,7 @@ test_serialize_leaf_check_msn(enum ftnode_verify_type bft, bool do_clone) {
sn
.
oldest_referenced_xid_known
=
TXNID_NONE
;
MALLOC_N
(
sn
.
n_children
,
sn
.
bp
);
MALLOC_N
(
1
,
sn
.
childkeys
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
0
],
toku_xmemdup
(
"b"
,
2
)
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
0
],
"b"
,
2
);
sn
.
totalchildkeylens
=
2
;
BP_STATE
(
&
sn
,
0
)
=
PT_AVAIL
;
BP_STATE
(
&
sn
,
1
)
=
PT_AVAIL
;
...
...
@@ -394,7 +394,7 @@ test_serialize_leaf_with_large_pivots(enum ftnode_verify_type bft, bool do_clone
if
(
i
<
nrows
-
1
)
{
uint32_t
keylen
;
char
*
CAST_FROM_VOIDP
(
keyp
,
le_key_and_len
(
le
,
&
keylen
));
toku_
fill_dbt
(
&
sn
.
childkeys
[
i
],
toku_xmemdup
(
keyp
,
keylen
)
,
keylen
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
i
],
keyp
,
keylen
);
}
}
...
...
@@ -813,12 +813,12 @@ test_serialize_leaf_with_empty_basement_nodes(enum ftnode_verify_type bft, bool
sn
.
oldest_referenced_xid_known
=
TXNID_NONE
;
MALLOC_N
(
sn
.
n_children
,
sn
.
bp
);
MALLOC_N
(
sn
.
n_children
-
1
,
sn
.
childkeys
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
0
],
toku_xmemdup
(
"A"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
1
],
toku_xmemdup
(
"a"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
2
],
toku_xmemdup
(
"a"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
3
],
toku_xmemdup
(
"b"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
4
],
toku_xmemdup
(
"b"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
5
],
toku_xmemdup
(
"x"
,
2
)
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
0
],
"A"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
1
],
"a"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
2
],
"a"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
3
],
"b"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
4
],
"b"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
5
],
"x"
,
2
);
sn
.
totalchildkeylens
=
(
sn
.
n_children
-
1
)
*
2
;
for
(
int
i
=
0
;
i
<
sn
.
n_children
;
++
i
)
{
BP_STATE
(
&
sn
,
i
)
=
PT_AVAIL
;
...
...
@@ -965,9 +965,9 @@ test_serialize_leaf_with_multiple_empty_basement_nodes(enum ftnode_verify_type b
sn
.
oldest_referenced_xid_known
=
TXNID_NONE
;
MALLOC_N
(
sn
.
n_children
,
sn
.
bp
);
MALLOC_N
(
sn
.
n_children
-
1
,
sn
.
childkeys
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
0
],
toku_xmemdup
(
"A"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
1
],
toku_xmemdup
(
"A"
,
2
)
,
2
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
2
],
toku_xmemdup
(
"A"
,
2
)
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
0
],
"A"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
1
],
"A"
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
2
],
"A"
,
2
);
sn
.
totalchildkeylens
=
(
sn
.
n_children
-
1
)
*
2
;
for
(
int
i
=
0
;
i
<
sn
.
n_children
;
++
i
)
{
BP_STATE
(
&
sn
,
i
)
=
PT_AVAIL
;
...
...
@@ -1086,7 +1086,7 @@ test_serialize_leaf(enum ftnode_verify_type bft, bool do_clone) {
sn
.
oldest_referenced_xid_known
=
TXNID_NONE
;
MALLOC_N
(
sn
.
n_children
,
sn
.
bp
);
MALLOC_N
(
1
,
sn
.
childkeys
);
toku_
fill_dbt
(
&
sn
.
childkeys
[
0
],
toku_xmemdup
(
"b"
,
2
)
,
2
);
toku_
memdup_dbt
(
&
sn
.
childkeys
[
0
],
"b"
,
2
);
sn
.
totalchildkeylens
=
2
;
BP_STATE
(
&
sn
,
0
)
=
PT_AVAIL
;
BP_STATE
(
&
sn
,
1
)
=
PT_AVAIL
;
...
...
@@ -1230,7 +1230,7 @@ test_serialize_nonleaf(enum ftnode_verify_type bft, bool do_clone) {
hello_string
=
toku_strdup
(
"hello"
);
MALLOC_N
(
2
,
sn
.
bp
);
MALLOC_N
(
1
,
sn
.
childkeys
);
toku_
fill
_dbt
(
&
sn
.
childkeys
[
0
],
hello_string
,
6
);
toku_
memdup
_dbt
(
&
sn
.
childkeys
[
0
],
hello_string
,
6
);
sn
.
totalchildkeylens
=
6
;
BP_BLOCKNUM
(
&
sn
,
0
).
b
=
30
;
BP_BLOCKNUM
(
&
sn
,
1
).
b
=
35
;
...
...
ft/tests/verify-bad-msn.cc
View file @
3f038902
...
...
@@ -94,7 +94,7 @@ make_tree(FT_HANDLE brt, int height, int fanout, int nperleaf, int *seq, int *mi
}
else
{
int
k
=
maxkeys
[
childnum
-
1
];
// use the max of the left tree
DBT
pivotkey
;
toku_ft_nonleaf_append_child
(
node
,
child
,
toku_fill_dbt
(
&
pivotkey
,
toku_xmemdup
(
&
k
,
sizeof
k
)
,
sizeof
k
));
toku_ft_nonleaf_append_child
(
node
,
child
,
toku_fill_dbt
(
&
pivotkey
,
&
k
,
sizeof
k
));
}
toku_unpin_ftnode
(
brt
->
ft
,
child
);
insert_into_child_buffer
(
brt
,
node
,
childnum
,
minkeys
[
childnum
],
maxkeys
[
childnum
]);
...
...
ft/tests/verify-dup-pivots.cc
View file @
3f038902
...
...
@@ -65,7 +65,7 @@ make_tree(FT_HANDLE brt, int height, int fanout, int nperleaf, int *seq, int *mi
}
else
{
int
k
=
maxkeys
[
0
];
// use duplicate pivots, should result in a broken tree
DBT
pivotkey
;
toku_ft_nonleaf_append_child
(
node
,
child
,
toku_fill_dbt
(
&
pivotkey
,
toku_xmemdup
(
&
k
,
sizeof
k
)
,
sizeof
k
));
toku_ft_nonleaf_append_child
(
node
,
child
,
toku_fill_dbt
(
&
pivotkey
,
&
k
,
sizeof
k
));
}
toku_unpin_ftnode
(
brt
->
ft
,
child
);
}
...
...
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