Debian Codegraph @

mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test

raw
1 ################## mysql-test/t/innodb_undo_tablespaces_basic.test ############
2 # #
3 # Variable Name: innodb_undo_tablespaces #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: string #
7 # #
8 # #
9 # Creation Date: 2011-07-05 #
10 # Author : Sunny Bains #
11 # #
12 # #
13 # Description: Read-only config global variable innodb_undo_tablespaces #
14 # * Value check #
15 # * Scope check #
16 # #
17 ###############################################################################
18
19 --source include/have_innodb.inc
20
21 SELECT @@GLOBAL.innodb_undo_tablespaces >= 0;
22 let $undo_tablespaces=`SELECT @@GLOBAL.innodb_undo_tablespaces`;
23
24
25 ####################################################################
26 # Check if value can be set #
27 ####################################################################
28
29 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
30 SET @@GLOBAL.innodb_undo_tablespaces=128;
31 --echo Expected error 'Read only variable'
32
33 SELECT COUNT(@@GLOBAL.innodb_undo_tablespaces);
34 --echo 1 Expected
35
36
37 ################################################################################
38 # Check if the value in GLOBAL table matches value in variable #
39 ################################################################################
40
41 --disable_warnings
42 --disable_query_log
43 eval SELECT VARIABLE_VALUE-$undo_tablespaces DIFFERENCE
44 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
45 WHERE VARIABLE_NAME='innodb_undo_tablespaces';
46 --enable_query_log
47 --enable_warnings
48 --echo 0 Expected
49
50
51 ################################################################################
52 # Check if accessing variable with and without GLOBAL point to same variable #
53 ################################################################################
54 SELECT @@innodb_undo_tablespaces = @@GLOBAL.innodb_undo_tablespaces;
55 --echo 1 Expected
56
57
58 ################################################################################
59 # Check if innodb_undo_tablespaces can be accessed with and without @@ sign #
60 ################################################################################
61
62 SELECT COUNT(@@innodb_undo_tablespaces);
63 --echo 1 Expected
64
65 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
66 SELECT COUNT(@@local.innodb_undo_tablespaces);
67 --echo Expected error 'Variable is a GLOBAL variable'
68
69 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
70 SELECT COUNT(@@SESSION.innodb_undo_tablespaces);
71 --echo Expected error 'Variable is a GLOBAL variable'
72
73 SELECT COUNT(@@GLOBAL.innodb_undo_tablespaces);
74 --echo 1 Expected
75
76 --Error ER_BAD_FIELD_ERROR
77 SELECT innodb_undo_tablespaces = @@SESSION.innodb_undo_tablespaces;
78 --echo Expected error 'Readonly variable'