~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#
 
3
# 2010-01-25 - Added
 
4
#
 
5
 
 
6
--source include/have_innodb.inc
 
7
 
 
8
SET @start_global_value = @@global.innodb_old_blocks_time;
 
9
SELECT @start_global_value;
 
10
 
 
11
#
 
12
# exists as global only
 
13
#
 
14
--echo Valid values are zero or above
 
15
select @@global.innodb_old_blocks_time >=0;
 
16
select @@global.innodb_old_blocks_time;
 
17
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
18
select @@session.innodb_old_blocks_time;
 
19
show global variables like 'innodb_old_blocks_time';
 
20
show session variables like 'innodb_old_blocks_time';
 
21
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
 
22
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
 
23
 
 
24
#
 
25
# show that it's writable
 
26
#
 
27
set global innodb_old_blocks_time=10;
 
28
select @@global.innodb_old_blocks_time;
 
29
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
 
30
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
 
31
--error ER_GLOBAL_VARIABLE
 
32
set session innodb_old_blocks_time=1;
 
33
 
 
34
#
 
35
# incorrect types
 
36
#
 
37
--error ER_WRONG_TYPE_FOR_VAR
 
38
set global innodb_old_blocks_time=1.1;
 
39
--error ER_WRONG_TYPE_FOR_VAR
 
40
set global innodb_old_blocks_time=1e1;
 
41
--error ER_WRONG_TYPE_FOR_VAR
 
42
set global innodb_old_blocks_time="foo";
 
43
 
 
44
set global innodb_old_blocks_time=-7;
 
45
select @@global.innodb_old_blocks_time;
 
46
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
 
47
 
 
48
#
 
49
# cleanup
 
50
#
 
51
SET @@global.innodb_old_blocks_time = @start_global_value;
 
52
SELECT @@global.innodb_old_blocks_time;