My Project
|
#include <log_event.h>
Public Types | |
enum | { UNDEF_F = 0, UNSIGNED_F = 1 } |
Public Member Functions | |
void | print (FILE *file, PRINT_EVENT_INFO *print_event_info) |
User_var_log_event (const char *buf, uint event_len, const Format_description_log_event *description_event) | |
Log_event_type | get_type_code () |
bool | is_valid () const |
Public Attributes | |
const char * | name |
uint | name_len |
char * | val |
ulong | val_len |
Item_result | type |
uint | charset_number |
bool | is_null |
uchar | flags |
Every time a query uses the value of a user variable, a User_var_log_event is written before the Query_log_event, to set the user variable.
User_var_log_event::User_var_log_event | ( | const char * | buf, |
uint | event_len, | ||
const Format_description_log_event * | description_event | ||
) |
We need to check if this is from an old server that did not pack information for flags. We do this by checking if there are extra bytes after the packed value. If there are we take the extra byte and it's value is assumed to contain the flags value.
Old events will not have this extra byte, thence, we keep the flags set to UNDEF_F.
Some 16 flags. See the definitions above for LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F, LOG_EVENT_THREAD_SPECIFIC_F, and LOG_EVENT_SUPPRESS_USE_F for notes.
Reimplemented from Log_event.