[MDEV-6877] Added binlog_row_image system variable
The system variable is present but it does not do anything yet.
This commit is contained in:
parent
768620ee5c
commit
3ed519ff05
@ -96,6 +96,16 @@ enum enum_mark_columns
|
|||||||
{ MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE};
|
{ MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE};
|
||||||
enum enum_filetype { FILETYPE_CSV, FILETYPE_XML };
|
enum enum_filetype { FILETYPE_CSV, FILETYPE_XML };
|
||||||
|
|
||||||
|
enum enum_binlog_row_image {
|
||||||
|
/** PKE in the before image and changed columns in the after image */
|
||||||
|
BINLOG_ROW_IMAGE_MINIMAL= 0,
|
||||||
|
/** Whenever possible, before and after image contain all columns except blobs. */
|
||||||
|
BINLOG_ROW_IMAGE_NOBLOB= 1,
|
||||||
|
/** All columns in both before and after image. */
|
||||||
|
BINLOG_ROW_IMAGE_FULL= 2
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Bits for different SQL modes modes (including ANSI mode) */
|
/* Bits for different SQL modes modes (including ANSI mode) */
|
||||||
#define MODE_REAL_AS_FLOAT (1ULL << 0)
|
#define MODE_REAL_AS_FLOAT (1ULL << 0)
|
||||||
#define MODE_PIPES_AS_CONCAT (1ULL << 1)
|
#define MODE_PIPES_AS_CONCAT (1ULL << 1)
|
||||||
@ -588,6 +598,7 @@ typedef struct system_variables
|
|||||||
/* Flags for slow log filtering */
|
/* Flags for slow log filtering */
|
||||||
ulong log_slow_rate_limit;
|
ulong log_slow_rate_limit;
|
||||||
ulong binlog_format; ///< binlog format for this thd (see enum_binlog_format)
|
ulong binlog_format; ///< binlog format for this thd (see enum_binlog_format)
|
||||||
|
ulong binlog_row_image;
|
||||||
ulong progress_report_time;
|
ulong progress_report_time;
|
||||||
ulong completion_type;
|
ulong completion_type;
|
||||||
ulong query_cache_type;
|
ulong query_cache_type;
|
||||||
|
@ -5200,6 +5200,22 @@ static Sys_var_mybool Sys_encrypt_tmp_files(
|
|||||||
READ_ONLY GLOBAL_VAR(encrypt_tmp_files),
|
READ_ONLY GLOBAL_VAR(encrypt_tmp_files),
|
||||||
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
|
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
|
||||||
|
|
||||||
|
static const char *binlog_row_image_names[]= {"MINIMAL", "NOBLOB", "FULL", NullS};
|
||||||
|
static Sys_var_enum Sys_binlog_row_image(
|
||||||
|
"binlog_row_image",
|
||||||
|
"Controls whether rows should be logged in 'FULL', 'NOBLOB' or "
|
||||||
|
"'MINIMAL' formats. 'FULL', means that all columns in the before "
|
||||||
|
"and after image are logged. 'NOBLOB', means that mysqld avoids logging "
|
||||||
|
"blob columns whenever possible (eg, blob column was not changed or "
|
||||||
|
"is not part of primary key). 'MINIMAL', means that a PK equivalent (PK "
|
||||||
|
"columns or full row if there is no PK in the table) is logged in the "
|
||||||
|
"before image, and only changed columns are logged in the after image. "
|
||||||
|
"(Default: FULL).",
|
||||||
|
SESSION_VAR(binlog_row_image), CMD_LINE(REQUIRED_ARG),
|
||||||
|
binlog_row_image_names, DEFAULT(BINLOG_ROW_IMAGE_FULL),
|
||||||
|
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
|
||||||
|
ON_UPDATE(NULL));
|
||||||
|
|
||||||
static bool check_pseudo_slave_mode(sys_var *self, THD *thd, set_var *var)
|
static bool check_pseudo_slave_mode(sys_var *self, THD *thd, set_var *var)
|
||||||
{
|
{
|
||||||
longlong previous_val= thd->variables.pseudo_slave_mode;
|
longlong previous_val= thd->variables.pseudo_slave_mode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user