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

« back to all changes in this revision

Viewing changes to mysql-test/suite/sys_vars/t/innodb_api_trx_level_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
#
 
2
#  2011-08-01  Added
 
3
#
 
4
 
 
5
--source include/have_innodb.inc
 
6
 
 
7
SET @start_global_value = @@global.innodb_api_trx_level;
 
8
SELECT @start_global_value;
 
9
 
 
10
#
 
11
# exists as global only
 
12
#
 
13
--echo Valid values are zero or above
 
14
SELECT @@global.innodb_api_trx_level >=0;
 
15
SELECT @@global.innodb_api_trx_level <=3;
 
16
SELECT @@global.innodb_api_trx_level;
 
17
 
 
18
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
 
19
SELECT @@session.innodb_api_trx_level;
 
20
SHOW global variables LIKE 'innodb_api_trx_level';
 
21
SHOW session variables LIKE 'innodb_api_trx_level';
 
22
SELECT * FROM information_schema.global_variables 
 
23
WHERE variable_name='innodb_api_trx_level';
 
24
SELECT * FROM information_schema.session_variables 
 
25
WHERE variable_name='innodb_api_trx_level';
 
26
 
 
27
#
 
28
# show that it's writable
 
29
#
 
30
SET global innodb_api_trx_level=100;
 
31
SELECT @@global.innodb_api_trx_level;
 
32
SELECT * FROM information_schema.global_variables 
 
33
WHERE variable_name='innodb_api_trx_level';
 
34
SELECT * FROM information_schema.session_variables 
 
35
WHERE variable_name='innodb_api_trx_level';
 
36
--error ER_GLOBAL_VARIABLE
 
37
SET session innodb_api_trx_level=1;
 
38
 
 
39
#
 
40
# incorrect types
 
41
#
 
42
--error ER_WRONG_TYPE_FOR_VAR
 
43
SET global innodb_api_trx_level=1.1;
 
44
--error ER_WRONG_TYPE_FOR_VAR
 
45
SET global innodb_api_trx_level=1e1;
 
46
--error ER_WRONG_TYPE_FOR_VAR
 
47
SET global innodb_api_trx_level="foo";
 
48
SET global innodb_api_trx_level=-7;
 
49
SELECT @@global.innodb_api_trx_level;
 
50
SELECT * FROM information_schema.global_variables 
 
51
WHERE variable_name='innodb_api_trx_level';
 
52
 
 
53
#
 
54
# cleanup
 
55
#
 
56
 
 
57
SET @@global.innodb_api_trx_level = @start_global_value;
 
58
SELECT @@global.innodb_api_trx_level;