• gkodinov/kgeorge@macbook.gmz's avatar
    Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs · e7ff881c
    gkodinov/kgeorge@macbook.gmz authored
    When compiling GROUP BY Item_ref instances are dereferenced in 
    setup_copy_fields(), i.e. replaced with the corresponding Item_field 
    (if they point to one) or Item_copy_string for the other cases.
    Since the Item_ref (in the Item_field case) is no longer used the information
    about the aliases stored in it is lost.   
    Fixed by preserving the column, table and DB alias on dereferencing Item_ref
    e7ff881c
item.cc 174 KB