diff options
author | unknown <monty@narttu.mysql.fi> | 2007-08-14 00:22:34 +0300 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2007-08-14 00:22:34 +0300 |
commit | c5f0611fadd910a8a169e35bdd7e572080530efe (patch) | |
tree | 2641806010f25bf6469538558e05487ecff3c959 /sql/handler.h | |
parent | 6930ac54068b88ce5ca2476f70d74ddb42f5d9fc (diff) | |
parent | 09a53f28a73d8000bab902611f609a44d87f329d (diff) | |
download | mariadb-git-c5f0611fadd910a8a169e35bdd7e572080530efe.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1
configure.in:
Auto merged
client/mysql.cc:
Auto merged
include/m_ctype.h:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_rkey.c:
Auto merged
client/mysqldump.c:
Manual merge (trivial)
scripts/mysql_install_db.sh:
Complex merge (parital rewrite of new code)
sql/sql_show.cc:
Manual merge
tests/mysql_client_test.c:
then
if ! test -x "$print_defaults"
then
missing_in_basedir my_print_defaults
exit 1
fi
else
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 71 |
1 files changed, 38 insertions, 33 deletions
diff --git a/sql/handler.h b/sql/handler.h index 60e936bef5b..557b9fd7887 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -278,7 +278,7 @@ enum legacy_db_type enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED, ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED, - ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, ROW_TYPE_PAGES }; + ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, ROW_TYPE_PAGE }; enum enum_binlog_func { BFN_RESET_LOGS= 1, @@ -321,6 +321,7 @@ enum enum_binlog_command { #define HA_CREATE_USED_PASSWORD (1L << 17) #define HA_CREATE_USED_CONNECTION (1L << 18) #define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19) +#define HA_CREATE_USED_TRANSACTIONAL (1L << 20) typedef ulonglong my_xid; // this line is the same as in log_event.h #define MYSQL_XID_PREFIX "MySQLXid" @@ -788,6 +789,7 @@ class partition_info; struct st_partition_iter; #define NOT_A_PARTITION_ID ((uint32)-1) +enum ha_choice { HA_CHOICE_UNDEF, HA_CHOICE_NO, HA_CHOICE_YES }; typedef struct st_ha_create_information { @@ -810,6 +812,8 @@ typedef struct st_ha_create_information uint options; /* OR of HA_CREATE_ options */ uint merge_insert_method; uint extra_size; /* length of extra data segment */ + /* 0 not used, 1 if not transactional, 2 if transactional */ + enum ha_choice transactional; bool table_existed; /* 1 in create if table existed */ bool frm_only; /* 1 if no ha_create_table() */ bool varchar; /* 1 if table has a VARCHAR */ @@ -1277,27 +1281,28 @@ public: enum ha_rkey_function find_flag) { return HA_ERR_WRONG_COMMAND; } public: -/** - @brief - Positions an index cursor to the index specified in the handle. Fetches the - row if available. If the key value is null, begin at the first key of the - index. -*/ - virtual int index_read(uchar * buf, const uchar * key, key_part_map keypart_map, - enum ha_rkey_function find_flag) - { - uint key_len= calculate_key_len(table, active_index, key, keypart_map); - return index_read(buf, key, key_len, find_flag); - } -/** - @brief - Positions an index cursor to the index specified in the handle. Fetches the - row if available. If the key value is null, begin at the first key of the - index. -*/ - virtual int index_read_idx(uchar * buf, uint index, const uchar * key, + /** + @brief + Positions an index cursor to the index specified in the handle. Fetches the + row if available. If the key value is null, begin at the first key of the + index. + */ + virtual int index_read_map(uchar * buf, const uchar * key, key_part_map keypart_map, - enum ha_rkey_function find_flag); + enum ha_rkey_function find_flag) + { + uint key_len= calculate_key_len(table, active_index, key, keypart_map); + return index_read(buf, key, key_len, find_flag); + } + /** + @brief + Positions an index cursor to the index specified in the handle. Fetches the + row if available. If the key value is null, begin at the first key of the + index. + */ + virtual int index_read_idx_map(uchar * buf, uint index, const uchar * key, + key_part_map keypart_map, + enum ha_rkey_function find_flag); virtual int index_next(uchar * buf) { return HA_ERR_WRONG_COMMAND; } virtual int index_prev(uchar * buf) @@ -1311,17 +1316,17 @@ public: virtual int index_read_last(uchar * buf, const uchar * key, uint key_len) { return (my_errno=HA_ERR_WRONG_COMMAND); } public: -/** - @brief - The following functions works like index_read, but it find the last - row with the current key value or prefix. -*/ - virtual int index_read_last(uchar * buf, const uchar * key, - key_part_map keypart_map) - { - uint key_len= calculate_key_len(table, active_index, key, keypart_map); - return index_read_last(buf, key, key_len); - } + /** + @brief + The following functions works like index_read, but it find the last + row with the current key value or prefix. + */ + virtual int index_read_last_map(uchar * buf, const uchar * key, + key_part_map keypart_map) + { + uint key_len= calculate_key_len(table, active_index, key, keypart_map); + return index_read_last(buf, key, key_len); + } virtual int read_multi_range_first(KEY_MULTI_RANGE **found_range_p, KEY_MULTI_RANGE *ranges, uint range_count, bool sorted, HANDLER_BUFFER *buffer); @@ -1864,7 +1869,7 @@ int ha_find_files(THD *thd,const char *db,const char *path, int ha_table_exists_in_engine(THD* thd, const char* db, const char* name); /* key cache */ -int ha_init_key_cache(const char *name, KEY_CACHE *key_cache); +extern "C" int ha_init_key_cache(const char *name, KEY_CACHE *key_cache); int ha_resize_key_cache(KEY_CACHE *key_cache); int ha_change_key_cache_param(KEY_CACHE *key_cache); int ha_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache); |