diff options
author | unknown <nick@mysql.com> | 2002-10-24 16:48:34 -0600 |
---|---|---|
committer | unknown <nick@mysql.com> | 2002-10-24 16:48:34 -0600 |
commit | 27d11e85b234de7ec48d57d5720c9871654adb2f (patch) | |
tree | b3f2e50a55894f80378006887d64c18c34e1558c /sql/log_event.h | |
parent | 171ac60fe1ce0cb112a11b709ff8029b3de935a3 (diff) | |
download | mariadb-git-27d11e85b234de7ec48d57d5720c9871654adb2f.tar.gz |
Added Rand_log_event
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index 5f7aa4ad586..ad0a44f9b4a 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -152,6 +152,11 @@ struct sql_ex_info #define I_TYPE_OFFSET 0 #define I_VAL_OFFSET 1 +/* Rand event post-header */ + +#define RAND_SEED1_OFFSET 0 +#define RAND_SEED2_OFFSET 8 + /* Load event post-header */ #define L_THREAD_ID_OFFSET 0 @@ -199,7 +204,7 @@ enum Log_event_type START_EVENT = 1, QUERY_EVENT =2, STOP_EVENT=3, ROTATE_EVENT = 4, INTVAR_EVENT=5, LOAD_EVENT=6, SLAVE_EVENT=7, CREATE_FILE_EVENT=8, APPEND_BLOCK_EVENT=9, EXEC_LOAD_EVENT=10, DELETE_FILE_EVENT=11, - NEW_LOAD_EVENT=12 + NEW_LOAD_EVENT=12, RAND_EVENT=13 }; enum Int_event_type @@ -497,6 +502,34 @@ public: bool is_valid() { return 1; } }; +/***************************************************************************** + * + * Rand log event class + * + ****************************************************************************/ +class Rand_log_event: public Log_event +{ + public: + ulonglong seed1; + ulonglong seed2; + +#ifndef MYSQL_CLIENT + Rand_log_event(THD* thd_arg, ulonglong seed1_arg, ulonglong seed2_arg) + :Log_event(thd_arg),seed1(seed1_arg),seed2(seed2_arg) + {} + void pack_info(String* packet); + int exec_event(struct st_relay_log_info* rli); +#else + void print(FILE* file, bool short_form = 0, char* last_db = 0); +#endif + + Rand_log_event(const char* buf, bool old_format); + ~Rand_log_event() {} + Log_event_type get_type_code() { return RAND_EVENT;} + int get_data_size() { return sizeof(ulonglong) * 2; } + int write_data(IO_CACHE* file); + bool is_valid() { return 1; } +}; class Stop_log_event: public Log_event { |