• Lawrin Novitsky's avatar
    MDEV-31064 Changes in a SP are not immediately seen in I_S.parameters · 02cd3675
    Lawrin Novitsky authored
    If procedure is changed in one connection, and other procedure has
    already called the initial version of the procedure, the query to
    INFORMATION_SCHEMA.PARAMETERS would use obsolete information from sp
    cache for that connection. That happens because cache invalidating
    method only increments cache version, and does not flush (all) the
    cache(s), and changing of a procedure only invalidates cache, and
    removes the procedure's cache entry from local thread cache only.
    
    The fix adds the check if sp info obtained from the cache for forming of
    results for the query to I_S, is not obsoleted, and does not use it, if
    it is.
    
    The test has been added to main.information_schema. It changes the SP in
    one connection, and ensures, that the change is seen in the query to the
    I_S.PARAMETERS in other connection, that already has called the
    procedure before the change.
    02cd3675
sp.cc 93.5 KB