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
ab2fbfa2
Commit
ab2fbfa2
authored
Nov 29, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addresses #8
git-svn-id:
file:///svn/tokudb@828
c7de825b-a66e-492c-adef-691d508d4ae1
parent
8b48d70c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
newbrt/brt-test.c
newbrt/brt-test.c
+17
-17
No files found.
newbrt/brt-test.c
View file @
ab2fbfa2
...
...
@@ -92,7 +92,7 @@ static void test2 (int memcheck) {
if
(
0
)
{
brt_flush
(
t
);
{
int
n
=
get_n_items_malloced
();
int
n
=
toku_
get_n_items_malloced
();
printf
(
"%s:%d i=%d n_items_malloced=%d
\n
"
,
__FILE__
,
__LINE__
,
i
,
n
);
if
(
n
!=
3
)
toku_print_malloced_items
();
assert
(
n
==
3
);
...
...
@@ -622,26 +622,26 @@ void test_cursor_last_empty(void) {
printf
(
"%s"
,
__FUNCTION__
);
unlink
(
n
);
toku_memory_check_all_free
();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_brt_create_cachetable
(
&
ct
,
0
,
ZERO_LSN
,
NULL_LOGGER
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_open_brt
(
n
,
0
,
1
,
&
brt
,
1
<<
12
,
ct
,
null_txn
,
toku_default_compare_fun
,
null_db
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_brt_cursor
(
brt
,
&
cursor
);
assert
(
r
==
0
);
toku_init_dbt
(
&
kbt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
toku_init_dbt
(
&
vbt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_brt_cursor_get
(
cursor
,
&
kbt
,
&
vbt
,
DB_LAST
,
null_txn
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
assert
(
r
==
DB_NOTFOUND
);
r
=
toku_brt_cursor_get
(
cursor
,
&
kbt
,
&
vbt
,
DB_FIRST
,
null_txn
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
assert
(
r
==
DB_NOTFOUND
);
r
=
toku_close_brt
(
brt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_cachetable_close
(
&
ct
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
toku_memory_check_all_free
();
}
...
...
@@ -656,22 +656,22 @@ void test_cursor_next (void) {
unlink
(
n
);
toku_memory_check_all_free
();
r
=
toku_brt_create_cachetable
(
&
ct
,
0
,
ZERO_LSN
,
NULL_LOGGER
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_open_brt
(
n
,
0
,
1
,
&
brt
,
1
<<
12
,
ct
,
null_txn
,
toku_default_compare_fun
,
null_db
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_brt_insert
(
brt
,
toku_fill_dbt
(
&
kbt
,
"hello"
,
6
),
toku_fill_dbt
(
&
vbt
,
"there"
,
6
),
null_txn
);
r
=
toku_brt_insert
(
brt
,
toku_fill_dbt
(
&
kbt
,
"byebye"
,
7
),
toku_fill_dbt
(
&
vbt
,
"byenow"
,
7
),
null_txn
);
printf
(
"%s:%d calling toku_brt_cursor(...)
\n
"
,
__FILE__
,
__LINE__
);
r
=
toku_brt_cursor
(
brt
,
&
cursor
);
assert
(
r
==
0
);
toku_init_dbt
(
&
kbt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
toku_init_dbt
(
&
vbt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
printf
(
"%s:%d calling toku_brt_cursor_get(...)
\n
"
,
__FILE__
,
__LINE__
);
r
=
toku_brt_cursor_get
(
cursor
,
&
kbt
,
&
vbt
,
DB_NEXT
,
null_txn
);
printf
(
"%s:%d called toku_brt_cursor_get(...)
\n
"
,
__FILE__
,
__LINE__
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
assert
(
r
==
0
);
assert
(
kbt
.
size
==
7
);
assert
(
memcmp
(
kbt
.
data
,
"byebye"
,
7
)
==
0
);
...
...
@@ -689,9 +689,9 @@ void test_cursor_next (void) {
assert
(
r
==
DB_NOTFOUND
);
r
=
toku_close_brt
(
brt
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
r
=
toku_cachetable_close
(
&
ct
);
assert
(
r
==
0
);
//printf("%s:%d %d alloced\n", __FILE__, __LINE__, get_n_items_malloced()); toku_print_malloced_items();
//printf("%s:%d %d alloced\n", __FILE__, __LINE__,
toku_
get_n_items_malloced()); toku_print_malloced_items();
toku_memory_check_all_free
();
}
...
...
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