• unknown's avatar
    Fix for #1992 · 859f599e
    unknown authored
    This bug happens when a query, having subselects in the fields list,
    needs temporary table.
    Item_subselect::get_tmp_table_item isn't implemented and just returns
    *this. So the tmp_table_item takes value not from temporary but
    from original table.
    
    
    mysql-test/r/subselect.result:
      appropriate test result added
    mysql-test/t/subselect.test:
      test case added
    sql/item_subselect.cc:
      Item_subselect::get_tmp_table_item implementation
    sql/item_subselect.h:
      Item_subselect::get_tmp_table_item declaration
    859f599e
item_subselect.h 9.83 KB