Skip to content
  • Roy Lyseng's avatar
    d9373ed2
    Bug#16499751: Opening cursor on SELECT in stored procedure causes segfault · d9373ed2
    Roy Lyseng authored
    This is a regression from the fix of bug#14740889.
    The fix started using another set of expressions as the source for
    the temporary table used for the materialized cursor. However,
    JOIN::make_tmp_tables_info() calls setup_copy_fields() which creates
    an Item_copy wrapper object on top of the function being selected.
    
    The Item_copy objects were not properly handled by create_tmp_table -
    they were simply ignored. This patch creates temporary table fields
    based on the underlying item of the Item_copy objects.
    
    sql/sql_tmp_table.cc
      In create_tmp_table(), create temporary table fields based on
      Item_copy's underlying item.
    d9373ed2
    Bug#16499751: Opening cursor on SELECT in stored procedure causes segfault
    Roy Lyseng authored
    This is a regression from the fix of bug#14740889.
    The fix started using another set of expressions as the source for
    the temporary table used for the materialized cursor. However,
    JOIN::make_tmp_tables_info() calls setup_copy_fields() which creates
    an Item_copy wrapper object on top of the function being selected.
    
    The Item_copy objects were not properly handled by create_tmp_table -
    they were simply ignored. This patch creates temporary table fields
    based on the underlying item of the Item_copy objects.
    
    sql/sql_tmp_table.cc
      In create_tmp_table(), create temporary table fields based on
      Item_copy's underlying item.
Loading