mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 15:45:33 +02:00
Simple optimization
nsure that delete works not only on table->record[0] for federated tables sql/field.cc: Test OOM condition sql/ha_federated.cc: Simple optimizations Ensure that delete works not only on table->record[0] sql/opt_range.cc: Simplify code
This commit is contained in:
parent
feffe571eb
commit
1aa6343fe8
3 changed files with 21 additions and 22 deletions
|
|
@ -8556,23 +8556,21 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range()
|
|||
|
||||
if ((result == HA_ERR_KEY_NOT_FOUND) && (cur_range->flag & EQ_RANGE))
|
||||
continue; /* Check the next range. */
|
||||
else if (result)
|
||||
if (result)
|
||||
{
|
||||
/*
|
||||
In no key was found with this upper bound, there certainly are no keys
|
||||
in the ranges to the left.
|
||||
*/
|
||||
return result;
|
||||
|
||||
}
|
||||
/* A key was found. */
|
||||
if (cur_range->flag & EQ_RANGE)
|
||||
return result; /* No need to perform the checks below for equal keys. */
|
||||
return 0; /* No need to perform the checks below for equal keys. */
|
||||
|
||||
/* Check if record belongs to the current group. */
|
||||
if (key_cmp(index_info->key_part, group_prefix, real_prefix_len))
|
||||
{
|
||||
result = HA_ERR_KEY_NOT_FOUND;
|
||||
continue;
|
||||
}
|
||||
continue; // Row not found
|
||||
|
||||
/* If there is a lower limit, check if the found key is in the range. */
|
||||
if ( !(cur_range->flag & NO_MIN_RANGE) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue