diff options
author | dlenev@mysql.com <> | 2005-08-08 17:46:06 +0400 |
---|---|---|
committer | dlenev@mysql.com <> | 2005-08-08 17:46:06 +0400 |
commit | 615baa9f237b30ec590a4405ecb222643d1792a5 (patch) | |
tree | 8007d727be724e17f5c651d47f354821dec91991 /sql/sp.h | |
parent | 6fd6fa517b9a660b8d0c81dcebcd880058f9561a (diff) | |
download | mariadb-git-615baa9f237b30ec590a4405ecb222643d1792a5.tar.gz |
Fix for bug #10055 "Using stored function with information_schema causes empty
result set".
To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -90,6 +90,13 @@ void sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex, extern "C" byte* sp_sroutine_key(const byte *ptr, uint *plen, my_bool first); +/* + Routines which allow open/lock and close mysql.proc table even when + we already have some tables open and locked. +*/ +TABLE *open_proc_table_for_read(THD *thd, Open_tables_state *backup); +void close_proc_table(THD *thd, Open_tables_state *backup); + // // Utilities... // |