~vadim-tk/percona-server/flushing-algo

« back to all changes in this revision

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

  • Committer: root
  • Date: 2011-10-29 01:34:40 UTC
  • Revision ID: root@hppro1.office.percona.com-20111029013440-qhnf4jk8kdjcf4e0
Initial import

Show diffs side-by-side

added added

removed removed

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