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
7827ebdf
Commit
7827ebdf
authored
Dec 29, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DbEnv::set_flags addresses #229
git-svn-id:
file:///svn/tokudb@1413
c7de825b-a66e-492c-adef-691d508d4ae1
parent
350d12a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
cxx/dbenv.cpp
cxx/dbenv.cpp
+5
-0
cxx/tests/test_env_set_flags.cpp
cxx/tests/test_env_set_flags.cpp
+14
-0
include/db_cxx.h
include/db_cxx.h
+1
-0
No files found.
cxx/dbenv.cpp
View file @
7827ebdf
...
...
@@ -48,6 +48,11 @@ int DbEnv::set_cachesize(u_int32_t gbytes, u_int32_t bytes, int ncache) {
return
maybe_throw_error
(
ret
);
}
int
DbEnv
::
set_flags
(
u_int32_t
flags
,
int
onoff
)
{
int
ret
=
the_env
->
set_flags
(
the_env
,
flags
,
onoff
);
return
maybe_throw_error
(
ret
);
}
#if DB_VERSION_MAJOR<4 || (DB_VERSION_MAJOR==4 && DB_VERSION_MINOR<=4)
int
DbEnv
::
set_lk_max
(
u_int32_t
flags
)
{
int
ret
=
the_env
->
set_lk_max
(
the_env
,
flags
);
...
...
cxx/tests/test_env_set_flags.cpp
0 → 100644
View file @
7827ebdf
#include <assert.h>
#include <db_cxx.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
int
main
(
int
argc
,
char
*
argv
[])
{
int
r
;
DbEnv
env
(
DB_CXX_NO_EXCEPTIONS
);
r
=
env
.
set_flags
(
0
,
0
);
assert
(
r
==
0
);
r
=
env
.
set_flags
(
0
,
1
);
assert
(
r
==
0
);
return
0
;
}
include/db_cxx.h
View file @
7827ebdf
...
...
@@ -139,6 +139,7 @@ class DbEnv {
int
close
(
u_int32_t
);
int
open
(
const
char
*
,
u_int32_t
,
int
);
int
set_cachesize
(
u_int32_t
,
u_int32_t
,
int
);
int
set_flags
(
u_int32_t
,
int
);
#if DB_VERSION_MAJOR<4 || (DB_VERSION_MAJOR==4 && DB_VERSION_MINOR<=4)
// set_lk_max is only defined for versions up to 4.4
int
set_lk_max
(
u_int32_t
);
...
...
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