2 ###########################################################################
8 CREATE PROCEDURE p1(OUT v TINYINT)
11 PREPARE stmt1 FROM
'CALL p1(?)';
12 EXECUTE stmt1 USING @a;
14 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
16 SHOW CREATE
TABLE tmp1;
20 DROP TEMPORARY
TABLE tmp1;
23 ###########################################################################
29 CREATE PROCEDURE p1(OUT v SMALLINT)
32 PREPARE stmt1 FROM
'CALL p1(?)';
33 EXECUTE stmt1 USING @a;
35 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
37 SHOW CREATE
TABLE tmp1;
39 SELECT @a, @a = 32767;
41 DROP TEMPORARY
TABLE tmp1;
44 ###########################################################################
50 CREATE PROCEDURE p1(OUT v MEDIUMINT)
53 PREPARE stmt1 FROM
'CALL p1(?)';
54 EXECUTE stmt1 USING @a;
56 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
58 SHOW CREATE
TABLE tmp1;
60 SELECT @a, @a = 8388607;
62 DROP TEMPORARY
TABLE tmp1;
65 ###########################################################################
71 CREATE PROCEDURE p1(OUT v INT)
74 PREPARE stmt1 FROM
'CALL p1(?)';
75 EXECUTE stmt1 USING @a;
77 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
79 SHOW CREATE
TABLE tmp1;
81 SELECT @a, @a = 2147483647;
83 DROP TEMPORARY
TABLE tmp1;
86 ###########################################################################
92 CREATE PROCEDURE p1(OUT v BIGINT)
93 SET v = 9223372036854775807;
95 PREPARE stmt1 FROM
'CALL p1(?)';
96 EXECUTE stmt1 USING @a;
98 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
100 SHOW CREATE
TABLE tmp1;
102 SELECT @a, @a = 9223372036854775807;
104 DROP TEMPORARY
TABLE tmp1;
107 ###########################################################################
113 CREATE PROCEDURE p1(OUT v BIT(11))
114 SET v = b'10100100101';
116 PREPARE stmt1 FROM 'CALL p1(?)';
117 EXECUTE stmt1 USING @a;
119 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
121 SHOW CREATE
TABLE tmp1;
123 SELECT @a, @a = b'10100100101';
125 DROP TEMPORARY
TABLE tmp1;
128 ###########################################################################
134 CREATE PROCEDURE p1(OUT v TIMESTAMP)
135 SET v =
'2007-11-18 15:01:02';
137 PREPARE stmt1 FROM
'CALL p1(?)';
138 EXECUTE stmt1 USING @a;
140 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
142 SHOW CREATE
TABLE tmp1;
144 SELECT @a, @a =
'2007-11-18 15:01:02';
146 DROP TEMPORARY
TABLE tmp1;
149 ###########################################################################
155 CREATE PROCEDURE p1(OUT v DATETIME)
156 SET v =
'1234-11-12 12:34:59';
158 PREPARE stmt1 FROM
'CALL p1(?)';
159 EXECUTE stmt1 USING @a;
161 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
163 SHOW CREATE
TABLE tmp1;
165 SELECT @a, @a =
'1234-11-12 12:34:59';
167 DROP TEMPORARY
TABLE tmp1;
170 ###########################################################################
176 CREATE PROCEDURE p1(OUT v TIME)
179 PREPARE stmt1 FROM
'CALL p1(?)';
180 EXECUTE stmt1 USING @a;
182 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
184 SHOW CREATE
TABLE tmp1;
186 SELECT @a, @a =
'123:45:01';
188 DROP TEMPORARY
TABLE tmp1;
191 ###########################################################################
197 CREATE PROCEDURE p1(OUT v DATE)
198 SET v =
'1234-11-12';
200 PREPARE stmt1 FROM
'CALL p1(?)';
201 EXECUTE stmt1 USING @a;
203 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
205 SHOW CREATE
TABLE tmp1;
207 SELECT @a, @a =
'1234-11-12';
209 DROP TEMPORARY
TABLE tmp1;
212 ###########################################################################
218 CREATE PROCEDURE p1(OUT v YEAR)
221 PREPARE stmt1 FROM
'CALL p1(?)';
222 EXECUTE stmt1 USING @a;
224 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
226 SHOW CREATE
TABLE tmp1;
228 SELECT @a, @a = 2010;
230 DROP TEMPORARY
TABLE tmp1;
233 ###########################################################################
239 CREATE PROCEDURE p1(OUT v FLOAT(7, 4))
242 PREPARE stmt1 FROM 'CALL p1(?)';
243 EXECUTE stmt1 USING @a;
245 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
247 SHOW CREATE
TABLE tmp1;
249 SELECT @a, @a - 123.4567 < 0.00001;
251 DROP TEMPORARY
TABLE tmp1;
254 ###########################################################################
260 CREATE PROCEDURE p1(OUT v DOUBLE(8, 5))
263 PREPARE stmt1 FROM 'CALL p1(?)';
264 EXECUTE stmt1 USING @a;
266 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
268 SHOW CREATE
TABLE tmp1;
270 SELECT @a, @a - 123.45678 < 0.000001;
272 DROP TEMPORARY
TABLE tmp1;
275 ###########################################################################
281 CREATE PROCEDURE p1(OUT v DECIMAL(9, 6))
284 PREPARE stmt1 FROM 'CALL p1(?)';
285 EXECUTE stmt1 USING @a;
287 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
289 SHOW CREATE
TABLE tmp1;
291 SELECT @a, @a = 123.456789;
293 DROP TEMPORARY
TABLE tmp1;
296 ###########################################################################
302 CREATE PROCEDURE p1(OUT v CHAR(32))
303 SET v = REPEAT('a', 16);
305 PREPARE stmt1 FROM 'CALL p1(?)';
306 EXECUTE stmt1 USING @a;
308 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
310 SHOW CREATE
TABLE tmp1;
312 SELECT @a, @a = REPEAT('a', 16);
314 DROP TEMPORARY
TABLE tmp1;
317 ###########################################################################
323 CREATE PROCEDURE p1(OUT v VARCHAR(32))
324 SET v = REPEAT('b', 16);
326 PREPARE stmt1 FROM 'CALL p1(?)';
327 EXECUTE stmt1 USING @a;
329 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
331 SHOW CREATE
TABLE tmp1;
333 SELECT @a, @a = REPEAT('b', 16);
335 DROP TEMPORARY
TABLE tmp1;
338 ###########################################################################
344 CREATE PROCEDURE p1(OUT v TINYTEXT)
345 SET v = REPEAT(
'c', 16);
347 PREPARE stmt1 FROM
'CALL p1(?)';
348 EXECUTE stmt1 USING @a;
350 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
352 SHOW CREATE
TABLE tmp1;
354 SELECT @a, @a = REPEAT(
'c', 16);
356 DROP TEMPORARY
TABLE tmp1;
359 ###########################################################################
365 CREATE PROCEDURE p1(OUT v TEXT)
366 SET v = REPEAT(
'd', 16);
368 PREPARE stmt1 FROM
'CALL p1(?)';
369 EXECUTE stmt1 USING @a;
371 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
373 SHOW CREATE
TABLE tmp1;
375 SELECT @a, @a = REPEAT(
'd', 16);
377 DROP TEMPORARY
TABLE tmp1;
380 ###########################################################################
386 CREATE PROCEDURE p1(OUT v MEDIUMTEXT)
387 SET v = REPEAT(
'e', 16);
389 PREPARE stmt1 FROM
'CALL p1(?)';
390 EXECUTE stmt1 USING @a;
392 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
394 SHOW CREATE
TABLE tmp1;
396 SELECT @a, @a = REPEAT(
'e', 16);
398 DROP TEMPORARY
TABLE tmp1;
401 ###########################################################################
407 CREATE PROCEDURE p1(OUT v LONGTEXT)
408 SET v = REPEAT(
'f', 16);
410 PREPARE stmt1 FROM
'CALL p1(?)';
411 EXECUTE stmt1 USING @a;
413 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
415 SHOW CREATE
TABLE tmp1;
417 SELECT @a, @a = REPEAT(
'f', 16);
419 DROP TEMPORARY
TABLE tmp1;
422 ###########################################################################
428 CREATE PROCEDURE p1(OUT v BINARY(32))
429 SET v = REPEAT('g', 32);
431 PREPARE stmt1 FROM 'CALL p1(?)';
432 EXECUTE stmt1 USING @a;
434 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
436 SHOW CREATE
TABLE tmp1;
438 SELECT @a, @a = REPEAT('g', 32);
440 DROP TEMPORARY
TABLE tmp1;
443 ###########################################################################
449 CREATE PROCEDURE p1(OUT v VARBINARY(32))
450 SET v = REPEAT('h', 16);
452 PREPARE stmt1 FROM 'CALL p1(?)';
453 EXECUTE stmt1 USING @a;
455 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
457 SHOW CREATE
TABLE tmp1;
459 SELECT @a, @a = REPEAT('h', 16);
461 DROP TEMPORARY
TABLE tmp1;
464 ###########################################################################
470 CREATE PROCEDURE p1(OUT v TINYBLOB)
471 SET v = REPEAT(
'i', 16);
473 PREPARE stmt1 FROM
'CALL p1(?)';
474 EXECUTE stmt1 USING @a;
476 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
478 SHOW CREATE
TABLE tmp1;
480 SELECT @a, @a = REPEAT(
'i', 16);
482 DROP TEMPORARY
TABLE tmp1;
485 ###########################################################################
491 CREATE PROCEDURE p1(OUT v BLOB)
492 SET v = REPEAT(
'j', 16);
494 PREPARE stmt1 FROM
'CALL p1(?)';
495 EXECUTE stmt1 USING @a;
497 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
499 SHOW CREATE
TABLE tmp1;
501 SELECT @a, @a = REPEAT(
'j', 16);
503 DROP TEMPORARY
TABLE tmp1;
506 ###########################################################################
512 CREATE PROCEDURE p1(OUT v MEDIUMBLOB)
513 SET v = REPEAT(
'k', 16);
515 PREPARE stmt1 FROM
'CALL p1(?)';
516 EXECUTE stmt1 USING @a;
518 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
520 SHOW CREATE
TABLE tmp1;
522 SELECT @a, @a = REPEAT(
'k', 16);
524 DROP TEMPORARY
TABLE tmp1;
527 ###########################################################################
533 CREATE PROCEDURE p1(OUT v LONGBLOB)
534 SET v = REPEAT(
'l', 16);
536 PREPARE stmt1 FROM
'CALL p1(?)';
537 EXECUTE stmt1 USING @a;
539 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
541 SHOW CREATE
TABLE tmp1;
543 SELECT @a, @a = REPEAT(
'l', 16);
545 DROP TEMPORARY
TABLE tmp1;
548 ###########################################################################
551 --echo SET(
'aaa',
'bbb')
554 CREATE PROCEDURE p1(OUT v SET(
'aaa',
'bbb'))
557 PREPARE stmt1 FROM 'CALL p1(?)';
558 EXECUTE stmt1 USING @a;
560 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
562 SHOW CREATE
TABLE tmp1;
564 SELECT @a, @a = 'aaa';
566 DROP TEMPORARY
TABLE tmp1;
569 ###########################################################################
572 --echo ENUM(
'aaa',
'bbb')
575 CREATE PROCEDURE p1(OUT v ENUM(
'aaa',
'bbb'))
578 PREPARE stmt1 FROM 'CALL p1(?)';
579 EXECUTE stmt1 USING @a;
581 CREATE TEMPORARY
TABLE tmp1 AS SELECT @a AS c1;
583 SHOW CREATE
TABLE tmp1;
585 SELECT @a, @a = 'aaa';
587 DROP TEMPORARY
TABLE tmp1;