My Project
Public Member Functions | Static Public Attributes
Gtid_log_event Class Reference
Inheritance diagram for Gtid_log_event:
Log_event

List of all members.

Public Member Functions

 Gtid_log_event (THD *thd_arg, bool using_trans, const Gtid_specification *spec=NULL)
int pack_info (Protocol *)
 Gtid_log_event (const char *buffer, uint event_len, const Format_description_log_event *descr_event)
Log_event_type get_type_code ()
int get_data_size ()
enum_group_type get_type () const
bool is_valid () const
const rpl_sidget_sid () const
rpl_sidno get_sidno (bool need_lock)
rpl_sidno get_sidno (Sid_map *sid_map)
rpl_gno get_gno () const
 Return the GNO for this GTID.
bool get_commit_flag () const
 Return true if this is the last group of the transaction, else false.

Static Public Attributes

static const char * SET_STRING_PREFIX = "SET @@SESSION.GTID_NEXT= '"
 string holding the text "SET @@GLOBAL.GTID_NEXT = '"
static const int POST_HEADER_LENGTH
 Total length of post header.

Constructor & Destructor Documentation

Gtid_log_event::Gtid_log_event ( THD *  thd_arg,
bool  using_trans,
const Gtid_specification spec = NULL 
)

Create a new event using the GTID from the given Gtid_specification, or from @SESSION.GTID_NEXT if spec==NULL.


Member Function Documentation

const rpl_sid* Gtid_log_event::get_sid ( ) const [inline]

Return the SID for this GTID. The SID is shared with the Log_event so it should not be modified.

rpl_sidno Gtid_log_event::get_sidno ( bool  need_lock) [inline]

Return the SIDNO relative to the global sid_map for this GTID.

This requires a lookup and possibly even update of global_sid_map, hence global_sid_lock must be held. If global_sid_lock is not held, the caller must pass need_lock=true. If there is an error (e.g. out of memory) while updating global_sid_map, this function returns a negative number.

Parameters:
need_lockIf true, the read lock on global_sid_lock is acquired and released inside this function; if false, the read lock or write lock must be held prior to calling this function.
Return values:
SIDNOif successful
negativeif adding SID to global_sid_map causes an error.
rpl_sidno Gtid_log_event::get_sidno ( Sid_map sid_map) [inline]

Return the SIDNO relative to the given Sid_map for this GTID.

This assumes that the Sid_map is local to the thread, and thus does not use locks.

Parameters:
sid_mapThe sid_map to use.
Return values:
SIDNOif successful. if adding SID to sid_map causes an error.
enum_group_type Gtid_log_event::get_type ( ) const [inline]

Return the group type for this Gtid_log_event: this can be either ANONYMOUS_GROUP, AUTOMATIC_GROUP, or GTID_GROUP.


Member Data Documentation

Initial value:
    ENCODED_FLAG_LENGTH + ENCODED_SID_LENGTH + ENCODED_GNO_LENGTH

Total length of post header.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines