mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
[MDEV-6877] Added test suite for binlog_row_image sys var
This commit is contained in:
parent
3ed519ff05
commit
b9d1d348dd
2 changed files with 229 additions and 0 deletions
100
mysql-test/suite/sys_vars/r/binlog_row_image_basic.result
Normal file
100
mysql-test/suite/sys_vars/r/binlog_row_image_basic.result
Normal file
|
@ -0,0 +1,100 @@
|
|||
SELECT @@GLOBAL.binlog_row_image;
|
||||
@@GLOBAL.binlog_row_image
|
||||
FULL
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
@@SESSION.binlog_row_image
|
||||
FULL
|
||||
FULL Expected
|
||||
'#---------------------BS_STVARS_002_01----------------------#'
|
||||
SET @start_value= @@global.binlog_row_image;
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
COUNT(@@GLOBAL.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
COUNT(@@SESSION.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
'#---------------------BS_STVARS_002_02----------------------#'
|
||||
SET @@GLOBAL.binlog_row_image=0;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
@@GLOBAL.binlog_row_image
|
||||
MINIMAL
|
||||
MINIMAL Expected
|
||||
SET @@SESSION.binlog_row_image=0;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
@@SESSION.binlog_row_image
|
||||
MINIMAL
|
||||
MINIMAL Expected
|
||||
SET @@GLOBAL.binlog_row_image=1;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
@@GLOBAL.binlog_row_image
|
||||
NOBLOB
|
||||
NOBLOB Expected
|
||||
SET @@SESSION.binlog_row_image=1;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
@@SESSION.binlog_row_image
|
||||
NOBLOB
|
||||
NOBLOB Expected
|
||||
SET @@GLOBAL.binlog_row_image=2;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
@@GLOBAL.binlog_row_image
|
||||
FULL
|
||||
FULL Expected
|
||||
SET @@SESSION.binlog_row_image=2;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
@@SESSION.binlog_row_image
|
||||
FULL
|
||||
FULL Expected
|
||||
'#---------------------BS_STVARS_002_03----------------------#'
|
||||
SELECT @@GLOBAL.binlog_row_image = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
@@GLOBAL.binlog_row_image = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
COUNT(@@GLOBAL.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
'#---------------------BS_STVARS_002_04----------------------#'
|
||||
SELECT @@SESSION.binlog_row_image = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
@@SESSION.binlog_row_image = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
COUNT(@@SESSION.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
'#---------------------BS_STVARS_002_05----------------------#'
|
||||
SELECT COUNT(@@binlog_row_image);
|
||||
COUNT(@@binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.binlog_row_image);
|
||||
COUNT(@@local.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
COUNT(@@SESSION.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
COUNT(@@GLOBAL.binlog_row_image)
|
||||
1
|
||||
1 Expected
|
||||
SET @@global.binlog_row_image= @start_value;
|
129
mysql-test/suite/sys_vars/t/binlog_row_image_basic.test
Normal file
129
mysql-test/suite/sys_vars/t/binlog_row_image_basic.test
Normal file
|
@ -0,0 +1,129 @@
|
|||
################## mysql-test\t\binlog_row_image_basic.test ###################
|
||||
# #
|
||||
# Variable Name: binlog_row_image #
|
||||
# Scope: Global & Session #
|
||||
# Access Type: Static #
|
||||
# Data Type: enumeration #
|
||||
# #
|
||||
# #
|
||||
# Creation Date: 2010-05-20 #
|
||||
# Author : Luis Soares #
|
||||
# #
|
||||
# #
|
||||
# Description:Test Cases of Dynamic System Variable binlog_row_image #
|
||||
# that checks the behavior of this variable in the following ways #
|
||||
# * Value Check #
|
||||
# * Scope Check #
|
||||
# #
|
||||
# Reference: #
|
||||
# http://dev.mysql.com/doc/refman/5.X/en/server-system-variables.html #
|
||||
# #
|
||||
###############################################################################
|
||||
|
||||
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
--echo FULL Expected
|
||||
|
||||
--echo '#---------------------BS_STVARS_002_01----------------------#'
|
||||
####################################################################
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SET @start_value= @@global.binlog_row_image;
|
||||
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
|
||||
--echo '#---------------------BS_STVARS_002_02----------------------#'
|
||||
####################################################################
|
||||
# Check if Value can set #
|
||||
####################################################################
|
||||
SET @@GLOBAL.binlog_row_image=0;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
--echo MINIMAL Expected
|
||||
|
||||
SET @@SESSION.binlog_row_image=0;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
--echo MINIMAL Expected
|
||||
|
||||
SET @@GLOBAL.binlog_row_image=1;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
--echo NOBLOB Expected
|
||||
|
||||
SET @@SESSION.binlog_row_image=1;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
--echo NOBLOB Expected
|
||||
|
||||
SET @@GLOBAL.binlog_row_image=2;
|
||||
SELECT @@GLOBAL.binlog_row_image;
|
||||
--echo FULL Expected
|
||||
|
||||
SET @@SESSION.binlog_row_image=2;
|
||||
SELECT @@SESSION.binlog_row_image;
|
||||
--echo FULL Expected
|
||||
|
||||
--echo '#---------------------BS_STVARS_002_03----------------------#'
|
||||
#################################################################
|
||||
# Check if the value in GLOBAL Table matches value in variable #
|
||||
#################################################################
|
||||
|
||||
--disable_warnings
|
||||
SELECT @@GLOBAL.binlog_row_image = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
|
||||
--disable_warnings
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_002_04----------------------#'
|
||||
#################################################################
|
||||
# Check if the value in SESSION Table matches value in variable #
|
||||
#################################################################
|
||||
|
||||
--disable_warnings
|
||||
SELECT @@SESSION.binlog_row_image = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
|
||||
--disable_warnings
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
WHERE VARIABLE_NAME='binlog_row_image';
|
||||
--enable_warnings
|
||||
--echo 1 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_002_05----------------------#'
|
||||
################################################################################
|
||||
# Check if binlog_row_image can be accessed with and without @@ sign #
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@binlog_row_image);
|
||||
--echo 1 Expected
|
||||
SELECT COUNT(@@local.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
SELECT COUNT(@@SESSION.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
SELECT COUNT(@@GLOBAL.binlog_row_image);
|
||||
--echo 1 Expected
|
||||
|
||||
SET @@global.binlog_row_image= @start_value;
|
||||
|
Loading…
Add table
Reference in a new issue