My Project
|
#include <rpl_gtid.h>
Public Member Functions | |
Gtid_set * | get_gtid_set () const |
Return NULL if this is NULL, otherwise return the Gtid_set. | |
Gtid_set * | set_non_null (Sid_map *sm) |
void | set_null () |
Set this Gtid_set to NULL. | |
Public Attributes | |
Gtid_set * | gtid_set |
Pointer to the Gtid_set. | |
bool | is_non_null |
True if this Gtid_set is NULL. |
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.
Gtid_set* Gtid_set_or_null::set_non_null | ( | Sid_map * | sm | ) | [inline] |
Do nothing if this object is non-null; set to empty set otherwise.