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
1861f571
Commit
1861f571
authored
Jan 24, 2008
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix db-benchmark-test. Fixes #300.
git-svn-id:
file:///svn/tokudb@1841
c7de825b-a66e-492c-adef-691d508d4ae1
parent
f1fa51fa
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
newbrt/brt-test.c
newbrt/brt-test.c
+1
-1
newbrt/brt.c
newbrt/brt.c
+5
-4
newbrt/brt.h
newbrt/brt.h
+1
-1
src/tests/Makefile
src/tests/Makefile
+1
-0
src/ydb.c
src/ydb.c
+2
-1
No files found.
newbrt/brt-test.c
View file @
1861f571
...
@@ -2219,7 +2219,7 @@ void test_brt_delete_both(int n) {
...
@@ -2219,7 +2219,7 @@ void test_brt_delete_both(int n) {
r
=
toku_brt_create
(
&
t
);
assert
(
r
==
0
);
r
=
toku_brt_create
(
&
t
);
assert
(
r
==
0
);
r
=
toku_brt_set_flags
(
t
,
TOKU_DB_DUP
+
TOKU_DB_DUPSORT
);
assert
(
r
==
0
);
r
=
toku_brt_set_flags
(
t
,
TOKU_DB_DUP
+
TOKU_DB_DUPSORT
);
assert
(
r
==
0
);
r
=
toku_brt_set_nodesize
(
t
,
4096
);
assert
(
r
==
0
);
r
=
toku_brt_set_nodesize
(
t
,
4096
);
assert
(
r
==
0
);
r
=
toku_brt_open
(
t
,
fname
,
fname
,
0
,
1
,
1
,
0
,
ct
,
null_txn
);
r
=
toku_brt_open
(
t
,
fname
,
fname
,
0
,
1
,
1
,
0
,
ct
,
null_txn
,
(
DB
*
)
0
);
assert
(
r
==
0
);
assert
(
r
==
0
);
DBT
key
,
val
;
DBT
key
,
val
;
...
...
newbrt/brt.c
View file @
1861f571
...
@@ -874,6 +874,7 @@ static int brt_leaf_put_cmd (BRT t, BRTNODE node, BRT_CMD *cmd,
...
@@ -874,6 +874,7 @@ static int brt_leaf_put_cmd (BRT t, BRTNODE node, BRT_CMD *cmd,
int
debug
,
int
debug
,
TOKUTXN
txn
)
{
TOKUTXN
txn
)
{
// toku_pma_verify_fingerprint(node->u.l.buffer, node->rand4fingerprint, node->subtree_fingerprint);
// toku_pma_verify_fingerprint(node->u.l.buffer, node->rand4fingerprint, node->subtree_fingerprint);
assert
(
node
->
height
==
0
);
FILENUM
filenum
=
toku_cachefile_filenum
(
t
->
cf
);
FILENUM
filenum
=
toku_cachefile_filenum
(
t
->
cf
);
if
(
cmd
->
type
==
BRT_INSERT
)
{
if
(
cmd
->
type
==
BRT_INSERT
)
{
DBT
*
k
=
cmd
->
u
.
id
.
key
;
DBT
*
k
=
cmd
->
u
.
id
.
key
;
...
@@ -1326,13 +1327,13 @@ int toku_brt_get_fd(BRT brt, int *fdp) {
...
@@ -1326,13 +1327,13 @@ int toku_brt_get_fd(BRT brt, int *fdp) {
return
0
;
return
0
;
}
}
int
toku_brt_open
(
BRT
t
,
const
char
*
fname
,
const
char
*
fname_in_env
,
const
char
*
dbname
,
int
is_create
,
int
only_create
,
int
load_flags
,
CACHETABLE
cachetable
,
TOKUTXN
txn
)
{
int
toku_brt_open
(
BRT
t
,
const
char
*
fname
,
const
char
*
fname_in_env
,
const
char
*
dbname
,
int
is_create
,
int
only_create
,
int
load_flags
,
CACHETABLE
cachetable
,
TOKUTXN
txn
,
DB
*
db
)
{
/* If dbname is NULL then we setup to hold a single tree. Otherwise we setup an array. */
/* If dbname is NULL then we setup to hold a single tree. Otherwise we setup an array. */
int
r
;
int
r
;
char
*
malloced_name
=
0
;
char
*
malloced_name
=
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__, get_n_items_malloced()); toku_print_malloced_items();
WHEN_BRTTRACE
(
fprintf
(
stderr
,
"BRTTRACE: %s:%d toku_
open_brt
(%s,
\"
%s
\"
, %d, %p, %d, %p)
\n
"
,
WHEN_BRTTRACE
(
fprintf
(
stderr
,
"BRTTRACE: %s:%d toku_
brt_open
(%s,
\"
%s
\"
, %d, %p, %d, %p)
\n
"
,
__FILE__
,
__LINE__
,
fname
,
dbname
,
is_create
,
newbrt
,
nodesize
,
cachetable
));
__FILE__
,
__LINE__
,
fname
,
dbname
,
is_create
,
newbrt
,
nodesize
,
cachetable
));
if
(
0
)
{
died0
:
assert
(
r
);
return
r
;
}
if
(
0
)
{
died0
:
assert
(
r
);
return
r
;
}
...
@@ -1347,6 +1348,7 @@ int toku_brt_open(BRT t, const char *fname, const char *fname_in_env, const char
...
@@ -1347,6 +1348,7 @@ int toku_brt_open(BRT t, const char *fname, const char *fname_in_env, const char
}
}
}
}
t
->
database_name
=
malloced_name
;
t
->
database_name
=
malloced_name
;
t
->
db
=
db
;
{
{
int
fd
=
open
(
fname
,
O_RDWR
,
0777
);
int
fd
=
open
(
fname
,
O_RDWR
,
0777
);
r
=
errno
;
r
=
errno
;
...
@@ -1529,9 +1531,8 @@ int toku_open_brt (const char *fname, const char *dbname, int is_create, BRT *ne
...
@@ -1529,9 +1531,8 @@ int toku_open_brt (const char *fname, const char *dbname, int is_create, BRT *ne
return
r
;
return
r
;
toku_brt_set_nodesize
(
brt
,
nodesize
);
toku_brt_set_nodesize
(
brt
,
nodesize
);
toku_brt_set_bt_compare
(
brt
,
compare_fun
);
toku_brt_set_bt_compare
(
brt
,
compare_fun
);
brt
->
db
=
db
;
r
=
toku_brt_open
(
brt
,
fname
,
fname
,
dbname
,
is_create
,
only_create
,
load_flags
,
cachetable
,
txn
);
r
=
toku_brt_open
(
brt
,
fname
,
fname
,
dbname
,
is_create
,
only_create
,
load_flags
,
cachetable
,
txn
,
db
);
if
(
r
!=
0
)
{
if
(
r
!=
0
)
{
return
r
;
return
r
;
}
}
...
...
newbrt/brt.h
View file @
1861f571
...
@@ -21,7 +21,7 @@ int toku_brt_get_nodesize(BRT, unsigned int *nodesize);
...
@@ -21,7 +21,7 @@ int toku_brt_get_nodesize(BRT, unsigned int *nodesize);
int
toku_brt_set_bt_compare
(
BRT
,
int
(
*
bt_compare
)(
DB
*
,
const
DBT
*
,
const
DBT
*
));
int
toku_brt_set_bt_compare
(
BRT
,
int
(
*
bt_compare
)(
DB
*
,
const
DBT
*
,
const
DBT
*
));
int
toku_brt_set_dup_compare
(
BRT
,
int
(
*
dup_compare
)(
DB
*
,
const
DBT
*
,
const
DBT
*
));
int
toku_brt_set_dup_compare
(
BRT
,
int
(
*
dup_compare
)(
DB
*
,
const
DBT
*
,
const
DBT
*
));
int
brt_set_cachetable
(
BRT
,
CACHETABLE
);
int
brt_set_cachetable
(
BRT
,
CACHETABLE
);
int
toku_brt_open
(
BRT
,
const
char
*
fname
,
const
char
*
fname_in_env
,
const
char
*
dbname
,
int
is_create
,
int
only_create
,
int
load_flags
,
CACHETABLE
ct
,
TOKUTXN
txn
);
int
toku_brt_open
(
BRT
,
const
char
*
fname
,
const
char
*
fname_in_env
,
const
char
*
dbname
,
int
is_create
,
int
only_create
,
int
load_flags
,
CACHETABLE
ct
,
TOKUTXN
txn
,
DB
*
db
);
int
toku_brt_remove_subdb
(
BRT
brt
,
const
char
*
dbname
,
u_int32_t
flags
);
int
toku_brt_remove_subdb
(
BRT
brt
,
const
char
*
dbname
,
u_int32_t
flags
);
int
toku_brt_insert
(
BRT
,
DBT
*
,
DBT
*
,
TOKUTXN
);
int
toku_brt_insert
(
BRT
,
DBT
*
,
DBT
*
,
TOKUTXN
);
...
...
src/tests/Makefile
View file @
1861f571
...
@@ -112,6 +112,7 @@ FOO_NO_VGRIND = \
...
@@ -112,6 +112,7 @@ FOO_NO_VGRIND = \
db_open_notexist_reopen
\
db_open_notexist_reopen
\
db_remove_subdb
\
db_remove_subdb
\
db_subdb
\
db_subdb
\
db_thread_insert
\
dup_delete
\
dup_delete
\
dup_flags
\
dup_flags
\
dup_insert
\
dup_insert
\
...
...
src/ydb.c
View file @
1861f571
...
@@ -1792,7 +1792,8 @@ static int toku_db_open(DB * db, DB_TXN * txn, const char *fname, const char *db
...
@@ -1792,7 +1792,8 @@ static int toku_db_open(DB * db, DB_TXN * txn, const char *fname, const char *db
r
=
toku_brt_open
(
db
->
i
->
brt
,
db
->
i
->
full_fname
,
fname
,
dbname
,
r
=
toku_brt_open
(
db
->
i
->
brt
,
db
->
i
->
full_fname
,
fname
,
dbname
,
is_db_create
,
is_db_excl
,
is_db_unknown
,
is_db_create
,
is_db_excl
,
is_db_unknown
,
db
->
dbenv
->
i
->
cachetable
,
db
->
dbenv
->
i
->
cachetable
,
txn
?
txn
->
i
->
tokutxn
:
NULL_TXN
);
txn
?
txn
->
i
->
tokutxn
:
NULL_TXN
,
db
);
if
(
r
!=
0
)
if
(
r
!=
0
)
goto
error_cleanup
;
goto
error_cleanup
;
...
...
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