Commit 0a467b5f authored by unknown's avatar unknown

Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/psergey/mysql-5.0-sept30-test

parents 60ee9326 b8ad9d14
...@@ -1209,7 +1209,8 @@ inline ulong ha_ndbcluster::index_flags(uint idx_no, uint part, ...@@ -1209,7 +1209,8 @@ inline ulong ha_ndbcluster::index_flags(uint idx_no, uint part,
DBUG_ENTER("ha_ndbcluster::index_flags"); DBUG_ENTER("ha_ndbcluster::index_flags");
DBUG_PRINT("info", ("idx_no: %d", idx_no)); DBUG_PRINT("info", ("idx_no: %d", idx_no));
DBUG_ASSERT(get_index_type_from_table(idx_no) < index_flags_size); DBUG_ASSERT(get_index_type_from_table(idx_no) < index_flags_size);
DBUG_RETURN(index_type_flags[get_index_type_from_table(idx_no)]); DBUG_RETURN(index_type_flags[get_index_type_from_table(idx_no)] |
HA_KEY_SCAN_NOT_ROR);
} }
static void shrink_varchar(Field* field, const byte* & ptr, char* buf) static void shrink_varchar(Field* field, const byte* & ptr, char* buf)
......
...@@ -98,6 +98,13 @@ ...@@ -98,6 +98,13 @@
#define HA_ONLY_WHOLE_INDEX 16 /* Can't use part key searches */ #define HA_ONLY_WHOLE_INDEX 16 /* Can't use part key searches */
#define HA_KEYREAD_ONLY 64 /* Support HA_EXTRA_KEYREAD */ #define HA_KEYREAD_ONLY 64 /* Support HA_EXTRA_KEYREAD */
/*
Index scan will not return records in rowid order. Not guaranteed to be
set for unordered (e.g. HASH) indexes.
*/
#define HA_KEY_SCAN_NOT_ROR 128
/* operations for disable/enable indexes */ /* operations for disable/enable indexes */
#define HA_KEY_SWITCH_NONUNIQ 0 #define HA_KEY_SWITCH_NONUNIQ 0
#define HA_KEY_SWITCH_ALL 1 #define HA_KEY_SWITCH_ALL 1
......
...@@ -5117,6 +5117,8 @@ check_quick_select(PARAM *param,uint idx,SEL_ARG *tree) ...@@ -5117,6 +5117,8 @@ check_quick_select(PARAM *param,uint idx,SEL_ARG *tree)
if (cpk_scan) if (cpk_scan)
param->is_ror_scan= TRUE; param->is_ror_scan= TRUE;
} }
if (param->table->file->index_flags(key, 0, TRUE) & HA_KEY_SCAN_NOT_ROR)
param->is_ror_scan= FALSE;
DBUG_PRINT("exit", ("Records: %lu", (ulong) records)); DBUG_PRINT("exit", ("Records: %lu", (ulong) records));
DBUG_RETURN(records); DBUG_RETURN(records);
} }
......
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