summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-02-21 01:50:50 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-02-21 01:50:50 +0400
commit352e848f214ab401d013604701341487a4fe2520 (patch)
treef88025167fe01d84d43ab6d78b36e0b2b4714562 /sql
parent00995935628c9e865ee545422871363be75812b8 (diff)
downloadmariadb-git-352e848f214ab401d013604701341487a4fe2520.tar.gz
BUG#920132: Assert trx->n_active_thrs == 1 failed at que0que.c line 1050
- MySQL 5.5 introduced caching of constant items by means of wrapping them in Item_cache_XXX objects. If a subquery was wrapped in this cache, it could end up being pushed down by ICP. - The fix is to add Item_cache::walk() which lets ICP to see that the cache item has a subquery inside it, and disable pushdown for this case.
Diffstat (limited to 'sql')
-rw-r--r--sql/item.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 6c0d3138b62..4af2038aa55 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -3901,6 +3901,12 @@ public:
return example->is_expensive_processor(arg);
}
virtual void set_null();
+ bool walk(Item_processor processor, bool walk_subquery, uchar *arg)
+ {
+ if (example && example->walk(processor, walk_subquery, arg))
+ return TRUE;
+ return (this->*processor)(arg);
+ }
};