Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
b9d1d348
Commit
b9d1d348
authored
Mar 21, 2015
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MDEV-6877] Added test suite for binlog_row_image sys var
parent
3ed519ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
229 additions
and
0 deletions
+229
-0
mysql-test/suite/sys_vars/r/binlog_row_image_basic.result
mysql-test/suite/sys_vars/r/binlog_row_image_basic.result
+100
-0
mysql-test/suite/sys_vars/t/binlog_row_image_basic.test
mysql-test/suite/sys_vars/t/binlog_row_image_basic.test
+129
-0
No files found.
mysql-test/suite/sys_vars/r/binlog_row_image_basic.result
0 → 100644
View file @
b9d1d348
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;
mysql-test/suite/sys_vars/t/binlog_row_image_basic.test
0 → 100644
View file @
b9d1d348
################## 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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment