• Evgeny Potemkin's avatar
    Bug#49746: Const expression caching led to NDB not using engine condition · 3c282ea2
    Evgeny Potemkin authored
    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.
    
    
    mysql-test/suite/ndb/t/disabled.def:
      Bug#49746: Const expression caching led to NDB not using engine condition
      pushdown.
      Enabled ndb_condition_pushdown test after fixing appropriate bug.
    sql/ha_ndbcluster_cond.cc:
      Bug#49746: Const expression caching led to NDB not using engine condition
      pushdown.
      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.
    sql/item.cc:
      Bug#49746: Const expression caching led to NDB not using engine condition
      pushdown.
      The Item::cache_const_expr_analyzer function is adjusted to not create
      cache for Item_int_with_ref objects.
    sql/item.h:
      Bug#49746: Const expression caching led to NDB not using engine condition
      pushdown.
      The result_type() method is added to Item_cache class.
      The Item_cache_str now initializes its collation.
    3c282ea2
item.cc 224 KB