mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
Add --bdb-data-direct and --bdb-log-direct server options. (Bug #14880)
sql/ha_berkeley.cc: Export DB_DIRECT_* constants sql/ha_berkeley.h: Declare new constants sql/mysqld.cc: Add bdb-data-direct and bdb-log-direct options
This commit is contained in:
parent
3380fd1d77
commit
ac5164b8f1
3 changed files with 20 additions and 2 deletions
|
@ -74,6 +74,8 @@
|
|||
const u_int32_t bdb_DB_TXN_NOSYNC= DB_TXN_NOSYNC;
|
||||
const u_int32_t bdb_DB_RECOVER= DB_RECOVER;
|
||||
const u_int32_t bdb_DB_PRIVATE= DB_PRIVATE;
|
||||
const u_int32_t bdb_DB_DIRECT_DB= DB_DIRECT_DB;
|
||||
const u_int32_t bdb_DB_DIRECT_LOG= DB_DIRECT_LOG;
|
||||
const char *ha_berkeley_ext=".db";
|
||||
bool berkeley_shared_data=0;
|
||||
u_int32_t berkeley_init_flags= DB_PRIVATE | DB_RECOVER, berkeley_env_flags=0,
|
||||
|
|
|
@ -160,6 +160,8 @@ class ha_berkeley: public handler
|
|||
extern const u_int32_t bdb_DB_TXN_NOSYNC;
|
||||
extern const u_int32_t bdb_DB_RECOVER;
|
||||
extern const u_int32_t bdb_DB_PRIVATE;
|
||||
extern const u_int32_t bdb_DB_DIRECT_DB;
|
||||
extern const u_int32_t bdb_DB_DIRECT_LOG;
|
||||
extern bool berkeley_shared_data;
|
||||
extern u_int32_t berkeley_init_flags,berkeley_env_flags, berkeley_lock_type,
|
||||
berkeley_lock_types[];
|
||||
|
|
|
@ -390,7 +390,8 @@ extern ulong srv_commit_concurrency;
|
|||
}
|
||||
#endif
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
extern const u_int32_t bdb_DB_TXN_NOSYNC, bdb_DB_RECOVER, bdb_DB_PRIVATE;
|
||||
extern const u_int32_t bdb_DB_TXN_NOSYNC, bdb_DB_RECOVER, bdb_DB_PRIVATE,
|
||||
bdb_DB_DIRECT_DB, bdb_DB_DIRECT_LOG;
|
||||
extern bool berkeley_shared_data;
|
||||
extern u_int32_t berkeley_init_flags,berkeley_env_flags, berkeley_lock_type,
|
||||
berkeley_lock_types[];
|
||||
|
@ -4469,7 +4470,8 @@ enum options_mysqld
|
|||
OPT_BDB_HOME, OPT_BDB_LOG,
|
||||
OPT_BDB_TMP, OPT_BDB_SYNC,
|
||||
OPT_BDB_LOCK, OPT_BDB,
|
||||
OPT_BDB_NO_RECOVER, OPT_BDB_SHARED,
|
||||
OPT_BDB_NO_RECOVER, OPT_BDB_SHARED,
|
||||
OPT_BDB_DATA_DIRECT, OPT_BDB_LOG_DIRECT,
|
||||
OPT_MASTER_HOST, OPT_MASTER_USER,
|
||||
OPT_MASTER_PASSWORD, OPT_MASTER_PORT,
|
||||
OPT_MASTER_INFO_FILE, OPT_MASTER_CONNECT_RETRY,
|
||||
|
@ -4673,6 +4675,9 @@ Disable with --skip-bdb (will save memory).",
|
|||
(gptr*) &opt_bdb, (gptr*) &opt_bdb, 0, GET_BOOL, NO_ARG, OPT_BDB_DEFAULT, 0, 0,
|
||||
0, 0, 0},
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
{"bdb-data-direct", OPT_BDB_DATA_DIRECT,
|
||||
"Turn off system buffering of BDB database files to avoid double caching.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bdb-home", OPT_BDB_HOME, "Berkeley home directory.", (gptr*) &berkeley_home,
|
||||
(gptr*) &berkeley_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bdb-lock-detect", OPT_BDB_LOCK,
|
||||
|
@ -4681,6 +4686,9 @@ Disable with --skip-bdb (will save memory).",
|
|||
{"bdb-logdir", OPT_BDB_LOG, "Berkeley DB log file directory.",
|
||||
(gptr*) &berkeley_logdir, (gptr*) &berkeley_logdir, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bdb-log-direct", OPT_BDB_LOG_DIRECT,
|
||||
"Turn off system buffering of BDB log files to avoid double caching.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bdb-no-recover", OPT_BDB_NO_RECOVER,
|
||||
"Don't try to recover Berkeley DB tables on start.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
|
@ -6837,6 +6845,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
else
|
||||
berkeley_env_flags&= ~bdb_DB_TXN_NOSYNC;
|
||||
break;
|
||||
case OPT_BDB_LOG_DIRECT:
|
||||
berkeley_env_flags|= bdb_DB_DIRECT_DB;
|
||||
break;
|
||||
case OPT_BDB_DATA_DIRECT:
|
||||
berkeley_env_flags|= bdb_DB_DIRECT_LOG;
|
||||
break;
|
||||
case OPT_BDB_NO_RECOVER:
|
||||
berkeley_init_flags&= ~(bdb_DB_RECOVER);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue