mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/merge-5.0-5.1-opt mysql-test/r/type_time.result: Auto merged sql/field.cc: Auto merged sql/item_cmpfunc.cc: Auto merged BitKeeper/deleted/.del-index_merge.result: Auto merged mysql-test/include/index_merge1.inc: Auto merged sql/item_cmpfunc.h: Auto merged sql/opt_range.cc: Auto merged storage/heap/ha_heap.cc: Auto merged storage/heap/ha_heap.h: Auto merged
This commit is contained in:
@ -124,6 +124,26 @@ int ha_heap::close(void)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Create a copy of this table
|
||||
|
||||
DESCRIPTION
|
||||
Do same as default implementation but use file->s->name instead of
|
||||
table->s->path. This is needed by Windows where the clone() call sees
|
||||
'/'-delimited path in table->s->path, while ha_peap::open() was called
|
||||
with '\'-delimited path.
|
||||
*/
|
||||
|
||||
handler *ha_heap::clone(MEM_ROOT *mem_root)
|
||||
{
|
||||
handler *new_handler= get_new_handler(table, mem_root, table->s->db_type);
|
||||
if (new_handler && !new_handler->ha_open(file->s->name, table->db_stat,
|
||||
HA_OPEN_IGNORE_IF_LOCKED))
|
||||
return new_handler;
|
||||
return NULL; /* purecov: inspected */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Compute which keys to use for scanning
|
||||
|
||||
|
@ -32,6 +32,7 @@ class ha_heap: public handler
|
||||
public:
|
||||
ha_heap(handlerton *hton, TABLE_SHARE *table);
|
||||
~ha_heap() {}
|
||||
handler *clone(MEM_ROOT *mem_root);
|
||||
const char *table_type() const
|
||||
{
|
||||
return (table->in_use->variables.sql_mode & MODE_MYSQL323) ?
|
||||
@ -55,8 +56,8 @@ public:
|
||||
ulong index_flags(uint inx, uint part, bool all_parts) const
|
||||
{
|
||||
return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
|
||||
HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE :
|
||||
HA_ONLY_WHOLE_INDEX);
|
||||
HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE :
|
||||
HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
|
||||
}
|
||||
const key_map *keys_to_use_for_scanning() { return &btree_keys; }
|
||||
uint max_supported_keys() const { return MAX_KEY; }
|
||||
@ -108,9 +109,7 @@ public:
|
||||
enum thr_lock_type lock_type);
|
||||
int cmp_ref(const uchar *ref1, const uchar *ref2)
|
||||
{
|
||||
HEAP_PTR ptr1=*(HEAP_PTR*)ref1;
|
||||
HEAP_PTR ptr2=*(HEAP_PTR*)ref2;
|
||||
return ptr1 < ptr2? -1 : (ptr1 > ptr2? 1 : 0);
|
||||
return memcmp(ref1, ref2, sizeof(HEAP_PTR));
|
||||
}
|
||||
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
|
||||
private:
|
||||
|
Reference in New Issue
Block a user