~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/sys_vars/t/slave_checkpoint_period_basic.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/not_embedded.inc
 
2
 
 
3
SET @start_global_value = @@global.slave_checkpoint_period;
 
4
SELECT @start_global_value;
 
5
 
 
6
#
 
7
# exists as global only
 
8
#
 
9
select @@global.slave_checkpoint_period;
 
10
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
11
select @@session.slave_checkpoint_period;
 
12
--replace_regex /[0-9]+/period/
 
13
show global variables like 'slave_checkpoint_period';
 
14
--replace_regex /[0-9]+/period/
 
15
show session variables like 'slave_checkpoint_period';
 
16
--replace_regex /[0-9]+/period/
 
17
select * from information_schema.global_variables where variable_name='slave_checkpoint_period';
 
18
--replace_regex /[0-9]+/period/
 
19
select * from information_schema.session_variables where variable_name='slave_checkpoint_period';
 
20
 
 
21
#
 
22
# show that it's writable
 
23
#
 
24
set global slave_checkpoint_period=1;
 
25
select @@global.slave_checkpoint_period;
 
26
--error ER_GLOBAL_VARIABLE
 
27
set session slave_checkpoint_period=1;
 
28
 
 
29
#
 
30
# incorrect types
 
31
#
 
32
--error ER_WRONG_TYPE_FOR_VAR
 
33
set global slave_checkpoint_period=1.1;
 
34
--error ER_WRONG_TYPE_FOR_VAR
 
35
set global slave_checkpoint_period=1e1;
 
36
--error ER_WRONG_TYPE_FOR_VAR
 
37
set global slave_checkpoint_period="foo";
 
38
 
 
39
#
 
40
# min/max values
 
41
#
 
42
set global slave_checkpoint_period=1;
 
43
select @@global.slave_checkpoint_period;
 
44
set global slave_checkpoint_period=cast(-1 as unsigned int);
 
45
select @@global.slave_checkpoint_period as "truncated to the maximum";
 
46
 
 
47
SET @@global.slave_checkpoint_period = @start_global_value;
 
48
SELECT @@global.slave_checkpoint_period;