summaryrefslogtreecommitdiff
path: root/include/thr_alarm.h
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-12-21 07:00:58 +0200
committerunknown <monty@hundin.mysql.fi>2001-12-21 07:00:58 +0200
commit9603291efdd930b1b7efb1534ba76569d517aac9 (patch)
tree14f15faabd0531594907bd3b9b9e4787da493d83 /include/thr_alarm.h
parent10863a359080d70a979bf0fc8bd88e7c51a6a2c2 (diff)
downloadmariadb-git-9603291efdd930b1b7efb1534ba76569d517aac9.tar.gz
Cleanup of alarm macros.
Fixed data corruption bug in query cache. Made queries be dependent of the database in use. Docs/manual.texi: Update binary log reference client/mysql.cc: Removed warning include/thr_alarm.h: Cleanup of alarm macros. libmysql/libmysql.c: Portabiliy fix libmysql/net.c: Cleanup of alarm macros. mysql-test/t/rpl_get_lock.test: Fixed results after merge. mysys/my_bitmap.c: Removed warning. sql/log_event.cc: Use thd->db_length sql/mini_client.cc: Cleanup of alarm macros. sql/net_serv.cc: Cleanup of alarm macros. sql/sql_acl.cc: Use thd->db_length sql/sql_cache.cc: Store used database together with the query. sql/sql_class.cc: Use thd->db_length sql/sql_class.h: Use thd->db_length sql/sql_db.cc: Use thd->db_length sql/sql_parse.cc: Use thd->db_length sql/sql_udf.cc: Use thd->db_length
Diffstat (limited to 'include/thr_alarm.h')
-rw-r--r--include/thr_alarm.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/thr_alarm.h b/include/thr_alarm.h
index 48fad54444e..5caf552718c 100644
--- a/include/thr_alarm.h
+++ b/include/thr_alarm.h
@@ -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__)