Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
94b0713c
Commit
94b0713c
authored
Jan 27, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix to #1224
code slightly modified with Monty's suggestions
parent
0f5933e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+4
-4
sql/sql_class.cc
sql/sql_class.cc
+0
-2
No files found.
libmysqld/lib_sql.cc
View file @
94b0713c
...
@@ -484,7 +484,7 @@ int check_embedded_connection(MYSQL *mysql)
...
@@ -484,7 +484,7 @@ int check_embedded_connection(MYSQL *mysql)
THD
*
thd
=
(
THD
*
)
mysql
->
thd
;
THD
*
thd
=
(
THD
*
)
mysql
->
thd
;
thd
->
host
=
(
char
*
)
my_localhost
;
thd
->
host
=
(
char
*
)
my_localhost
;
thd
->
host_or_ip
=
thd
->
host
;
thd
->
host_or_ip
=
thd
->
host
;
thd
->
user
=
my
sql
->
user
;
thd
->
user
=
my
_strdup
(
mysql
->
user
,
MYF
(
0
))
;
return
0
;
return
0
;
}
}
...
@@ -498,8 +498,8 @@ int check_embedded_connection(MYSQL *mysql)
...
@@ -498,8 +498,8 @@ int check_embedded_connection(MYSQL *mysql)
if
(
mysql
->
options
.
client_ip
)
if
(
mysql
->
options
.
client_ip
)
{
{
thd
->
host
=
my
sql
->
options
.
client_ip
;
thd
->
host
=
my
_strdup
(
mysql
->
options
.
client_ip
,
MYF
(
0
))
;
thd
->
ip
=
thd
->
host
;
thd
->
ip
=
my_strdup
(
thd
->
host
,
MYF
(
0
))
;
}
}
else
else
thd
->
host
=
(
char
*
)
my_localhost
;
thd
->
host
=
(
char
*
)
my_localhost
;
...
@@ -511,7 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
...
@@ -511,7 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
goto
err
;
goto
err
;
}
}
thd
->
user
=
my
sql
->
user
;
thd
->
user
=
my
_strdup
(
mysql
->
user
,
MYF
(
0
))
;
if
(
mysql
->
passwd
&&
mysql
->
passwd
[
0
])
if
(
mysql
->
passwd
&&
mysql
->
passwd
[
0
])
{
{
memset
(
thd
->
scramble
,
55
,
SCRAMBLE_LENGTH
);
// dummy scramble
memset
(
thd
->
scramble
,
55
,
SCRAMBLE_LENGTH
);
// dummy scramble
...
...
sql/sql_class.cc
View file @
94b0713c
...
@@ -323,13 +323,11 @@ THD::~THD()
...
@@ -323,13 +323,11 @@ THD::~THD()
#endif
#endif
DBUG_PRINT
(
"info"
,
(
"freeing host"
));
DBUG_PRINT
(
"info"
,
(
"freeing host"
));
#ifndef EMBEDDED_LIBRARY
if
(
host
!=
my_localhost
)
// If not pointer to constant
if
(
host
!=
my_localhost
)
// If not pointer to constant
safeFree
(
host
);
safeFree
(
host
);
if
(
user
!=
delayed_user
)
if
(
user
!=
delayed_user
)
safeFree
(
user
);
safeFree
(
user
);
safeFree
(
ip
);
safeFree
(
ip
);
#endif
safeFree
(
db
);
safeFree
(
db
);
free_root
(
&
warn_root
,
MYF
(
0
));
free_root
(
&
warn_root
,
MYF
(
0
));
free_root
(
&
transaction
.
mem_root
,
MYF
(
0
));
free_root
(
&
transaction
.
mem_root
,
MYF
(
0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment