• unknown's avatar
    Bug#20836 Selecting into variables results in wrong results being returned · b4aab152
    unknown authored
    This error is displayed anytime the SELECT statement needs a temp table to
    return correct results because the object (select_dumpvar) that represents
    variables named in the INTO clause stored the results before the temp
    table was considered.  The problem was fixed by creating the necessary
    Item_func_set_user_var objects once the correct data is ready.
    
    
    mysql-test/r/distinct.result:
      Bug#20836 Selecting into variables results in wrong results being returned
      - Added results
    mysql-test/t/distinct.test:
      Bug#20836 Selecting into variables results in wrong results being returned
      - Added various Selects that use the INTO statement and a temp table.
      - Added Select Into Outfile variant tests also.
    sql/sql_class.cc:
      Bug#20836 Selecting into variables results in wrong results being returned
      - The select_dumpvar variable created a Item_func_set_user_var too early
      and once set, it was not possible to change.  The Item_func_set_user_var
      is now created once the final results are available.
    sql/sql_class.h:
      Bug#20836 Selecting into variables results in wrong results being returned
      - Removed unnecessary object members.
    b4aab152
distinct.result 21.1 KB