diff options
author | unknown <sanja@askmonty.org> | 2011-11-01 17:42:52 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2011-11-01 17:42:52 +0200 |
commit | b40bc2b3e3afee92a6d33d80840840fcf9baae11 (patch) | |
tree | 6b836e02a31995d2fdf3a71ff04c31f0abccccf4 /sql/item_sum.cc | |
parent | 391c5db1fca4b9d36afa3d131b4f5401fa9189f6 (diff) | |
download | mariadb-git-b40bc2b3e3afee92a6d33d80840840fcf9baae11.tar.gz |
Fix of LP BUG#872775.
The problem was that merged views has its own nest_level numbering =>
when we compare nest levels we should take into considiration basis (i.e. 0 level),
if it is different then nest levels are not comparable.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 65314a0ff91..063406990cb 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -359,7 +359,9 @@ bool Item_sum::collect_outer_ref_processor(uchar *param) { Collect_deps_prm *prm= (Collect_deps_prm *)param; SELECT_LEX *ds; - if ((ds= depended_from()) && ds->nest_level < prm->nest_level) + if ((ds= depended_from()) && + ds->nest_level_base == prm->nest_level_base && + ds->nest_level < prm->nest_level) prm->parameters->add_unique(this, &cmp_items); return FALSE; } |