List:Commits« Previous MessageNext Message »
From:Luis Soares Date:July 4 2011 4:05pm
Subject:bzr push into mysql-trunk branch (luis.soares:3198 to 3199) Bug#12717803
View as plain text  
 3199 Luis Soares	2011-07-04
      BUG#12717803: SYS_VARS.ALL_VARS SHOULDNT NOT LIST REPLICATION
                    VARIABLES
      
      WL 5465 added four new, global scope, readonly, replication
      variables. However, some basic tests, testing the mentioned
      properties, were missing for three of them.
      
      This patch adds the missing tests cases to the sys_vars suite 
      and fixes the result file for sys_vars.all_vars test case.

    added:
      mysql-test/suite/sys_vars/inc/bin_relay_log_basename_index.inc
      mysql-test/suite/sys_vars/r/log_bin_basename_basic.result
      mysql-test/suite/sys_vars/r/log_bin_index_basic.result
      mysql-test/suite/sys_vars/r/relay_log_basename_basic.result
      mysql-test/suite/sys_vars/t/log_bin_basename_basic.test
      mysql-test/suite/sys_vars/t/log_bin_index_basic.test
      mysql-test/suite/sys_vars/t/relay_log_basename_basic.test
    modified:
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/r/relay_log_index_basic.result
      mysql-test/suite/sys_vars/t/relay_log_index_basic.test
 3198 Tor Didriksen	2011-07-04 [merge]
      Merge 5.5 => trunk

    modified:
      cmake/build_configurations/mysql_release.cmake
=== added file 'mysql-test/suite/sys_vars/inc/bin_relay_log_basename_index.inc'
--- a/mysql-test/suite/sys_vars/inc/bin_relay_log_basename_index.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/inc/bin_relay_log_basename_index.inc	2011-07-04 15:55:00 +0000
@@ -0,0 +1,55 @@
+# ==== Usage ====
+# [--let $rpl_debug=1]
+# --let $rpl_log_var_name= log_bin_basename|relay_log_basename|...
+# --source suite/sys_vars/inc/bin_relay_log_basename_index.inc
+#
+#   $rpl_log_var_name
+#     The name of the variable to test, i.e., one of:
+#     - log_bin_basename
+#     - relay_log_basename
+#     - log_bin_index
+#     - relay_log_index
+#
+#   $rpl_debug
+#     See include/rpl_init.inc
+
+if ($rpl_debug)
+{
+  --echo Testing variable named: $rpl_log_var_name
+}
+
+--let $basename= `SELECT @@global.$rpl_log_var_name`
+
+#
+# Assert that the variable is indeed only global
+#
+--replace_result $basename REPLACED
+--eval select @@global.$rpl_log_var_name
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+--eval select @@session.$rpl_log_var_name
+
+#
+# Assert that it is retrievable 
+# 
+--replace_result $basename REPLACED
+--eval show global variables like '$rpl_log_var_name'
+
+--replace_result $basename REPLACED
+--eval show session variables like '$rpl_log_var_name'
+
+--replace_result $basename REPLACED
+--eval select * from information_schema.global_variables where variable_name='$rpl_log_var_name'
+
+--replace_result $basename REPLACED
+--eval select * from information_schema.session_variables where variable_name='$rpl_log_var_name'
+
+#
+# Assert it is read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+--eval set global $rpl_log_var_name=1
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+--eval set session $rpl_log_var_name=1
+

=== modified file 'mysql-test/suite/sys_vars/r/all_vars.result'
--- a/mysql-test/suite/sys_vars/r/all_vars.result	2011-05-31 09:30:59 +0000
+++ b/mysql-test/suite/sys_vars/r/all_vars.result	2011-07-04 15:55:00 +0000
@@ -15,14 +15,11 @@ There should be *no* variables listed be
 INNODB_STATS_TRANSIENT_SAMPLE_PAGES
 INNODB_ROLLBACK_SEGMENTS
 INNODB_STATS_PERSISTENT_SAMPLE_PAGES
-RELAY_LOG_BASENAME
-LOG_BIN_BASENAME
 INNODB_MONITOR_RESET
 INNODB_ANALYZE_IS_PERSISTENT
 INNODB_PRINT_ALL_DEADLOCKS
 INNODB_MONITOR_RESET_ALL
 INNODB_STATS_METHOD
-LOG_BIN_INDEX
 INNODB_SYNC_ARRAY_SIZE
 INNODB_MONITOR_DISABLE
 INNODB_FILE_FORMAT_MAX
@@ -31,14 +28,11 @@ INNODB_LARGE_PREFIX
 INNODB_STATS_TRANSIENT_SAMPLE_PAGES
 INNODB_ROLLBACK_SEGMENTS
 INNODB_STATS_PERSISTENT_SAMPLE_PAGES
-RELAY_LOG_BASENAME
-LOG_BIN_BASENAME
 INNODB_MONITOR_RESET
 INNODB_ANALYZE_IS_PERSISTENT
 INNODB_PRINT_ALL_DEADLOCKS
 INNODB_MONITOR_RESET_ALL
 INNODB_STATS_METHOD
-LOG_BIN_INDEX
 INNODB_SYNC_ARRAY_SIZE
 INNODB_MONITOR_DISABLE
 INNODB_FILE_FORMAT_MAX

=== added file 'mysql-test/suite/sys_vars/r/log_bin_basename_basic.result'
--- a/mysql-test/suite/sys_vars/r/log_bin_basename_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/log_bin_basename_basic.result	2011-07-04 15:55:00 +0000
@@ -0,0 +1,21 @@
+select @@global.log_bin_basename;
+@@global.log_bin_basename
+REPLACED
+select @@session.log_bin_basename;
+ERROR HY000: Variable 'log_bin_basename' is a GLOBAL variable
+show global variables like 'log_bin_basename';
+Variable_name	Value
+log_bin_basename	REPLACED
+show session variables like 'log_bin_basename';
+Variable_name	Value
+log_bin_basename	REPLACED
+select * from information_schema.global_variables where variable_name='log_bin_basename';
+VARIABLE_NAME	VARIABLE_VALUE
+LOG_BIN_BASENAME	REPLACED
+select * from information_schema.session_variables where variable_name='log_bin_basename';
+VARIABLE_NAME	VARIABLE_VALUE
+LOG_BIN_BASENAME	REPLACED
+set global log_bin_basename=1;
+ERROR HY000: Variable 'log_bin_basename' is a read only variable
+set session log_bin_basename=1;
+ERROR HY000: Variable 'log_bin_basename' is a read only variable

=== added file 'mysql-test/suite/sys_vars/r/log_bin_index_basic.result'
--- a/mysql-test/suite/sys_vars/r/log_bin_index_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/log_bin_index_basic.result	2011-07-04 15:55:00 +0000
@@ -0,0 +1,21 @@
+select @@global.log_bin_index;
+@@global.log_bin_index
+REPLACED
+select @@session.log_bin_index;
+ERROR HY000: Variable 'log_bin_index' is a GLOBAL variable
+show global variables like 'log_bin_index';
+Variable_name	Value
+log_bin_index	REPLACED
+show session variables like 'log_bin_index';
+Variable_name	Value
+log_bin_index	REPLACED
+select * from information_schema.global_variables where variable_name='log_bin_index';
+VARIABLE_NAME	VARIABLE_VALUE
+LOG_BIN_INDEX	REPLACED
+select * from information_schema.session_variables where variable_name='log_bin_index';
+VARIABLE_NAME	VARIABLE_VALUE
+LOG_BIN_INDEX	REPLACED
+set global log_bin_index=1;
+ERROR HY000: Variable 'log_bin_index' is a read only variable
+set session log_bin_index=1;
+ERROR HY000: Variable 'log_bin_index' is a read only variable

=== added file 'mysql-test/suite/sys_vars/r/relay_log_basename_basic.result'
--- a/mysql-test/suite/sys_vars/r/relay_log_basename_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/relay_log_basename_basic.result	2011-07-04 15:55:00 +0000
@@ -0,0 +1,24 @@
+include/master-slave.inc
+[connection master]
+select @@global.relay_log_basename;
+@@global.relay_log_basename
+REPLACED
+select @@session.relay_log_basename;
+ERROR HY000: Variable 'relay_log_basename' is a GLOBAL variable
+show global variables like 'relay_log_basename';
+Variable_name	Value
+relay_log_basename	REPLACED
+show session variables like 'relay_log_basename';
+Variable_name	Value
+relay_log_basename	REPLACED
+select * from information_schema.global_variables where variable_name='relay_log_basename';
+VARIABLE_NAME	VARIABLE_VALUE
+RELAY_LOG_BASENAME	REPLACED
+select * from information_schema.session_variables where variable_name='relay_log_basename';
+VARIABLE_NAME	VARIABLE_VALUE
+RELAY_LOG_BASENAME	REPLACED
+set global relay_log_basename=1;
+ERROR HY000: Variable 'relay_log_basename' is a read only variable
+set session relay_log_basename=1;
+ERROR HY000: Variable 'relay_log_basename' is a read only variable
+include/rpl_end.inc

=== modified file 'mysql-test/suite/sys_vars/r/relay_log_index_basic.result'
--- a/mysql-test/suite/sys_vars/r/relay_log_index_basic.result	2009-12-22 09:35:56 +0000
+++ b/mysql-test/suite/sys_vars/r/relay_log_index_basic.result	2011-07-04 15:55:00 +0000
@@ -1,21 +1,24 @@
+include/master-slave.inc
+[connection master]
 select @@global.relay_log_index;
 @@global.relay_log_index
-NULL
+REPLACED
 select @@session.relay_log_index;
 ERROR HY000: Variable 'relay_log_index' is a GLOBAL variable
 show global variables like 'relay_log_index';
 Variable_name	Value
-relay_log_index	
+relay_log_index	REPLACED
 show session variables like 'relay_log_index';
 Variable_name	Value
-relay_log_index	
+relay_log_index	REPLACED
 select * from information_schema.global_variables where variable_name='relay_log_index';
 VARIABLE_NAME	VARIABLE_VALUE
-RELAY_LOG_INDEX	
+RELAY_LOG_INDEX	REPLACED
 select * from information_schema.session_variables where variable_name='relay_log_index';
 VARIABLE_NAME	VARIABLE_VALUE
-RELAY_LOG_INDEX	
+RELAY_LOG_INDEX	REPLACED
 set global relay_log_index=1;
 ERROR HY000: Variable 'relay_log_index' is a read only variable
 set session relay_log_index=1;
 ERROR HY000: Variable 'relay_log_index' is a read only variable
+include/rpl_end.inc

=== added file 'mysql-test/suite/sys_vars/t/log_bin_basename_basic.test'
--- a/mysql-test/suite/sys_vars/t/log_bin_basename_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/log_bin_basename_basic.test	2011-07-04 15:55:00 +0000
@@ -0,0 +1,13 @@
+#
+# WL#5465: System variables: paths to relay log and binary log files
+#
+# Test for variable:
+#  Variable Name: log_bin_basename
+#  Variable Scope: Global
+#  Dynamic Variable: No
+
+--source include/not_embedded.inc
+--source include/have_log_bin.inc
+
+--let $rpl_log_var_name=log_bin_basename
+--source suite/sys_vars/inc/bin_relay_log_basename_index.inc

=== added file 'mysql-test/suite/sys_vars/t/log_bin_index_basic.test'
--- a/mysql-test/suite/sys_vars/t/log_bin_index_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/log_bin_index_basic.test	2011-07-04 15:55:00 +0000
@@ -0,0 +1,13 @@
+#
+# WL#5465: System variables: paths to relay log and binary log files
+#
+# Test for variable:
+#  Variable Name: log_bin_index
+#  Variable Scope: Global
+#  Dynamic Variable: No
+
+--source include/not_embedded.inc
+--source include/have_log_bin.inc
+
+--let $rpl_log_var_name=log_bin_index
+--source suite/sys_vars/inc/bin_relay_log_basename_index.inc

=== added file 'mysql-test/suite/sys_vars/t/relay_log_basename_basic.test'
--- a/mysql-test/suite/sys_vars/t/relay_log_basename_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/relay_log_basename_basic.test	2011-07-04 15:55:00 +0000
@@ -0,0 +1,16 @@
+#
+# WL#5465: System variables: paths to relay log and binary log files
+#
+# Test for variable:
+#  Variable Name: relay_log_basename
+#  Variable Scope: Global
+#  Dynamic Variable: No
+
+--source include/not_embedded.inc
+--source include/master-slave.inc
+
+--connection slave
+--let $rpl_log_var_name=relay_log_basename
+--source suite/sys_vars/inc/bin_relay_log_basename_index.inc
+
+--source include/rpl_end.inc

=== modified file 'mysql-test/suite/sys_vars/t/relay_log_index_basic.test'
--- a/mysql-test/suite/sys_vars/t/relay_log_index_basic.test	2009-12-22 09:35:56 +0000
+++ b/mysql-test/suite/sys_vars/t/relay_log_index_basic.test	2011-07-04 15:55:00 +0000
@@ -1,19 +1,16 @@
---source include/not_embedded.inc
 #
-# only global
+# WL#5465: System variables: paths to relay log and binary log files
 #
-select @@global.relay_log_index;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.relay_log_index;
-show global variables like 'relay_log_index';
-show session variables like 'relay_log_index';
-select * from information_schema.global_variables where variable_name='relay_log_index';
-select * from information_schema.session_variables where variable_name='relay_log_index';
+# Test for variable:
+#  Variable Name: relay_log_index
+#  Variable Scope: Global
+#  Dynamic Variable: No
 
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global relay_log_index=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session relay_log_index=1;
+--source include/not_embedded.inc
+--source include/master-slave.inc
+
+--connection slave
+--let $rpl_log_var_name=relay_log_index
+--source suite/sys_vars/inc/bin_relay_log_basename_index.inc
+
+--source include/rpl_end.inc

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (luis.soares:3198 to 3199) Bug#12717803Luis Soares4 Jul