• dlenev@mysql.com's avatar
    Fix for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs". · c77d5a0e
    dlenev@mysql.com authored
    Error was emitted when one tried to select information from view which used
    merge algorithm and which also had CONVERT_TZ() function in its select list.
    
    This bug was caused by wrong assumption that global table list for view
    which is handled using merge algorithm begins from tables belonging to
    the main select of this view. Nowadays the above assumption is not true only
    when one uses convert_tz() function in view's select list, but in future
    other cases may be added (for example we may support merging of views
    with subqueries in select list one day). Relying on this false assumption
    led to the usage of wrong table list for field lookups and therefor errors. 
    
    With this fix we explicitly use pointer to the beginning of main select's
    table list.
    c77d5a0e
timezone_grant.test 4.16 KB