Debian Codegraph @

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

raw
1 SET @start_value= @@global.max_sort_length;
2 SET @session_max_sort_length = @@Session.max_sort_length;
3 DROP TABLE IF EXISTS t;
4 ** creating tables **
5 CREATE TABLE t
6 (
7 id INT AUTO_INCREMENT PRIMARY KEY,
8 c TEXT(30)
9 ) charset latin1;
10 CREATE TABLE t1
11 (
12 id INT AUTO_INCREMENT PRIMARY KEY,
13 c BLOB(30)
14 );
15 CREATE TABLE t2
16 (
17 id INT AUTO_INCREMENT PRIMARY KEY,
18 c TEXT(30)
19 ) charset latin1;
20 '#--------------------FN_DYNVARS_098_01-------------------------#'
21 ** Connecting test_con1 using username 'root' **
22 ** Connection test_con1 **
23 SELECT @@global.max_sort_length = 10;
24 @@global.max_sort_length = 10
25 0
26 SELECT @@session.max_sort_length = 10;
27 @@session.max_sort_length = 10
28 0
29 ** Setting value to 30 and inserting data **
30 SET @@global.max_sort_length = 30;
31 SELECT @@global.max_sort_length;
32 @@global.max_sort_length
33 30
34 INSERT INTO t set c = repeat('x',29);
35 INSERT INTO t set c = concat(repeat('x',28),'r','x');
36 INSERT INTO t set c = concat(repeat('x',28),'s','y');
37 INSERT INTO t set c = concat(repeat('x',28),'g','w');
38 SELECT c from t ORDER BY c, id;
39 c
40 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
41 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
42 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
43 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
44 ** Results should be sorted **
45 SET @@session.max_sort_length = 29;
46 SELECT @@session.max_sort_length;
47 @@session.max_sort_length
48 29
49 INSERT INTO t set c = repeat('x',29);
50 INSERT INTO t set c = concat(repeat('x',28),'r','x');
51 INSERT INTO t set c = concat(repeat('x',28),'s','y');
52 INSERT INTO t set c = concat(repeat('x',28),'g','w');
53 SELECT c from t ORDER BY c, id;
54 c
55 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
56 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
57 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
58 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
59 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
60 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
61 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
62 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
63 ** Results should be sorted **
64 '#--------------------FN_DYNVARS_098_02-------------------------#'
65 ** Connecting test_con2 using username 'root' **
66 ** Connection test_con2 **
67 SET @@global.max_sort_length = 30;
68 SELECT @@global.max_sort_length;
69 @@global.max_sort_length
70 30
71 INSERT INTO t set c = repeat('x',29);
72 INSERT INTO t set c = concat(repeat('x',28),'r','x');
73 INSERT INTO t set c = concat(repeat('x',28),'s','y');
74 INSERT INTO t set c = concat(repeat('x',28),'g','w');
75 SELECT c from t ORDER BY c, id;
76 c
77 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
78 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
79 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
80 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
81 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
82 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
83 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
84 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
85 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
86 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
87 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
88 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
89 ** Results should be sorted **
90 SET @@session.max_sort_length = 20;
91 SELECT @@session.max_sort_length;
92 @@session.max_sort_length
93 20
94 INSERT INTO t set c = repeat('x',29);
95 INSERT INTO t set c = concat(repeat('x',28),'r','x');
96 INSERT INTO t set c = concat(repeat('x',28),'s','y');
97 INSERT INTO t set c = concat(repeat('x',28),'g','w');
98 SELECT c from t ORDER BY c, id;
99 c
100 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
101 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
102 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
103 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
104 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
105 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
106 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
107 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
108 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
109 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
110 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
111 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
112 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
113 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
114 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
115 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
116 ** Results should not be sorted **
117 '#--------------------FN_DYNVARS_098_03-------------------------#'
118 SET max_sort_length=20;
119 INSERT INTO t set c = repeat('x',29);
120 INSERT INTO t set c = concat(repeat('x',28),'r','x');
121 INSERT INTO t set c = concat(repeat('x',28),'s','y');
122 INSERT INTO t set c = concat(repeat('x',28),'g','w');
123 SELECT c from t ORDER BY c, id;
124 c
125 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
126 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
127 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
128 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
129 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
130 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
131 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
132 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
133 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
134 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
135 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
136 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
137 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
138 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
139 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
140 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
141 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
142 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
143 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
144 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
145 ** Results should not be sorted **
146 '#--------------------FN_DYNVARS_098_04-------------------------#'
147 SET max_sort_length=29;
148 SELECT c from t ORDER BY c, id;
149 c
150 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
151 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
152 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
153 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
154 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
155 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
156 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
157 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
158 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
159 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
160 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
161 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
162 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
163 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
164 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
165 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
166 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
167 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
168 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
169 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
170 ** Results should be sorted **
171 '#--------------------FN_DYNVARS_098_05-------------------------#'
172 SET max_sort_length=30;
173 SELECT c from t ORDER BY c, id;
174 c
175 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
176 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
177 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
178 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
179 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
180 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
181 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
182 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
183 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
184 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
185 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
186 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
187 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
188 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
189 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
190 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
191 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
192 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
193 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
194 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
195 ** Results should be sorted **
196 '#--------------------FN_DYNVARS_098_06-------------------------#'
197 SET max_sort_length=default;
198 SELECT c from t ORDER BY c, id;
199 c
200 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
201 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
202 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
203 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
204 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
205 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
206 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
207 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
208 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
209 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
210 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
211 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
212 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
213 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
214 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
215 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
216 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
217 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
218 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
219 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
220 ** Results should be sorted **
221 '#--------------------FN_DYNVARS_098_07-------------------------#'
222 Testing type BLOB
223 SET @@global.max_sort_length = 30;
224 SELECT @@global.max_sort_length;
225 @@global.max_sort_length
226 30
227 INSERT INTO t1 set c = repeat('x',28);
228 INSERT INTO t1 set c = concat(repeat('x',27),'r','x');
229 INSERT INTO t1 set c = concat(repeat('x',27),'s','y');
230 INSERT INTO t1 set c = concat(repeat('x',27),'g','w');
231 SELECT c from t1 ORDER BY c, id;
232 c
233 xxxxxxxxxxxxxxxxxxxxxxxxxxxgw
234 xxxxxxxxxxxxxxxxxxxxxxxxxxxrx
235 xxxxxxxxxxxxxxxxxxxxxxxxxxxsy
236 xxxxxxxxxxxxxxxxxxxxxxxxxxxx
237 ** Results should be sorted **
238 SET @@session.max_sort_length = 20;
239 SELECT @@session.max_sort_length;
240 @@session.max_sort_length
241 20
242 INSERT INTO t1 set c = repeat('x',29);
243 INSERT INTO t1 set c = concat(repeat('x',28),'r','x');
244 INSERT INTO t1 set c = concat(repeat('x',28),'s','y');
245 INSERT INTO t1 set c = concat(repeat('x',28),'g','w');
246 SELECT c from t1 ORDER BY c, id;
247 c
248 xxxxxxxxxxxxxxxxxxxxxxxxxxxgw
249 xxxxxxxxxxxxxxxxxxxxxxxxxxxrx
250 xxxxxxxxxxxxxxxxxxxxxxxxxxxsy
251 xxxxxxxxxxxxxxxxxxxxxxxxxxxx
252 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
253 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
254 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
255 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
256 ** Results should still be sorted **
257 '#--------------------FN_DYNVARS_098_08-------------------------#'
258 Testing type TEXT
259 SET @@global.max_sort_length = 30;
260 SELECT @@global.max_sort_length;
261 @@global.max_sort_length
262 30
263 INSERT INTO t2 set c = repeat('x',29);
264 INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
265 INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
266 INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
267 SELECT c from t2 ORDER BY c, id;
268 c
269 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
270 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
271 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
272 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
273 ** Results should not be sorted **
274 SET @@session.max_sort_length = 20;
275 SELECT @@session.max_sort_length;
276 @@session.max_sort_length
277 20
278 INSERT INTO t2 set c = repeat('x',29);
279 INSERT INTO t2 set c = concat(repeat('x',28),'r','x');
280 INSERT INTO t2 set c = concat(repeat('x',28),'s','y');
281 INSERT INTO t2 set c = concat(repeat('x',28),'g','w');
282 SELECT c from t2 ORDER BY c, id;
283 c
284 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
285 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
286 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
287 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
288 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
289 xxxxxxxxxxxxxxxxxxxxxxxxxxxxrx
290 xxxxxxxxxxxxxxxxxxxxxxxxxxxxsy
291 xxxxxxxxxxxxxxxxxxxxxxxxxxxxgw
292 ** Results should not be sorted **
293 ** Connection default **
294 ** Disconnecting test_con1, test_con2 **
295 SET @@SESSION.max_sort_length = @session_max_sort_length;
296 DROP TABLE IF EXISTS t;
297 DROP TABLE IF EXISTS t1;
298 DROP TABLE IF EXISTS t2;
299 SET @@global.max_sort_length= @start_value;