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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
94da57dc
Commit
94da57dc
authored
Jan 25, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always call vio_in_addr() so that thd->remote is
always initialized. (Bug #5569)
parent
bc35532b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
vio/viosocket.c
vio/viosocket.c
+1
-1
vio/viossl.c
vio/viossl.c
+1
-1
No files found.
sql/sql_parse.cc
View file @
94da57dc
...
...
@@ -501,6 +501,9 @@ check_connections(THD *thd)
thd
->
thread_id
));
DBUG_PRINT
(
"info"
,(
"New connection received on %s"
,
vio_description
(
net
->
vio
)));
vio_in_addr
(
net
->
vio
,
&
thd
->
remote
.
sin_addr
);
if
(
!
thd
->
host
)
// If TCP/IP connection
{
char
ip
[
30
];
...
...
@@ -521,7 +524,6 @@ check_connections(THD *thd)
#endif
if
(
!
(
specialflag
&
SPECIAL_NO_RESOLVE
))
{
vio_in_addr
(
net
->
vio
,
&
thd
->
remote
.
sin_addr
);
thd
->
host
=
ip_to_hostname
(
&
thd
->
remote
.
sin_addr
,
&
connect_errors
);
/* Cut very long hostnames to avoid possible overflows */
if
(
thd
->
host
)
...
...
@@ -543,7 +545,6 @@ check_connections(THD *thd)
DBUG_PRINT
(
"info"
,(
"Host: %s"
,
thd
->
host
));
thd
->
host_or_ip
=
thd
->
host
;
thd
->
ip
=
0
;
bzero
((
char
*
)
&
thd
->
remote
,
sizeof
(
struct
sockaddr
));
}
vio_keepalive
(
net
->
vio
,
TRUE
);
...
...
vio/viosocket.c
View file @
94da57dc
...
...
@@ -295,7 +295,7 @@ void vio_in_addr(Vio *vio, struct in_addr *in)
{
DBUG_ENTER
(
"vio_in_addr"
);
if
(
vio
->
localhost
)
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
/* This should never be executed */
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
else
*
in
=
vio
->
remote
.
sin_addr
;
DBUG_VOID_RETURN
;
...
...
vio/viossl.c
View file @
94da57dc
...
...
@@ -259,7 +259,7 @@ void vio_ssl_in_addr(Vio *vio, struct in_addr *in)
{
DBUG_ENTER
(
"vio_ssl_in_addr"
);
if
(
vio
->
localhost
)
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
/* This should never be executed */
bzero
((
char
*
)
in
,
sizeof
(
*
in
));
else
*
in
=
vio
->
remote
.
sin_addr
;
DBUG_VOID_RETURN
;
...
...
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