• dlenev@mysql.com's avatar
    Fix for bug#11081 "Using a CONVERT_TZ function in a stored function or · 2033f7ba
    dlenev@mysql.com authored
    trigger fails".
    
    In cases when CONVERT_TZ() function was used in trigger or stored function
    (or in stored procedure which was called from trigger or stored function)
    error about non existing '.' table was reported.
    
    Statements that use CONVERT_TZ() function should have time zone related
    tables in their table list. tz_init_table_list() function which is used
    to produce part of table list containing those tables didn't set
    TABLE_LIST::db_length/table_name_length members properly. As result time
    zone tables needed for CONVERT_TZ() function were incorrectly handled by
    prelocking algorithm and "Table '.' doesn't exist' error was emitted.
    This fix changes tz_init_table_list() in such way that it properly inits
    TABLE_LIST::table_name_length/db_length members and thus produces table list
    which can be handled by prelocking algorithm correctly.
    2033f7ba
tztime.cc 81.1 KB