diff options
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 7dfee132ea9..85b5e7270ec 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -853,7 +853,7 @@ QUICK_ROR_INTERSECT_SELECT::QUICK_ROR_INTERSECT_SELECT(THD *thd_param, bool retrieve_full_rows, MEM_ROOT *parent_alloc) : cpk_quick(NULL), thd(thd_param), need_to_fetch_row(retrieve_full_rows), - scans_inited(false) + scans_inited(FALSE) { index= MAX_KEY; head= table; @@ -1022,7 +1022,7 @@ int QUICK_ROR_INTERSECT_SELECT::reset() DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::reset"); if (!scans_inited && init_ror_merged_scan(TRUE)) DBUG_RETURN(1); - scans_inited= true; + scans_inited= TRUE; List_iterator_fast<QUICK_RANGE_SELECT> it(quick_selects); QUICK_RANGE_SELECT *quick; while ((quick= it++)) @@ -1066,7 +1066,7 @@ QUICK_ROR_INTERSECT_SELECT::~QUICK_ROR_INTERSECT_SELECT() QUICK_ROR_UNION_SELECT::QUICK_ROR_UNION_SELECT(THD *thd_param, TABLE *table) - : thd(thd_param), scans_inited(false) + : thd(thd_param), scans_inited(FALSE) { index= MAX_KEY; head= table; @@ -1148,7 +1148,7 @@ int QUICK_ROR_UNION_SELECT::reset() if (quick->init_ror_merged_scan(FALSE)) DBUG_RETURN(1); } - scans_inited= true; + scans_inited= TRUE; } queue_remove_all(&queue); /* @@ -2677,7 +2677,7 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info, { /* Don't add this scan if it doesn't improve selectivity. */ DBUG_PRINT("info", ("The scan doesn't improve selectivity.")); - DBUG_RETURN(false); + DBUG_RETURN(FALSE); } info->out_rows *= selectivity_mult; @@ -2865,7 +2865,7 @@ TRP_ROR_INTERSECT *get_best_ror_intersect(const PARAM *param, SEL_TREE *tree, while (cur_ror_scan != tree->ror_scans_end && !intersect->is_covering) { /* S= S + first(R); R= R - first(R); */ - if (!ror_intersect_add(intersect, *cur_ror_scan, false)) + if (!ror_intersect_add(intersect, *cur_ror_scan, FALSE)) { cur_ror_scan++; continue; @@ -8080,7 +8080,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min() } else { - /* Apply the constant equality conditions to the non-group select fields. */ + /* Apply the constant equality conditions to the non-group select fields */ if (key_infix_len > 0) { if ((result= file->index_read(record, group_prefix, real_prefix_len, @@ -8114,9 +8114,10 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min() */ if (!result) { - if(key_cmp(index_info->key_part, group_prefix, real_prefix_len)) + if (key_cmp(index_info->key_part, group_prefix, real_prefix_len)) key_restore(record, tmp_record, index_info, 0); - } else if (result == HA_ERR_KEY_NOT_FOUND) + } + else if (result == HA_ERR_KEY_NOT_FOUND) result= 0; /* There is a result in any case. */ } } |