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
b4d45cd7
Commit
b4d45cd7
authored
Dec 31, 2007
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DbEnv::set_errcall closes #228
git-svn-id:
file:///svn/tokudb@1441
c7de825b-a66e-492c-adef-691d508d4ae1
parent
14830de6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
cxx/dbenv.cpp
cxx/dbenv.cpp
+10
-0
include/db_cxx.h
include/db_cxx.h
+14
-2
No files found.
cxx/dbenv.cpp
View file @
b4d45cd7
...
...
@@ -109,3 +109,13 @@ void DbEnv::err(int error, const char *fmt, ...) {
void
DbEnv
::
set_errfile
(
FILE
*
errfile
)
{
the_env
->
set_errfile
(
the_env
,
errfile
);
}
extern
"C"
void
toku_db_env_errcall_c
(
DB_ENV
*
dbenv_c
,
const
char
*
errpfx
,
const
char
*
msg
)
{
DbEnv
*
dbenv
=
(
DbEnv
*
)
dbenv_c
->
api1_internal
;
dbenv
->
errcall
(
dbenv
,
errpfx
,
msg
);
}
void
DbEnv
::
set_errcall
(
void
(
*
db_errcall_fcn
)(
const
DbEnv
*
,
const
char
*
,
const
char
*
))
{
errcall
=
db_errcall_fcn
;
the_env
->
set_errcall
(
the_env
,
toku_db_env_errcall_c
);
}
include/db_cxx.h
View file @
b4d45cd7
...
...
@@ -97,21 +97,31 @@ class Db {
}
/* C++ analogues of the C functions. */
int
open
(
DbTxn
*/
*
txn
*/
,
const
char
*/
*
name
*/
,
const
char
*/
*
subname
*/
,
DBTYPE
,
u_int32_t
/*flags*/
,
int
/*mode*/
);
int
close
(
u_int32_t
/*flags*/
);
int
cursor
(
DbTxn
*/
*
txn
*/
,
Dbc
*
*/
*
cursorp
*/
,
u_int32_t
/*flags*/
);
int
del
(
DbTxn
*/
*
txn
*/
,
Dbt
*/
*
key
*/
,
u_int32_t
/*flags*/
);
int
get
(
DbTxn
*/
*
txn
*/
,
Dbt
*/
*
key
*/
,
Dbt
*/
*
data
*/
,
u_int32_t
/*flags*/
);
int
pget
(
DbTxn
*
,
Dbt
*
,
Dbt
*
,
Dbt
*
,
u_int32_t
);
int
open
(
DbTxn
*/
*
txn
*/
,
const
char
*/
*
name
*/
,
const
char
*/
*
subname
*/
,
DBTYPE
,
u_int32_t
/*flags*/
,
int
/*mode*/
);
int
put
(
DbTxn
*
,
Dbt
*
,
Dbt
*
,
u_int32_t
);
int
get_flags
(
u_int32_t
*
);
int
set_flags
(
u_int32_t
);
int
set_pagesize
(
u_int32_t
);
int
remove
(
const
char
*
file
,
const
char
*
database
,
u_int32_t
flags
);
int
set_bt_compare
(
bt_compare_fcn_type
bt_compare_fcn
);
int
set_bt_compare
(
int
(
*
)(
Db
*
,
const
Dbt
*
,
const
Dbt
*
));
int
set_dup_compare
(
dup_compare_fcn_type
dup_compare_fcn
);
int
set_dup_compare
(
int
(
*
)(
Db
*
,
const
Dbt
*
,
const
Dbt
*
));
int
associate
(
DbTxn
*
,
Db
*
,
int
(
*
)(
Db
*
,
const
Dbt
*
,
const
Dbt
*
,
Dbt
*
),
u_int32_t
);
/* the cxx callbacks must be public so they can be called by the c callback. But it's really private. */
...
...
@@ -152,8 +162,10 @@ class DbEnv {
void
set_errpfx
(
const
char
*
errpfx
);
void
err
(
int
error
,
const
char
*
fmt
,
...);
void
set_errfile
(
FILE
*
errfile
);
void
set_errcall
(
void
(
*
)(
const
DbEnv
*
,
const
char
*
,
const
char
*
));
int
do_no_exceptions
;
// This should be private!!!
void
(
*
errcall
)(
const
DbEnv
*
,
const
char
*
,
const
char
*
);
private:
DB_ENV
*
the_env
;
...
...
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