summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-05-30 20:48:40 +0300
committerunknown <monty@mysql.com>2005-05-30 20:48:40 +0300
commite2285c541b027503e3040a85fc618f9c6357a91e (patch)
treececbfda09bb93c1c181159eacc7b4e58cac50cf4 /sql/opt_range.cc
parent6a7dedf25909719fe5a8c2f98f87e18e6461b705 (diff)
downloadmariadb-git-e2285c541b027503e3040a85fc618f9c6357a91e.tar.gz
Fixed bug in multiple-table-delete where some rows was not deleted
mysql-test/r/delete.result: Test case for bug in multiple-table-delete where some rows was not deleted mysql-test/t/delete.test: Test case for bug in multiple-table-delete where some rows was not deleted sql/item_subselect.cc: Code cleanup sql/opt_range.cc: Code cleanup sql/sql_delete.cc: Fixed bug in multiple-table-delete where some rows was not deleted This happend when the first table-to-delete-from was not the the table that was scanned. Fixed this by only doing 'delete-on-the-fly' for the first table. Fixed also some wrong error handling in multi-table-delete
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 0aa0468fc36..7da2990180d 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -7957,7 +7957,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
max_used_key_length= real_prefix_len;
if (min_max_ranges.elements > 0)
{
- QUICK_RANGE *cur_range= 0;
+ QUICK_RANGE *cur_range;
if (have_min)
{ /* Check if the right-most range has a lower boundary. */
get_dynamic(&min_max_ranges, (gptr)&cur_range,
@@ -7965,7 +7965,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
if (!(cur_range->flag & NO_MIN_RANGE))
{
max_used_key_length+= min_max_arg_len;
- ++used_key_parts;
+ used_key_parts++;
return;
}
}
@@ -7975,7 +7975,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
if (!(cur_range->flag & NO_MAX_RANGE))
{
max_used_key_length+= min_max_arg_len;
- ++used_key_parts;
+ used_key_parts++;
return;
}
}
@@ -7983,7 +7983,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
else if (have_min && min_max_arg_part && min_max_arg_part->field->is_null())
{
max_used_key_length+= min_max_arg_len;
- ++used_key_parts;
+ used_key_parts++;
}
}