summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorEvgeny Potemkin <epotemkin@mysql.com>2010-08-14 13:11:33 +0400
committerEvgeny Potemkin <epotemkin@mysql.com>2010-08-14 13:11:33 +0400
commit48738f737ade6e5e58e37bcd7e70ad5a515f0f18 (patch)
treee62f523aa32ed6704ce025ceef21724a2e6c29a3 /sql/item.cc
parent87f655d52d4e30392f2232b51a7658684db6c5d1 (diff)
downloadmariadb-git-48738f737ade6e5e58e37bcd7e70ad5a515f0f18.tar.gz
Bug#49746: Const expression caching led to NDB not using engine condition
pushdown. NDB supports only a limited set of item nodes for use in engine condition pushdown. Because of this adding cache for const expression effectively disabled this optimization. The ndb_serialize_cond function is extended to support Item_cache and treat it as a constant values. A helper function called ndb_serialize_const is added. It is used to create Ndb_cond value node from given const item.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 1decb5ec426..24f57342668 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5931,7 +5931,8 @@ bool Item::cache_const_expr_analyzer(uchar **arg)
a subselect (they use their own cache).
*/
if (const_item() &&
- !(item->basic_const_item() || item->type() == Item::FIELD_ITEM ||
+ !(basic_const_item() || item->basic_const_item() ||
+ item->type() == Item::FIELD_ITEM ||
item->type() == SUBSELECT_ITEM ||
/*
Do not cache GET_USER_VAR() function as its const_item() may