summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-12-09 21:22:37 +0100
committerSergei Golubchik <serg@mariadb.org>2015-12-11 23:25:20 +0100
commit265e833fdd921c58c2525442a7064003da83c884 (patch)
treea81f498a7c72d00f0a5e56674c7a32f25f88a4c7 /sql/item_subselect.cc
parentc19972fc8708778bd6070715b449351a39edb0cc (diff)
downloadmariadb-git-265e833fdd921c58c2525442a7064003da83c884.tar.gz
revert 415faa122b9c683661dafac82fff414fa6864151
that was mistakenly merged from mysql-5.5.47
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc24
1 files changed, 0 insertions, 24 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 3020faf29d3..ba674743724 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1748,27 +1748,6 @@ Item_in_subselect::single_value_transformer(JOIN *join)
runtime created Ref item which is deleted at the end
of the statement. Thus one of 'substitution' arguments
can be broken in case of PS.
-
- @todo
- Why do we use real_item()/substitutional_item() instead of the plain
- left_expr?
- Because left_expr might be a rollbackable item, and we fail to properly
- rollback all copies of left_expr at end of execution, so we want to
- avoid creating copies of left_expr as much as possible, so we use
- real_item() instead.
- Doing a proper rollback is difficult: the change was registered for the
- original item which was the left argument of IN. Then this item was
- copied to left_expr, which is copied below to substitution->args[0]. To
- do a proper rollback, we would have to restore the content
- of both copies as well as the original item. There might be more copies,
- if AND items have been constructed.
- The same applies to the right expression.
- However, using real_item()/substitutional_item() brings its own
- problems: for example, we lose information that the item is an outer
- reference; the item can thus wrongly be considered for a Keyuse (causing
- bug#17766653).
- When WL#6570 removes the "rolling back" system, all
- real_item()/substitutional_item() in this file should be removed.
*/
substitution= func->create(left_expr, where_item);
have_to_be_excluded= 1;
@@ -2055,9 +2034,6 @@ Item_in_subselect::create_single_in_to_exists_cond(JOIN *join,
}
else
{
- /*
- Grep for "WL#6570" to see the relevant comment about real_item.
- */
Item *item= (Item*) select_lex->item_list.head()->real_item();
if (select_lex->table_list.elements)