List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:June 16 2011 8:30am
Subject:bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3297 to 3298) WL#5569
View as plain text  
 3298 Andrei Elkin	2011-06-16
      wl#5569 MTS
      
      adding new tests to sys_vars.\

    added:
      mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result
      mysql-test/suite/sys_vars/r/slave_pending_jobs_size_max_basic.result
      mysql-test/suite/sys_vars/t/slave_parallel_workers_basic.test
      mysql-test/suite/sys_vars/t/slave_pending_jobs_size_max_basic.test
 3297 Luis Soares	2011-06-16
      WL#5569
      
      Adding a global suppression for the warning that may appear when
      stopping the slave sql thread in the middle of a group. This 
      should affect MTS mode only.

    modified:
      mysql-test/include/mtr_warnings.sql
=== added file 'mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result'
--- a/mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result	2011-06-16 08:29:53 +0000
@@ -0,0 +1,29 @@
+set @save.slave_parallel_workers= @@global.slave_parallel_workers;
+select @@session.slave_parallel_workers;
+ERROR HY000: Variable 'slave_parallel_workers' is a GLOBAL variable
+show global variables like 'slave_parallel_workers';
+Variable_name	Value
+slave_parallel_workers	0
+show session variables like 'slave_parallel_workers';
+Variable_name	Value
+slave_parallel_workers	0
+select * from information_schema.global_variables where variable_name='$var';
+VARIABLE_NAME	VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='$var';
+VARIABLE_NAME	VARIABLE_VALUE
+set @@global.slave_parallel_workers= 0;
+select @@global.slave_parallel_workers;
+@@global.slave_parallel_workers
+0
+set @@global.slave_parallel_workers= 1.1;
+ERROR 42000: Incorrect argument type to variable 'slave_parallel_workers'
+set @@global.slave_parallel_workers= "foo";
+ERROR 42000: Incorrect argument type to variable 'slave_parallel_workers'
+set @@global.slave_parallel_workers= 0;
+set @@global.slave_parallel_workers= cast(-1 as unsigned int);
+Warnings:
+Warning	1292	Truncated incorrect slave_parallel_workers value: '18446744073709551615'
+select @@global.slave_parallel_workers;
+@@global.slave_parallel_workers
+4294967295
+set @@global.slave_parallel_workers= @save.slave_parallel_workers;

=== added file 'mysql-test/suite/sys_vars/r/slave_pending_jobs_size_max_basic.result'
--- a/mysql-test/suite/sys_vars/r/slave_pending_jobs_size_max_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/slave_pending_jobs_size_max_basic.result	2011-06-16 08:29:53 +0000
@@ -0,0 +1,33 @@
+set @save.slave_pending_jobs_size_max= @@global.slave_pending_jobs_size_max;
+select @@session.slave_pending_jobs_size_max;
+ERROR HY000: Variable 'slave_pending_jobs_size_max' is a GLOBAL variable
+show global variables like 'slave_pending_jobs_size_max';
+Variable_name	Value
+slave_pending_jobs_size_max	16777216
+show session variables like 'slave_pending_jobs_size_max';
+Variable_name	Value
+slave_pending_jobs_size_max	16777216
+select * from information_schema.global_variables where variable_name='$var';
+VARIABLE_NAME	VARIABLE_VALUE
+select * from information_schema.session_variables where variable_name='$var';
+VARIABLE_NAME	VARIABLE_VALUE
+set @@global.slave_pending_jobs_size_max= 0;
+Warnings:
+Warning	1292	Truncated incorrect slave_pending_jobs_size_max value: '0'
+select @@global.slave_pending_jobs_size_max;
+@@global.slave_pending_jobs_size_max
+1024
+set @@global.slave_pending_jobs_size_max= 1.1;
+ERROR 42000: Incorrect argument type to variable 'slave_pending_jobs_size_max'
+set @@global.slave_pending_jobs_size_max= "foo";
+ERROR 42000: Incorrect argument type to variable 'slave_pending_jobs_size_max'
+set @@global.slave_pending_jobs_size_max= 0;
+Warnings:
+Warning	1292	Truncated incorrect slave_pending_jobs_size_max value: '0'
+set @@global.slave_pending_jobs_size_max= cast(-1 as unsigned int);
+Warnings:
+Warning	1292	Truncated incorrect slave_pending_jobs_size_max value: '18446744073709551615'
+select @@global.slave_pending_jobs_size_max;
+@@global.slave_pending_jobs_size_max
+18446744073709550592
+set @@global.slave_pending_jobs_size_max= @save.slave_pending_jobs_size_max;

=== added file 'mysql-test/suite/sys_vars/t/slave_parallel_workers_basic.test'
--- a/mysql-test/suite/sys_vars/t/slave_parallel_workers_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/slave_parallel_workers_basic.test	2011-06-16 08:29:53 +0000
@@ -0,0 +1,41 @@
+--source include/not_embedded.inc
+
+let $var= slave_parallel_workers;
+eval set @save.$var= @@global.$var;
+
+#
+# exists as global only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+eval select @@session.$var;
+
+eval show global variables like '$var';
+eval show session variables like '$var';
+select * from information_schema.global_variables where variable_name='$var';
+select * from information_schema.session_variables where variable_name='$var';
+
+#
+# show that it's writable
+#
+let $value= 0;
+eval set @@global.$var= $value;
+eval select @@global.$var;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+eval set @@global.$var= 1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+eval set @@global.$var= "foo";
+
+#
+# min/max values
+#
+eval set @@global.$var= 0;
+eval set @@global.$var= cast(-1 as unsigned int);
+eval select @@global.$var;
+
+# cleanup
+
+eval set @@global.$var= @save.$var;

=== added file 'mysql-test/suite/sys_vars/t/slave_pending_jobs_size_max_basic.test'
--- a/mysql-test/suite/sys_vars/t/slave_pending_jobs_size_max_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/slave_pending_jobs_size_max_basic.test	2011-06-16 08:29:53 +0000
@@ -0,0 +1,41 @@
+--source include/not_embedded.inc
+
+let $var= slave_pending_jobs_size_max;
+eval set @save.$var= @@global.$var;
+
+#
+# exists as global only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+eval select @@session.$var;
+
+eval show global variables like '$var';
+eval show session variables like '$var';
+select * from information_schema.global_variables where variable_name='$var';
+select * from information_schema.session_variables where variable_name='$var';
+
+#
+# show that it's writable
+#
+let $value= 0;
+eval set @@global.$var= $value;
+eval select @@global.$var;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+eval set @@global.$var= 1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+eval set @@global.$var= "foo";
+
+#
+# min/max values
+#
+eval set @@global.$var= 0;
+eval set @@global.$var= cast(-1 as unsigned int);
+eval select @@global.$var;
+
+# cleanup
+
+eval set @@global.$var= @save.$var;


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110616082953-0r264wlpvghhj1hv.bundle
Thread
bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3297 to 3298) WL#5569Andrei Elkin16 Jun