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
dfba18ce
Commit
dfba18ce
authored
Oct 11, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup
git-svn-id:
file:///svn/tokudb@438
c7de825b-a66e-492c-adef-691d508d4ae1
parent
c69bbcf7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
25 deletions
+26
-25
buildheader/sample_offsets_32.h
buildheader/sample_offsets_32.h
+1
-1
buildheader/sample_offsets_64.h
buildheader/sample_offsets_64.h
+1
-1
include/db.h
include/db.h
+1
-1
src/ydb.c
src/ydb.c
+23
-22
No files found.
buildheader/sample_offsets_32.h
View file @
dfba18ce
...
...
@@ -61,7 +61,7 @@ struct fieldinfo db_txn_active_fields32[] = {
{
0
,
148
,
148
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields32
[]
=
{
{
"int (*abort)
__P(
(DB_TXN *)"
,
100
,
4
},
{
"int (*abort) (DB_TXN *)"
,
100
,
4
},
{
"int (*commit) (DB_TXN*, u_int32_t)"
,
104
,
4
},
{
"u_int32_t (*id) (DB_TXN *)"
,
112
,
4
},
{
0
,
132
,
132
}
/* size of whole struct */
...
...
buildheader/sample_offsets_64.h
View file @
dfba18ce
...
...
@@ -61,7 +61,7 @@ struct fieldinfo db_txn_active_fields64[] = {
{
0
,
148
,
148
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields64
[]
=
{
{
"int (*abort)
__P(
(DB_TXN *)"
,
176
,
8
},
{
"int (*abort) (DB_TXN *)"
,
176
,
8
},
{
"int (*commit) (DB_TXN*, u_int32_t)"
,
184
,
8
},
{
"u_int32_t (*id) (DB_TXN *)"
,
200
,
8
},
{
0
,
240
,
240
}
/* size of whole struct */
...
...
include/db.h
View file @
dfba18ce
...
...
@@ -165,7 +165,7 @@ struct __toku_db_txn {
struct
__toku_db_txn_internal
*
i
;
void
*
__toku_dummy0
[
18
];
char
__toku_dummy1
[
24
];
int
(
*
abort
)
__P
(
(
DB_TXN
*
);
/* 32-bit offset=100 size=4, 64=bit offset=176 size=8 */
int
(
*
abort
)
(
DB_TXN
*
);
/* 32-bit offset=100 size=4, 64=bit offset=176 size=8 */
int
(
*
commit
)
(
DB_TXN
*
,
u_int32_t
);
/* 32-bit offset=104 size=4, 64=bit offset=184 size=8 */
void
*
__toku_dummy2
[
1
];
u_int32_t
(
*
id
)
(
DB_TXN
*
);
/* 32-bit offset=112 size=4, 64=bit offset=200 size=8 */
...
...
src/ydb.c
View file @
dfba18ce
...
...
@@ -67,7 +67,7 @@ void __toku_db_env_err (const DB_ENV *env __attribute__((__unused__)), int error
void
print_flags
(
u_int32_t
flags
)
{
u_int32_t
gotit
=
0
;
int
doneone
=
0
;
#define doit(flag) if (flag & flags) { if (doneone)
printf(" | "); printf(
"%s", #flag); doneone=1; gotit|=flag; }
#define doit(flag) if (flag & flags) { if (doneone)
fprintf(stderr, " | "); fprintf(stderr,
"%s", #flag); doneone=1; gotit|=flag; }
printf
(
" flags="
);
doit
(
DB_INIT_LOCK
);
doit
(
DB_INIT_LOG
);
...
...
@@ -78,7 +78,7 @@ void print_flags (u_int32_t flags) {
doit
(
DB_RECOVER
);
doit
(
DB_PRIVATE
);
if
(
gotit
!=
flags
)
printf
(
" flags 0x%x not accounted for"
,
flags
&~
gotit
);
printf
(
"
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
}
struct
__toku_db_env_internal
{
...
...
@@ -88,7 +88,8 @@ struct __toku_db_env_internal {
const
char
*
errpfx
;
char
*
dir
;
/* A malloc'd copy of the directory. */
char
*
tmp_dir
;
void
(
*
noticecall
)(
DB_ENV
*
,
db_notices
);
char
*
data_dir
;
//void (*noticecall)(DB_ENV *, db_notices);
int
n_files
;
int
files_array_limit
;
// How big is *files ?
struct
ydb_file
**
files
;
...
...
@@ -136,11 +137,11 @@ int __toku_db_env_log_flush (DB_ENV * env, const DB_LSN * lsn) {
return
1
;
}
int
__toku_db_env_set_cachesize
(
DB_ENV
*
env
,
u_int32_t
gbytes
,
u_int32_t
bytes
,
int
ncache
)
{
barf
(
);
fprintf
(
stderr
,
"%s:%d set_cachsize %d %d %d
\n
"
,
__FILE__
,
__LINE__
,
gbytes
,
bytes
,
ncache
);
return
1
;
}
int
__toku_db_env_set_data_dir
(
DB_ENV
*
env
,
const
char
*
dir
)
{
barf
(
);
env
->
i
->
data_dir
=
strdup
(
dir
);
return
1
;
}
void
__toku_db_env_set_errcall
(
DB_ENV
*
env
,
void
(
*
errcall
)(
const
char
*
,
char
*
))
{
...
...
@@ -150,11 +151,11 @@ void __toku_db_env_set_errpfx (DB_ENV * env, const char *errpfx) {
env
->
i
->
errpfx
=
strdup
(
errpfx
);
}
int
__toku_db_env_set_flags
(
DB_ENV
*
env
,
u_int32_t
flags
,
int
onoff
)
{
barf
(
);
assert
(
flags
==
0
);
return
1
;
}
int
__toku_db_env_set_lg_bsize
(
DB_ENV
*
env
,
u_int32_t
bsize
)
{
barf
(
);
barff
(
"lg_bsize=%d
\n
"
,
bsize
);
return
1
;
}
int
__toku_db_env_set_lg_dir
(
DB_ENV
*
env
,
const
char
*
dir
)
{
...
...
@@ -162,20 +163,20 @@ int __toku_db_env_set_lg_dir (DB_ENV * env, const char * dir) {
return
1
;
}
int
__toku_db_env_set_lg_max
(
DB_ENV
*
env
,
u_int32_t
lg_max
)
{
barf
(
);
barff
(
"lg_max=%d
\n
"
,
lg_max
);
return
1
;
}
int
__toku_db_env_set_lk_detect
(
DB_ENV
*
env
,
u_int32_t
detect
)
{
barf
(
);
barff
(
"detect=%d
\n
"
,
detect
);
return
1
;
}
int
__toku_db_env_set_lk_max
(
DB_ENV
*
env
,
u_int32_t
lk_max
)
{
barf
(
);
barff
(
"lk_max=%d
\n
"
,
lk_max
);
return
0
;
}
void
__toku_db_env_set_noticecall
(
DB_ENV
*
env
,
void
(
*
noticecall
)(
DB_ENV
*
,
db_notices
))
{
env
->
i
->
noticecall
=
noticecall
;
}
//
void __toku_db_env_set_noticecall (DB_ENV *env, void (*noticecall)(DB_ENV *, db_notices)) {
//
env->i->noticecall = noticecall;
//
}
int
__toku_db_env_set_tmp_dir
(
DB_ENV
*
env
,
const
char
*
tmp_dir
)
{
env
->
i
->
tmp_dir
=
strdup
(
tmp_dir
);
return
0
;
...
...
@@ -209,7 +210,7 @@ int db_env_create (DB_ENV **envp, u_int32_t flags) {
result
->
log_flush
=
__toku_db_env_log_flush
;
result
->
set_errcall
=
__toku_db_env_set_errcall
;
result
->
set_errpfx
=
__toku_db_env_set_errpfx
;
result
->
set_noticecall
=
__toku_db_env_set_noticecall
;
//
result->set_noticecall = __toku_db_env_set_noticecall;
result
->
set_flags
=
__toku_db_env_set_flags
;
result
->
set_data_dir
=
__toku_db_env_set_data_dir
;
result
->
set_tmp_dir
=
__toku_db_env_set_tmp_dir
;
...
...
@@ -226,7 +227,7 @@ int db_env_create (DB_ENV **envp, u_int32_t flags) {
result
->
i
=
malloc_zero
(
sizeof
(
*
result
->
i
));
result
->
i
->
dir
=
0
;
result
->
i
->
noticecall
=
0
;
//
result->i->noticecall = 0;
result
->
i
->
tmp_dir
=
0
;
result
->
i
->
errcall
=
__toku_default_errcall
;
...
...
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