summaryrefslogtreecommitdiff
path: root/sql/sp.h
diff options
context:
space:
mode:
authoranozdrin/alik@ibm.opbmk <>2007-08-31 20:42:14 +0400
committeranozdrin/alik@ibm.opbmk <>2007-08-31 20:42:14 +0400
commitd6f94b062c370fc0765a8720bdbba50e6d872802 (patch)
tree38c6a445d870a736939fb8fa36bb8dc40fb08e20 /sql/sp.h
parentf141ba5e2688df860fe18b298d5366b7ff11f91b (diff)
downloadmariadb-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.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/sql/sp.h b/sql/sp.h
index 52b0344a2e2..3797eb289a4 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -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_ */