summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-01-27 13:46:47 +0400
committerhf@deer.(none) <>2004-01-27 13:46:47 +0400
commit94b0713ca1ea6c503328357f46950138d24ad4a2 (patch)
tree6b057ed2cd82a6da7910f989cbadbd78ce2cf0bc /libmysqld/lib_sql.cc
parent0f5933e38e8855c4196b0ab3ee93b716a5fab2fc (diff)
downloadmariadb-git-94b0713ca1ea6c503328357f46950138d24ad4a2.tar.gz
bugfix to #1224
code slightly modified with Monty's suggestions
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 2d451d6cecd..741916064b0 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -484,7 +484,7 @@ int check_embedded_connection(MYSQL *mysql)
THD *thd= (THD*)mysql->thd;
thd->host= (char*)my_localhost;
thd->host_or_ip= thd->host;
- thd->user= mysql->user;
+ thd->user= my_strdup(mysql->user, MYF(0));
return 0;
}
@@ -498,8 +498,8 @@ int check_embedded_connection(MYSQL *mysql)
if (mysql->options.client_ip)
{
- thd->host= mysql->options.client_ip;
- thd->ip= thd->host;
+ thd->host= my_strdup(mysql->options.client_ip, MYF(0));
+ thd->ip= my_strdup(thd->host, MYF(0));
}
else
thd->host= (char*)my_localhost;
@@ -511,7 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
goto err;
}
- thd->user= mysql->user;
+ thd->user= my_strdup(mysql->user, MYF(0));
if (mysql->passwd && mysql->passwd[0])
{
memset(thd->scramble, 55, SCRAMBLE_LENGTH); // dummy scramble