• kostja@bodhi.local's avatar
    A fix for Bug#14897 "ResultSet.getString("table.column") sometimes · 3bf609b7
    kostja@bodhi.local authored
    doesn't find the column"
    
    When a user was using 4.1 tables with VARCHAR column and 5.0 server
    and a query that used a temporary table to resolve itself, the
    table metadata for the varchar column sent to client was incorrect:
    MYSQL_FIELD::table member was empty.
    
    The bug was caused by implicit "upgrade" from old VARCHAR to new
    VARCHAR hard-coded in Field::new_field, which did not preserve
    the information about the original table. Thus, the field metadata
    of the "upgraded" field pointed to an auxiliary temporary table
    created for query execution.
    
    The fix is to copy the pointer to the original table to the new field.
    3bf609b7
field.cc 243 KB