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
ea337204
Commit
ea337204
authored
Nov 17, 2003
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Safety fix for alarms on windows.
parent
d0a21a0a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
mysys/thr_alarm.c
mysys/thr_alarm.c
+2
-1
sql/mini_client.cc
sql/mini_client.cc
+11
-6
No files found.
mysys/thr_alarm.c
View file @
ea337204
...
@@ -638,7 +638,8 @@ bool thr_got_alarm(thr_alarm_t *alrm_ptr)
...
@@ -638,7 +638,8 @@ bool thr_got_alarm(thr_alarm_t *alrm_ptr)
void
thr_end_alarm
(
thr_alarm_t
*
alrm_ptr
)
void
thr_end_alarm
(
thr_alarm_t
*
alrm_ptr
)
{
{
thr_alarm_t
alrm
=
*
alrm_ptr
;
thr_alarm_t
alrm
=
*
alrm_ptr
;
if
(
alrm
->
crono
)
/* alrm may be zero if thr_alarm aborted with an error */
if
(
alrm
&&
alrm
->
crono
)
{
{
KillTimer
(
NULL
,
alrm
->
crono
);
KillTimer
(
NULL
,
alrm
->
crono
);
alrm
->
crono
=
0
;
alrm
->
crono
=
0
;
...
...
sql/mini_client.cc
View file @
ea337204
...
@@ -15,13 +15,14 @@
...
@@ -15,13 +15,14 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
/*
mini MySQL client to be included into the server to do server to server
mini MySQL client to be included into the server to do server to server
commincation by Sasha Pachev
commincation by Sasha Pachev
Note: all file-global symbols must begin with mc_ , even the static ones, just
Note: all file-global symbols must begin with mc_ , even the static
in case we decide to make them external at some point
ones, just
in case we decide to make them external at some point
*/
*/
#include <global.h>
#define DONT_USE_RAID
#define DONT_USE_RAID
#if defined(__WIN__)
#if defined(__WIN__)
#include <winsock.h>
#include <winsock.h>
...
@@ -40,7 +41,6 @@ inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __a
...
@@ -40,7 +41,6 @@ inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __a
#define thr_got_alarm(A) 0
#define thr_got_alarm(A) 0
#endif
#endif
#include <global.h>
#include <my_sys.h>
#include <my_sys.h>
#include <mysys_err.h>
#include <mysys_err.h>
#include <m_string.h>
#include <m_string.h>
...
@@ -597,6 +597,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
...
@@ -597,6 +597,11 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user,
sprintf
(
host_info
=
buff
,
ER
(
CR_TCP_CONNECTION
),
host
);
sprintf
(
host_info
=
buff
,
ER
(
CR_TCP_CONNECTION
),
host
);
DBUG_PRINT
(
"info"
,(
"Server name: '%s'. TCP sock: %d"
,
host
,
port
));
DBUG_PRINT
(
"info"
,(
"Server name: '%s'. TCP sock: %d"
,
host
,
port
));
thr_alarm_init
(
&
alarmed
);
thr_alarm_init
(
&
alarmed
);
/*
We don't have to check status for thr_alarm as it's not fatal if
we didn't manage to set an alarm. (In this case the socket call
will just block for a while).
*/
thr_alarm
(
&
alarmed
,
net_read_timeout
,
&
alarm_buff
);
thr_alarm
(
&
alarmed
,
net_read_timeout
,
&
alarm_buff
);
sock
=
(
my_socket
)
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
sock
=
(
my_socket
)
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
thr_end_alarm
(
&
alarmed
);
thr_end_alarm
(
&
alarmed
);
...
...
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