| 1 |
######### mysql-test\t\binlog_rows_query_log_events.test ########### |
| 2 |
# # |
| 3 |
# Variable Name: binlog_rows_query_log_events # |
| 4 |
# Scope: Global & Session # |
| 5 |
# Access Type: Static # |
| 6 |
# Data Type: bool # |
| 7 |
# # |
| 8 |
# Description:Test Cases of Dynamic System Variable # |
| 9 |
# binlog_rows_query_log_events # |
| 10 |
# that checks the behavior of this variable in the following ways # |
| 11 |
# * Value Check # |
| 12 |
# * Scope Check # |
| 13 |
# # |
| 14 |
# Reference: # |
| 15 |
# http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html # |
| 16 |
# # |
| 17 |
############################################################################### |
| 18 |
|
| 19 |
SELECT @@GLOBAL.binlog_rows_query_log_events; |
| 20 |
|
| 21 |
--echo '#---------------------BS_STVARS_002_01----------------------#' |
| 22 |
#################################################################### |
| 23 |
# Displaying default value # |
| 24 |
#################################################################### |
| 25 |
SET @start_value= @@global.binlog_rows_query_log_events; |
| 26 |
|
| 27 |
SELECT COUNT(@@GLOBAL.binlog_rows_query_log_events); |
| 28 |
--echo 1 Expected |
| 29 |
|
| 30 |
SELECT COUNT(@@SESSION.binlog_rows_query_log_events); |
| 31 |
--echo 1 Expected |
| 32 |
|
| 33 |
--echo '#---------------------BS_STVARS_002_02----------------------#' |
| 34 |
#################################################################### |
| 35 |
# Check if Value can set # |
| 36 |
#################################################################### |
| 37 |
SET @@GLOBAL.binlog_rows_query_log_events=TRUE; |
| 38 |
SELECT @@GLOBAL.binlog_rows_query_log_events; |
| 39 |
|
| 40 |
SET @@SESSION.binlog_rows_query_log_events=TRUE; |
| 41 |
SELECT @@SESSION.binlog_rows_query_log_events; |
| 42 |
|
| 43 |
--echo '#---------------------BS_STVARS_002_03----------------------#' |
| 44 |
################################################################# |
| 45 |
# Check if the value in GLOBAL Table matches value in variable # |
| 46 |
################################################################# |
| 47 |
|
| 48 |
--disable_warnings |
| 49 |
SELECT |
| 50 |
IF(@@GLOBAL.binlog_rows_query_log_events, "ON", "OFF") = VARIABLE_VALUE |
| 51 |
FROM performance_schema.global_variables |
| 52 |
WHERE VARIABLE_NAME='binlog_rows_query_log_events'; |
| 53 |
--enable_warnings |
| 54 |
--echo 1 Expected |
| 55 |
|
| 56 |
SELECT COUNT(@@GLOBAL.binlog_rows_query_log_events); |
| 57 |
--echo 1 Expected |
| 58 |
|
| 59 |
--disable_warnings |
| 60 |
SELECT COUNT(VARIABLE_VALUE) |
| 61 |
FROM performance_schema.global_variables |
| 62 |
WHERE VARIABLE_NAME='binlog_rows_query_log_events'; |
| 63 |
--enable_warnings |
| 64 |
--echo 1 Expected |
| 65 |
|
| 66 |
|
| 67 |
--echo '#---------------------BS_STVARS_002_04----------------------#' |
| 68 |
################################################################# |
| 69 |
# Check if the value in SESSION Table matches value in variable # |
| 70 |
################################################################# |
| 71 |
|
| 72 |
--disable_warnings |
| 73 |
SELECT |
| 74 |
IF(@@SESSION.binlog_rows_query_log_events, "ON", "OFF") = VARIABLE_VALUE |
| 75 |
FROM performance_schema.session_variables |
| 76 |
WHERE VARIABLE_NAME='binlog_rows_query_log_events'; |
| 77 |
--enable_warnings |
| 78 |
--echo 1 Expected |
| 79 |
|
| 80 |
SELECT COUNT(@@SESSION.binlog_rows_query_log_events); |
| 81 |
--echo 1 Expected |
| 82 |
|
| 83 |
--disable_warnings |
| 84 |
SELECT COUNT(VARIABLE_VALUE) |
| 85 |
FROM performance_schema.session_variables |
| 86 |
WHERE VARIABLE_NAME='binlog_rows_query_log_events'; |
| 87 |
--enable_warnings |
| 88 |
--echo 1 Expected |
| 89 |
|
| 90 |
|
| 91 |
--echo '#---------------------BS_STVARS_002_05----------------------#' |
| 92 |
################################################################################ |
| 93 |
# Check if binlog_format can be accessed with and without @@ sign # |
| 94 |
################################################################################ |
| 95 |
|
| 96 |
SELECT COUNT(@@binlog_rows_query_log_events); |
| 97 |
--echo 1 Expected |
| 98 |
SELECT COUNT(@@local.binlog_rows_query_log_events); |
| 99 |
--echo 1 Expected |
| 100 |
SELECT COUNT(@@SESSION.binlog_rows_query_log_events); |
| 101 |
--echo 1 Expected |
| 102 |
SELECT COUNT(@@GLOBAL.binlog_rows_query_log_events); |
| 103 |
--echo 1 Expected |
| 104 |
|
| 105 |
SET @@global.binlog_rows_query_log_events= @start_value; |