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
1348ca79
Commit
1348ca79
authored
Oct 14, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save new sample offsets
git-svn-id:
file:///svn/tokudb@446
c7de825b-a66e-492c-adef-691d508d4ae1
parent
11bf6c52
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
91 deletions
+101
-91
buildheader/Makefile
buildheader/Makefile
+10
-3
buildheader/sample_offsets.c
buildheader/sample_offsets.c
+4
-2
buildheader/sample_offsets_32_4_1.h
buildheader/sample_offsets_32_4_1.h
+87
-0
buildheader/sample_offsets_32_4_3.h
buildheader/sample_offsets_32_4_3.h
+0
-0
buildheader/sample_offsets_64.h
buildheader/sample_offsets_64.h
+0
-86
No files found.
buildheader/Makefile
View file @
1348ca79
CFLAGS
=
-Wall
-W
-O2
-Werror
-g
#CPPFLAGS=-I../../mysql-5.0.27/mysql-5.0.27/bdb/build_unix/
runs
:
runs_mysql runs_installed
# the mysql versions use the header in the mysql distribution.
runs_mysql
:
./sample_offsets_mysql
./sample_offsets_mysql
runs_installed
:
sample_offsets
./sample_offsets
sample_offsets_mysql
:
CPPFLAGS=-I../../mysql-5.0.27/mysql-5.0.27/mysql/build_unix/
sample_offsets_mysql
:
sample_offsets.c
$(CC)
$(CFLAGS)
$(CPPFLAGS)
$<
-o
$@
make_db_h.o
:
make_db_h.c sample_offsets_32.h sample_offsets_64.h
sample_offsets
:
sample_offsets_local
:
./db.h
...
...
@@ -8,8 +17,6 @@ sample_offsets_local: sample_offsets.c
db.h
:
make_db_h
./make_db_h
>
db.h
runs
:
sample_offsets
./sample_offsets
check32
:
sample_offsets_local
./sample_offsets_local
diff sample_offsets_local.h sample_offsets_32.h
...
...
buildheader/sample_offsets.c
View file @
1348ca79
...
...
@@ -35,7 +35,7 @@ void open_file (void) {
#ifdef LOCAL
snprintf
(
fname
,
100
,
"sample_offsets_local.h"
);
#else
snprintf
(
fname
,
100
,
"sample_offsets_%d
.h"
,
__WORDSIZE
);
snprintf
(
fname
,
100
,
"sample_offsets_%d
_%d_%d.h"
,
__WORDSIZE
,
DB_VERSION_MAJOR
,
DB_VERSION_MINOR
);
#endif
outf
=
fopen
(
fname
,
"w"
);
assert
(
outf
);
...
...
@@ -150,7 +150,9 @@ void sample_dbc_offsets (void) {
void
sample_dbt_offsets
(
void
)
{
field_counter
=
0
;
//STRUCT_SETUP(DBT,app_private, "void*%s");
#if DB_VERSION_MAJOR==4 && DB_VERSION_MINOR==1
STRUCT_SETUP
(
DBT
,
app_private
,
"void*%s"
);
#endif
STRUCT_SETUP
(
DBT
,
data
,
"void*%s"
);
STRUCT_SETUP
(
DBT
,
flags
,
"u_int32_t %s"
);
STRUCT_SETUP
(
DBT
,
size
,
"u_int32_t %s"
);
...
...
buildheader/sample_offsets_32_4_1.h
0 → 100644
View file @
1348ca79
/* BDB offsets on a 32-bit machine */
#define DB_VERSION_MAJOR_32 4
#define DB_VERSION_MINOR_32 1
#define DB_VERSION_STRING_32 "Berkeley DB Compatability Header 4.1"
struct
fieldinfo
db_btree_stat_fields32
[]
=
{
{
"u_int32_t bt_nkeys"
,
12
,
4
},
{
"u_int32_t bt_ndata"
,
16
,
4
},
{
0
,
80
,
80
}
/* size of whole struct */
};
struct
fieldinfo
db_env_fields32
[]
=
{
{
"int (*close) (DB_ENV *, u_int32_t)"
,
248
,
4
},
{
"void (*err) (const DB_ENV *, int, const char *, ...)"
,
260
,
4
},
{
"int (*open) (DB_ENV *, const char *, u_int32_t, int)"
,
268
,
4
},
{
"int (*set_data_dir) (DB_ENV *, const char *)"
,
276
,
4
},
{
"void (*set_errcall) (DB_ENV *, void (*)(const char *, char *))"
,
292
,
4
},
{
"void (*set_errpfx) (DB_ENV *, const char *)"
,
300
,
4
},
{
"int (*set_flags) (DB_ENV *, u_int32_t, int)"
,
308
,
4
},
{
"int (*set_tmp_dir) (DB_ENV *, const char *)"
,
332
,
4
},
{
"int (*set_verbose) (DB_ENV *, u_int32_t, int)"
,
336
,
4
},
{
"int (*set_lg_bsize) (DB_ENV *, u_int32_t)"
,
344
,
4
},
{
"int (*set_lg_dir) (DB_ENV *, const char *)"
,
348
,
4
},
{
"int (*set_lg_max) (DB_ENV *, u_int32_t)"
,
352
,
4
},
{
"int (*log_archive) (DB_ENV *, char **[], u_int32_t)"
,
360
,
4
},
{
"int (*log_flush) (DB_ENV *, const DB_LSN *)"
,
372
,
4
},
{
"int (*set_lk_detect) (DB_ENV *, u_int32_t)"
,
392
,
4
},
{
"int (*set_lk_max) (DB_ENV *, u_int32_t)"
,
396
,
4
},
{
"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)"
,
460
,
4
},
{
"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)"
,
548
,
4
},
{
"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)"
,
552
,
4
},
{
"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)"
,
564
,
4
},
{
0
,
584
,
584
}
/* size of whole struct */
};
struct
fieldinfo
db_key_range_fields32
[]
=
{
{
"double less"
,
0
,
8
},
{
"double equal"
,
8
,
8
},
{
"double greater"
,
16
,
8
},
{
0
,
584
,
584
}
/* size of whole struct */
};
struct
fieldinfo
db_lsn_fields32
[]
=
{
{
0
,
8
,
8
}
/* size of whole struct */
};
struct
fieldinfo
db_fields32
[]
=
{
{
"void *app_private"
,
16
,
4
},
{
"int (*close) (DB*, u_int32_t)"
,
272
,
4
},
{
"int (*cursor) (DB *, DB_TXN *, DBC **, u_int32_t)"
,
276
,
4
},
{
"int (*del) (DB *, DB_TXN *, DBT *, u_int32_t)"
,
280
,
4
},
{
"int (*get) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
296
,
4
},
{
"int (*key_range) (DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)"
,
316
,
4
},
{
"int (*open) (DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)"
,
320
,
4
},
{
"int (*put) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
324
,
4
},
{
"int (*remove) (DB *, const char *, const char *, u_int32_t)"
,
328
,
4
},
{
"int (*rename) (DB *, const char *, const char *, const char *, u_int32_t)"
,
332
,
4
},
{
"int (*set_flags) (DB *, u_int32_t)"
,
380
,
4
},
{
"int (*stat) (DB *, void *, u_int32_t)"
,
396
,
4
},
{
"int (*set_bt_compare) (DB *, int (*)(DB *, const DBT *, const DBT *))"
,
412
,
4
},
{
0
,
484
,
484
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_active_fields32
[]
=
{
{
"u_int32_t txnid"
,
0
,
4
},
{
"DB_LSN lsn"
,
8
,
8
},
{
0
,
16
,
16
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields32
[]
=
{
{
"int (*abort) (DB_TXN *)"
,
76
,
4
},
{
"int (*commit) (DB_TXN*, u_int32_t)"
,
80
,
4
},
{
"u_int32_t (*id) (DB_TXN *)"
,
88
,
4
},
{
0
,
104
,
104
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_stat_fields32
[]
=
{
{
"u_int32_t st_nactive"
,
32
,
4
},
{
"DB_TXN_ACTIVE *st_txnarray"
,
44
,
4
},
{
0
,
60
,
60
}
/* size of whole struct */
};
struct
fieldinfo
dbc_fields32
[]
=
{
{
"int (*c_close) (DBC *)"
,
204
,
4
},
{
"int (*c_del) (DBC *, u_int32_t)"
,
212
,
4
},
{
"int (*c_get) (DBC *, DBT *, DBT *, u_int32_t)"
,
220
,
4
},
{
0
,
268
,
268
}
/* size of whole struct */
};
struct
fieldinfo
dbt_fields32
[]
=
{
{
"void*data"
,
0
,
4
},
{
"u_int32_t size"
,
4
,
4
},
{
"u_int32_t ulen"
,
8
,
4
},
{
"void*app_private"
,
20
,
4
},
{
"u_int32_t flags"
,
24
,
4
},
{
0
,
28
,
28
}
/* size of whole struct */
};
buildheader/sample_offsets_32.h
→
buildheader/sample_offsets_32
_4_3
.h
View file @
1348ca79
File moved
buildheader/sample_offsets_64.h
deleted
100644 → 0
View file @
11bf6c52
/* BDB offsets on a 64-bit machine */
#define DB_VERSION_MAJOR_64 4
#define DB_VERSION_MINOR_64 3
#define DB_VERSION_STRING_64 "Berkeley DB Compatability Header 4.3"
struct
fieldinfo
db_btree_stat_fields64
[]
=
{
{
"u_int32_t bt_nkeys"
,
12
,
4
},
{
"u_int32_t bt_ndata"
,
16
,
4
},
{
0
,
84
,
84
}
/* size of whole struct */
};
struct
fieldinfo
db_env_fields64
[]
=
{
{
"int (*close) (DB_ENV *, u_int32_t)"
,
456
,
8
},
{
"void (*err) (const DB_ENV *, int, const char *, ...)"
,
480
,
8
},
{
"int (*open) (DB_ENV *, const char *, u_int32_t, int)"
,
496
,
8
},
{
"int (*set_data_dir) (DB_ENV *, const char *)"
,
576
,
8
},
{
"void (*set_errcall) (DB_ENV *, void (*)(const char *, char *))"
,
600
,
8
},
{
"void (*set_errpfx) (DB_ENV *, const char *)"
,
632
,
8
},
{
"int (*set_flags) (DB_ENV *, u_int32_t, int)"
,
656
,
8
},
{
"int (*set_tmp_dir) (DB_ENV *, const char *)"
,
768
,
8
},
{
"int (*set_verbose) (DB_ENV *, u_int32_t, int)"
,
784
,
8
},
{
"int (*set_lg_bsize) (DB_ENV *, u_int32_t)"
,
808
,
8
},
{
"int (*set_lg_dir) (DB_ENV *, const char *)"
,
824
,
8
},
{
"int (*set_lg_max) (DB_ENV *, u_int32_t)"
,
840
,
8
},
{
"int (*log_archive) (DB_ENV *, char **[], u_int32_t)"
,
864
,
8
},
{
"int (*log_flush) (DB_ENV *, const DB_LSN *)"
,
888
,
8
},
{
"int (*set_lk_detect) (DB_ENV *, u_int32_t)"
,
952
,
8
},
{
"int (*set_lk_max) (DB_ENV *, u_int32_t)"
,
960
,
8
},
{
"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)"
,
1096
,
8
},
{
"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)"
,
1328
,
8
},
{
"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)"
,
1336
,
8
},
{
"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)"
,
1352
,
8
},
{
0
,
1400
,
1400
}
/* size of whole struct */
};
struct
fieldinfo
db_key_range_fields64
[]
=
{
{
"double less"
,
0
,
8
},
{
"double equal"
,
8
,
8
},
{
"double greater"
,
16
,
8
},
{
0
,
1400
,
1400
}
/* size of whole struct */
};
struct
fieldinfo
db_lsn_fields64
[]
=
{
{
0
,
8
,
8
}
/* size of whole struct */
};
struct
fieldinfo
db_fields64
[]
=
{
{
"void *app_private"
,
32
,
8
},
{
"int (*close) (DB*, u_int32_t)"
,
448
,
8
},
{
"int (*cursor) (DB *, DB_TXN *, DBC **, u_int32_t)"
,
456
,
8
},
{
"int (*del) (DB *, DB_TXN *, DBT *, u_int32_t)"
,
464
,
8
},
{
"int (*get) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
504
,
8
},
{
"int (*key_range) (DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)"
,
632
,
8
},
{
"int (*open) (DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)"
,
640
,
8
},
{
"int (*put) (DB *, DB_TXN *, DBT *, DBT *, u_int32_t)"
,
648
,
8
},
{
"int (*remove) (DB *, const char *, const char *, u_int32_t)"
,
656
,
8
},
{
"int (*rename) (DB *, const char *, const char *, const char *, u_int32_t)"
,
664
,
8
},
{
"int (*set_flags) (DB *, u_int32_t)"
,
752
,
8
},
{
"int (*stat) (DB *, void *, u_int32_t)"
,
808
,
8
},
{
"int (*set_bt_compare) (DB *, int (*)(DB *, const DBT *, const DBT *))"
,
856
,
8
},
{
0
,
1056
,
1056
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_active_fields64
[]
=
{
{
"u_int32_t txnid"
,
0
,
4
},
{
"DB_LSN lsn"
,
8
,
8
},
{
0
,
148
,
148
}
/* size of whole struct */
};
struct
fieldinfo
db_txn_fields64
[]
=
{
{
"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 */
};
struct
fieldinfo
db_txn_stat_fields64
[]
=
{
{
"u_int32_t st_nactive"
,
36
,
4
},
{
"DB_TXN_ACTIVE *st_txnarray"
,
48
,
8
},
{
0
,
72
,
72
}
/* size of whole struct */
};
struct
fieldinfo
dbc_fields64
[]
=
{
{
"int (*c_close) (DBC *)"
,
264
,
8
},
{
"int (*c_del) (DBC *, u_int32_t)"
,
280
,
8
},
{
"int (*c_get) (DBC *, DBT *, DBT *, u_int32_t)"
,
296
,
8
},
{
0
,
384
,
384
}
/* size of whole struct */
};
struct
fieldinfo
dbt_fields64
[]
=
{
{
"void*data"
,
0
,
8
},
{
"u_int32_t size"
,
8
,
4
},
{
"u_int32_t ulen"
,
12
,
4
},
{
"u_int32_t flags"
,
24
,
4
},
{
0
,
32
,
32
}
/* size of whole struct */
};
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