• unknown's avatar
    Fixed LP bug #601156 · b4d5f30a
    unknown authored
    The cause for this bug is that MariaDB 5.3 still processes derived tables
    (subqueries in the FROM clause) by fully executing them during the parse
    phase. This will be remedied by MWL#106 once merged into the main 5.3.
    
    The assert statement is triggered when MATERIALIZATION is ON for EXPLAIN
    EXTENDED for derived tables with an IN subquery as follows:
    - mysql_parse calls JOIN::exec for the derived table as if it is regular
      execution (not explain).
    - When materialization is ON, this call goes all the way to
      subselect_hash_sj_engine::exec, which creates a partial match engine
      because of NULL presence.
    - In order to proceed with normal execution, the hash_sj engine substitutes
      itself with the created partial match engine.
    - After the parse phase it turns out that this execution was part of
      EXPLAIN EXTENDED, which in turn calls
      Item_cond::print -> ... -> Item_subselect::print,
      which calls engine->print().
      Since subselect_hash_sj_engine::exec substituted the current
      Item_subselect engine with a  partial match engine, eventually we call
      its ::print() method. However the partial match engines are designed only
      for execution, hence there is no implementation of this print() method.
    
    The fix temporarily removes the assert, until this code is merged with
    MWL#106.
    b4d5f30a
subselect_partial_match.result 1.47 KB