1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge from 5.0-bugteam for 43414

This commit is contained in:
Staale Smedseng
2009-06-09 18:44:26 +02:00
13 changed files with 61 additions and 60 deletions

View File

@ -3760,8 +3760,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost));
if (imerge_too_expensive || (imerge_cost > read_time) ||
(non_cpk_scan_records+cpk_scan_records >= param->table->file->stats.records) &&
read_time != DBL_MAX)
((non_cpk_scan_records+cpk_scan_records >= param->table->file->stats.records) &&
read_time != DBL_MAX))
{
/*
Bail out if it is obvious that both index_merge and ROR-union will be
@ -7950,7 +7950,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
goto err;
quick->records= records;
if (cp_buffer_from_ref(thd, table, ref) && thd->is_fatal_error ||
if ((cp_buffer_from_ref(thd, table, ref) && thd->is_fatal_error) ||
!(range= new(alloc) QUICK_RANGE()))
goto err; // out of memory
@ -8826,7 +8826,7 @@ int QUICK_RANGE_SELECT::cmp_prev(QUICK_RANGE *range_arg)
cmp= key_cmp(key_part_info, range_arg->min_key,
range_arg->min_length);
if (cmp > 0 || cmp == 0 && !(range_arg->flag & NEAR_MIN))
if (cmp > 0 || (cmp == 0 && !(range_arg->flag & NEAR_MIN)))
return 0;
return 1; // outside of range
}
@ -10886,7 +10886,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range()
/* Compare the found key with max_key. */
int cmp_res= key_cmp(index_info->key_part, max_key,
real_prefix_len + min_max_arg_len);
if (!((cur_range->flag & NEAR_MAX) && (cmp_res == -1) ||
if (!(((cur_range->flag & NEAR_MAX) && (cmp_res == -1)) ||
(cmp_res <= 0)))
{
result= HA_ERR_KEY_NOT_FOUND;
@ -11004,7 +11004,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range()
/* Compare the found key with min_key. */
int cmp_res= key_cmp(index_info->key_part, min_key,
real_prefix_len + min_max_arg_len);
if (!((cur_range->flag & NEAR_MIN) && (cmp_res == 1) ||
if (!(((cur_range->flag & NEAR_MIN) && (cmp_res == 1)) ||
(cmp_res >= 0)))
continue;
}