• unknown's avatar
    Bug#32482: Crash for a query with ORDER BY a user variable. · 0ad7fc58
    unknown authored
    The Item_func_set_user_var::register_field_in_read_map() did not check 
    that the result_field was null.This caused server crashes for queries that
    required order by such a field and were executed without using a temporary
    table.
    
    The Item_func_set_user_var::register_field_in_read_map() now checks the
    result_field to be not null.
    
    
    mysql-test/t/user_var.test:
      Added a test case for the bug#32482: Crash for a query with ORDER BY a user variable.
    mysql-test/r/user_var.result:
      Added a test case for the bug#32482: Crash for a query with ORDER BY a user variable.
    sql/item_func.cc:
      Bug#32482: Crash for a query with ORDER BY a user variable.
      The Item_func_set_user_var::register_field_in_read_map() now checks the
      result_field to be not null.
    0ad7fc58
user_var.result 9.31 KB