mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
This is the second patch for bdb removeal. This takes care of all options and variables that rely on bdb.
BitKeeper/deleted/.del-ha_berkeley.cc: Delete: sql/ha_berkeley.cc BitKeeper/deleted/.del-ha_berkeley.h: Delete: sql/ha_berkeley.h mysql-test/install_test_db.sh: Removed skip option mysql-test/mysql-test-run.pl: Remove bdb option mysql-test/mysql-test-run.sh: Remove bdb option sql/Makefile.am: Remove bdb option sql/handler.cc: Remove references to bdb sql/lex.h: Removed lex for bdb sql/mysql_priv.h: Removed bdb privs sql/mysqld.cc: Removed all options for bdb sql/set_var.cc: Removed variables for bdb sql/sql_yacc.yy: Removed yacc for bdb
This commit is contained in:
@ -80,7 +80,7 @@ basedir=.
|
||||
EXTRA_ARG="--language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/"
|
||||
fi
|
||||
|
||||
mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb --skip-ndbcluster --skip-bdb --tmpdir=. $EXTRA_ARG"
|
||||
mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb --skip-ndbcluster --tmpdir=. $EXTRA_ARG"
|
||||
echo "running $mysqld_boot"
|
||||
|
||||
if $scriptdir/mysql_create_system_tables test $mdata $hostname | $mysqld_boot
|
||||
|
@ -2108,7 +2108,6 @@ sub install_db ($$) {
|
||||
mtr_add_arg($args, "--datadir=%s", $data_dir);
|
||||
mtr_add_arg($args, "--skip-innodb");
|
||||
mtr_add_arg($args, "--skip-ndbcluster");
|
||||
mtr_add_arg($args, "--skip-bdb");
|
||||
mtr_add_arg($args, "--tmpdir=.");
|
||||
|
||||
if ( ! $opt_netware )
|
||||
@ -2201,7 +2200,6 @@ basedir = $path_my_basedir
|
||||
server_id = $server_id
|
||||
skip-stack-trace
|
||||
skip-innodb
|
||||
skip-bdb
|
||||
skip-ndbcluster
|
||||
EOF
|
||||
;
|
||||
@ -2615,7 +2613,6 @@ sub mysqld_arguments ($$$$$) {
|
||||
if ( $opt_valgrind_mysqld )
|
||||
{
|
||||
mtr_add_arg($args, "%s--skip-safemalloc", $prefix);
|
||||
mtr_add_arg($args, "%s--skip-bdb", $prefix);
|
||||
}
|
||||
|
||||
my $pidfile;
|
||||
|
@ -536,8 +536,8 @@ while test $# -gt 0; do
|
||||
--valgrind | --valgrind-all)
|
||||
find_valgrind;
|
||||
VALGRIND=$FIND_VALGRIND
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
|
||||
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc"
|
||||
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc"
|
||||
SLEEP_TIME_AFTER_RESTART=10
|
||||
SLEEP_TIME_FOR_DELETE=60
|
||||
USE_RUNNING_SERVER=0
|
||||
|
@ -50,7 +50,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
|
||||
sql_manager.h sql_map.h sql_string.h unireg.h \
|
||||
sql_error.h field.h handler.h mysqld_suffix.h \
|
||||
ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
|
||||
ha_innodb.h ha_berkeley.h ha_federated.h \
|
||||
ha_innodb.h ha_federated.h \
|
||||
ha_ndbcluster.h ha_ndbcluster_binlog.h \
|
||||
ha_ndbcluster_tables.h \
|
||||
opt_range.h protocol.h rpl_tblmap.h \
|
||||
@ -88,7 +88,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
|
||||
discover.cc time.cc opt_range.cc opt_sum.cc \
|
||||
records.cc filesort.cc handler.cc \
|
||||
ha_heap.cc ha_myisam.cc ha_myisammrg.cc \
|
||||
ha_partition.cc ha_innodb.cc ha_berkeley.cc \
|
||||
ha_partition.cc ha_innodb.cc \
|
||||
ha_federated.cc \
|
||||
ha_ndbcluster.cc ha_ndbcluster_binlog.cc \
|
||||
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \
|
||||
@ -161,9 +161,6 @@ lex_hash.h: gen_lex_hash$(EXEEXT)
|
||||
./gen_lex_hash$(EXEEXT) > $@
|
||||
|
||||
# the following three should eventually be moved out of this directory
|
||||
ha_berkeley.o: ha_berkeley.cc ha_berkeley.h
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
|
2754
sql/ha_berkeley.cc
2754
sql/ha_berkeley.cc
File diff suppressed because it is too large
Load Diff
@ -1,180 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
#ifdef USE_PRAGMA_INTERFACE
|
||||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
/* class for the the myisam handler */
|
||||
|
||||
#include <db.h>
|
||||
|
||||
#define BDB_HIDDEN_PRIMARY_KEY_LENGTH 5
|
||||
|
||||
typedef struct st_berkeley_share {
|
||||
ulonglong auto_ident;
|
||||
ha_rows rows, org_rows;
|
||||
ulong *rec_per_key;
|
||||
THR_LOCK lock;
|
||||
pthread_mutex_t mutex;
|
||||
char *table_name;
|
||||
DB *status_block, *file, **key_file;
|
||||
u_int32_t *key_type;
|
||||
uint table_name_length,use_count;
|
||||
uint status,version;
|
||||
uint ref_length;
|
||||
bool fixed_length_primary_key, fixed_length_row;
|
||||
} BDB_SHARE;
|
||||
|
||||
|
||||
class ha_berkeley: public handler
|
||||
{
|
||||
THR_LOCK_DATA lock;
|
||||
DBT last_key,current_row;
|
||||
gptr alloc_ptr;
|
||||
byte *rec_buff;
|
||||
char *key_buff, *key_buff2, *primary_key_buff;
|
||||
DB *file, **key_file;
|
||||
DB_TXN *transaction;
|
||||
u_int32_t *key_type;
|
||||
DBC *cursor;
|
||||
BDB_SHARE *share;
|
||||
ulong int_table_flags;
|
||||
ulong alloced_rec_buff_length;
|
||||
ulong changed_rows;
|
||||
uint primary_key,last_dup_key, hidden_primary_key, version;
|
||||
bool key_read, using_ignore;
|
||||
bool fix_rec_buff_for_blob(ulong length);
|
||||
byte current_ident[BDB_HIDDEN_PRIMARY_KEY_LENGTH];
|
||||
|
||||
ulong max_row_length(const byte *buf);
|
||||
int pack_row(DBT *row,const byte *record, bool new_row);
|
||||
void unpack_row(char *record, DBT *row);
|
||||
void unpack_key(char *record, DBT *key, uint index);
|
||||
DBT *create_key(DBT *key, uint keynr, char *buff, const byte *record,
|
||||
int key_length = MAX_KEY_LENGTH);
|
||||
DBT *pack_key(DBT *key, uint keynr, char *buff, const byte *key_ptr,
|
||||
uint key_length);
|
||||
int remove_key(DB_TXN *trans, uint keynr, const byte *record, DBT *prim_key);
|
||||
int remove_keys(DB_TXN *trans,const byte *record, DBT *new_record,
|
||||
DBT *prim_key, key_map *keys);
|
||||
int restore_keys(DB_TXN *trans, key_map *changed_keys, uint primary_key,
|
||||
const byte *old_row, DBT *old_key,
|
||||
const byte *new_row, DBT *new_key);
|
||||
int key_cmp(uint keynr, const byte * old_row, const byte * new_row);
|
||||
int update_primary_key(DB_TXN *trans, bool primary_key_changed,
|
||||
const byte * old_row, DBT *old_key,
|
||||
const byte * new_row, DBT *prim_key,
|
||||
bool local_using_ignore);
|
||||
int read_row(int error, char *buf, uint keynr, DBT *row, DBT *key, bool);
|
||||
DBT *get_pos(DBT *to, byte *pos);
|
||||
|
||||
public:
|
||||
ha_berkeley(TABLE_SHARE *table_arg);
|
||||
~ha_berkeley() {}
|
||||
const char *table_type() const { return "BerkeleyDB"; }
|
||||
ulong index_flags(uint idx, uint part, bool all_parts) const;
|
||||
const char *index_type(uint key_number) { return "BTREE"; }
|
||||
const char **bas_ext() const;
|
||||
ulonglong table_flags(void) const { return int_table_flags; }
|
||||
uint max_supported_keys() const { return MAX_KEY-1; }
|
||||
uint extra_rec_buf_length() const { return BDB_HIDDEN_PRIMARY_KEY_LENGTH; }
|
||||
ha_rows estimate_rows_upper_bound();
|
||||
uint max_supported_key_length() const { return UINT_MAX32; }
|
||||
uint max_supported_key_part_length() const { return UINT_MAX32; }
|
||||
|
||||
const key_map *keys_to_use_for_scanning() { return &key_map_full; }
|
||||
|
||||
int open(const char *name, int mode, uint test_if_locked);
|
||||
int close(void);
|
||||
double scan_time();
|
||||
int write_row(byte * buf);
|
||||
int update_row(const byte * old_data, byte * new_data);
|
||||
int delete_row(const byte * buf);
|
||||
int index_init(uint index, bool sorted);
|
||||
int index_end();
|
||||
int index_read(byte * buf, const byte * key,
|
||||
uint key_len, enum ha_rkey_function find_flag);
|
||||
int index_read_idx(byte * buf, uint index, const byte * key,
|
||||
uint key_len, enum ha_rkey_function find_flag);
|
||||
int index_read_last(byte * buf, const byte * key, uint key_len);
|
||||
int index_next(byte * buf);
|
||||
int index_next_same(byte * buf, const byte *key, uint keylen);
|
||||
int index_prev(byte * buf);
|
||||
int index_first(byte * buf);
|
||||
int index_last(byte * buf);
|
||||
int rnd_init(bool scan);
|
||||
int rnd_end();
|
||||
int rnd_next(byte *buf);
|
||||
int rnd_pos(byte * buf, byte *pos);
|
||||
void position(const byte *record);
|
||||
void info(uint);
|
||||
int extra(enum ha_extra_function operation);
|
||||
int reset(void);
|
||||
int external_lock(THD *thd, int lock_type);
|
||||
int start_stmt(THD *thd, thr_lock_type lock_type);
|
||||
void position(byte *record);
|
||||
int analyze(THD* thd,HA_CHECK_OPT* check_opt);
|
||||
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
int check(THD* thd, HA_CHECK_OPT* check_opt);
|
||||
|
||||
ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
|
||||
int create(const char *name, register TABLE *form,
|
||||
HA_CREATE_INFO *create_info);
|
||||
int delete_table(const char *name);
|
||||
int rename_table(const char* from, const char* to);
|
||||
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
||||
enum thr_lock_type lock_type);
|
||||
|
||||
void get_status();
|
||||
inline void get_auto_primary_key(byte *to)
|
||||
{
|
||||
pthread_mutex_lock(&share->mutex);
|
||||
share->auto_ident++;
|
||||
int5store(to,share->auto_ident);
|
||||
pthread_mutex_unlock(&share->mutex);
|
||||
}
|
||||
virtual void get_auto_increment(ulonglong offset, ulonglong increment,
|
||||
ulonglong nb_desired_values,
|
||||
ulonglong *first_value,
|
||||
ulonglong *nb_reserved_values);
|
||||
void print_error(int error, myf errflag);
|
||||
uint8 table_cache_type() { return HA_CACHE_TBL_TRANSACT; }
|
||||
bool primary_key_is_clustered() { return true; }
|
||||
int cmp_ref(const byte *ref1, const byte *ref2);
|
||||
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
|
||||
};
|
||||
|
||||
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[];
|
||||
extern ulong berkeley_max_lock, berkeley_log_buffer_size;
|
||||
extern ulonglong berkeley_cache_size;
|
||||
extern ulong berkeley_region_size, berkeley_cache_parts;
|
||||
extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
|
||||
extern long berkeley_lock_scan_time;
|
||||
extern TYPELIB berkeley_lock_typelib;
|
||||
|
||||
int berkeley_init(void);
|
||||
int berkeley_end(ha_panic_function type);
|
||||
bool berkeley_flush_logs(void);
|
||||
bool berkeley_show_status(THD *thd, stat_print_fn *print, enum ha_stat_type);
|
@ -74,7 +74,6 @@ static const LEX_STRING sys_table_aliases[]=
|
||||
{
|
||||
{(char*)STRING_WITH_LEN("INNOBASE")}, {(char*)STRING_WITH_LEN("INNODB")},
|
||||
{(char*)STRING_WITH_LEN("NDB")}, {(char*)STRING_WITH_LEN("NDBCLUSTER")},
|
||||
{(char*)STRING_WITH_LEN("BDB")}, {(char*)STRING_WITH_LEN("BERKELEYDB")},
|
||||
{(char*)STRING_WITH_LEN("HEAP")}, {(char*)STRING_WITH_LEN("MEMORY")},
|
||||
{(char*)STRING_WITH_LEN("MERGE")}, {(char*)STRING_WITH_LEN("MRG_MYISAM")},
|
||||
{NullS, 0}
|
||||
@ -1480,7 +1479,7 @@ int handler::ha_open(TABLE *table_arg, const char *name, int mode,
|
||||
|
||||
/*
|
||||
Read first row (only) from a table
|
||||
This is never called for InnoDB or BDB tables, as these table types
|
||||
This is never called for InnoDB tables, as these table types
|
||||
has the HA_STATS_RECORDS_IS_EXACT set.
|
||||
*/
|
||||
|
||||
|
@ -82,10 +82,8 @@ static SYMBOL symbols[] = {
|
||||
{ "AVG", SYM(AVG_SYM)},
|
||||
{ "AVG_ROW_LENGTH", SYM(AVG_ROW_LENGTH)},
|
||||
{ "BACKUP", SYM(BACKUP_SYM)},
|
||||
{ "BDB", SYM(BERKELEY_DB_SYM)},
|
||||
{ "BEFORE", SYM(BEFORE_SYM)},
|
||||
{ "BEGIN", SYM(BEGIN_SYM)},
|
||||
{ "BERKELEYDB", SYM(BERKELEY_DB_SYM)},
|
||||
{ "BETWEEN", SYM(BETWEEN_SYM)},
|
||||
{ "BIGINT", SYM(BIGINT)},
|
||||
{ "BINARY", SYM(BINARY)},
|
||||
|
@ -1620,12 +1620,6 @@ extern handlerton innobase_hton;
|
||||
#else
|
||||
extern SHOW_COMP_OPTION have_innodb;
|
||||
#endif
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
extern handlerton berkeley_hton;
|
||||
#define have_berkeley_db berkeley_hton.state
|
||||
#else
|
||||
extern SHOW_COMP_OPTION have_berkeley_db;
|
||||
#endif
|
||||
#ifdef WITH_EXAMPLE_STORAGE_ENGINE
|
||||
extern handlerton example_hton;
|
||||
#define have_example_db example_hton.state
|
||||
|
157
sql/mysqld.cc
157
sql/mysqld.cc
@ -310,7 +310,7 @@ static bool lower_case_table_names_used= 0;
|
||||
static bool volatile select_thread_in_use, signal_thread_in_use;
|
||||
static bool volatile ready_to_exit;
|
||||
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
|
||||
static my_bool opt_bdb, opt_isam, opt_ndbcluster, opt_merge;
|
||||
static my_bool opt_isam, opt_ndbcluster, opt_merge;
|
||||
static my_bool opt_short_log_format= 0;
|
||||
static uint kill_cached_threads, wake_thread;
|
||||
static ulong killed_threads, thread_created;
|
||||
@ -332,10 +332,6 @@ static I_List<THD> thread_cache;
|
||||
|
||||
static pthread_cond_t COND_thread_cache, COND_flush_thread_cache;
|
||||
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
static my_bool opt_sync_bdb_logs;
|
||||
#endif
|
||||
|
||||
/* Global variables */
|
||||
|
||||
bool opt_update_log, opt_bin_log;
|
||||
@ -405,22 +401,6 @@ extern ulong srv_commit_concurrency;
|
||||
extern ulong srv_flush_log_at_trx_commit;
|
||||
}
|
||||
#endif
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
#ifndef HAVE_U_INT32_T
|
||||
typedef unsigned int u_int32_t;
|
||||
#endif
|
||||
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[];
|
||||
extern ulong berkeley_max_lock, berkeley_log_buffer_size;
|
||||
extern ulonglong berkeley_cache_size;
|
||||
extern ulong berkeley_region_size, berkeley_cache_parts;
|
||||
extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
|
||||
extern long berkeley_lock_scan_time;
|
||||
extern TYPELIB berkeley_lock_typelib;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
const char *opt_ndbcluster_connectstring= 0;
|
||||
@ -3337,11 +3317,7 @@ server.");
|
||||
|
||||
static void create_maintenance_thread()
|
||||
{
|
||||
if (
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
(have_berkeley_db == SHOW_OPTION_YES) ||
|
||||
#endif
|
||||
(flush_time && flush_time != ~(ulong) 0L))
|
||||
if (flush_time && flush_time != ~(ulong) 0L)
|
||||
{
|
||||
pthread_t hThread;
|
||||
if (pthread_create(&hThread,&connection_attrib,handle_manager,0))
|
||||
@ -4883,38 +4859,6 @@ struct my_option my_long_options[] =
|
||||
"Path to installation directory. All paths are usually resolved relative to this.",
|
||||
(gptr*) &mysql_home_ptr, (gptr*) &mysql_home_ptr, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"bdb", OPT_BDB, "Enable Berkeley DB (if this version of MySQL supports it). \
|
||||
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,
|
||||
"Berkeley lock detect (DEFAULT, OLDEST, RANDOM or YOUNGEST, # sec).",
|
||||
0, 0, 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-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-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},
|
||||
{"bdb-no-sync", OPT_BDB_NOSYNC,
|
||||
"This option is deprecated, use --skip-sync-bdb-logs instead",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bdb-shared-data", OPT_BDB_SHARED,
|
||||
"Start Berkeley DB in multi-process mode.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
|
||||
0, 0, 0, 0, 0},
|
||||
{"bdb-tmpdir", OPT_BDB_TMP, "Berkeley DB tempfile name.",
|
||||
(gptr*) &berkeley_tmpdir, (gptr*) &berkeley_tmpdir, 0, GET_STR,
|
||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif /* WITH_BERKELEY_STORAGE_ENGINE */
|
||||
{"big-tables", OPT_BIG_TABLES,
|
||||
"Allow big result sets by saving all temporary sets on file (Solves most 'table full' errors).",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -5729,31 +5673,6 @@ log and this option does nothing anymore.",
|
||||
"The number of outstanding connection requests MySQL can have. This comes into play when the main MySQL thread gets very many connection requests in a very short time.",
|
||||
(gptr*) &back_log, (gptr*) &back_log, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 50, 1, 65535, 0, 1, 0 },
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
{ "bdb_cache_parts", OPT_BDB_CACHE_PARTS,
|
||||
"Number of parts to use for BDB cache.",
|
||||
(gptr*) &berkeley_cache_parts, (gptr*) &berkeley_cache_parts, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 1, 1, 1024, 0, 1, 0},
|
||||
{ "bdb_cache_size", OPT_BDB_CACHE_SIZE,
|
||||
"The buffer that is allocated to cache index and rows for BDB tables.",
|
||||
(gptr*) &berkeley_cache_size, (gptr*) &berkeley_cache_size, 0, GET_ULL,
|
||||
REQUIRED_ARG, KEY_CACHE_SIZE, 20*1024, (ulonglong) ~0, 0, IO_SIZE, 0},
|
||||
{"bdb_lock_max", OPT_BDB_MAX_LOCK, "Synonym for bdb_max_lock.",
|
||||
(gptr*) &berkeley_max_lock, (gptr*) &berkeley_max_lock, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 10000, 0, (long) ~0, 0, 1, 0},
|
||||
{"bdb_log_buffer_size", OPT_BDB_LOG_BUFFER_SIZE,
|
||||
"The buffer that is allocated to cache index and rows for BDB tables.",
|
||||
(gptr*) &berkeley_log_buffer_size, (gptr*) &berkeley_log_buffer_size, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 0, 256*1024L, ~0L, 0, 1024, 0},
|
||||
{"bdb_max_lock", OPT_BDB_MAX_LOCK,
|
||||
"The maximum number of locks you can have active on a BDB table.",
|
||||
(gptr*) &berkeley_max_lock, (gptr*) &berkeley_max_lock, 0, GET_ULONG,
|
||||
REQUIRED_ARG, 10000, 0, (long) ~0, 0, 1, 0},
|
||||
{"bdb_region_size", OPT_BDB_REGION_SIZE,
|
||||
"The size of the underlying logging area of the Berkeley DB environment.",
|
||||
(gptr*) &berkeley_region_size, (gptr*) &berkeley_region_size, 0, GET_ULONG,
|
||||
OPT_ARG, 60*1024L, 60*1024L, (long) ~0, 0, 1, 0},
|
||||
#endif /* WITH_BERKELEY_STORAGE_ENGINE */
|
||||
{"binlog_cache_size", OPT_BINLOG_CACHE_SIZE,
|
||||
"The size of the cache to hold the SQL statements for the binary log during a transaction. If you often use big, multi-statement transactions you can increase this to get more performance.",
|
||||
(gptr*) &binlog_cache_size, (gptr*) &binlog_cache_size, 0, GET_ULONG,
|
||||
@ -6245,12 +6164,6 @@ The minimum value for this variable is 4096.",
|
||||
(gptr*) &max_system_variables.sortbuff_size, 0, GET_ULONG, REQUIRED_ARG,
|
||||
MAX_SORT_MEMORY, MIN_SORT_MEMORY+MALLOC_OVERHEAD*2, ~0L, MALLOC_OVERHEAD,
|
||||
1, 0},
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
{"sync-bdb-logs", OPT_BDB_SYNC,
|
||||
"Synchronously flush Berkeley DB logs. Enabled by default",
|
||||
(gptr*) &opt_sync_bdb_logs, (gptr*) &opt_sync_bdb_logs, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
#endif /* WITH_BERKELEY_STORAGE_ENGINE */
|
||||
{"sync-binlog", OPT_SYNC_BINLOG,
|
||||
"Synchronously flush binary log to disk after every #th event. "
|
||||
"Use 0 (default) to disable synchronous flushing.",
|
||||
@ -7565,59 +7478,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
have_merge_db= SHOW_OPTION_YES;
|
||||
else
|
||||
have_merge_db= SHOW_OPTION_DISABLED;
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
case OPT_BDB_NOSYNC:
|
||||
/* Deprecated option */
|
||||
opt_sync_bdb_logs= 0;
|
||||
/* Fall through */
|
||||
case OPT_BDB_SYNC:
|
||||
if (!opt_sync_bdb_logs)
|
||||
berkeley_env_flags|= bdb_DB_TXN_NOSYNC;
|
||||
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;
|
||||
case OPT_BDB_LOCK:
|
||||
{
|
||||
int type;
|
||||
if ((type=find_type(argument, &berkeley_lock_typelib, 2)) > 0)
|
||||
berkeley_lock_type=berkeley_lock_types[type-1];
|
||||
else
|
||||
{
|
||||
int err;
|
||||
char *end;
|
||||
uint length= strlen(argument);
|
||||
long value= my_strntol(&my_charset_latin1, argument, length, 10, &end, &err);
|
||||
if (end == argument+length)
|
||||
berkeley_lock_scan_time= value;
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"Unknown lock type: %s\n",argument);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OPT_BDB_SHARED:
|
||||
berkeley_init_flags&= ~(bdb_DB_PRIVATE);
|
||||
berkeley_shared_data= 1;
|
||||
break;
|
||||
#endif /* WITH_BERKELEY_STORAGE_ENGINE */
|
||||
case OPT_BDB:
|
||||
#ifdef WITH_BERKELEY_STORAGE_ENGINE
|
||||
if (opt_bdb)
|
||||
have_berkeley_db= SHOW_OPTION_YES;
|
||||
else
|
||||
have_berkeley_db= SHOW_OPTION_DISABLED;
|
||||
#endif
|
||||
break;
|
||||
case OPT_NDBCLUSTER:
|
||||
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
|
||||
@ -7850,10 +7711,6 @@ static void get_options(int argc,char **argv)
|
||||
#ifndef WITH_ISAM_STORAGE_ENGINE
|
||||
if (opt_isam)
|
||||
sql_print_warning("this binary does not contain ISAM storage engine");
|
||||
#endif
|
||||
#ifndef WITH_BERKELEY_STORAGE_ENGINE
|
||||
if (opt_bdb)
|
||||
sql_print_warning("this binary does not contain BDB storage engine");
|
||||
#endif
|
||||
if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes) &&
|
||||
!opt_slow_log)
|
||||
@ -8197,7 +8054,6 @@ void refresh_status(THD *thd)
|
||||
/*****************************************************************************
|
||||
Instantiate have_xyx for missing storage engines
|
||||
*****************************************************************************/
|
||||
#undef have_berkeley_db
|
||||
#undef have_innodb
|
||||
#undef have_ndbcluster
|
||||
#undef have_example_db
|
||||
@ -8207,7 +8063,6 @@ void refresh_status(THD *thd)
|
||||
#undef have_partition_db
|
||||
#undef have_blackhole_db
|
||||
|
||||
SHOW_COMP_OPTION have_berkeley_db= SHOW_OPTION_NO;
|
||||
SHOW_COMP_OPTION have_innodb= SHOW_OPTION_NO;
|
||||
SHOW_COMP_OPTION have_ndbcluster= SHOW_OPTION_NO;
|
||||
SHOW_COMP_OPTION have_example_db= SHOW_OPTION_NO;
|
||||
@ -8217,14 +8072,6 @@ SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
|
||||
SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
|
||||
SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
|
||||
|
||||
#ifndef WITH_BERKELEY_STORAGE_ENGINE
|
||||
bool berkeley_shared_data;
|
||||
ulong berkeley_max_lock, berkeley_log_buffer_size;
|
||||
ulonglong berkeley_cache_size;
|
||||
ulong berkeley_region_size, berkeley_cache_parts;
|
||||
char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
|
||||
#endif
|
||||
|
||||
#ifndef WITH_INNOBASE_STORAGE_ENGINE
|
||||
uint innobase_flush_log_at_trx_commit;
|
||||
ulong innobase_fast_shutdown;
|
||||
|
@ -59,13 +59,6 @@
|
||||
|
||||
#include "event_scheduler.h"
|
||||
|
||||
/* WITH_BERKELEY_STORAGE_ENGINE */
|
||||
extern bool berkeley_shared_data;
|
||||
extern ulong berkeley_max_lock, berkeley_log_buffer_size;
|
||||
extern ulonglong berkeley_cache_size;
|
||||
extern ulong berkeley_region_size, berkeley_cache_parts;
|
||||
extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
|
||||
|
||||
/* WITH_INNOBASE_STORAGE_ENGINE */
|
||||
extern uint innobase_flush_log_at_trx_commit;
|
||||
extern ulong innobase_fast_shutdown;
|
||||
@ -668,7 +661,6 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
|
||||
/* Read only variables */
|
||||
|
||||
sys_var_have_variable sys_have_archive_db("have_archive", &have_archive_db);
|
||||
sys_var_have_variable sys_have_berkeley_db("have_bdb", &have_berkeley_db);
|
||||
sys_var_have_variable sys_have_blackhole_db("have_blackhole_engine",
|
||||
&have_blackhole_db);
|
||||
sys_var_have_variable sys_have_compress("have_compress", &have_compress);
|
||||
@ -759,15 +751,6 @@ SHOW_VAR init_vars[]= {
|
||||
{sys_automatic_sp_privileges.name,(char*) &sys_automatic_sp_privileges, SHOW_SYS},
|
||||
{"back_log", (char*) &back_log, SHOW_LONG},
|
||||
{sys_basedir.name, (char*) &sys_basedir, SHOW_SYS},
|
||||
{"bdb_cache_parts", (char*) &berkeley_cache_parts, SHOW_LONG},
|
||||
{"bdb_cache_size", (char*) &berkeley_cache_size, SHOW_LONGLONG},
|
||||
{"bdb_home", (char*) &berkeley_home, SHOW_CHAR_PTR},
|
||||
{"bdb_log_buffer_size", (char*) &berkeley_log_buffer_size, SHOW_LONG},
|
||||
{"bdb_logdir", (char*) &berkeley_logdir, SHOW_CHAR_PTR},
|
||||
{"bdb_max_lock", (char*) &berkeley_max_lock, SHOW_LONG},
|
||||
{"bdb_region_size", (char*) &berkeley_region_size, SHOW_LONG},
|
||||
{"bdb_shared_data", (char*) &berkeley_shared_data, SHOW_BOOL},
|
||||
{"bdb_tmpdir", (char*) &berkeley_tmpdir, SHOW_CHAR_PTR},
|
||||
{sys_binlog_cache_size.name,(char*) &sys_binlog_cache_size, SHOW_SYS},
|
||||
{sys_binlog_format.name, (char*) &sys_binlog_format, SHOW_SYS},
|
||||
{sys_bulk_insert_buff_size.name,(char*) &sys_bulk_insert_buff_size,SHOW_SYS},
|
||||
@ -812,7 +795,6 @@ SHOW_VAR init_vars[]= {
|
||||
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
|
||||
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
|
||||
{sys_have_archive_db.name, (char*) &have_archive_db, SHOW_HAVE},
|
||||
{sys_have_berkeley_db.name, (char*) &have_berkeley_db, SHOW_HAVE},
|
||||
{sys_have_blackhole_db.name,(char*) &have_blackhole_db, SHOW_HAVE},
|
||||
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
|
||||
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
|
||||
|
@ -146,7 +146,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||
%token BEFORE_SYM
|
||||
%token BEGIN_SYM
|
||||
%token BENCHMARK_SYM
|
||||
%token BERKELEY_DB_SYM
|
||||
%token BIGINT
|
||||
%token BINARY
|
||||
%token BINLOG_SYM
|
||||
@ -8328,30 +8327,6 @@ show_param:
|
||||
if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS))
|
||||
YYABORT;
|
||||
}
|
||||
| BERKELEY_DB_SYM LOGS_SYM
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS;
|
||||
if (!(lex->create_info.db_type=
|
||||
ha_resolve_by_legacy_type(YYTHD, DB_TYPE_BERKELEY_DB)))
|
||||
{
|
||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "BerkeleyDB");
|
||||
YYABORT;
|
||||
}
|
||||
WARN_DEPRECATED(yythd, "5.2", "SHOW BDB LOGS", "'SHOW ENGINE BDB LOGS'");
|
||||
}
|
||||
| LOGS_SYM
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS;
|
||||
if (!(lex->create_info.db_type=
|
||||
ha_resolve_by_legacy_type(YYTHD, DB_TYPE_BERKELEY_DB)))
|
||||
{
|
||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "BerkeleyDB");
|
||||
YYABORT;
|
||||
}
|
||||
WARN_DEPRECATED(yythd, "5.2", "SHOW LOGS", "'SHOW ENGINE BDB LOGS'");
|
||||
}
|
||||
| GRANTS
|
||||
{
|
||||
LEX *lex=Lex;
|
||||
@ -9382,7 +9357,6 @@ keyword_sp:
|
||||
| AUTOEXTEND_SIZE_SYM {}
|
||||
| AVG_ROW_LENGTH {}
|
||||
| AVG_SYM {}
|
||||
| BERKELEY_DB_SYM {}
|
||||
| BINLOG_SYM {}
|
||||
| BIT_SYM {}
|
||||
| BOOL_SYM {}
|
||||
|
Reference in New Issue
Block a user