Bug #50287 | MySQL Backup: missed altered procedure in backup_bml_not_falcon.test | ||
---|---|---|---|
Submitted: | 12 Jan 2010 18:50 | Modified: | 27 Jan 2010 17:13 |
Reporter: | Ingo Strüwing | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Backup | Severity: | S3 (Non-critical) |
Version: | 6.0.14-alpha | OS: | Any |
Assigned to: | Ingo Strüwing | CPU Architecture: | Any |
[12 Jan 2010 18:50]
Ingo Strüwing
[12 Jan 2010 18:53]
Ingo Strüwing
This is perhaps a timing problem and thus won't hit many users.
[27 Jan 2010 17:13]
Ingo Strüwing
This is not a bug. There is a behavior difference between 6.0 and 5.6. 5.6: sp_show_create_routine() first calls sp_cache_routine(), which calls sp_cache_lookup(). If successful, it calls sp_cache_flush_obsolete(), which removes altered routines from cache, db_find_routine(), which reloads from mysql.proc, and sp_cache_insert(), which re-inserts the new definition into the cache, and sets sp_head::m_sp_cache_version from current cache version, which is used to detect altered routines. 6.0: sp_show_create_routine() calls sp_find_routine(), which calls sp_cache_lookup() and returns, if a cache hit, thus delivering old data. 6.0 does not have a sp_head::m_sp_cache_version member, it cannot detect altered routines in the cache. Hence it is correct that in 6.0, BACKUP backs up an outdated version of the CREATE PROCEDURE statement.