1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

fix for bug #17619 Scheduler race conditions

- Scheduler is either initialized at server start or never.
  Starting & stopping is now suspending & resuming.
- The scheduler has clear OO interface
- Now all calls to the scheduler are synchronous
- GLOBAL event_scheduler uses thd::sys_var_tmp (see set_var.cc)
- External API is encapsulated into class Events
- Includes fixes for all comments of Kostja's review of 19.05.2005

Starting to merge into 5.1-release (5.1.10) and push
This commit is contained in:
andrey@lmy004.
2006-05-22 20:46:13 +02:00
parent 9fca0d766b
commit b429d73d62
41 changed files with 4129 additions and 2369 deletions

View File

@ -629,6 +629,8 @@ public:
{
return (*priv_host ? priv_host : (char *)"%");
}
bool set_user(char *user_arg);
};
@ -770,6 +772,19 @@ public:
};
/* Flags for the THD::system_thread variable */
enum enum_thread_type
{
NON_SYSTEM_THREAD= 0,
SYSTEM_THREAD_DELAYED_INSERT= 1,
SYSTEM_THREAD_SLAVE_IO= 2,
SYSTEM_THREAD_SLAVE_SQL= 4,
SYSTEM_THREAD_NDBCLUSTER_BINLOG= 8,
SYSTEM_THREAD_EVENT_SCHEDULER= 16,
SYSTEM_THREAD_EVENT_WORKER= 32
};
/*
For each client connection we create a separate thread with THD serving as
a thread/connection descriptor
@ -1103,7 +1118,8 @@ public:
long dbug_thread_id;
pthread_t real_id;
uint tmp_table, global_read_lock;
uint server_status,open_options,system_thread;
uint server_status,open_options;
enum enum_thread_type system_thread;
uint32 db_length;
uint select_number; //number of select (used for EXPLAIN)
/* variables.transaction_isolation is reset to this after each commit */
@ -1404,11 +1420,6 @@ public:
#define reenable_binlog(A) (A)->options= tmp_disable_binlog__save_options;}
/* Flags for the THD::system_thread (bitmap) variable */
#define SYSTEM_THREAD_DELAYED_INSERT 1
#define SYSTEM_THREAD_SLAVE_IO 2
#define SYSTEM_THREAD_SLAVE_SQL 4
#define SYSTEM_THREAD_NDBCLUSTER_BINLOG 8
/*
Used to hold information about file and file structure in exchainge