• evgen@moonbone.local's avatar
    Fix bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server · cc5d7c07
    evgen@moonbone.local authored
    Procedure analyse() redefines select's fields_list. setup_copy_fields() assumes
    that fields_list is a part of all_fields_list. Because select have only 
    3 columns and analyse() redefines it to have 10 columns, int overrun in
    setup_copy_fields() occurs and server goes to almost infinite loop.
    
    Because fields_list used not only to send data ad fields types, it's wrong 
    to allow procedure redefine it. This patch separates select's fileds_list 
    and procedure's one. Now if procedure is present, copy of fields_list is 
    created in procedure_fields_list and it is used for sending data and fields.
    cc5d7c07
sql_select.cc 288 KB