2002-01-12 14:42:54 +01:00
|
|
|
/* Copyright (C) 2000 MySQL AB && Innobase Oy
|
2000-12-06 00:54:17 +01:00
|
|
|
|
|
|
|
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.
|
2001-02-17 13:19:19 +01:00
|
|
|
|
2000-12-06 00:54:17 +01:00
|
|
|
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.
|
2001-02-17 13:19:19 +01:00
|
|
|
|
2000-12-06 00:54:17 +01:00
|
|
|
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 */
|
|
|
|
|
2002-01-12 14:42:54 +01:00
|
|
|
/*
|
|
|
|
This file is based on ha_berkeley.h of MySQL distribution
|
|
|
|
|
|
|
|
This file defines the Innodb handler: the interface between MySQL and
|
|
|
|
Innodb
|
|
|
|
*/
|
|
|
|
|
2000-12-06 00:54:17 +01:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#pragma interface /* gcc class implementation */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct st_innobase_share {
|
|
|
|
THR_LOCK lock;
|
|
|
|
pthread_mutex_t mutex;
|
|
|
|
char *table_name;
|
|
|
|
uint table_name_length,use_count;
|
|
|
|
} INNOBASE_SHARE;
|
|
|
|
|
|
|
|
|
2002-01-12 14:42:54 +01:00
|
|
|
/* The class defining a handle to an Innodb table */
|
2000-12-06 00:54:17 +01:00
|
|
|
class ha_innobase: public handler
|
|
|
|
{
|
|
|
|
void* innobase_prebuilt; /* (row_prebuilt_t*) prebuilt
|
2002-01-12 14:42:54 +01:00
|
|
|
struct in Innodb, used to save
|
2000-12-06 00:54:17 +01:00
|
|
|
CPU */
|
|
|
|
THD* user_thd; /* the thread handle of the user
|
|
|
|
currently using the handle; this is
|
|
|
|
set in external_lock function */
|
2001-04-10 20:58:07 +02:00
|
|
|
ulong last_query_id; /* the latest query id where the
|
|
|
|
handle was used */
|
2000-12-06 00:54:17 +01:00
|
|
|
THR_LOCK_DATA lock;
|
|
|
|
INNOBASE_SHARE *share;
|
|
|
|
|
|
|
|
gptr alloc_ptr;
|
|
|
|
byte* upd_buff; /* buffer used in updates */
|
|
|
|
byte* key_val_buff; /* buffer used in converting
|
|
|
|
search key values from MySQL format
|
2002-01-12 14:42:54 +01:00
|
|
|
to Innodb format */
|
2002-04-12 20:35:46 +02:00
|
|
|
ulong int_table_flags;
|
2000-12-06 00:54:17 +01:00
|
|
|
uint primary_key;
|
2001-02-21 13:16:00 +01:00
|
|
|
uint last_dup_key;
|
2001-02-17 13:19:19 +01:00
|
|
|
ulong start_of_scan; /* this is set to 1 when we are
|
|
|
|
starting a table scan but have not
|
|
|
|
yet fetched any row, else 0 */
|
2003-04-18 17:42:43 +02:00
|
|
|
uint active_index_before_scan;
|
|
|
|
/* since a table scan in InnoDB is
|
|
|
|
always done through an index, a table
|
|
|
|
scan may change active_index; but
|
|
|
|
MySQL may assume that active_index
|
|
|
|
after a table scan is the same as
|
|
|
|
before; we store the value here so
|
|
|
|
that we can restore the value after
|
|
|
|
a scan */
|
2000-12-06 00:54:17 +01:00
|
|
|
uint last_match_mode;/* match mode of the latest search:
|
2001-02-17 13:19:19 +01:00
|
|
|
ROW_SEL_EXACT, ROW_SEL_EXACT_PREFIX,
|
|
|
|
or undefined */
|
2001-10-30 16:38:44 +01:00
|
|
|
longlong auto_inc_counter_for_this_stat;
|
2000-12-06 00:54:17 +01:00
|
|
|
ulong max_row_length(const byte *buf);
|
|
|
|
|
|
|
|
uint store_key_val_for_row(uint keynr, char* buff, const byte* record);
|
|
|
|
int update_thd(THD* thd);
|
|
|
|
int change_active_index(uint keynr);
|
|
|
|
int general_fetch(byte* buf, uint direction, uint match_mode);
|
2002-07-30 23:47:20 +02:00
|
|
|
int innobase_read_and_init_auto_inc(longlong* ret);
|
2000-12-06 00:54:17 +01:00
|
|
|
|
|
|
|
/* Init values for the class: */
|
|
|
|
public:
|
|
|
|
ha_innobase(TABLE *table): handler(table),
|
2002-04-12 20:35:46 +02:00
|
|
|
int_table_flags(HA_REC_NOT_IN_SEQ |
|
2001-03-10 16:05:10 +01:00
|
|
|
HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER |
|
2002-08-21 22:55:34 +02:00
|
|
|
HA_NULL_KEY | HA_CAN_SQL_HANDLER |
|
2001-12-21 14:28:51 +01:00
|
|
|
HA_NOT_EXACT_COUNT |
|
2001-03-10 16:05:10 +01:00
|
|
|
HA_NO_WRITE_DELAYED |
|
|
|
|
HA_PRIMARY_KEY_IN_READ_INDEX |
|
2002-04-12 20:35:46 +02:00
|
|
|
HA_DROP_BEFORE_CREATE |
|
2002-01-30 15:07:11 +01:00
|
|
|
HA_NO_PREFIX_CHAR_KEYS |
|
2003-03-18 23:45:44 +01:00
|
|
|
HA_TABLE_SCAN_ON_INDEX),
|
2001-03-10 16:05:10 +01:00
|
|
|
last_dup_key((uint) -1),
|
|
|
|
start_of_scan(0)
|
2000-12-06 00:54:17 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
~ha_innobase() {}
|
|
|
|
|
2001-05-09 22:02:36 +02:00
|
|
|
const char* table_type() const { return("InnoDB");}
|
2002-01-02 20:29:41 +01:00
|
|
|
const char *index_type(uint key_number) { return "BTREE"; }
|
2000-12-06 00:54:17 +01:00
|
|
|
const char** bas_ext() const;
|
2002-04-12 20:35:46 +02:00
|
|
|
ulong table_flags() const { return int_table_flags; }
|
|
|
|
ulong index_flags(uint idx) const
|
|
|
|
{
|
|
|
|
return (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER |
|
Many files:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/mysqld.cc:
Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway
sql/ha_innodb.cc:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
sql/ha_innodb.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/buf0buf.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/dict0dict.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/fil0fil.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/lock0lock.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0file.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0proc.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/os0thread.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0cur.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/page0page.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/read0read.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/srv0srv.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0rw.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/sync0sync.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0purge.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/trx0trx.h:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/include/rem0rec.ic:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0btr.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/btr/btr0pcur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0buf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/buf/buf0flu.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/dict/dict0dict.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fil/fil0fil.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/fsp/fsp0fsp.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/ibuf/ibuf0ibuf.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/lock/lock0lock.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/mem/mem0dbg.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0file.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/os/os0proc.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0cur.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/page/page0page.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/lexyy.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/pars/pars0grm.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/read/read0read.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0ins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0mysql.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0sel.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0uins.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0undo.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/row/row0upd.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0srv.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/srv/srv0start.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0rw.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/sync/sync0sync.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0purge.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
innobase/trx/trx0trx.c:
Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution
2002-10-29 22:16:46 +01:00
|
|
|
HA_KEY_READ_ONLY);
|
2002-04-12 20:35:46 +02:00
|
|
|
}
|
2000-12-06 00:54:17 +01:00
|
|
|
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
|
|
|
|
uint max_keys() const { return MAX_KEY; }
|
|
|
|
uint max_key_parts() const { return MAX_REF_PARTS; }
|
2001-12-22 10:18:22 +01:00
|
|
|
/* An InnoDB page must store >= 2 keys;
|
|
|
|
a secondary key record must also contain the
|
|
|
|
primary key value:
|
|
|
|
max key length is therefore set to slightly
|
2001-12-23 12:06:48 +01:00
|
|
|
less than 1 / 4 of page size which is 16 kB;
|
|
|
|
but currently MySQL does not work with keys
|
|
|
|
whose size is > MAX_KEY_LENGTH */
|
|
|
|
uint max_key_length() const { return((MAX_KEY_LENGTH <= 3500) ?
|
|
|
|
MAX_KEY_LENGTH : 3500);}
|
2000-12-06 00:54:17 +01:00
|
|
|
bool fast_key_read() { return 1;}
|
2001-11-25 12:50:48 +01:00
|
|
|
key_map keys_to_use_for_scanning() { return ~(key_map) 0; }
|
2000-12-06 00:54:17 +01:00
|
|
|
bool has_transactions() { return 1;}
|
|
|
|
|
2001-01-12 12:53:06 +01:00
|
|
|
int open(const char *name, int mode, uint test_if_locked);
|
2000-12-06 00:54:17 +01:00
|
|
|
void initialize(void);
|
|
|
|
int close(void);
|
|
|
|
double scan_time();
|
2003-04-23 20:52:16 +02:00
|
|
|
double read_time(uint index, uint ranges, ha_rows rows);
|
2000-12-06 00:54:17 +01:00
|
|
|
|
|
|
|
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);
|
|
|
|
int index_end();
|
|
|
|
int index_read(byte * buf, const byte * key,
|
2002-01-12 14:42:54 +01:00
|
|
|
uint key_len, enum ha_rkey_function find_flag);
|
2000-12-06 00:54:17 +01:00
|
|
|
int index_read_idx(byte * buf, uint index, const byte * key,
|
2002-01-12 14:42:54 +01:00
|
|
|
uint key_len, enum ha_rkey_function find_flag);
|
|
|
|
int index_read_last(byte * buf, const byte * key, uint key_len);
|
2000-12-06 00:54:17 +01:00
|
|
|
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=1);
|
|
|
|
int rnd_end();
|
|
|
|
int rnd_next(byte *buf);
|
|
|
|
int rnd_pos(byte * buf, byte *pos);
|
|
|
|
|
|
|
|
void position(const byte *record);
|
|
|
|
void info(uint);
|
2003-04-24 14:34:43 +02:00
|
|
|
int analyze(THD* thd,HA_CHECK_OPT* check_opt);
|
2000-12-06 00:54:17 +01:00
|
|
|
int extra(enum ha_extra_function operation);
|
|
|
|
int reset(void);
|
|
|
|
int external_lock(THD *thd, int lock_type);
|
2002-09-20 22:26:21 +02:00
|
|
|
int start_stmt(THD *thd);
|
|
|
|
|
2000-12-06 00:54:17 +01:00
|
|
|
void position(byte *record);
|
|
|
|
ha_rows records_in_range(int inx,
|
|
|
|
const byte *start_key,uint start_key_len,
|
|
|
|
enum ha_rkey_function start_search_flag,
|
|
|
|
const byte *end_key,uint end_key_len,
|
|
|
|
enum ha_rkey_function end_search_flag);
|
2001-08-09 19:42:32 +02:00
|
|
|
ha_rows estimate_number_of_rows();
|
2000-12-06 00:54:17 +01:00
|
|
|
|
|
|
|
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);
|
manual.texi website address change
row0sel.c CHECK TABLE now also for InnoDB, a join speed optimization
trx0trx.c CHECK TABLE now also for InnoDB, a join speed optimization
rem0cmp.c CHECK TABLE now also for InnoDB, a join speed optimization
row0mysql.c CHECK TABLE now also for InnoDB, a join speed optimization
page0page.c CHECK TABLE now also for InnoDB, a join speed optimization
row0mysql.h CHECK TABLE now also for InnoDB, a join speed optimization
trx0trx.h CHECK TABLE now also for InnoDB, a join speed optimization
btr0btr.h CHECK TABLE now also for InnoDB, a join speed optimization
btr0cur.h CHECK TABLE now also for InnoDB, a join speed optimization
btr0pcur.h CHECK TABLE now also for InnoDB, a join speed optimization
btr0pcur.ic CHECK TABLE now also for InnoDB, a join speed optimization
btr0btr.c CHECK TABLE now also for InnoDB, a join speed optimization
btr0cur.c CHECK TABLE now also for InnoDB, a join speed optimization
btr0sea.c CHECK TABLE now also for InnoDB, a join speed optimization
innodb.result CHECK TABLE now also for InnoDB, a join speed optimization
ha_innobase.cc CHECK TABLE now also for InnoDB, a join speed optimization
ha_innobase.h CHECK TABLE now also for InnoDB, a join speed optimization
sql/ha_innobase.cc:
CHECK TABLE now also for InnoDB, a join speed optimization
sql/ha_innobase.h:
CHECK TABLE now also for InnoDB, a join speed optimization
mysql-test/r/innodb.result:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0btr.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0cur.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/btr/btr0sea.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0btr.h:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0cur.h:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0pcur.h:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/btr0pcur.ic:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/row0mysql.h:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/include/trx0trx.h:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/page/page0page.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/rem/rem0cmp.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/row/row0mysql.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/row/row0sel.c:
CHECK TABLE now also for InnoDB, a join speed optimization
innobase/trx/trx0trx.c:
CHECK TABLE now also for InnoDB, a join speed optimization
Docs/manual.texi:
website address change
2001-06-03 21:58:03 +02:00
|
|
|
int check(THD* thd, HA_CHECK_OPT* check_opt);
|
2001-02-17 13:19:19 +01:00
|
|
|
char* update_table_comment(const char* comment);
|
2002-03-21 17:03:09 +01:00
|
|
|
char* get_foreign_key_create_info();
|
|
|
|
void free_foreign_key_create_info(char* str);
|
2000-12-06 00:54:17 +01:00
|
|
|
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
|
|
|
|
enum thr_lock_type lock_type);
|
2002-08-21 22:55:34 +02:00
|
|
|
void init_table_handle_for_HANDLER();
|
2001-07-16 20:10:29 +02:00
|
|
|
longlong get_auto_increment();
|
2002-11-03 09:15:14 +01:00
|
|
|
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
|
2000-12-06 00:54:17 +01:00
|
|
|
};
|
|
|
|
|
2001-04-13 11:25:12 +02:00
|
|
|
extern bool innodb_skip;
|
2000-12-06 00:54:17 +01:00
|
|
|
extern uint innobase_init_flags, innobase_lock_type;
|
2002-09-11 05:40:08 +02:00
|
|
|
extern uint innobase_flush_log_at_trx_commit;
|
2000-12-06 00:54:17 +01:00
|
|
|
extern ulong innobase_cache_size;
|
|
|
|
extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
|
|
|
|
extern long innobase_lock_scan_time;
|
2001-01-12 12:53:06 +01:00
|
|
|
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
|
2000-12-06 00:54:17 +01:00
|
|
|
extern long innobase_log_file_size, innobase_log_buffer_size;
|
2003-01-06 21:07:25 +01:00
|
|
|
extern long innobase_buffer_pool_size, innobase_buffer_pool_awe_mem_mb,
|
|
|
|
innobase_additional_mem_pool_size;
|
2001-02-17 13:19:19 +01:00
|
|
|
extern long innobase_file_io_threads, innobase_lock_wait_timeout;
|
2001-10-30 16:38:44 +01:00
|
|
|
extern long innobase_force_recovery, innobase_thread_concurrency;
|
2000-12-06 00:54:17 +01:00
|
|
|
extern char *innobase_data_home_dir, *innobase_data_file_path;
|
|
|
|
extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
|
2001-05-23 17:04:49 +02:00
|
|
|
extern char *innobase_unix_file_flush_method;
|
2002-02-07 20:34:35 +01:00
|
|
|
/* The following variables have to be my_bool for SHOW VARIABLES to work */
|
2002-09-11 05:40:08 +02:00
|
|
|
extern my_bool innobase_log_archive,
|
2002-02-07 20:34:35 +01:00
|
|
|
innobase_use_native_aio, innobase_fast_shutdown;
|
2003-05-16 15:27:50 +02:00
|
|
|
extern "C" {
|
|
|
|
extern ulong srv_max_buf_pool_modified_pct;
|
|
|
|
}
|
2000-12-06 00:54:17 +01:00
|
|
|
|
|
|
|
extern TYPELIB innobase_lock_typelib;
|
|
|
|
|
|
|
|
bool innobase_init(void);
|
|
|
|
bool innobase_end(void);
|
|
|
|
bool innobase_flush_logs(void);
|
2001-02-17 13:19:19 +01:00
|
|
|
uint innobase_get_free_space(void);
|
2000-12-06 00:54:17 +01:00
|
|
|
|
2001-01-12 12:53:06 +01:00
|
|
|
int innobase_commit(THD *thd, void* trx_handle);
|
2002-01-22 21:57:56 +01:00
|
|
|
int innobase_report_binlog_offset_and_commit(
|
|
|
|
THD* thd,
|
|
|
|
void* trx_handle,
|
|
|
|
char* log_file_name,
|
|
|
|
my_off_t end_offset);
|
2003-05-03 01:29:40 +02:00
|
|
|
int innobase_commit_complete(
|
|
|
|
void* trx_handle);
|
2001-01-12 12:53:06 +01:00
|
|
|
int innobase_rollback(THD *thd, void* trx_handle);
|
2000-12-06 00:54:17 +01:00
|
|
|
int innobase_close_connection(THD *thd);
|
2001-10-10 21:47:08 +02:00
|
|
|
int innobase_drop_database(char *path);
|
2002-07-08 18:34:49 +02:00
|
|
|
int innodb_show_status(THD* thd);
|
2001-10-10 21:47:08 +02:00
|
|
|
|
2002-11-03 09:15:14 +01:00
|
|
|
bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name,
|
|
|
|
uint full_name_len);
|
2003-03-03 18:31:01 +01:00
|
|
|
void innobase_release_temporary_latches(void* innobase_tid);
|