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
fa25b9b4
Commit
fa25b9b4
authored
May 06, 2005
by
jani@ibmlab.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix for Bug#8467.
parent
f9e7e2ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
sql/hostname.cc
sql/hostname.cc
+8
-4
No files found.
BitKeeper/etc/logging_ok
View file @
fa25b9b4
...
...
@@ -86,6 +86,7 @@ jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
jani@hynda.(none)
jani@hynda.mysql.fi
jani@ibmlab.site
jani@janikt.pp.saunalahti.fi
jani@rhols221.adsl.netsonic.fi
jani@rhols221.arenanet.fi
...
...
sql/hostname.cc
View file @
fa25b9b4
...
...
@@ -207,13 +207,17 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
{
VOID
(
pthread_mutex_unlock
(
&
LOCK_hostname
));
DBUG_PRINT
(
"error"
,(
"gethostbyaddr returned %d"
,
errno
));
goto
err
;
if
(
errno
==
HOST_NOT_FOUND
||
errno
==
NO_DATA
)
add_wrong_ip
(
in
);
/* only cache negative responses, not failures */
DBUG_RETURN
(
0
);
}
if
(
!
hp
->
h_name
[
0
])
// Don't allow empty hostnames
{
VOID
(
pthread_mutex_unlock
(
&
LOCK_hostname
));
DBUG_PRINT
(
"error"
,(
"Got an empty hostname"
));
goto
err
;
goto
add_wrong_ip_and_return
;
}
if
(
!
(
name
=
my_strdup
(
hp
->
h_name
,
MYF
(
0
))))
{
...
...
@@ -240,7 +244,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
{
DBUG_PRINT
(
"error"
,(
"mysqld doesn't accept hostnames that starts with a number followed by a '.'"
));
my_free
(
name
,
MYF
(
0
));
goto
err
;
goto
add_wrong_ip_and_return
;
}
}
...
...
@@ -256,7 +260,7 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
DBUG_PRINT
(
"error"
,(
"Couldn't verify hostname with gethostbyname"
));
my_free
(
name
,
MYF
(
0
));
err
:
add_wrong_ip_and_return
:
add_wrong_ip
(
in
);
DBUG_RETURN
(
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