summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index bafc368e415..c9311cdf398 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -3754,8 +3754,9 @@ 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
@@ -7927,7 +7928,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
@@ -8803,7 +8804,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
}
@@ -10856,7 +10857,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;
@@ -10974,7 +10975,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;
}