diff options
author | anozdrin/alik@ibm.opbmk <> | 2007-08-31 20:42:14 +0400 |
---|---|---|
committer | anozdrin/alik@ibm.opbmk <> | 2007-08-31 20:42:14 +0400 |
commit | d6f94b062c370fc0765a8720bdbba50e6d872802 (patch) | |
tree | 38c6a445d870a736939fb8fa36bb8dc40fb08e20 /sql/sp.h | |
parent | f141ba5e2688df860fe18b298d5366b7ff11f91b (diff) | |
download | mariadb-git-d6f94b062c370fc0765a8720bdbba50e6d872802.tar.gz |
Fix for BUG#25843: changing default database between PREPARE and EXECUTE
of statement breaks binlog.
There were two problems discovered by this bug:
1. Default (current) database is not fixed at the creation time.
That leads to wrong output of DATABASE() function.
2. Database attributes (@@collation_database) are not fixed at
the creation time. That leads to wrong resultset.
Binlog breakage and Query Cache wrong output happened because of
the first problem.
The fix is to remember the current database at the PREPARE-time and
set it each time at EXECUTE.
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -85,15 +85,4 @@ extern "C" uchar* sp_sroutine_key(const uchar *ptr, size_t *plen, */ TABLE *open_proc_table_for_read(THD *thd, Open_tables_state *backup); - -/* - Do a "use new_db". The current db is stored at old_db. If new_db is the - same as the current one, nothing is changed. dbchangedp is set to true if - the db was actually changed. -*/ - -int -sp_use_new_db(THD *thd, LEX_STRING new_db, LEX_STRING *old_db, - bool no_access_check, bool *dbchangedp); - #endif /* _SP_H_ */ |