• Anurag Shekhar's avatar
    Bug#37740 Server crashes on execute statement with full text search and · 7c670fc3
    Anurag Shekhar authored
              match against.
    
    
    Server crashes when executing prepared statement with duplicating
    MATCH() function calls in SELECT and ORDER BY expressions, e.g.:
    SELECT MATCH(a) AGAINST('test') FROM t1 ORDER BY MATCH(a) AGAINST('test')
    
    This query gets optimized by the server, so the value returned
    by MATCH() from the SELECT list is reused for ORDER BY purposes.
    To make this optimization server is comparing items from
    SELECT and ORDER BY lists. We were getting server crash because
    comparision function for MATCH() item is not intended to be called
    at this point of execution.
    
    In 5.0 and 5.1 this problem is workarounded by resetting MATCH()
    item to the state as it was during PREPARE.
    
    In 6.0 correct comparision function will be implemented and
    duplicating MATCH() items from the ORDER BY list will be
    optimized.
    7c670fc3
fulltext.result 20.3 KB