Skip to content
  • Neeraj Bisht's avatar
    6df48b18
    Bug#16539903 - SERVER CRASHES IN IN HA_MYISAM::FT_INIT_EXT WITH · 6df48b18
    Neeraj Bisht authored
    	       A FROM SUBQUERY
    
    Problem:-
    Full-text search combined with derived tables causes a segment fault.
    
    Analysis:-
    In query like
    EXPLAIN SELECT  MATCH(ft) AGAINST( "test" IN BOOLEAN MODE) FROM
    ( SELECT  ft FROM t1 ) AS t;
    
    We are creating a temporary table for the subquery result table.
    But after wl-5274(where we are postponed materialization), we will create
    tmp table, but skip instantiation of temporary table.
    
    When we have full-text function in our main select query, we are
    going to call Item_func_match::init_search() for all the full-text item.
    There we are going to take care about
    condition like
    --> match ... against (null)
    and we are going to call handler::ft_init_ext(), which is used to
    Initialize full-text index scan(which need table to be initialized).
    but as we havnt initialized the table. This cause a segmentation fault.
    
    Solution:-
    When we have derived tables, instead of intializing full-text function at 
    optimization, we will initiate it at the time of execution . 
    6df48b18
    Bug#16539903 - SERVER CRASHES IN IN HA_MYISAM::FT_INIT_EXT WITH
    Neeraj Bisht authored
    	       A FROM SUBQUERY
    
    Problem:-
    Full-text search combined with derived tables causes a segment fault.
    
    Analysis:-
    In query like
    EXPLAIN SELECT  MATCH(ft) AGAINST( "test" IN BOOLEAN MODE) FROM
    ( SELECT  ft FROM t1 ) AS t;
    
    We are creating a temporary table for the subquery result table.
    But after wl-5274(where we are postponed materialization), we will create
    tmp table, but skip instantiation of temporary table.
    
    When we have full-text function in our main select query, we are
    going to call Item_func_match::init_search() for all the full-text item.
    There we are going to take care about
    condition like
    --> match ... against (null)
    and we are going to call handler::ft_init_ext(), which is used to
    Initialize full-text index scan(which need table to be initialized).
    but as we havnt initialized the table. This cause a segmentation fault.
    
    Solution:-
    When we have derived tables, instead of intializing full-text function at 
    optimization, we will initiate it at the time of execution . 
Loading