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
c0d9954c
Commit
c0d9954c
authored
Apr 16, 2002
by
monty@tik.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed pthread_cond_timedwait() for HPUX and DCE threads
Cleanup of LIBWRAP handling
parent
abb3e501
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
35 deletions
+61
-35
Docs/manual.texi
Docs/manual.texi
+7
-9
include/my_pthread.h
include/my_pthread.h
+7
-0
mysys/my_pthread.c
mysys/my_pthread.c
+16
-2
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/mysqld.cc
sql/mysqld.cc
+29
-22
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
Docs/manual.texi
View file @
c0d9954c
...
...
@@ -46854,7 +46854,6 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code.
@menu
* News-3.23.51::
* News-3.23.50:: Changes in release 3.23.50
* News-3.23.49:: Changes in release 3.23.49
* News-3.23.48:: Changes in release 3.23.48
...
...
@@ -46909,20 +46908,19 @@ not yet 100% confident in this code.
* News-3.23.0:: Changes in release 3.23.0
@end menu
@node News-3.23.5
1, News-3.23.50
, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.5
1
@node News-3.23.5
0, News-3.23.49
, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.5
0
@itemize @bullet
@item
Fixed timeout for @code{GET_LOCK()} on HPUX with DCE threads.
@item
Fixed memory allocation bug in the glibc library used to build Linux
binaries, which caused mysqld to die in 'free()'.
@item
Fixed @code{SIGINT} and @code{SIGQUIT} problems in @code{mysql}.
@item
Fixed bug in character table converts when used with big ( > 64K) strings.
@end itemize
@node News-3.23.50, News-3.23.49, News-3.23.51, News-3.23.x
@appendixsubsec Changes in release 3.23.50
@itemize @bullet
@item
@code{InnoDB} now retains foreign key constraints through @code{ALTER TABLE}
and @code{CREATE/DROP INDEX}.
include/my_pthread.h
View file @
c0d9954c
...
...
@@ -349,6 +349,13 @@ extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
#undef HAVE_GETHOSTBYADDR_R
/* No definition */
#endif
#if defined(HAVE_DEC_THREADS)
extern
int
my_pthread_cond_timedwait
(
pthread_cond_t
*
cond
,
pthread_mutex_t
*
mutex
,
struct
timespec
*
abstime
);
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
#endif
#if defined(OS2)
#define my_pthread_getspecific(T,A) ((T) &(A))
#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
...
...
mysys/my_pthread.c
View file @
c0d9954c
...
...
@@ -410,9 +410,23 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif
/* Change functions on HP to work according to POSIX */
#ifdef HAVE_DEC_THREADS
#undef pthread_cond_timedwait
int
my_pthread_cond_timedwait
(
pthread_cond_t
*
cond
,
pthread_mutex_t
*
mutex
,
struct
timespec
*
abstime
)
{
int
error
=
pthread_cond_timedwait
(
cond
,
mutex
,
abstime
);
return
error
==
EAGAIN
?
ETIMEDOUT
:
error
;
}
#endif
/* HAVE_DEC_THREADS */
/*
**
Emulate SOLARIS style calls, not because it's better, but just to make the
**
usage of getbostbyname_r simpler.
Emulate SOLARIS style calls, not because it's better, but just to make the
usage of getbostbyname_r simpler.
*/
#if !defined(my_gethostbyname_r) && defined(HAVE_GETHOSTBYNAME_R)
...
...
sql/item_func.cc
View file @
c0d9954c
...
...
@@ -1514,7 +1514,7 @@ longlong Item_func_get_lock::val_int()
while
(
!
thd
->
killed
&&
(
error
=
pthread_cond_timedwait
(
&
ull
->
cond
,
&
LOCK_user_locks
,
&
abstime
))
!=
ETIME
&&
error
!=
ETIMEDOUT
&&
ull
->
locked
)
;
!=
ETIME
&&
error
!=
ETIMEDOUT
&&
error
!=
EINVAL
&&
ull
->
locked
)
;
if
(
thd
->
killed
)
error
=
EINTR
;
// Return NULL
if
(
ull
->
locked
)
...
...
sql/mysqld.cc
View file @
c0d9954c
...
...
@@ -89,6 +89,16 @@ extern "C" { // Because of SCO 3.2V4.2
#endif
/* NEED_SYS_SYSLOG_H */
int
allow_severity
=
LOG_INFO
;
int
deny_severity
=
LOG_WARNING
;
#ifdef __linux__
#define my_fromhost(A) fromhost()
#define my_hosts_access(A) hosts_access()
#define my_eval_client(A) eval_client()
#else
#define my_fromhost(A) fromhost(A)
#define my_hosts_access(A) hosts_access(A)
#define my_eval_client(A) eval_client(A)
#endif
#endif
/* HAVE_LIBWRAP */
#ifdef HAVE_SYS_MMAN_H
...
...
@@ -2258,7 +2268,6 @@ static void create_new_thread(THD *thd)
if
(
cached_thread_count
>
wake_thread
)
{
start_cached_thread
(
thd
);
(
void
)
pthread_mutex_unlock
(
&
LOCK_thread_count
);
}
else
{
...
...
@@ -2285,9 +2294,9 @@ static void create_new_thread(THD *thd)
(
void
)
pthread_mutex_unlock
(
&
LOCK_thread_count
);
DBUG_VOID_RETURN
;
}
(
void
)
pthread_mutex_unlock
(
&
LOCK_thread_count
);
}
(
void
)
pthread_mutex_unlock
(
&
LOCK_thread_count
);
}
DBUG_PRINT
(
"info"
,(
"Thread created"
));
DBUG_VOID_RETURN
;
...
...
@@ -2415,29 +2424,27 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused)))
struct
request_info
req
;
signal
(
SIGCHLD
,
SIG_DFL
);
request_init
(
&
req
,
RQ_DAEMON
,
libwrapName
,
RQ_FILE
,
new_sock
,
NULL
);
#ifndef __linux__
fromhost
(
&
req
);
if
(
!
hosts_access
(
&
req
))
{
// This may be stupid but refuse() includes an exit(0)
// which we surely don't want...
// clean_exit() - same stupid thing ...
syslog
(
deny_severity
,
"refused connect from %s"
,
eval_client
(
&
req
));
#else
fromhost
();
if
(
!
hosts_access
())
my_fromhost
(
&
req
);
if
(
!
my_hosts_access
(
&
req
))
{
syslog
(
deny_severity
,
"refused connect from %s"
,
eval_client
());
#endif
/*
This may be stupid but refuse() includes an exit(0)
which we surely don't want...
clean_exit() - same stupid thing ...
*/
syslog
(
deny_severity
,
"refused connect from %s"
,
my_eval_client
(
&
req
));
/*
C++ sucks (the gibberish in front just translates the supplied
sink function pointer in the req structure from a void (*sink)();
to a void(*sink)(int) if you omit the cast, the C++ compiler
will cry...
*/
if
(
req
.
sink
)
((
void
(
*
)(
int
))
req
.
sink
)(
req
.
fd
);
// C++ sucks (the gibberish in front just translates the supplied
// sink function pointer in the req structure from a void (*sink)();
// to a void(*sink)(int) if you omit the cast, the C++ compiler
// will cry...
(
void
)
shutdown
(
new_sock
,
2
);
// This looks fine to me...
(
void
)
shutdown
(
new_sock
,
2
);
(
void
)
closesocket
(
new_sock
);
continue
;
}
...
...
sql/sql_parse.cc
View file @
c0d9954c
...
...
@@ -530,7 +530,7 @@ pthread_handler_decl(handle_one_connection,arg)
if
((
error
=
check_connections
(
thd
)))
{
// Wrong permissions
if
(
error
>
0
)
net_printf
(
net
,
error
,
thd
->
host
?
thd
->
host
:
thd
->
ip
);
net_printf
(
net
,
error
,
thd
->
host
?
thd
->
host
:
(
thd
->
ip
?
thd
->
ip
:
""
)
);
#ifdef __NT__
if
(
vio_type
(
net
->
vio
)
==
VIO_TYPE_NAMEDPIPE
)
sleep
(
1
);
/* must wait after eof() */
...
...
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