My Project
Public Member Functions | Public Attributes
Gtid_set_or_null Struct Reference

#include <rpl_gtid.h>

List of all members.

Public Member Functions

Gtid_setget_gtid_set () const
 Return NULL if this is NULL, otherwise return the Gtid_set.
Gtid_setset_non_null (Sid_map *sm)
void set_null ()
 Set this Gtid_set to NULL.

Public Attributes

Gtid_setgtid_set
 Pointer to the Gtid_set.
bool is_non_null
 True if this Gtid_set is NULL.

Detailed Description

Holds information about a Gtid_set. Can also be NULL.

This is used as backend storage for @session.gtid_next_list. The idea is that we allow the user to set this to NULL, but we keep the Gtid_set object so that we can re-use the allocated memory and avoid costly allocations later.

This is stored in struct system_variables (defined in sql_class.h), which is cleared using memset(0); hence the negated form of is_non_null.

The convention is: if is_non_null is false, then the value of the session variable is NULL, and the field gtid_set may be NULL or non-NULL. If is_non_null is true, then the value of the session variable is not NULL, and the field gtid_set has to be non-NULL.

This is a POD. It has to be a POD because it is stored in THD::variables.


Member Function Documentation

Do nothing if this object is non-null; set to empty set otherwise.

Returns:
NULL if out of memory; Gtid_set otherwise.

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