summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authormonty@mishka.local <>2005-08-20 11:00:00 +0300
committermonty@mishka.local <>2005-08-20 11:00:00 +0300
commit1c1f26d5e2dbd35bf26ddc7f4830ceacd86eb3f9 (patch)
tree499bcf518b69b974792bbb607094965a41e25061 /sql/sql_parse.cc
parentc726451abb7687488c906a318687485dd05e9bff (diff)
downloadmariadb-git-1c1f26d5e2dbd35bf26ddc7f4830ceacd86eb3f9.tar.gz
Fixes during review of new pushed code
Fixed new bug when running a SP without a default database
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2ba82954319..4fc01d99d22 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -238,7 +238,8 @@ end:
/*
- Check if user exist and password supplied is correct.
+ Check if user exist and password supplied is correct.
+
SYNOPSIS
check_user()
thd thread handle, thd->{host,user,ip} are used
@@ -273,6 +274,10 @@ int check_user(THD *thd, enum enum_server_command command,
/* Change database if necessary */
if (db && db[0])
{
+ /*
+ thd->db is saved in caller and needs to be freed by caller if this
+ function returns 0
+ */
thd->db= 0;
thd->db_length= 0;
if (mysql_change_db(thd, db, FALSE))