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
44ceb84c
Commit
44ceb84c
authored
Feb 15, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge with 4.0
parents
9a042c81
788a2658
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
sql/sql_parse.cc
sql/sql_parse.cc
+5
-4
vio/viosocket.c
vio/viosocket.c
+12
-0
No files found.
sql/sql_parse.cc
View file @
44ceb84c
...
@@ -656,12 +656,12 @@ static int check_connection(THD *thd)
...
@@ -656,12 +656,12 @@ static int check_connection(THD *thd)
{
{
uint
connect_errors
=
0
;
uint
connect_errors
=
0
;
NET
*
net
=
&
thd
->
net
;
NET
*
net
=
&
thd
->
net
;
ulong
pkt_len
=
0
;
char
*
end
;
DBUG_PRINT
(
"info"
,
DBUG_PRINT
(
"info"
,
(
"New connection received on %s"
,
vio_description
(
net
->
vio
)));
(
"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
if
(
!
thd
->
host
)
// If TCP/IP connection
{
{
char
ip
[
30
];
char
ip
[
30
];
...
@@ -671,6 +671,7 @@ static int check_connection(THD *thd)
...
@@ -671,6 +671,7 @@ static int check_connection(THD *thd)
if
(
!
(
thd
->
ip
=
my_strdup
(
ip
,
MYF
(
0
))))
if
(
!
(
thd
->
ip
=
my_strdup
(
ip
,
MYF
(
0
))))
return
(
ER_OUT_OF_RESOURCES
);
return
(
ER_OUT_OF_RESOURCES
);
thd
->
host_or_ip
=
thd
->
ip
;
thd
->
host_or_ip
=
thd
->
ip
;
vio_in_addr
(
net
->
vio
,
&
thd
->
remote
.
sin_addr
);
#if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread)
#if !defined(HAVE_SYS_UN_H) || defined(HAVE_mit_thread)
/* Fast local hostname resolve for Win32 */
/* Fast local hostname resolve for Win32 */
if
(
!
strcmp
(
thd
->
ip
,
"127.0.0.1"
))
if
(
!
strcmp
(
thd
->
ip
,
"127.0.0.1"
))
...
@@ -706,10 +707,10 @@ static int check_connection(THD *thd)
...
@@ -706,10 +707,10 @@ static int check_connection(THD *thd)
DBUG_PRINT
(
"info"
,(
"Host: %s"
,
thd
->
host
));
DBUG_PRINT
(
"info"
,(
"Host: %s"
,
thd
->
host
));
thd
->
host_or_ip
=
thd
->
host
;
thd
->
host_or_ip
=
thd
->
host
;
thd
->
ip
=
0
;
thd
->
ip
=
0
;
/* Reset sin_addr */
bzero
((
char
*
)
&
thd
->
remote
,
sizeof
(
thd
->
remote
));
}
}
vio_keepalive
(
net
->
vio
,
TRUE
);
vio_keepalive
(
net
->
vio
,
TRUE
);
ulong
pkt_len
=
0
;
char
*
end
;
{
{
/* buff[] needs to big enough to hold the server_version variable */
/* buff[] needs to big enough to hold the server_version variable */
char
buff
[
SERVER_VERSION_LENGTH
+
SCRAMBLE_LENGTH
+
64
];
char
buff
[
SERVER_VERSION_LENGTH
+
SCRAMBLE_LENGTH
+
64
];
...
...
vio/viosocket.c
View file @
44ceb84c
...
@@ -272,6 +272,18 @@ my_bool vio_peer_addr(Vio * vio, char *buf, uint16 *port)
...
@@ -272,6 +272,18 @@ my_bool vio_peer_addr(Vio * vio, char *buf, uint16 *port)
}
}
/*
Get in_addr for a TCP/IP connection
SYNOPSIS
vio_in_addr()
vio vio handle
in put in_addr here
NOTES
one must call vio_peer_addr() before calling this one
*/
void
vio_in_addr
(
Vio
*
vio
,
struct
in_addr
*
in
)
void
vio_in_addr
(
Vio
*
vio
,
struct
in_addr
*
in
)
{
{
DBUG_ENTER
(
"vio_in_addr"
);
DBUG_ENTER
(
"vio_in_addr"
);
...
...
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