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 = ON;
60 ERROR 42000: Incorrect argument type to variable 'identity'
61 SELECT @@session.identity;
62 @@session.identity
63 42949672950
64 SET @@session.identity = 'test';
65 ERROR 42000: Incorrect argument type to variable 'identity'
66 SELECT @@session.identity;
67 @@session.identity
68 42949672950
69 '#-------------------FN_DYNVARS_035_05----------------------------#'
70 SET @@global.identity = 0;
71 ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
72 SELECT @@global.identity;
73 ERROR HY000: Variable 'identity' is a SESSION variable
74 '#----------------------FN_DYNVARS_035_06------------------------#'
75 SELECT @@global.identity = VARIABLE_VALUE
76 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
77 WHERE VARIABLE_NAME='identity';
78 ERROR HY000: Variable 'identity' is a SESSION variable
79 SELECT @@session.identity = VARIABLE_VALUE
80 FROM INFORMATION_SCHEMA.SESSION_VARIABLES
81 WHERE VARIABLE_NAME='identity';
82 @@session.identity = VARIABLE_VALUE
83 1
84 '#-------------------FN_DYNVARS_035_07----------------------------#'
85 SET @@global.identity = 0;
86 ERROR HY000: Variable 'identity' is a SESSION variable and can't be used with SET GLOBAL
87 SELECT @@global.identity;
88 ERROR HY000: Variable 'identity' is a SESSION variable
89 '#---------------------FN_DYNVARS_035_08----------------------#'
90 SET @@session.identity = TRUE;
91 SELECT @@session.identity;
92 @@session.identity
93 1
94 SET @@session.identity = FALSE;
95 SELECT @@session.identity;
96 @@session.identity
97 0
98 '#---------------------FN_DYNVARS_035_09----------------------#'
99 SET @@session.identity = 1;
100 SELECT @@identity = @@session.identity;
101 @@identity = @@session.identity
102 1
103 SELECT @@session.identity = @@local.identity;
104 @@session.identity = @@local.identity
105 1
106 '#---------------------FN_DYNVARS_035_10----------------------#'
107 SET identity = 1;
108 SELECT @@identity;
109 @@identity
110 1
111 SELECT local.identity;
112 ERROR 42S02: Unknown table 'local' in SELECT
113 SELECT session.identity;
114 ERROR 42S02: Unknown table 'session' in SELECT
115 SELECT identity = @@session.identity;
116 ERROR 42S22: Unknown column 'identity' in 'SELECT'
117 SET @@session.identity = @start_value;
118 SELECT @@session.identity;
119 @@session.identity
120 0