• unknown's avatar
    Fixed bug #21727. · 2a7cf59f
    unknown authored
    This is a performance issue for queries with subqueries evaluation
    of which requires filesort.
    Allocation of memory for the sort buffer at each evaluation of a
    subquery may take a significant amount of time if the buffer is rather big.
    With the fix we allocate the buffer at the first evaluation of the
    subquery and reuse it at each subsequent evaluation.
    
    
    mysql-test/r/subselect.result:
      Added a test case for bug #21727.
    mysql-test/t/subselect.test:
      Added a test case for bug #21727.
    sql/item_subselect.h:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added an implementation for Item_subselect::is_uncacheable()
      returning TRUE if the engine if the subselect is uncacheable.
    sql/mysql_priv.h:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added a new boolean parameter to the filesort_free_buffers procedure.
      If the value of this parameter is TRUE the procedure frees the sort_keys
      buffpek buffers.
    sql/records.cc:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added a new boolean parameter to the filesort_free_buffers procedure.
      If the value of this parameter is TRUE the procedure frees the sort_keys
      buffpek buffers.
    sql/sql_base.cc:
      Fixed bug #21727.
      Made sure that st_table::pos_in_table_list would be always initialized.
    sql/sql_select.cc:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added a new boolean parameter to the filesort_free_buffers procedure.
      If the value of this parameter is TRUE the procedure frees the sort_keys
      buffpek buffers.
    sql/sql_show.cc:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added a new boolean parameter to the filesort_free_buffers procedure.
      If the value of this parameter is TRUE the procedure frees the sort_keys
      buffpek buffers.
    sql/sql_table.cc:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Cleanup.
    sql/table.cc:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added st_table_list::in_subselect() returning for a table the subselect that 
      contains the FROM list this table is taken from (if there is any).
    sql/table.h:
      Fixed bug #21727.
      This is a performance issue for queries with subqueries evaluation
      of which requires filesort.
      Added fields for sort_keys and buffpek buffers to the FILESORT_INFO structure.
    2a7cf59f
table.h 30 KB