• dlenev@mysql.com's avatar
    Fix for bug #11555 "Stored procedures: current SP tables locking make · 06b895c0
    dlenev@mysql.com authored
    impossible view security".
    
    We should not expose names of tables which are explicitly or implicitly (via
    routine or trigger) used by view even if we find that they are missing.
    So during building of list of prelocked tables for statement we track which
    routines (and therefore tables for these routines) are used from views. We
    mark elements of LEX::routines set which correspond to routines used in views
    by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
    object for topmost view which uses routine. We propagate this mark to all
    routines which are used by this routine and which we add to this set. We also
    mark tables used by such routine which we add to the list of tables for
    prelocking as belonging to this view.
    06b895c0
view.result 72.7 KB