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
9c6a3b1a
Commit
9c6a3b1a
authored
Aug 21, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portability fix.
parent
510ce837
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
mysys/thr_alarm.c
mysys/thr_alarm.c
+25
-11
readline/display.c
readline/display.c
+1
-1
sql/net_serv.cc
sql/net_serv.cc
+12
-8
No files found.
mysys/thr_alarm.c
View file @
9c6a3b1a
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
static
my_bool
alarm_aborted
=
1
;
static
my_bool
alarm_aborted
=
1
;
my_bool
thr_alarm_inited
=
0
;
my_bool
thr_alarm_inited
=
0
;
static
sig_handler
process_alarm_part2
(
int
sig
);
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
static
pthread_mutex_t
LOCK_alarm
;
static
pthread_mutex_t
LOCK_alarm
;
...
@@ -244,8 +246,6 @@ void thr_end_alarm(thr_alarm_t *alarmed)
...
@@ -244,8 +246,6 @@ void thr_end_alarm(thr_alarm_t *alarmed)
sig_handler
process_alarm
(
int
sig
__attribute__
((
unused
)))
sig_handler
process_alarm
(
int
sig
__attribute__
((
unused
)))
{
{
sigset_t
old_mask
;
sigset_t
old_mask
;
ALARM
*
alarm_data
;
/*
/*
This must be first as we can't call DBUG inside an alarm for a normal thread
This must be first as we can't call DBUG inside an alarm for a normal thread
*/
*/
...
@@ -262,11 +262,33 @@ sig_handler process_alarm(int sig __attribute__((unused)))
...
@@ -262,11 +262,33 @@ sig_handler process_alarm(int sig __attribute__((unused)))
return
;
return
;
}
}
#endif
#endif
{
/*
We have to do do the handling of the alarm in a sub function,
because otherwise we would get problems with two threads calling
DBUG_... functions at the same time (as two threads may call
process_alarm() at the same time
*/
#ifndef USE_ALARM_THREAD
#ifndef USE_ALARM_THREAD
pthread_sigmask
(
SIG_SETMASK
,
&
full_signal_set
,
&
old_mask
);
pthread_sigmask
(
SIG_SETMASK
,
&
full_signal_set
,
&
old_mask
);
pthread_mutex_lock
(
&
LOCK_alarm
);
pthread_mutex_lock
(
&
LOCK_alarm
);
#endif
#endif
process_alarm_part2
(
sig
);
#ifndef USE_ALARM_THREAD
#if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND)
sigset
(
THR_SERVER_ALARM
,
process_alarm
);
#endif
pthread_mutex_unlock
(
&
LOCK_alarm
);
pthread_sigmask
(
SIG_SETMASK
,
&
old_mask
,
NULL
);
#endif
return
;
}
static
sig_handler
process_alarm_part2
(
int
sig
__attribute__
((
unused
)))
{
ALARM
*
alarm_data
;
DBUG_ENTER
(
"process_alarm"
);
DBUG_ENTER
(
"process_alarm"
);
DBUG_PRINT
(
"info"
,(
"sig: %d active alarms: %d"
,
sig
,
alarm_queue
.
elements
));
DBUG_PRINT
(
"info"
,(
"sig: %d active alarms: %d"
,
sig
,
alarm_queue
.
elements
));
...
@@ -333,15 +355,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
...
@@ -333,15 +355,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
#endif
#endif
}
}
}
}
#ifndef USE_ALARM_THREAD
#if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND)
sigset
(
THR_SERVER_ALARM
,
process_alarm
);
#endif
pthread_mutex_unlock
(
&
LOCK_alarm
);
pthread_sigmask
(
SIG_SETMASK
,
&
old_mask
,
NULL
);
#endif
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
}
...
...
readline/display.c
View file @
9c6a3b1a
...
@@ -623,7 +623,7 @@ rl_redisplay ()
...
@@ -623,7 +623,7 @@ rl_redisplay ()
_rl_move_vert
(
linenum
);
_rl_move_vert
(
linenum
);
_rl_move_cursor_relative
(
0
,
tt
);
_rl_move_cursor_relative
(
0
,
tt
);
_rl_clear_to_eol
_rl_clear_to_eol
((
linenum
==
_rl_vis_botlin
)
?
strlen
(
tt
)
:
screenwidth
);
((
linenum
==
_rl_vis_botlin
)
?
(
int
)
strlen
(
tt
)
:
screenwidth
);
}
}
}
}
_rl_vis_botlin
=
inv_botlin
;
_rl_vis_botlin
=
inv_botlin
;
...
...
sql/net_serv.cc
View file @
9c6a3b1a
...
@@ -162,20 +162,24 @@ static my_bool net_realloc(NET *net, ulong length)
...
@@ -162,20 +162,24 @@ static my_bool net_realloc(NET *net, ulong length)
void
net_clear
(
NET
*
net
)
void
net_clear
(
NET
*
net
)
{
{
DBUG_ENTER
(
"net_clear"
);
#if !defined(EXTRA_DEBUG) && !defined(EMBEDDED_LIBRARY)
#if !defined(EXTRA_DEBUG) && !defined(EMBEDDED_LIBRARY)
int
count
;
/* One may get 'unused' warn */
my_bool
old_mode
;
if
(
!
vio_blocking
(
net
->
vio
,
FALSE
,
&
old_mode
))
{
{
while
(
(
count
=
vio_read
(
net
->
vio
,
(
char
*
)
(
net
->
buff
),
int
count
;
/* One may get 'unused' warn */
(
uint32
)
net
->
max_packet
))
>
0
)
my_bool
old_mode
;
DBUG_PRINT
(
"info"
,(
"skipped %d bytes from file: %s"
,
if
(
!
vio_blocking
(
net
->
vio
,
FALSE
,
&
old_mode
))
count
,
vio_description
(
net
->
vio
)));
{
vio_blocking
(
net
->
vio
,
TRUE
,
&
old_mode
);
while
((
count
=
vio_read
(
net
->
vio
,
(
char
*
)
(
net
->
buff
),
(
uint32
)
net
->
max_packet
))
>
0
)
DBUG_PRINT
(
"info"
,(
"skipped %d bytes from file: %s"
,
count
,
vio_description
(
net
->
vio
)));
vio_blocking
(
net
->
vio
,
TRUE
,
&
old_mode
);
}
}
}
#endif
/* EXTRA_DEBUG */
#endif
/* EXTRA_DEBUG */
net
->
pkt_nr
=
net
->
compress_pkt_nr
=
0
;
/* Ready for new command */
net
->
pkt_nr
=
net
->
compress_pkt_nr
=
0
;
/* Ready for new command */
net
->
write_pos
=
net
->
buff
;
net
->
write_pos
=
net
->
buff
;
DBUG_VOID_RETURN
;
}
}
/* Flush write_buffer if not empty. */
/* Flush write_buffer if not empty. */
...
...
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