MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
User_var_log_event Class Reference

#include <log_event.h>

Inheritance diagram for User_var_log_event:
Collaboration diagram for User_var_log_event:

Public Types

enum  { UNDEF_F = 0, UNSIGNED_F = 1 }
- Public Types inherited from Log_event
enum  enum_skip_reason { EVENT_SKIP_NOT, EVENT_SKIP_IGNORE, EVENT_SKIP_COUNT }
typedef unsigned char Byte

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 Member Functions inherited from Log_event
 Log_event (enum_event_cache_type cache_type_arg=EVENT_INVALID_CACHE, enum_event_logging_type logging_type_arg=EVENT_INVALID_LOGGING)
void print_timestamp (IO_CACHE *file, time_t *ts)
void print_header (IO_CACHE *file, PRINT_EVENT_INFO *print_event_info, bool is_more)
void print_base64 (IO_CACHE *file, PRINT_EVENT_INFO *print_event_info, bool is_more)
bool wrapper_my_b_safe_write (IO_CACHE *file, const uchar *buf, ulong data_length)
void set_artificial_event ()
void set_relay_log_event ()
bool is_artificial_event () const
bool is_relay_log_event () const
bool is_ignorable_event () const
bool is_no_filter_event () const
bool is_using_trans_cache () const
bool is_using_stmt_cache () const
bool is_using_immediate_logging () const
 Log_event (const char *buf, const Format_description_log_event *description_event)
void register_temp_buf (char *buf)
void free_temp_buf ()
virtual int get_data_size ()
const char * get_type_str ()

Public Attributes

const char * name
uint name_len
char * val
ulong val_len
Item_result type
uint charset_number
bool is_null
uchar flags
- Public Attributes inherited from Log_event
my_off_t log_pos
char * temp_buf
struct timeval when
ulong exec_time
ulong data_written
uint32 server_id
uint32 unmasked_server_id
uint16 flags
ulong slave_exec_mode
enum_event_cache_type event_cache_type
enum_event_logging_type event_logging_type
ha_checksum crc
ulong mts_group_idx
Relay_log_infoworker
ulonglong future_event_relay_log_pos
uint8 checksum_alg

Additional Inherited Members

- Static Public Member Functions inherited from Log_event
static Log_eventread_log_event (IO_CACHE *file, const Format_description_log_event *description_event, my_bool crc_check)
static void * operator new (size_t size)
static void operator delete (void *ptr, size_t)
static void * operator new (size_t, void *ptr)
static void operator delete (void *, void *)
static Log_eventread_log_event (const char *buf, uint event_len, const char **error, const Format_description_log_event *description_event, my_bool crc_check)
static const char * get_type_str (Log_event_type type)
- Protected Types inherited from Log_event
enum  enum_event_cache_type {
  EVENT_INVALID_CACHE = 0, EVENT_STMT_CACHE, EVENT_TRANSACTIONAL_CACHE, EVENT_NO_CACHE,
  EVENT_CACHE_COUNT
}
enum  enum_event_logging_type { EVENT_INVALID_LOGGING = 0, EVENT_NORMAL_LOGGING, EVENT_IMMEDIATE_LOGGING, EVENT_CACHE_LOGGING_COUNT }

Detailed Description

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.

Binary Format

Definition at line 2932 of file log_event.h.

Constructor & Destructor Documentation

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.

Definition at line 7462 of file log_event.cc.

Here is the call graph for this function:


The documentation for this class was generated from the following files: