Phase 4 (final): Remove associated stored procedures when a database is dropped.
mysql-test/r/sp-security.result:
drop database now deletes associated SPs.
mysql-test/r/sp.result:
drop database now deletes associated SPs.
mysql-test/t/sp-security.test:
drop database now deletes associated SPs.
mysql-test/t/sp.test:
drop database now deletes associated SPs.
sql/sp.cc:
New function for deleting all SPs associated with a database.
sql/sp.h:
New function for deleting all SPs associated with a database.
sql/sp_cache.cc:
New function for just invalidating all SP caches (when dropping a database).
sql/sp_cache.h:
New function for just invalidating all SP caches (when dropping a database).
sql/sql_db.cc:
When dropping a database, also delete all associated SPs.
Phase 1: Introduced sp_name class, for qualified name support.
sql/item_func.cc:
Introduced sp_name class; moved some methods from item_func.h.
sql/item_func.h:
Introduced sp_name class; moved some methods to item_func.cc.
sql/sp.cc:
Introduced sp_name class, for qualified name support.
sql/sp.h:
Introduced sp_name class, for qualified name support.
sql/sp_cache.cc:
Introduced sp_name class, for qualified name support.
sql/sp_cache.h:
Introduced sp_name class, for qualified name support.
sql/sp_head.cc:
Introduced sp_name class, for qualified name support.
sql/sp_head.h:
Introduced sp_name class, for qualified name support.
sql/sql_lex.h:
Introduced sp_name class, for qualified name support.
sql/sql_parse.cc:
Introduced sp_name class, for qualified name support.
sql/sql_yacc.yy:
Introduced sp_name class, for qualified name support.
sql/sp.cc:
Fixed memory leaks. Deletion of sps now in sp_cache.
sql/sp_cache.cc:
Fixed memory leaks. Use implicit delete of objects to make sure
they're always freed.
sql/sp_cache.h:
Fixed memory leaks. Use implicit delete of objects to make sure
they're always freed.
sql/sp_head.cc:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
sql/sp_head.h:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
sql/sql_parse.cc:
Fixed memory leaks. Don't forget to free the temporary object created at definition.
sql/sql_yacc.yy:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
Need a sp_cache_remove() function with implicit name lookup to make the WL task
to work. It's a cleaner and more convenient interface anyway...
sql/sp.cc:
Modified sp_cache_remove() function calls; just remove by name.
sql/sp_cache.cc:
Modified sp_cache_remove() function. Get name and lookup/remove, return the
removed entry, if any.
sql/sp_cache.h:
Modified sp_cache_remove() function. Get name and lookup/remove, return the
removed entry, if any.
New sp_cache C API. When an SP is dropped, old caches (in other threads)
become invalid and are cleared.
Also, the caches in THD are only created on demand.
Docs/sp-imp-spec.txt:
Brough the SP cache docs up-to-date.
sql/mysqld.cc:
Initialize SP cache.
sql/sp.cc:
New C API for SP cache.
sql/sp_cache.cc:
New C API for sp_cache.
The class sp_cache is still used, but not directly. The C functions makes takes
care of updating caches when SPs are dropped. (This is done in the simplest
possible way, by simply detecting drops and then clear all old caches.)
The API is also designed so that the sp_cache is created on demand.
sql/sp_cache.h:
New C API for sp_cache.
The class sp_cache is still used, but not directly. The C functions makes takes
care of updating caches when SPs are dropped.
The API is also designed so that the sp_cache is created on demand.
sql/sql_class.cc:
The new sp_cache API creates the caches on demand, to avoid allocating it
when it's not needed.