Commit d819e45a authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0

parents 144d7cc7 3a9eb4f6
......@@ -41,13 +41,14 @@ class ha_heap: public handler
{
return (HA_READ_RND_SAME | HA_NO_INDEX | HA_KEYPOS_TO_RNDPOS |
HA_NO_BLOBS | HA_NULL_KEY | HA_REC_NOT_IN_SEQ |
HA_NOT_READ_PREFIX_LAST | HA_NO_AUTO_INCREMENT);
HA_NO_AUTO_INCREMENT);
}
ulong index_flags(uint inx) const
{
return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
(HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER) :
(HA_ONLY_WHOLE_INDEX | HA_WRONG_ASCII_ORDER));
(HA_ONLY_WHOLE_INDEX | HA_WRONG_ASCII_ORDER |
HA_NOT_READ_PREFIX_LAST));
}
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
uint max_keys() const { return MAX_KEY; }
......
......@@ -33,9 +33,9 @@ class ha_isammrg: public handler
const char *table_type() const { return "MRG_ISAM"; }
const char **bas_ext() const;
ulong table_flags() const { return (HA_READ_RND_SAME | HA_KEYPOS_TO_RNDPOS |
HA_NOT_READ_PREFIX_LAST |
HA_REC_NOT_IN_SEQ); }
ulong index_flags(uint idx) const { return 0; }
ulong index_flags(uint idx) const { return HA_NOT_READ_PREFIX_LAST; }
uint max_record_length() const { return HA_MAX_REC_LENGTH; }
uint max_keys() const { return 0; }
uint max_key_parts() const { return 0; }
......
......@@ -81,7 +81,7 @@
#define HA_READ_PREV 4 /* Read prev. record with same key */
#define HA_READ_ORDER 8 /* Read through record-keys in order */
#define HA_ONLY_WHOLE_INDEX 16 /* Can't use part key searches */
#define HA_NOT_READ_PREFIX_LAST 32
#define HA_NOT_READ_PREFIX_LAST 32 /* No support for index_read_last() */
#define HA_KEY_READ_ONLY 64 /* Support HA_EXTRA_KEYREAD */
/*
......
......@@ -5576,7 +5576,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
Use a traversal function that starts by reading the last row
with key part (A) and then traverse the index backwards.
*/
if (table->file->table_flags() & HA_NOT_READ_PREFIX_LAST)
if (table->file->index_flags(ref_key) & HA_NOT_READ_PREFIX_LAST)
DBUG_RETURN(0); // Use filesort
tab->read_first_record= join_read_last_key;
tab->read_record.read_record= join_read_prev_same;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment