• unknown's avatar
    Fixed bug #28811: crash for a query containing a subquery with · d8e2f262
    unknown authored
    ORDER BY and LIMIT 1. 
    The bug was introduced by the patch for bug 21727. The patch
    erroneously skipped initialization of the array of headers
    for sorted records for non-first evaluations of the subquery.
    
    To fix the problem a new parameter has been added to the
    function make_char_array that performs the initialization.
    Now this function is called for any invocation of the 
    filesort procedure. Yet it allocates the buffer for sorted
    records only if this parameter is NULL.
    
    
    mysql-test/r/subselect.result:
      Added a test case for bug #28811.
    mysql-test/t/subselect.test:
      Added a test case for bug #28811.
    d8e2f262
filesort.cc 44.4 KB