diff options
author | unknown <monty@donna.mysql.com> | 2000-12-07 14:08:48 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-12-07 14:08:48 +0200 |
commit | 29907fc5a4e0982e4bd287355bf79ab6e429795a (patch) | |
tree | 8a5c9d678d477bb2c3fa95057c9299dcf9560aab /sql/ha_berkeley.h | |
parent | e5c585861e6bf411fd64a18d3a08dbacf039d21a (diff) | |
download | mariadb-git-29907fc5a4e0982e4bd287355bf79ab6e429795a.tar.gz |
Only write full transactions to binary log
A lot of new functions for BDB tables
Fix for DROP DATABASE on windows
Default server_id variables
Docs/manual.texi:
Update of BDB info + Changes
configure.in:
Added test of readlink
include/mysqld_error.h:
Added new error message
sql/ha_berkeley.cc:
Added storing of status, CHECK, ANALYZE and OPTIMIZE TABLE
sql/ha_berkeley.h:
Added storing of status, CHECK, ANALYZE and OPTIMIZE TABLE
sql/handler.cc:
Only write full transactions to binary log
sql/hostname.cc:
cleanup
sql/log.cc:
Only write full transactions to binary log
sql/log_event.h:
Only write full transactions to binary log
sql/mf_iocache.cc:
Changes to be able to use IO_CACHE to save statements in a transaction
sql/mysql_priv.h:
New variables
sql/mysqld.cc:
Only write full transactions to binary log
Added default values for server_id
Lots of new bdb options
sql/share/czech/errmsg.sys:
Added new error message
sql/share/czech/errmsg.txt:
Added new error message
sql/share/danish/errmsg.sys:
Added new error message
sql/share/danish/errmsg.txt:
Added new error message
sql/share/dutch/errmsg.sys:
Added new error message
sql/share/dutch/errmsg.txt:
Added new error message
sql/share/english/errmsg.sys:
Added new error message
sql/share/english/errmsg.txt:
Added new error message
sql/share/estonian/errmsg.sys:
Added new error message
sql/share/estonian/errmsg.txt:
Added new error message
sql/share/french/errmsg.sys:
Added new error message
sql/share/french/errmsg.txt:
Added new error message
sql/share/german/errmsg.sys:
Added new error message
sql/share/german/errmsg.txt:
Added new error message
sql/share/greek/errmsg.sys:
Added new error message
sql/share/greek/errmsg.txt:
Added new error message
sql/share/hungarian/errmsg.sys:
Added new error message
sql/share/hungarian/errmsg.txt:
Added new error message
sql/share/italian/errmsg.sys:
Added new error message
sql/share/italian/errmsg.txt:
Added new error message
sql/share/japanese/errmsg.sys:
Added new error message
sql/share/japanese/errmsg.txt:
Added new error message
sql/share/korean/errmsg.sys:
Added new error message
sql/share/korean/errmsg.txt:
Added new error message
sql/share/norwegian-ny/errmsg.txt:
Added new error message
sql/share/norwegian/errmsg.txt:
Added new error message
sql/share/polish/errmsg.sys:
Added new error message
sql/share/polish/errmsg.txt:
Added new error message
sql/share/portuguese/errmsg.sys:
Added new error message
sql/share/portuguese/errmsg.txt:
Added new error message
sql/share/romanian/errmsg.txt:
Added new error message
sql/share/russian/errmsg.sys:
Added new error message
sql/share/russian/errmsg.txt:
Added new error message
sql/share/slovak/errmsg.sys:
Added new error message
sql/share/slovak/errmsg.txt:
Added new error message
sql/share/spanish/errmsg.sys:
Added new error message
sql/share/spanish/errmsg.txt:
Added new error message
sql/share/swedish/errmsg.OLD:
Added new error message
sql/share/swedish/errmsg.sys:
Added new error message
sql/share/swedish/errmsg.txt:
Added new error message
sql/sql_base.cc:
cleanup
sql/sql_class.cc:
Only write full transactions to binary log
sql/sql_class.h:
Added error handling of failed writes to logs
sql/sql_db.cc:
Fix for DROP DATABASE on windows
sql/sql_delete.cc:
Only write full transactions to binary log
sql/sql_insert.cc:
Only write full transactions to binary log
sql/sql_load.cc:
Only write full transactions to binary log
sql/sql_parse.cc:
End transaction at DROP, RENAME, CREATE and TRUNCATE
sql/sql_table.cc:
Fixes for ALTER TABLE on BDB tables for windows
sql/sql_update.cc:
Only write full transactions to binary log
sql/sql_yacc.yy:
AGAINST is not anymore a reserved word
support-files/my-huge.cnf.sh:
Changed to use binary log
support-files/my-large.cnf.sh:
Changed to use binary log
support-files/my-medium.cnf.sh:
Changed to use binary log
support-files/my-small.cnf.sh:
Changed to use binary log
Diffstat (limited to 'sql/ha_berkeley.h')
-rw-r--r-- | sql/ha_berkeley.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h index 3cfcab82ecf..4ee682664a5 100644 --- a/sql/ha_berkeley.h +++ b/sql/ha_berkeley.h @@ -27,11 +27,13 @@ typedef struct st_berkeley_share { ulonglong auto_ident; + ha_rows rows, org_rows, *rec_per_key; THR_LOCK lock; pthread_mutex_t mutex; char *table_name; + DB *status_block; uint table_name_length,use_count; - bool primary_key_inited; + uint status,version; } BDB_SHARE; @@ -49,7 +51,8 @@ class ha_berkeley: public handler BDB_SHARE *share; ulong int_option_flag; ulong alloced_rec_buff_length; - uint primary_key,last_dup_key, hidden_primary_key; + ulong changed_rows; + uint primary_key,last_dup_key, hidden_primary_key, version; bool fixed_length_row, fixed_length_primary_key, key_read; bool fix_rec_buff_for_blob(ulong length); byte current_ident[BDB_HIDDEN_PRIMARY_KEY_LENGTH]; @@ -58,7 +61,8 @@ class ha_berkeley: public handler int pack_row(DBT *row,const byte *record, bool new_row); void unpack_row(char *record, DBT *row); void ha_berkeley::unpack_key(char *record, DBT *key, uint index); - DBT *pack_key(DBT *key, uint keynr, char *buff, const byte *record); + 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, @@ -79,8 +83,9 @@ class ha_berkeley: public handler HA_KEYPOS_TO_RNDPOS | HA_READ_ORDER | HA_LASTKEY_ORDER | HA_LONGLONG_KEYS | HA_NULL_KEY | HA_HAVE_KEY_READ_ONLY | HA_BLOB_KEY | HA_NOT_EXACT_COUNT | - HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE), - last_dup_key((uint) -1) + HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE | + HA_AUTO_PART_KEY), + last_dup_key((uint) -1),version(0) { } ~ha_berkeley() {} @@ -123,6 +128,10 @@ class ha_berkeley: public handler int reset(void); int external_lock(THD *thd, int 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(int inx, const byte *start_key,uint start_key_len, enum ha_rkey_function start_search_flag, @@ -135,7 +144,7 @@ class ha_berkeley: public handler THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type); - void update_auto_primary_key(); + void get_status(); inline void get_auto_primary_key(byte *to) { ulonglong tmp; @@ -144,11 +153,12 @@ class ha_berkeley: public handler int5store(to,share->auto_ident); pthread_mutex_unlock(&share->mutex); } + longlong ha_berkeley::get_auto_increment(); }; -extern bool berkeley_skip; +extern bool berkeley_skip, berkeley_shared_data; extern u_int32_t berkeley_init_flags,berkeley_lock_type,berkeley_lock_types[]; -extern ulong berkeley_cache_size, berkeley_lock_max; +extern ulong berkeley_cache_size, berkeley_max_lock; extern char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir; extern long berkeley_lock_scan_time; extern TYPELIB berkeley_lock_typelib; |