Skip to content

Commit a7a5eb4

Browse files
author
Dag Wanvik
committed
Bug#21575790 ROLLUP WITH IN SUBQUERY CAUSES CRASH
Post-push formatting changes for compliance with coding std (long lines).
1 parent 35d7748 commit a7a5eb4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

sql/item_cmpfunc.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -2487,12 +2487,12 @@ void Item_in_optimizer::replace_argument(THD *thd, Item **oldpp, Item *newp)
24872487
Item_in_subselect *ss= down_cast<Item_in_subselect *>(args[1]);
24882488
thd->change_item_tree(&ss->left_expr, newp);
24892489
/*
2490-
fix_left() does cache setup. This setup() does (mainly) cache->example=arg[0];
2491-
we could wonder why change_item_tree isn't used instead of this simple
2492-
assignment. The reason is that cache->setup() is called at every
2493-
fix_fields(), so every execution, so it's not important if the previous
2494-
execution left a non-rolled-back now-pointing-to-garbage cache->example -
2495-
it will be overwritten.
2490+
fix_left() does cache setup. This setup() does (mainly)
2491+
cache->example=arg[0]; we could wonder why change_item_tree isn't used
2492+
instead of this simple assignment. The reason is that cache->setup() is
2493+
called at every fix_fields(), so every execution, so it's not important if
2494+
the previous execution left a non-rolled-back now-pointing-to-garbage
2495+
cache->example - it will be overwritten.
24962496
*/
24972497
fix_left(thd, NULL);
24982498
}

sql/item_subselect.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,12 @@ class Item_in_subselect :public Item_exists_subselect
407407
- the same transformation is done on SELECT2; but the wrapped 'x' doesn't
408408
need to be created again, the one created for SELECT1 could be reused
409409
410-
- to achieve this, the wrapped 'x' is stored in member 'm_injected_left_expr'
411-
when it is created for SELECT1, and is later reused for SELECT2.
412-
*/
410+
- to achieve this, the wrapped 'x' is stored in member
411+
'm_injected_left_expr' when it is created for SELECT1, and is later
412+
reused for SELECT2.
413413
414-
/**
415-
This will refer to a cached value which is reevaluated once for each candidate
416-
row, cf. setup in ::single_value_transformer.
414+
This will refer to a cached value which is reevaluated once for each
415+
candidate row, cf. setup in ::single_value_transformer.
417416
*/
418417
Item_direct_ref *m_injected_left_expr;
419418

@@ -493,7 +492,8 @@ class Item_in_subselect :public Item_exists_subselect
493492

494493
Item_in_subselect()
495494
:Item_exists_subselect(), left_expr(NULL), left_expr_cache(NULL),
496-
left_expr_cache_filled(false), need_expr_cache(TRUE), m_injected_left_expr(NULL),
495+
left_expr_cache_filled(false), need_expr_cache(TRUE),
496+
m_injected_left_expr(NULL),
497497
optimizer(NULL), was_null(FALSE), abort_on_null(FALSE),
498498
in2exists_info(NULL), pushed_cond_guards(NULL), upper_item(NULL)
499499
{}

0 commit comments

Comments
 (0)