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:
unknown 2005-06-29 12:44:40 +03:00
commit 1aa6343fe8
3 changed files with 21 additions and 22 deletions

View file

@ -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) )