1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Cleanup of alarm macros.

Fixed data corruption bug in query cache.
Made queries be dependent of the database in use.
This commit is contained in:
monty@hundin.mysql.fi
2001-12-21 07:00:58 +02:00
parent f5a1abd861
commit 55a2ab6e7e
17 changed files with 188 additions and 154 deletions

View File

@ -38,24 +38,23 @@ extern "C" {
#define THR_SERVER_ALARM SIGALRM
#endif
#if defined(DONT_USE_THR_ALARM)
#if defined(DONT_USE_THR_ALARM) || !defined(THREAD)
#define USE_ALARM_THREAD
#undef USE_ONE_SIGNAL_HAND
typedef struct st_thr_alarm_entry
{
uint crono;
} thr_alarm_entry;
typedef my_bool thr_alarm_t;
typedef my_bool ALARM;
#define thr_alarm_init(A) (A)->crono=0
#define thr_alarm_in_use(A) (A)->crono
#define thr_alarm_init(A) (*(A))=0
#define thr_alarm_in_use(A) (*(A) != 0)
#define thr_end_alarm(A)
#define thr_alarm(A,B,C) ((*(A)=1)-1)
/* The following should maybe be (*(A)) */
#define thr_got_alarm(A) 0
#define init_thr_alarm(A)
#define thr_alarm_kill(A)
#define end_thr_alarm()
#define thr_alarm(A,B) (((A)->crono=1)-1)
#define thr_got_alarm(A) (A)->crono
#define thr_end_alarm(A)
#else
#if defined(__WIN__)