1SET @start_value = @@global.max_prepared_stmt_count;
2SELECT @start_value;
3@start_value
416382
5'#--------------------FN_DYNVARS_081_01------------------------#'
6SET @@global.max_prepared_stmt_count = 5000;
7SET @@global.max_prepared_stmt_count = DEFAULT;
8SELECT @@global.max_prepared_stmt_count;
9@@global.max_prepared_stmt_count
1016382
11'#---------------------FN_DYNVARS_081_02-------------------------#'
12SET @@global.max_prepared_stmt_count = @start_value;
13SELECT @@global.max_prepared_stmt_count = 16382;
14@@global.max_prepared_stmt_count = 16382
151
16'#--------------------FN_DYNVARS_081_03------------------------#'
17SET @@global.max_prepared_stmt_count = 0;
18SELECT @@global.max_prepared_stmt_count;
19@@global.max_prepared_stmt_count
200
21SET @@global.max_prepared_stmt_count = 1;
22SELECT @@global.max_prepared_stmt_count;
23@@global.max_prepared_stmt_count
241
25SET @@global.max_prepared_stmt_count = 1048576;
26SELECT @@global.max_prepared_stmt_count;
27@@global.max_prepared_stmt_count
281048576
29SET @@global.max_prepared_stmt_count = 1048575;
30SELECT @@global.max_prepared_stmt_count;
31@@global.max_prepared_stmt_count
321048575
33SET @@global.max_prepared_stmt_count = 65535;
34SELECT @@global.max_prepared_stmt_count;
35@@global.max_prepared_stmt_count
3665535
37'#--------------------FN_DYNVARS_081_04-------------------------#'
38SET @@global.max_prepared_stmt_count = -1;
39Warnings:
40Warning	1292	Truncated incorrect max_prepared_stmt_count value: '-1'
41SELECT @@global.max_prepared_stmt_count;
42@@global.max_prepared_stmt_count
430
44SET @@global.max_prepared_stmt_count = 100000000000;
45Warnings:
46Warning	1292	Truncated incorrect max_prepared_stmt_count value: '100000000000'
47SELECT @@global.max_prepared_stmt_count;
48@@global.max_prepared_stmt_count
491048576
50SET @@global.max_prepared_stmt_count = 10000.01;
51ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count'
52SELECT @@global.max_prepared_stmt_count;
53@@global.max_prepared_stmt_count
541048576
55SET @@global.max_prepared_stmt_count = -1024;
56Warnings:
57Warning	1292	Truncated incorrect max_prepared_stmt_count value: '-1024'
58SELECT @@global.max_prepared_stmt_count;
59@@global.max_prepared_stmt_count
600
61SET @@global.max_prepared_stmt_count = 1048577;
62Warnings:
63Warning	1292	Truncated incorrect max_prepared_stmt_count value: '1048577'
64SELECT @@global.max_prepared_stmt_count;
65@@global.max_prepared_stmt_count
661048576
67SET @@global.max_prepared_stmt_count = 104857612;
68Warnings:
69Warning	1292	Truncated incorrect max_prepared_stmt_count value: '104857612'
70SELECT @@global.max_prepared_stmt_count;
71@@global.max_prepared_stmt_count
721048576
73SET @@global.max_prepared_stmt_count = ON;
74ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count'
75SELECT @@global.max_prepared_stmt_count;
76@@global.max_prepared_stmt_count
771048576
78SET @@global.max_prepared_stmt_count = 'test';
79ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count'
80SELECT @@global.max_prepared_stmt_count;
81@@global.max_prepared_stmt_count
821048576
83SET @@global.max_prepared_stmt_count = ' ';
84ERROR 42000: Incorrect argument type to variable 'max_prepared_stmt_count'
85SELECT @@global.max_prepared_stmt_count;
86@@global.max_prepared_stmt_count
871048576
88'#-------------------FN_DYNVARS_081_05----------------------------#'
89SET @@session.max_prepared_stmt_count = 4096;
90ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL
91SELECT @@session.max_prepared_stmt_count;
92ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable
93'#----------------------FN_DYNVARS_081_06------------------------#'
94SELECT @@global.max_prepared_stmt_count = VARIABLE_VALUE
95FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
96WHERE VARIABLE_NAME='max_prepared_stmt_count';
97@@global.max_prepared_stmt_count = VARIABLE_VALUE
981
99SELECT @@max_prepared_stmt_count = VARIABLE_VALUE
100FROM INFORMATION_SCHEMA.SESSION_VARIABLES
101WHERE VARIABLE_NAME='max_prepared_stmt_count';
102@@max_prepared_stmt_count = VARIABLE_VALUE
1031
104'#---------------------FN_DYNVARS_081_07----------------------#'
105SET @@global.max_prepared_stmt_count = TRUE;
106SELECT @@global.max_prepared_stmt_count;
107@@global.max_prepared_stmt_count
1081
109SET @@global.max_prepared_stmt_count = FALSE;
110SELECT @@global.max_prepared_stmt_count;
111@@global.max_prepared_stmt_count
1120
113'#---------------------FN_DYNVARS_081_08----------------------#'
114SET @@global.max_prepared_stmt_count = 5000;
115SELECT @@max_prepared_stmt_count = @@global.max_prepared_stmt_count;
116@@max_prepared_stmt_count = @@global.max_prepared_stmt_count
1171
118'#---------------------FN_DYNVARS_081_09----------------------#'
119SET max_prepared_stmt_count = 6000;
120ERROR HY000: Variable 'max_prepared_stmt_count' is a GLOBAL variable and should be set with SET GLOBAL
121SELECT @@max_prepared_stmt_count;
122@@max_prepared_stmt_count
1235000
124SET local.max_prepared_stmt_count = 7000;
125ERROR 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.max_prepared_stmt_count = 7000' at line 1
126SELECT local.max_prepared_stmt_count;
127ERROR 42S02: Unknown table 'local' in field list
128SET global.max_prepared_stmt_count = 8000;
129ERROR 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 'global.max_prepared_stmt_count = 8000' at line 1
130SELECT global.max_prepared_stmt_count;
131ERROR 42S02: Unknown table 'global' in field list
132SELECT max_prepared_stmt_count = @@session.max_prepared_stmt_count;
133ERROR 42S22: Unknown column 'max_prepared_stmt_count' in 'field list'
134SET @@global.max_prepared_stmt_count = @start_value;
135SELECT @@global.max_prepared_stmt_count;
136@@global.max_prepared_stmt_count
13716382
138