Debian Codegraph @

mysql-test/suite/sys_vars/r/identity_basic.result

raw
1 SET @start_value = @@session.identity;
2 SELECT @start_value;
3 @start_value
4 0
5 '#--------------------FN_DYNVARS_035_01------------------------#'
6 SET @@session.identity = 99;
7 'Variable is giving error on assigning Default value';
8 SELECT @@session.identity;
9 @@session.identity
10 99
11 '#---------------------FN_DYNVARS_035_02-------------------------#'
12 SET @@session.identity = @start_value;
13 SELECT @@session.identity = 0;
14 @@session.identity = 0
15 1
16 '#--------------------FN_DYNVARS_035_03------------------------#'
17 SET @@session.identity = 0;
18 SELECT @@session.identity;
19 @@session.identity
20 0
21 SET @@session.identity = 1099;
22 SELECT @@session.identity;
23 @@session.identity
24 1099
25 SET @@session.identity = 1800;
26 SELECT @@session.identity;
27 @@session.identity
28 1800
29 SET @@session.identity = 65535;
30 SELECT @@session.identity;
31 @@session.identity
32 65535
33 '#--------------------FN_DYNVARS_035_04-------------------------#'
34 SET @@session.identity = -1;
35 Warnings:
36 Warning 1292 Truncated incorrect identity value: '-1'
37 SELECT @@session.identity;
38 @@session.identity
39 0
40 SET @@session.identity = 100000000000;
41 SELECT @@session.identity;
42 @@session.identity
43 100000000000
44 SET @@session.identity = 10000.01;
45 ERROR 42000: Incorrect argument type to variable 'identity'
46 SELECT @@session.identity;
47 @@session.identity
48 100000000000
49 SET @@session.identity = -1024;
50 Warnings:
51 Warning 1292 Truncated incorrect identity value: '-1024'
52 SELECT @@session.identity;
53 @@session.identity
54 0
55 SET @@session.identity = 42949672950;
56 SELECT @@session.identity;
57 @@session.identity
58 42949672950
59 SET @@session.identity = " ";
60 ERROR 42000: Incorrect argument type to variable 'identity'
61 SELECT @@session.identity;
62 @@session.identity
63 42949672950
64 SET @@session.identity = ' ';
65 ERROR 42000: Incorrect argument type to variable 'identity'
66 SELECT @@session.identity;
67 @@session.identity
68 42949672950
69 SET @@session.identity = ON;
70 ERROR 42000: Incorrect argument type to variable 'identity'
71 SELECT @@session.identity;
72 @@session.identity
73 42949672950
74 SET @@session.identity = 'test';
75 ERROR 42000: Incorrect argument type to variable 'identity'
76 SELECT @@session.identity;
77 @@session.identity
78 42949672950
79 '#-------------------FN_DYNVARS_035_05----------------------------#'
80 SET @@global.identity = 0;
81 ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
82 SELECT @@global.identity;
83 ERROR HY000: Variable 'identity' is a SESSION variable
84 '#----------------------FN_DYNVARS_035_06------------------------#'
85 SELECT @@global.identity = VARIABLE_VALUE
86 FROM performance_schema.global_variables
87 WHERE VARIABLE_NAME='identity';
88 ERROR HY000: Variable 'identity' is a SESSION variable
89 SELECT @@session.identity = VARIABLE_VALUE
90 FROM performance_schema.session_variables
91 WHERE VARIABLE_NAME='identity';
92 @@session.identity = VARIABLE_VALUE
93 1
94 '#-------------------FN_DYNVARS_035_07----------------------------#'
95 SET @@global.identity = 0;
96 ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
97 SELECT @@global.identity;
98 ERROR HY000: Variable 'identity' is a SESSION variable
99 '#---------------------FN_DYNVARS_035_08----------------------#'
100 SET @@session.identity = TRUE;
101 SELECT @@session.identity;
102 @@session.identity
103 1
104 SET @@session.identity = FALSE;
105 SELECT @@session.identity;
106 @@session.identity
107 0
108 '#---------------------FN_DYNVARS_035_09----------------------#'
109 SET @@session.identity = 1;
110 SELECT @@identity = @@session.identity;
111 @@identity = @@session.identity
112 1
113 SELECT @@session.identity = @@local.identity;
114 @@session.identity = @@local.identity
115 1
116 '#---------------------FN_DYNVARS_035_10----------------------#'
117 SET identity = 1;
118 SELECT @@identity;
119 @@identity
120 1
121 SET local.identity = 1;
122 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'local.identity = 1' at line 1
123 SELECT local.identity;
124 ERROR 42S02: Unknown table 'local' in field list
125 SET session.identity = 1;
126 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'session.identity = 1' at line 1
127 SELECT session.identity;
128 ERROR 42S02: Unknown table 'session' in field list
129 SELECT identity = @@session.identity;
130 ERROR 42S22: Unknown column 'identity' in 'field list'
131 SET @@session.identity = @start_value;
132 SELECT @@session.identity;
133 @@session.identity
134 0