1# suite/funcs_1/t/storedproc.test
2#
3# Check general properties of stored procedures.
4#
5# Last Modification:
6# 2008-08-27 mleich - Fix Bug#37744 Expected result of "<engine>_storedproc"
7#                                   test is inconsistent
8#                   - remove variation of storage engines
9#                   - restore global sort_buffer_size after some subtest
10#
11############################################################################
12
13# Bug#37746 - Arithmetic range ("int") is smaller than expected
14# This code is in place to ensure this test is only skipped
15# for the Win64 platform
16if(`SELECT CONVERT(@@version_compile_os using latin1) IN ("Win64")`)
17{
18--skip Bug#37746 2009-07-07 pcrews Arithmetic range ("int") is smaller than expected
19}
20
21
22
23
24# This test cannot be used for the embedded server because we check here
25# privileges.
26--source include/not_embedded.inc
27
28# It is assumed that the storage engine used for some tables has no impact on
29# the outcome of this test. Therefor we use simply the fastest engine.
30let $engine_type= memory;
31
32--source suite/funcs_1/storedproc/load_sp_tb.inc
33
34
35# ==============================================================================
36echo;
37echo
38Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
39FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
40CREATE PROCEDURE, SHOW CREATE FUNCTION, SHOW CREATE PROCEDURE STATUS, SHOW
41CREATE FUNCTION STATUS, and CALL statements:;
42echo --------------------------------------------------------------------------------;
43
44
45# ------------------------------------------------------------------------------
46echo;
47echo
48Testcase 4.1.1:
49---------------
50Ensure that all clauses that should be supported are supported
51CREATE PROCEDURE;
52echo --------------------------------------------------------------------------------;
53
54USE db_storedproc;
55
56--disable_warnings ONCE
57--error ER_TOO_LONG_IDENT
58DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
59
60--error ER_TOO_LONG_IDENT
61CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) )
62            SELECT * from t1 where f2 = f1;
63--error ER_TOO_LONG_IDENT
64CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa');
65
66--disable_warnings ONCE
67--error ER_TOO_LONG_IDENT
68DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
69
70delimiter //;
71--error ER_TOO_LONG_IDENT
72CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 TINYTEXT )
73   LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
74BEGIN
75   SET @v1 = f1;
76   SELECT @v1, @v1;
77END//
78delimiter ;//
79
80--error ER_TOO_LONG_IDENT
81CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' );
82
83--replace_column 5 <modified> 6 <created>
84SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
85
86--disable_warnings ONCE
87DROP PROCEDURE IF EXISTS sp1;
88
89delimiter //;
90CREATE PROCEDURE sp1( f1 BINARY )
91   LANGUAGE SQL DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
92BEGIN
93   SET @v1 = f1;
94   SELECT @v1;
95END//
96delimiter ;//
97
98CALL sp1( 34 );
99
100--replace_column 5 <modified> 6 <created>
101SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
102
103--disable_warnings ONCE
104DROP PROCEDURE IF EXISTS sp1;
105
106delimiter //;
107CREATE PROCEDURE sp1( f1 BLOB )
108   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
109BEGIN
110   set @v1 = f1;
111   SELECT @v1;
112END//
113delimiter ;//
114
115CALL sp1( 34 );
116
117--replace_column 5 <modified> 6 <created>
118SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
119
120--disable_warnings ONCE
121DROP PROCEDURE IF EXISTS sp1;
122
123delimiter //;
124CREATE PROCEDURE sp1( f1 INT )
125   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
126BEGIN
127   SET @v1 = f1;
128   SELECT @v1;
129END//
130delimiter ;//
131
132CALL sp1( 34 );
133
134--replace_column 5 <modified> 6 <created>
135SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
136
137--disable_warnings ONCE
138DROP PROCEDURE IF EXISTS sp1;
139
140delimiter //;
141--error ER_TOO_BIG_PRECISION
142CREATE PROCEDURE sp1( f1 DECIMAL(256, 30) )
143   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
144BEGIN
145   SET @v1 = f1;
146   SELECT @v1;
147END//
148DROP PROCEDURE IF EXISTS sp1//
149
150--error ER_TOO_BIG_PRECISION
151CREATE PROCEDURE sp1( f1 DECIMAL(66, 30) )
152   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
153BEGIN
154   SET @v1 = f1;
155   SELECT @v1;
156END//
157DROP PROCEDURE IF EXISTS sp1//
158delimiter ;//
159
160
161# Check assignment of float values to DECIMAL(65, 30) parameters of
162# PRODDUREs and FUNCTIONs.
163###########################################################################
164# - The assignment of float values causes that conversions with OS/compiler
165#   specific math libraries are involved.
166#   --> The content depends on the testing box and simple printing
167#       of content will often lead to differences.
168# - We have the same conversions when assigning float values to columns
169#   of tables.
170# --> Reveal that we have a consistent behaviour per testing box.
171#
172# Checks that floating point values assigned to objects of type DECIMAL
173# end up with correct DECIMAL values (truncated to a border of the DECIMAL
174# value range or reasonable nearby the floating point value) must be done
175# in other tests.
176###########################################################################
177--disable_warnings
178DROP TABLE IF EXISTS t1_aux;
179DROP PROCEDURE IF EXISTS sproc_1;
180DROP FUNCTION IF EXISTS func_1;
181--enable_warnings
182CREATE TABLE t1_aux ( f1 DECIMAL(65, 30) );
183INSERT INTO t1_aux SET f1 = NULL;
184delimiter //;
185CREATE PROCEDURE sproc_1(f1 DECIMAL(65, 30), OUT f2 DECIMAL(65, 30))
186   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
187BEGIN
188   SET f2 = NULL;
189   SET f2 = f1;
190   SET @v2_proc = f1;
191END//
192CREATE FUNCTION func_1(f1 DECIMAL(65, 30)) RETURNS DECIMAL(65,30)
193   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
194BEGIN
195    RETURN f1;
196END//
197delimiter ;//
198--replace_column 5 <modified> 6 <created>
199SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
200--replace_column 5 <modified> 6 <created>
201SHOW FUNCTION STATUS WHERE db = 'db_storedproc';
202
203let $test_value = 1.7976931348623157493578e+308;
204--source suite/funcs_1/storedproc/param_check.inc
205#
206# Check all ...E+nnn
207let digits= 100;
208let $run= 1;
209while ($run)
210{
211   let $test_value = 0.1234567890987654321e+$digits;
212   --source suite/funcs_1/storedproc/param_check.inc
213   let $run = `SELECT $digits > 0`;
214   if ($run)
215   {
216      dec $digits;
217   }
218}
219# Check all ...E-nnn
220let digits= 100;
221let $run= 1;
222while ($run)
223{
224   let $test_value = 0.1234567890987654321e-$digits;
225   --source suite/funcs_1/storedproc/param_check.inc
226   let $run = `SELECT $digits > 0`;
227   if ($run)
228   {
229      dec $digits;
230   }
231}
232
233# Cleanup
234DROP PROCEDURE sproc_1;
235DROP FUNCTION  func_1;
236DROP TABLE     t1_aux;
237
238--disable_warnings ONCE
239DROP PROCEDURE IF EXISTS sp1;
240
241delimiter //;
242CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
243   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
244BEGIN
245   SELECT f1;
246END//
247delimiter ;//
248
249CALL sp1( "value1" );
250
251--replace_column 5 <modified> 6 <created>
252SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
253
254--disable_warnings ONCE
255DROP PROCEDURE IF EXISTS sp1;
256
257delimiter //;
258CREATE PROCEDURE sp1( f1 SET("value1", "value1") )
259   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
260BEGIN
261   SELECT f1;
262END//
263delimiter ;//
264
265CALL sp1( "value1, value1" );
266
267--replace_column 5 <modified> 6 <created>
268SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
269
270--disable_warnings ONCE
271DROP PROCEDURE IF EXISTS sp1;
272
273delimiter //;
274CREATE PROCEDURE sp1( f1 ENUM("value1", "value1") )
275   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
276BEGIN
277   SELECT f1;
278END//
279delimiter ;//
280
281CALL sp1( "value1" );
282
283--replace_column 5 <modified> 6 <created>
284SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
285
286--disable_warnings ONCE
287DROP PROCEDURE IF EXISTS sp1;
288
289CREATE PROCEDURE sp1( f1 TEXT ) LANGUAGE SQL SELECT f1;
290
291CALL sp1( 'abc' );
292
293--replace_column 5 <modified> 6 <created>
294SHOW PROCEDURE STATUS LIKE 'sp1';
295
296--disable_warnings ONCE
297DROP PROCEDURE IF EXISTS sp1;
298
299CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1;
300CALL sp1( 'abc' );
301
302--replace_column 5 <modified> 6 <created>
303SHOW PROCEDURE STATUS LIKE 'sp1';
304
305--disable_warnings ONCE
306DROP PROCEDURE IF EXISTS sp1;
307
308CREATE PROCEDURE sp1( f1 TEXT ) NOT DETERMINISTIC SELECT f1;
309CALL sp1( 'abc' );
310
311--replace_column 5 <modified> 6 <created>
312SHOW PROCEDURE STATUS LIKE 'sp1';
313
314--disable_warnings ONCE
315DROP PROCEDURE IF EXISTS sp1;
316
317CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY DEFINER SELECT f1;
318CALL sp1( 'abc' );
319
320--replace_column 5 <modified> 6 <created>
321SHOW PROCEDURE STATUS LIKE 'sp1';
322
323--disable_warnings ONCE
324DROP PROCEDURE IF EXISTS sp1;
325
326CREATE PROCEDURE sp1( f1 TEXT ) SQL SECURITY INVOKER SELECT f1;
327CALL sp1( 'abc' );
328
329--replace_column 5 <modified> 6 <created>
330SHOW PROCEDURE STATUS LIKE 'sp1';
331
332--disable_warnings ONCE
333DROP PROCEDURE IF EXISTS sp1;
334
335CREATE PROCEDURE sp1( f1 TEXT ) COMMENT 'this is simple' SELECT f1;
336CALL sp1( 'abc' );
337
338--replace_column 5 <modified> 6 <created>
339SHOW PROCEDURE STATUS LIKE 'sp1';
340
341# cleanup
342DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934;
343DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde;
344DROP PROCEDURE sp1;
345
346# ------------------------------------------------------------------------------
347let $message= Testcase 4.1.2:
348              ---------------
349              Ensure that all clauses that should be supported are supported
350              CREATE FUNCTION;
351--source include/show_msg80.inc
352
353
354--disable_warnings ONCE
355DROP FUNCTION IF EXISTS fn1;
356
357CREATE FUNCTION fn1 (s CHAR(20)) RETURNS CHAR(50)
358   RETURN CONCAT('hello, ', s, '!');
359SELECT fn1('world');
360
361--disable_warnings ONCE
362DROP FUNCTION IF EXISTS fn1;
363
364delimiter //;
365CREATE FUNCTION fn1( f1 MEDIUMTEXT ) RETURNS MEDIUMTEXT
366   LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'this is simple'
367BEGIN
368   SET @v1 = 'hello';
369   SET f1 = CONCAT( @v1, f1 );
370   RETURN f1;
371END//
372delimiter ;//
373
374SELECT fn1( ' world');
375
376--replace_column 5 <modified> 6 <created>
377SHOW FUNCTION STATUS LIKE 'fn1';
378
379--disable_warnings ONCE
380DROP FUNCTION IF EXISTS fn1;
381
382delimiter //;
383CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT
384   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
385BEGIN
386   SET f1 = 1 + f1;
387   RETURN f1;
388END//
389delimiter ;//
390
391SELECT fn1( 126 );
392
393--replace_column 5 <modified> 6 <created>
394SHOW FUNCTION STATUS LIKE 'fn1';
395
396--disable_warnings ONCE
397DROP FUNCTION IF EXISTS fn1;
398
399delimiter //;
400# 1425: Too big scale 63 specified for column ''. Maximum is 30.
401--error ER_TOO_BIG_SCALE
402CREATE FUNCTION fn1( f1 DECIMAL(63, 31) ) RETURNS DECIMAL(63, 31)
403   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
404BEGIN
405   SET f1 = 1000000 + f1;
406   RETURN f1;
407END//
408delimiter ;//
409
410--error ER_SP_DOES_NOT_EXIST
411SELECT fn1( 1.3326e+8 );
412
413delimiter //;
414CREATE FUNCTION fn1( f1 DECIMAL(63, 30) ) RETURNS DECIMAL(63, 30)
415   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
416BEGIN
417   SET f1 = 1000000 + f1;
418   RETURN f1;
419END//
420delimiter ;//
421
422SELECT fn1( 1.3326e+8 );
423
424--replace_column 5 <modified> 6 <created>
425SHOW FUNCTION STATUS LIKE 'fn1';
426
427--disable_warnings ONCE
428DROP FUNCTION IF EXISTS fn1;
429
430delimiter //;
431CREATE FUNCTION fn1( f1 ENUM("value1", "value1") ) RETURNS DECIMAL(63, 30)
432   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
433BEGIN
434   RETURN f1;
435END//
436delimiter ;//
437
438# warnings for this select disabled due to diffs with/without --ps-protocol:
439# without ps-protocol the following warning is shown:
440# +Note   1291    Column '' has duplicated value 'value1' in SET
441# +Warning        1265    Data truncated for column 'f1' at row 1
442# Reported as BUG#33396
443--disable_warnings ONCE
444SELECT fn1( "value1" );
445
446--replace_column 5 <modified> 6 <created>
447SHOW FUNCTION STATUS LIKE 'fn1';
448
449--disable_warnings ONCE
450DROP FUNCTION IF EXISTS fn1;
451
452delimiter //;
453CREATE FUNCTION fn1( f1 SET("value1", "value1") ) RETURNS DECIMAL(63, 30)
454   LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
455BEGIN
456   RETURN f1;
457END//
458delimiter ;//
459
460# warnings for this select disabled due to diffs with/without --ps-protocol:
461# without ps-protocol the following warning is shown:
462# +Note   1291    Column '' has duplicated value 'value1' in SET
463# +Warning        1265    Data truncated for column 'f1' at row 1
464# Reported as BUG#33396
465--disable_warnings ONCE
466SELECT fn1( "value1, value1" );
467
468--replace_column 5 <modified> 6 <created>
469SHOW FUNCTION STATUS LIKE 'fn1';
470
471--disable_warnings ONCE
472DROP FUNCTION IF EXISTS fn1;
473
474delimiter //;
475CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT LANGUAGE SQL
476BEGIN
477   SET f1 = 1 + f1;
478   RETURN f1;
479END//
480delimiter ;//
481
482SELECT fn1( 126 );
483
484--replace_column 5 <modified> 6 <created>
485SHOW FUNCTION STATUS LIKE 'fn1';
486
487--disable_warnings ONCE
488DROP FUNCTION IF EXISTS fn1;
489
490delimiter //;
491CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT DETERMINISTIC
492BEGIN
493   SET f1 = 1 + f1;
494   RETURN f1;
495END//
496delimiter ;//
497
498SELECT fn1( 126 );
499
500--replace_column 5 <modified> 6 <created>
501SHOW FUNCTION STATUS LIKE 'fn1';
502
503--disable_warnings ONCE
504DROP FUNCTION IF EXISTS fn1;
505
506delimiter //;
507CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT NOT DETERMINISTIC
508BEGIN
509   SET f1 = 1 + f1;
510   RETURN f1;
511END//
512delimiter ;//
513
514SELECT fn1( 126 );
515
516--replace_column 5 <modified> 6 <created>
517SHOW FUNCTION STATUS LIKE 'fn1';
518
519--disable_warnings ONCE
520DROP FUNCTION IF EXISTS fn1;
521
522delimiter //;
523CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY DEFINER
524BEGIN
525   SET f1 = 1 + f1;
526   RETURN f1;
527END//
528delimiter ;//
529
530SELECT fn1( 126 );
531
532--replace_column 5 <modified> 6 <created>
533SHOW FUNCTION STATUS LIKE 'fn1';
534
535--disable_warnings ONCE
536DROP FUNCTION IF EXISTS fn1;
537
538delimiter //;
539CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT SQL SECURITY INVOKER
540BEGIN
541  SET f1 = 1 + f1;
542  RETURN f1;
543END//
544delimiter ;//
545
546SELECT fn1( 126 );
547
548--replace_column 5 <modified> 6 <created>
549SHOW FUNCTION STATUS LIKE 'fn1';
550
551--disable_warnings ONCE
552DROP FUNCTION IF EXISTS fn1;
553
554delimiter //;
555CREATE FUNCTION fn1( f1 SMALLINT ) RETURNS SMALLINT COMMENT 'this is simple'
556BEGIN
557   SET f1 = 1 + f1;
558   RETURN f1;
559END//
560delimiter ;//
561
562SELECT fn1( 126 );
563
564--replace_column 5 <modified> 6 <created>
565SHOW FUNCTION STATUS LIKE 'fn1';
566
567# cleanup
568DROP FUNCTION fn1;
569
570# ------------------------------------------------------------------------------
571let $message= Testcase 4.1.3:
572              ---------------
573              Ensure that all clauses that should be supported are supported
574              SHOW CREATE PROC;
575--source include/show_msg80.inc
576
577--disable_warnings ONCE
578DROP PROCEDURE IF EXISTS sp1;
579
580CREATE PROCEDURE sp1 (f1 char(20) )
581    SELECT * from t1 where f2 = f1;
582
583--replace_column 5 <modified> 6 <created>
584show CREATE PROCEDURE sp1;
585
586# cleanup
587DROP PROCEDURE sp1;
588
589# ------------------------------------------------------------------------------
590let $message= Testcase 4.1.4:
591              ---------------
592show create function;
593--source include/show_msg80.inc
594
595--disable_warnings ONCE
596DROP FUNCTION IF EXISTS fn1;
597
598CREATE FUNCTION fn1 (s char(20)) returns char(50)
599   return concat('hello, ', s, '!');
600
601--replace_column 5 <modified> 6 <created>
602show CREATE FUNCTION fn1;
603
604# cleanup
605DROP FUNCTION fn1;
606
607# ------------------------------------------------------------------------------
608let $message= Testcase 4.1.5:
609              ---------------
610SHOW PROCEDURE status;
611--source include/show_msg80.inc
612
613
614CREATE PROCEDURE sp5()
615   SELECT * from t1;
616
617--replace_column 5 <modified> 6 <created>
618SHOW PROCEDURE status like 'sp5';
619
620# cleanup
621DROP PROCEDURE sp5;
622
623# ------------------------------------------------------------------------------
624let $message= Testcase 4.1.6:
625              ---------------
626show function status;
627--source include/show_msg80.inc
628
629
630delimiter //;
631CREATE FUNCTION fn5(a int) returns int
632BEGIN
633   set @b = 0.9 * a;
634   return @b;
635END//
636delimiter ;//
637
638--replace_column 5 <modified> 6 <created>
639SHOW FUNCTION STATUS LIKE 'fn5';
640
641# cleanup
642DROP FUNCTION fn5;
643
644# ------------------------------------------------------------------------------
645let $message= Testcase 4.1.7:
646              ---------------
647CALL procedure;
648--source include/show_msg80.inc
649
650--disable_warnings
651DROP PROCEDURE IF EXISTS sp7a;
652DROP PROCEDURE IF EXISTS sp7b;
653DROP PROCEDURE IF EXISTS sp7c;
654--enable_warnings
655
656CREATE PROCEDURE sp7a(a char(20))
657    SELECT * from t1 where t1.f2 = a;
658
659CALL sp7a( 'xyz' );
660
661CREATE PROCEDURE sp7b (a char (20), out b char(20))
662    SELECT f1 into b from t1 where t1.f2= a;
663
664CALL sp7b('xyz', @out_param);
665SELECT @out_param;
666
667delimiter //;
668CREATE PROCEDURE sp7c (a char (20), out b char(20), inout c int)
669BEGIN
670SELECT f1 into b from t1 where t1.f2=a;
671   update t1 set t1.f2=999 where t1.f4=c;
672SELECT f2 into c from t1 where t1.f2=999;
673END//
674delimiter ;//
675
676--disable_warnings
677set @c=1;
678CALL sp7c('xyz', @out_param, @c);
679SELECT @out_param;
680SELECT @c;
681--enable_warnings
682
683# cleanup
684DROP PROCEDURE sp7a;
685DROP PROCEDURE sp7b;
686DROP PROCEDURE sp7c;
687
688
689# ------------------------------------------------------------------------------
690let $message= Testcase 4.1.8:
691              ---------------
692calling function;
693--source include/show_msg80.inc
694
695
696CREATE FUNCTION fn8(a char(20)) returns char(50)
697return concat('hello, ', a, '!');
698SELECT fn8('world');
699
700# cleanup
701DROP FUNCTION fn8;
702
703# ------------------------------------------------------------------------------
704let $message= Testcase 4.1.9:
705              ---------------
706drop procedure;
707--source include/show_msg80.inc
708
709--sorted_result
710--replace_column 13 created 14 modified
711SELECT * from mysql.proc where specific_name='sp9';
712
713--disable_warnings ONCE
714DROP PROCEDURE IF EXISTS sp9;
715
716--sorted_result
717--replace_column 13 created 14 modified
718SELECT * from mysql.proc where specific_name='sp9';
719
720CREATE PROCEDURE sp9()SELECT * from t1;
721
722--sorted_result
723--replace_column 13 created 14 modified
724SELECT * from mysql.proc where specific_name='sp9';
725
726DROP PROCEDURE sp9;
727
728--sorted_result
729--replace_column 13 created 14 modified
730SELECT * from mysql.proc where specific_name='sp9';
731
732CREATE PROCEDURE sp9()SELECT * from t1;
733
734--sorted_result
735--replace_column 13 created 14 modified
736SELECT * from mysql.proc where specific_name='sp9';
737
738DROP PROCEDURE IF EXISTS sp9;
739
740--sorted_result
741--replace_column 13 created 14 modified
742SELECT * from mysql.proc where specific_name='sp9';
743
744# ------------------------------------------------------------------------------
745let $message= Testcase 4.1.10:
746              ----------------
747DROP FUNCTION;
748--source include/show_msg80.inc
749
750--replace_column 13 created 14 modified
751SELECT * from mysql.proc where specific_name='fn10' and type='function';
752
753--disable_warnings ONCE
754DROP FUNCTION IF EXISTS fn10;
755
756--replace_column 13 created 14 modified
757SELECT * from mysql.proc where specific_name='fn10' and type='function';
758
759
760CREATE FUNCTION fn10() returns int return 100;
761
762--replace_column 13 created 14 modified
763SELECT * from mysql.proc where specific_name='fn10' and type='function';
764
765DROP FUNCTION fn10;
766
767--replace_column 13 created 14 modified
768SELECT * from mysql.proc where specific_name='fn10' and type='function';
769
770CREATE FUNCTION fn10() returns int return 100;
771
772--replace_column 13 created 14 modified
773SELECT * from mysql.proc where specific_name='fn10' and type='function';
774
775DROP FUNCTION IF EXISTS fn10;
776
777--replace_column 13 created 14 modified
778SELECT * from mysql.proc where specific_name='fn10' and type='function';
779
780
781# ------------------------------------------------------------------------------
782let $message= Testcase 4.1.11:
783              ----------------
784alter proc;
785--source include/show_msg80.inc
786
787
788create user 'user_1'@'localhost';
789grant execute on db_storedproc.* to 'user_1'@'localhost';
790flush privileges;
791drop table IF EXISTS mysql.t1;
792create table mysql.t1( f1 char );
793DROP PROCEDURE IF EXISTS sp11;
794CREATE PROCEDURE sp11() insert into mysql.t1 values('a');
795--replace_column 13 created 14 modified
796SELECT security_type from mysql.proc where specific_name='sp11';
797
798--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
799connect (u_1, localhost, user_1, , db_storedproc);
800--source suite/funcs_1/include/show_connection.inc
801
802CALL sp11();
803
804connection default;
805USE db_storedproc;
806--source suite/funcs_1/include/show_connection.inc
807
808alter procedure sp11 sql security invoker;
809--replace_column 13 created 14 modified
810SELECT security_type from mysql.proc where specific_name='sp11';
811
812--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
813connection u_1;
814--source suite/funcs_1/include/show_connection.inc
815USE db_storedproc;
816
817--error ER_TABLEACCESS_DENIED_ERROR
818CALL sp11();
819
820commit work;
821disconnect u_1;
822connection default;
823--source suite/funcs_1/include/show_connection.inc
824
825alter procedure sp11 sql security DEFINER;
826--replace_column 13 created 14 modified
827SELECT security_type from mysql.proc where specific_name='sp11';
828CALL sp11();
829
830# cleanup
831DROP USER 'user_1'@'localhost';
832DROP PROCEDURE sp11;
833drop table mysql.t1;
834
835
836# ------------------------------------------------------------------------------
837let $message= Testcase 4.1.12:
838              ----------------
839alter function;
840--source include/show_msg80.inc
841
842
843CREATE FUNCTION fn12() returns int
844 return 100;
845SELECT security_type from mysql.proc where specific_name='fn12';
846--replace_column 13 created 14 modified
847SELECT fn12();
848
849alter function fn12 sql security invoker;
850SELECT security_type from mysql.proc where specific_name='fn12';
851--replace_column 13 created 14 modified
852SELECT fn12();
853
854alter function fn12 sql security DEFINER;
855SELECT security_type from mysql.proc where specific_name='fn12';
856--replace_column 13 created 14 modified
857SELECT fn12();
858
859# cleanup
860DROP FUNCTION fn12;
861
862
863# ------------------------------------------------------------------------------
864let $message= Testcase 4.1.13:
865              ----------------
866alter proc;
867--source include/show_msg80.inc
868
869
870DROP PROCEDURE IF EXISTS sp11;
871CREATE PROCEDURE sp11()
872   SELECT * from t1;
873
874SELECT comment from mysql.proc where specific_name='sp11';
875--replace_column 13 created 14 modified
876alter procedure sp11 comment 'this is simple';
877SELECT comment from mysql.proc where specific_name='sp11';
878--replace_column 13 created 14 modified
879
880# cleanup
881DROP PROCEDURE sp11;
882
883
884# ------------------------------------------------------------------------------
885let $message= Testcase 4.1.14:
886              ----------------
887alter function;
888--source include/show_msg80.inc
889
890DROP FUNCTION IF EXISTS fn12;
891CREATE FUNCTION fn12() returns int
892    return 100;
893  SELECT comment from mysql.proc where specific_name='fn12';
894--replace_column 13 created 14 modified
895
896  alter function fn12 comment 'this is simple';
897  SELECT comment from mysql.proc where specific_name='fn12';
898--replace_column 13 created 14 modified
899
900# cleanup
901DROP FUNCTION fn12;
902
903
904# ------------------------------------------------------------------------------
905let $message= Testcase 4.1.15:
906              ----------------
907Ensure that any invalid stored procedure name is never accepted, and that an
908appropriate error message is returned when the name is rejected;
909--source include/show_msg80.inc
910
911
912--error ER_SP_NO_DROP_SP
913CREATE PROCEDURE sp1()
914DROP PROCEDURE sp1;
915
916--error ER_PARSE_ERROR
917CREATE PROCEDURE !_sp1( f1 char(20) )
918SELECT * from t1 where f2 = f1;
919
920CREATE PROCEDURE function()
921   SELECT * from t1 where f2=f1;
922DROP PROCEDURE function;
923
924--error ER_PARSE_ERROR
925CREATE PROCEDURE accessible()
926   SELECT * from t1 where f2=f1;
927
928--error ER_PARSE_ERROR
929CREATE PROCEDURE add()
930   SELECT * from t1 where f2=f1;
931
932--error ER_PARSE_ERROR
933CREATE PROCEDURE all()
934   SELECT * from t1 where f2=f1;
935
936--error ER_PARSE_ERROR
937CREATE PROCEDURE alter()
938   SELECT * from t1 where f2=f1;
939
940--error ER_PARSE_ERROR
941CREATE PROCEDURE analyze()
942   SELECT * from t1 where f2=f1;
943
944--error ER_PARSE_ERROR
945CREATE PROCEDURE and()
946   SELECT * from t1 where f2=f1;
947
948--error ER_PARSE_ERROR
949CREATE PROCEDURE as()
950   SELECT * from t1 where f2=f1;
951
952--error ER_PARSE_ERROR
953CREATE PROCEDURE asc()
954   SELECT * from t1 where f2=f1;
955
956--error ER_PARSE_ERROR
957CREATE PROCEDURE asensitive()
958   SELECT * from t1 where f2=f1;
959
960--error ER_PARSE_ERROR
961CREATE PROCEDURE before()
962   SELECT * from t1 where f2=f1;
963
964--error ER_PARSE_ERROR
965CREATE PROCEDURE between()
966   SELECT * from t1 where f2=f1;
967
968--error ER_PARSE_ERROR
969CREATE PROCEDURE bigint()
970   SELECT * from t1 where f2=f1;
971
972--error ER_PARSE_ERROR
973CREATE PROCEDURE binary()
974   SELECT * from t1 where f2=f1;
975
976--error ER_PARSE_ERROR
977CREATE PROCEDURE blob()
978   SELECT * from t1 where f2=f1;
979
980--error ER_PARSE_ERROR
981CREATE PROCEDURE both()
982   SELECT * from t1 where f2=f1;
983
984--error ER_PARSE_ERROR
985CREATE PROCEDURE by()
986   SELECT * from t1 where f2=f1;
987
988--error ER_PARSE_ERROR
989CREATE PROCEDURE call()
990   SELECT * from t1 where f2=f1;
991
992--error ER_PARSE_ERROR
993CREATE PROCEDURE cascade()
994   SELECT * from t1 where f2=f1;
995
996--error ER_PARSE_ERROR
997CREATE PROCEDURE case()
998   SELECT * from t1 where f2=f1;
999
1000--error ER_PARSE_ERROR
1001CREATE PROCEDURE change()
1002   SELECT * from t1 where f2=f1;
1003
1004--error ER_PARSE_ERROR
1005CREATE PROCEDURE char()
1006   SELECT * from t1 where f2=f1;
1007
1008--error ER_PARSE_ERROR
1009CREATE PROCEDURE character()
1010   SELECT * from t1 where f2=f1;
1011
1012--error ER_PARSE_ERROR
1013CREATE PROCEDURE check()
1014   SELECT * from t1 where f2=f1;
1015
1016--error ER_PARSE_ERROR
1017CREATE PROCEDURE collate()
1018   SELECT * from t1 where f2=f1;
1019
1020--error ER_PARSE_ERROR
1021CREATE PROCEDURE column()
1022   SELECT * from t1 where f2=f1;
1023
1024--error ER_PARSE_ERROR
1025CREATE PROCEDURE condition()
1026   SELECT * from t1 where f2=f1;
1027
1028--error ER_PARSE_ERROR
1029CREATE PROCEDURE constraint()
1030   SELECT * from t1 where f2=f1;
1031
1032--error ER_PARSE_ERROR
1033CREATE PROCEDURE continue()
1034   SELECT * from t1 where f2=f1;
1035
1036--error ER_PARSE_ERROR
1037CREATE PROCEDURE convert()
1038   SELECT * from t1 where f2=f1;
1039
1040--error ER_PARSE_ERROR
1041CREATE PROCEDURE create()
1042   SELECT * from t1 where f2=f1;
1043
1044--error ER_PARSE_ERROR
1045CREATE PROCEDURE cross()
1046   SELECT * from t1 where f2=f1;
1047
1048--error ER_PARSE_ERROR
1049CREATE PROCEDURE current_date()
1050  SELECT * from t1 where f2=f1;
1051
1052--error ER_PARSE_ERROR
1053CREATE PROCEDURE current_time()
1054   SELECT * from t1 where f2=f1;
1055
1056--error ER_PARSE_ERROR
1057CREATE PROCEDURE current_timestamp()
1058   SELECT * from t1 where f2=f1;
1059
1060--error ER_PARSE_ERROR
1061CREATE PROCEDURE current_user()
1062   SELECT * from t1 where f2=f1;
1063
1064--error ER_PARSE_ERROR
1065CREATE PROCEDURE cursor()
1066  SELECT * from t1 where f2=f1;
1067
1068--error ER_PARSE_ERROR
1069CREATE PROCEDURE database()
1070   SELECT * from t1 where f2=f1;
1071
1072--error ER_PARSE_ERROR
1073CREATE PROCEDURE databases()
1074   SELECT * from t1 where f2=f1;
1075
1076--error ER_PARSE_ERROR
1077CREATE PROCEDURE day_hour()
1078   SELECT * from t1 where f2=f1;
1079
1080--error ER_PARSE_ERROR
1081CREATE PROCEDURE day_microsecond()
1082   SELECT * from t1 where f2=f1;
1083
1084--error ER_PARSE_ERROR
1085CREATE PROCEDURE day_minute()
1086   SELECT * from t1 where f2=f1;
1087
1088--error ER_PARSE_ERROR
1089CREATE PROCEDURE day_second()
1090   SELECT * from t1 where f2=f1;
1091
1092--error ER_PARSE_ERROR
1093CREATE PROCEDURE dec()
1094   SELECT * from t1 where f2=f1;
1095
1096--error ER_PARSE_ERROR
1097CREATE PROCEDURE decimal()
1098   SELECT * from t1 where f2=f1;
1099
1100--error ER_PARSE_ERROR
1101CREATE PROCEDURE declare()
1102   SELECT * from t1 where f2=f1;
1103
1104--error ER_PARSE_ERROR
1105CREATE PROCEDURE default()
1106   SELECT * from t1 where f2=f1;
1107
1108--error ER_PARSE_ERROR
1109CREATE PROCEDURE delayed()
1110   SELECT * from t1 where f2=f1;
1111
1112--error ER_PARSE_ERROR
1113CREATE PROCEDURE delete()
1114   SELECT * from t1 where f2=f1;
1115
1116--error ER_PARSE_ERROR
1117CREATE PROCEDURE desc()
1118   SELECT * from t1 where f2=f1;
1119
1120--error ER_PARSE_ERROR
1121CREATE PROCEDURE describe()
1122   SELECT * from t1 where f2=f1;
1123
1124--error ER_PARSE_ERROR
1125CREATE PROCEDURE deterministic()
1126   SELECT * from t1 where f2=f1;
1127
1128--error ER_PARSE_ERROR
1129CREATE PROCEDURE distinct()
1130   SELECT * from t1 where f2=f1;
1131
1132--error ER_PARSE_ERROR
1133CREATE PROCEDURE distinctrow()
1134   SELECT * from t1 where f2=f1;
1135
1136--error ER_PARSE_ERROR
1137CREATE PROCEDURE div()
1138   SELECT * from t1 where f2=f1;
1139
1140--error ER_PARSE_ERROR
1141CREATE PROCEDURE double()
1142   SELECT * from t1 where f2=f1;
1143
1144--error ER_PARSE_ERROR
1145CREATE PROCEDURE drop()
1146   SELECT * from t1 where f2=f1;
1147
1148--error ER_PARSE_ERROR
1149CREATE PROCEDURE dual()
1150   SELECT * from t1 where f2=f1;
1151
1152--error ER_PARSE_ERROR
1153CREATE PROCEDURE each()
1154   SELECT * from t1 where f2=f1;
1155
1156--error ER_PARSE_ERROR
1157CREATE PROCEDURE else()
1158   SELECT * from t1 where f2=f1;
1159
1160--error ER_PARSE_ERROR
1161CREATE PROCEDURE elseif()
1162   SELECT * from t1 where f2=f1;
1163
1164--error ER_PARSE_ERROR
1165CREATE PROCEDURE enclosed()
1166   SELECT * from t1 where f2=f1;
1167
1168--error ER_PARSE_ERROR
1169CREATE PROCEDURE escaped()
1170   SELECT * from t1 where f2=f1;
1171
1172--error ER_PARSE_ERROR
1173CREATE PROCEDURE exists()
1174   SELECT * from t1 where f2=f1;
1175
1176--error ER_PARSE_ERROR
1177CREATE PROCEDURE exit()
1178   SELECT * from t1 where f2=f1;
1179
1180--error ER_PARSE_ERROR
1181CREATE PROCEDURE explain()
1182   SELECT * from t1 where f2=f1;
1183
1184--error ER_PARSE_ERROR
1185CREATE PROCEDURE false()
1186   SELECT * from t1 where f2=f1;
1187
1188--error ER_PARSE_ERROR
1189CREATE PROCEDURE fetch()
1190   SELECT * from t1 where f2=f1;
1191
1192#--error ER_PARSE_ERROR
1193CREATE PROCEDURE fields()
1194   SELECT * from t1 where f2=f1;
1195DROP PROCEDURE fields;
1196
1197--error ER_PARSE_ERROR
1198CREATE PROCEDURE float()
1199   SELECT * from t1 where f2=f1;
1200
1201--error ER_PARSE_ERROR
1202CREATE PROCEDURE for()
1203   SELECT * from t1 where f2=f1;
1204
1205--error ER_PARSE_ERROR
1206CREATE PROCEDURE force()
1207   SELECT * from t1 where f2=f1;
1208
1209--error ER_PARSE_ERROR
1210CREATE PROCEDURE foreign()
1211   SELECT * from t1 where f2=f1;
1212
1213--error ER_PARSE_ERROR
1214CREATE PROCEDURE from()
1215   SELECT * from t1 where f2=f1;
1216
1217--error ER_PARSE_ERROR
1218CREATE PROCEDURE fulltext()
1219   SELECT * from t1 where f2=f1;
1220
1221--error ER_PARSE_ERROR
1222CREATE PROCEDURE grant()
1223   SELECT * from t1 where f2=f1;
1224
1225--error ER_PARSE_ERROR
1226CREATE PROCEDURE group()
1227   SELECT * from t1 where f2=f1;
1228
1229--error ER_PARSE_ERROR
1230CREATE PROCEDURE having()
1231   SELECT * from t1 where f2=f1;
1232
1233--error ER_PARSE_ERROR
1234CREATE PROCEDURE high_priority()
1235   SELECT * from t1 where f2=f1;
1236
1237--error ER_PARSE_ERROR
1238CREATE PROCEDURE hour_microsecond()
1239   SELECT * from t1 where f2=f1;
1240
1241--error ER_PARSE_ERROR
1242CREATE PROCEDURE hour_minute()
1243   SELECT * from t1 where f2=f1;
1244
1245--error ER_PARSE_ERROR
1246CREATE PROCEDURE hour_second()
1247   SELECT * from t1 where f2=f1;
1248
1249--error ER_PARSE_ERROR
1250CREATE PROCEDURE if()
1251   SELECT * from t1 where f2=f1;
1252
1253--error ER_PARSE_ERROR
1254CREATE PROCEDURE ignore()
1255   SELECT * from t1 where f2=f1;
1256
1257--error ER_PARSE_ERROR
1258CREATE PROCEDURE in()
1259   SELECT * from t1 where f2=f1;
1260
1261--error ER_PARSE_ERROR
1262CREATE PROCEDURE index()
1263   SELECT * from t1 where f2=f1;
1264
1265--error ER_PARSE_ERROR
1266CREATE PROCEDURE infile()
1267   SELECT * from t1 where f2=f1;
1268
1269--error ER_PARSE_ERROR
1270CREATE PROCEDURE inner()
1271   SELECT * from t1 where f2=f1;
1272
1273--error ER_PARSE_ERROR
1274CREATE PROCEDURE inout()
1275   SELECT * from t1 where f2=f1;
1276
1277--error ER_PARSE_ERROR
1278CREATE PROCEDURE insensitive()
1279   SELECT * from t1 where f2=f1;
1280
1281--error ER_PARSE_ERROR
1282CREATE PROCEDURE insert()
1283   SELECT * from t1 where f2=f1;
1284
1285--error ER_PARSE_ERROR
1286CREATE PROCEDURE int()
1287   SELECT * from t1 where f2=f1;
1288
1289--error ER_PARSE_ERROR
1290CREATE PROCEDURE int1()
1291   SELECT * from t1 where f2=f1;
1292
1293--error ER_PARSE_ERROR
1294CREATE PROCEDURE int2()
1295   SELECT * from t1 where f2=f1;
1296
1297--error ER_PARSE_ERROR
1298CREATE PROCEDURE int3()
1299   SELECT * from t1 where f2=f1;
1300
1301--error ER_PARSE_ERROR
1302CREATE PROCEDURE int4()
1303   SELECT * from t1 where f2=f1;
1304
1305--error ER_PARSE_ERROR
1306CREATE PROCEDURE int8()
1307   SELECT * from t1 where f2=f1;
1308
1309--error ER_PARSE_ERROR
1310CREATE PROCEDURE integer()
1311   SELECT * from t1 where f2=f1;
1312
1313--error ER_PARSE_ERROR
1314CREATE PROCEDURE interval()
1315   SELECT * from t1 where f2=f1;
1316
1317--error ER_PARSE_ERROR
1318CREATE PROCEDURE into()
1319   SELECT * from t1 where f2=f1;
1320
1321--error ER_PARSE_ERROR
1322CREATE PROCEDURE is()
1323   SELECT * from t1 where f2=f1;
1324
1325--error ER_PARSE_ERROR
1326CREATE PROCEDURE iterate()
1327   SELECT * from t1 where f2=f1;
1328
1329--error ER_PARSE_ERROR
1330CREATE PROCEDURE join()
1331   SELECT * from t1 where f2=f1;
1332
1333--error ER_PARSE_ERROR
1334CREATE PROCEDURE key()
1335   SELECT * from t1 where f2=f1;
1336
1337--error ER_PARSE_ERROR
1338CREATE PROCEDURE keys()
1339   SELECT * from t1 where f2=f1;
1340
1341--error ER_PARSE_ERROR
1342CREATE PROCEDURE kill()
1343   SELECT * from t1 where f2=f1;
1344
1345--error ER_PARSE_ERROR
1346CREATE PROCEDURE leading()
1347   SELECT * from t1 where f2=f1;
1348
1349--error ER_PARSE_ERROR
1350CREATE PROCEDURE leave()
1351   SELECT * from t1 where f2=f1;
1352
1353--error ER_PARSE_ERROR
1354CREATE PROCEDURE left()
1355   SELECT * from t1 where f2=f1;
1356
1357--error ER_PARSE_ERROR
1358CREATE PROCEDURE like()
1359   SELECT * from t1 where f2=f1;
1360
1361--error ER_PARSE_ERROR
1362CREATE PROCEDURE limit()
1363   SELECT * from t1 where f2=f1;
1364
1365--error ER_PARSE_ERROR
1366CREATE PROCEDURE linear()
1367   SELECT * from t1 where f2=f1;
1368
1369--error ER_PARSE_ERROR
1370CREATE PROCEDURE lines()
1371   SELECT * from t1 where f2=f1;
1372
1373--error ER_PARSE_ERROR
1374CREATE PROCEDURE load()
1375   SELECT * from t1 where f2=f1;
1376
1377--error ER_PARSE_ERROR
1378CREATE PROCEDURE localtime()
1379   SELECT * from t1 where f2=f1;
1380
1381--error ER_PARSE_ERROR
1382CREATE PROCEDURE localtimestamp()
1383   SELECT * from t1 where f2=f1;
1384
1385--error ER_PARSE_ERROR
1386CREATE PROCEDURE lock()
1387   SELECT * from t1 where f2=f1;
1388
1389--error ER_PARSE_ERROR
1390CREATE PROCEDURE long()
1391   SELECT * from t1 where f2=f1;
1392
1393--error ER_PARSE_ERROR
1394CREATE PROCEDURE longblob()
1395   SELECT * from t1 where f2=f1;
1396
1397--error ER_PARSE_ERROR
1398CREATE PROCEDURE longtext()
1399   SELECT * from t1 where f2=f1;
1400
1401--error ER_PARSE_ERROR
1402CREATE PROCEDURE loop()
1403   SELECT * from t1 where f2=f1;
1404
1405--error ER_PARSE_ERROR
1406CREATE PROCEDURE low_priority()
1407   SELECT * from t1 where f2=f1;
1408
1409--error ER_PARSE_ERROR
1410CREATE PROCEDURE master_ssl_verify_server_cert()
1411   SELECT * from t1 where f2=f1;
1412
1413--error ER_PARSE_ERROR
1414CREATE PROCEDURE match()
1415   SELECT * from t1 where f2=f1;
1416
1417--error ER_PARSE_ERROR
1418CREATE PROCEDURE mediumblob()
1419   SELECT * from t1 where f2=f1;
1420
1421--error ER_PARSE_ERROR
1422CREATE PROCEDURE mediumint()
1423   SELECT * from t1 where f2=f1;
1424
1425--error ER_PARSE_ERROR
1426CREATE PROCEDURE mediumtext()
1427   SELECT * from t1 where f2=f1;
1428
1429--error ER_PARSE_ERROR
1430CREATE PROCEDURE middleint()
1431   SELECT * from t1 where f2=f1;
1432
1433--error ER_PARSE_ERROR
1434CREATE PROCEDURE minute_microsecond()
1435   SELECT * from t1 where f2=f1;
1436
1437--error ER_PARSE_ERROR
1438CREATE PROCEDURE minute_second()
1439   SELECT * from t1 where f2=f1;
1440
1441--error ER_PARSE_ERROR
1442CREATE PROCEDURE mod()
1443   SELECT * from t1 where f2=f1;
1444
1445--error ER_PARSE_ERROR
1446CREATE PROCEDURE modifies()
1447   SELECT * from t1 where f2=f1;
1448
1449--error ER_PARSE_ERROR
1450CREATE PROCEDURE natural()
1451   SELECT * from t1 where f2=f1;
1452
1453--error ER_PARSE_ERROR
1454CREATE PROCEDURE not()
1455   SELECT * from t1 where f2=f1;
1456
1457--error ER_PARSE_ERROR
1458CREATE PROCEDURE no_write_to_binlog()
1459   SELECT * from t1 where f2=f1;
1460
1461--error ER_PARSE_ERROR
1462CREATE PROCEDURE null()
1463   SELECT * from t1 where f2=f1;
1464
1465--error ER_PARSE_ERROR
1466CREATE PROCEDURE numeric()
1467   SELECT * from t1 where f2=f1;
1468
1469--error ER_PARSE_ERROR
1470CREATE PROCEDURE on()
1471   SELECT * from t1 where f2=f1;
1472
1473--error ER_PARSE_ERROR
1474CREATE PROCEDURE optimize()
1475   SELECT * from t1 where f2=f1;
1476
1477--error ER_PARSE_ERROR
1478CREATE PROCEDURE option()
1479   SELECT * from t1 where f2=f1;
1480
1481--error ER_PARSE_ERROR
1482CREATE PROCEDURE optionally()
1483   SELECT * from t1 where f2=f1;
1484
1485--error ER_PARSE_ERROR
1486CREATE PROCEDURE or()
1487   SELECT * from t1 where f2=f1;
1488
1489--error ER_PARSE_ERROR
1490CREATE PROCEDURE order()
1491   SELECT * from t1 where f2=f1;
1492
1493--error ER_PARSE_ERROR
1494CREATE PROCEDURE out()
1495   SELECT * from t1 where f2=f1;
1496
1497--error ER_PARSE_ERROR
1498CREATE PROCEDURE outer()
1499   SELECT * from t1 where f2=f1;
1500
1501--error ER_PARSE_ERROR
1502CREATE PROCEDURE outfile()
1503   SELECT * from t1 where f2=f1;
1504
1505--error ER_PARSE_ERROR
1506CREATE PROCEDURE precision()
1507   SELECT * from t1 where f2=f1;
1508
1509--error ER_PARSE_ERROR
1510CREATE PROCEDURE primary()
1511   SELECT * from t1 where f2=f1;
1512
1513--error ER_PARSE_ERROR
1514CREATE PROCEDURE procedure()
1515   SELECT * from t1 where f2=f1;
1516
1517--error ER_PARSE_ERROR
1518CREATE PROCEDURE purge()
1519   SELECT * from t1 where f2=f1;
1520
1521--error ER_PARSE_ERROR
1522CREATE PROCEDURE range()
1523   SELECT * from t1 where f2=f1;
1524
1525--error ER_PARSE_ERROR
1526CREATE PROCEDURE read()
1527   SELECT * from t1 where f2=f1;
1528
1529--error ER_PARSE_ERROR
1530CREATE PROCEDURE reads()
1531   SELECT * from t1 where f2=f1;
1532
1533--error ER_PARSE_ERROR
1534CREATE PROCEDURE real()
1535   SELECT * from t1 where f2=f1;
1536
1537--error ER_PARSE_ERROR
1538CREATE PROCEDURE references()
1539   SELECT * from t1 where f2=f1;
1540
1541--error ER_PARSE_ERROR
1542CREATE PROCEDURE regexp()
1543   SELECT * from t1 where f2=f1;
1544
1545--error ER_PARSE_ERROR
1546CREATE PROCEDURE release()
1547   SELECT * from t1 where f2=f1;
1548
1549--error ER_PARSE_ERROR
1550CREATE PROCEDURE rename()
1551   SELECT * from t1 where f2=f1;
1552
1553--error ER_PARSE_ERROR
1554CREATE PROCEDURE repeat()
1555   SELECT * from t1 where f2=f1;
1556
1557--error ER_PARSE_ERROR
1558CREATE PROCEDURE replace()
1559   SELECT * from t1 where f2=f1;
1560
1561--error ER_PARSE_ERROR
1562CREATE PROCEDURE require()
1563   SELECT * from t1 where f2=f1;
1564
1565--error ER_PARSE_ERROR
1566CREATE PROCEDURE restrict()
1567   SELECT * from t1 where f2=f1;
1568
1569--error ER_PARSE_ERROR
1570CREATE PROCEDURE return()
1571   SELECT * from t1 where f2=f1;
1572
1573--error ER_PARSE_ERROR
1574CREATE PROCEDURE revoke()
1575   SELECT * from t1 where f2=f1;
1576
1577--error ER_PARSE_ERROR
1578CREATE PROCEDURE right()
1579   SELECT * from t1 where f2=f1;
1580
1581--error ER_PARSE_ERROR
1582CREATE PROCEDURE rlike()
1583   SELECT * from t1 where f2=f1;
1584
1585--error ER_PARSE_ERROR
1586CREATE PROCEDURE schema()
1587   SELECT * from t1 where f2=f1;
1588
1589--error ER_PARSE_ERROR
1590CREATE PROCEDURE schemas()
1591   SELECT * from t1 where f2=f1;
1592
1593--error ER_PARSE_ERROR
1594CREATE PROCEDURE second_microsecond()
1595   SELECT * from t1 where f2=f1;
1596
1597--error ER_PARSE_ERROR
1598CREATE PROCEDURE select()
1599   SELECT * from t1 where f2=f1;
1600
1601--error ER_PARSE_ERROR
1602CREATE PROCEDURE sensitive()
1603   SELECT * from t1 where f2=f1;
1604
1605--error ER_PARSE_ERROR
1606CREATE PROCEDURE separator()
1607   SELECT * from t1 where f2=f1;
1608
1609--error ER_PARSE_ERROR
1610CREATE PROCEDURE set()
1611   SELECT * from t1 where f2=f1;
1612
1613--error ER_PARSE_ERROR
1614CREATE PROCEDURE show()
1615   SELECT * from t1 where f2=f1;
1616
1617--error ER_PARSE_ERROR
1618CREATE PROCEDURE smallint()
1619   SELECT * from t1 where f2=f1;
1620
1621--error ER_PARSE_ERROR
1622CREATE PROCEDURE spatial()
1623   SELECT * from t1 where f2=f1;
1624
1625--error ER_PARSE_ERROR
1626CREATE PROCEDURE specific()
1627   SELECT * from t1 where f2=f1;
1628
1629--error ER_PARSE_ERROR
1630CREATE PROCEDURE sql()
1631   SELECT * from t1 where f2=f1;
1632
1633--error ER_PARSE_ERROR
1634CREATE PROCEDURE sqlexception()
1635   SELECT * from t1 where f2=f1;
1636
1637--error ER_PARSE_ERROR
1638CREATE PROCEDURE sqlstate()
1639   SELECT * from t1 where f2=f1;
1640
1641--error ER_PARSE_ERROR
1642CREATE PROCEDURE sqlwarning()
1643   SELECT * from t1 where f2=f1;
1644
1645--error ER_PARSE_ERROR
1646CREATE PROCEDURE sql_big_result()
1647   SELECT * from t1 where f2=f1;
1648
1649--error ER_PARSE_ERROR
1650CREATE PROCEDURE sql_calc_found_rows()
1651   SELECT * from t1 where f2=f1;
1652
1653--error ER_PARSE_ERROR
1654CREATE PROCEDURE sql_small_result()
1655   SELECT * from t1 where f2=f1;
1656
1657--error ER_PARSE_ERROR
1658CREATE PROCEDURE ssl()
1659   SELECT * from t1 where f2=f1;
1660
1661--error ER_PARSE_ERROR
1662CREATE PROCEDURE starting()
1663   SELECT * from t1 where f2=f1;
1664
1665--error ER_PARSE_ERROR
1666CREATE PROCEDURE straight_join()
1667   SELECT * from t1 where f2=f1;
1668
1669--error ER_PARSE_ERROR
1670CREATE PROCEDURE table()
1671   SELECT * from t1 where f2=f1;
1672
1673--error ER_PARSE_ERROR
1674CREATE PROCEDURE terminated()
1675   SELECT * from t1 where f2=f1;
1676
1677--error ER_PARSE_ERROR
1678CREATE PROCEDURE then()
1679   SELECT * from t1 where f2=f1;
1680
1681--error ER_PARSE_ERROR
1682CREATE PROCEDURE tinyblob()
1683   SELECT * from t1 where f2=f1;
1684
1685--error ER_PARSE_ERROR
1686CREATE PROCEDURE tinyint()
1687   SELECT * from t1 where f2=f1;
1688
1689--error ER_PARSE_ERROR
1690CREATE PROCEDURE tinytext()
1691   SELECT * from t1 where f2=f1;
1692
1693--error ER_PARSE_ERROR
1694CREATE PROCEDURE to()
1695   SELECT * from t1 where f2=f1;
1696
1697--error ER_PARSE_ERROR
1698CREATE PROCEDURE trailing()
1699   SELECT * from t1 where f2=f1;
1700
1701--error ER_PARSE_ERROR
1702CREATE PROCEDURE trigger()
1703   SELECT * from t1 where f2=f1;
1704
1705--error ER_PARSE_ERROR
1706CREATE PROCEDURE true()
1707   SELECT * from t1 where f2=f1;
1708
1709--error ER_PARSE_ERROR
1710CREATE PROCEDURE undo()
1711   SELECT * from t1 where f2=f1;
1712
1713--error ER_PARSE_ERROR
1714CREATE PROCEDURE union()
1715   SELECT * from t1 where f2=f1;
1716
1717--error ER_PARSE_ERROR
1718CREATE PROCEDURE unique()
1719   SELECT * from t1 where f2=f1;
1720
1721--error ER_PARSE_ERROR
1722CREATE PROCEDURE unlock()
1723   SELECT * from t1 where f2=f1;
1724
1725--error ER_PARSE_ERROR
1726CREATE PROCEDURE unsigned()
1727   SELECT * from t1 where f2=f1;
1728
1729--error ER_PARSE_ERROR
1730CREATE PROCEDURE update()
1731   SELECT * from t1 where f2=f1;
1732
1733--error ER_PARSE_ERROR
1734CREATE PROCEDURE usage()
1735   SELECT * from t1 where f2=f1;
1736
1737--error ER_PARSE_ERROR
1738CREATE PROCEDURE use()
1739   SELECT * from t1 where f2=f1;
1740
1741--error ER_PARSE_ERROR
1742CREATE PROCEDURE using()
1743   SELECT * from t1 where f2=f1;
1744
1745--error ER_PARSE_ERROR
1746CREATE PROCEDURE utc_date()
1747   SELECT * from t1 where f2=f1;
1748
1749--error ER_PARSE_ERROR
1750CREATE PROCEDURE utc_time()
1751   SELECT * from t1 where f2=f1;
1752
1753--error ER_PARSE_ERROR
1754CREATE PROCEDURE utc_timestamp()
1755   SELECT * from t1 where f2=f1;
1756
1757--error ER_PARSE_ERROR
1758CREATE PROCEDURE values()
1759   SELECT * from t1 where f2=f1;
1760
1761--error ER_PARSE_ERROR
1762CREATE PROCEDURE varbinary()
1763   SELECT * from t1 where f2=f1;
1764
1765--error ER_PARSE_ERROR
1766CREATE PROCEDURE varchar()
1767   SELECT * from t1 where f2=f1;
1768
1769--error ER_PARSE_ERROR
1770CREATE PROCEDURE varcharacter()
1771   SELECT * from t1 where f2=f1;
1772
1773--error ER_PARSE_ERROR
1774CREATE PROCEDURE varying()
1775   SELECT * from t1 where f2=f1;
1776
1777--error ER_PARSE_ERROR
1778CREATE PROCEDURE when()
1779   SELECT * from t1 where f2=f1;
1780
1781--error ER_PARSE_ERROR
1782CREATE PROCEDURE where()
1783   SELECT * from t1 where f2=f1;
1784
1785--error ER_PARSE_ERROR
1786CREATE PROCEDURE while()
1787   SELECT * from t1 where f2=f1;
1788
1789--error ER_PARSE_ERROR
1790CREATE PROCEDURE with()
1791   SELECT * from t1 where f2=f1;
1792
1793--error ER_PARSE_ERROR
1794CREATE PROCEDURE write()
1795   SELECT * from t1 where f2=f1;
1796
1797--error ER_PARSE_ERROR
1798CREATE PROCEDURE xor()
1799   SELECT * from t1 where f2=f1;
1800
1801--error ER_PARSE_ERROR
1802CREATE PROCEDURE year_month()
1803   SELECT * from t1 where f2=f1;
1804
1805--error ER_PARSE_ERROR
1806CREATE PROCEDURE zerofill()
1807   SELECT * from t1 where f2=f1;
1808
1809
1810# ------------------------------------------------------------------------------
1811let $message= Testcase 4.1.15:
1812              ----------------
1813Ensure that any invalid function name is never accepted, and that an appropriate
1814error message is returned when the name is rejected;
1815--source include/show_msg80.inc
1816
1817
1818--error ER_PARSE_ERROR
1819CREATE FUNCTION !_fn1(f1 char) returns char
1820    return f1;
1821
1822--disable_warnings
1823--error ER_PARSE_ERROR
1824CREATE FUNCTION char(f1 char) returns char
1825    return f1;
1826
1827--error ER_PARSE_ERROR
1828CREATE FUNCTION char binary(f1 char binary) returns char binary
1829    return f1;
1830--error ER_PARSE_ERROR
1831CREATE FUNCTION char ascii(f1 char ascii) returns char ascii
1832    return f1;
1833
1834--error ER_PARSE_ERROR
1835CREATE FUNCTION char not null(f1 char not null) returns char not null
1836    return f1;
1837
1838--error ER_PARSE_ERROR
1839CREATE FUNCTION char binary not null(f1 char binary not null) returns char binary not null
1840    return f1;
1841
1842--error ER_PARSE_ERROR
1843CREATE FUNCTION char ascii not null(f1 char ascii not null) returns char ascii not null
1844    return f1;
1845
1846--error ER_PARSE_ERROR
1847CREATE FUNCTION tinytext(f1 tinytext) returns tinytext
1848    return f1;
1849
1850#--error ER_PARSE_ERROR
1851CREATE FUNCTION text(f1 text) returns text
1852    return f1;
1853  DROP FUNCTION text;
1854
1855--error ER_PARSE_ERROR
1856CREATE FUNCTION mediumtext(f1 mediumtext) returns mediumtext
1857    return f1;
1858
1859--error ER_PARSE_ERROR
1860CREATE FUNCTION longtext(f1 longtext) returns longtext
1861    return f1;
1862
1863--error ER_PARSE_ERROR
1864CREATE FUNCTION tinytext not null(f1 tinytext not null) returns tinytext not null
1865    return f1;
1866
1867--error ER_PARSE_ERROR
1868CREATE FUNCTION text not null(f1 text not null) returns text not null
1869    return f1;
1870
1871--error ER_PARSE_ERROR
1872CREATE FUNCTION mediumtext not null(f1 mediumtext not null) returns mediumtext not null
1873    return f1;
1874
1875--error ER_PARSE_ERROR
1876CREATE FUNCTION longtext not null(f1 longtext not null) returns longtext not null
1877    return f1;
1878
1879--error ER_PARSE_ERROR
1880CREATE FUNCTION tinyblob(f1 tinyblob) returns tinyblob
1881    return f1;
1882
1883--error ER_PARSE_ERROR
1884CREATE FUNCTION blob(f1 blob) returns blob
1885    return f1;
1886
1887--error ER_PARSE_ERROR
1888CREATE FUNCTION mediumblob(f1 mediumblob) returns mediumblob
1889    return f1;
1890
1891--error ER_PARSE_ERROR
1892CREATE FUNCTION longblob(f1 longblob) returns longblob
1893    return f1;
1894
1895--error ER_PARSE_ERROR
1896CREATE FUNCTION tinyblob not null(f1 tinyblob not null) returns tinyblob not null
1897    return f1;
1898
1899--error ER_PARSE_ERROR
1900CREATE FUNCTION blob not null(f1 blob not null) returns blob not null
1901    return f1;
1902
1903--error ER_PARSE_ERROR
1904CREATE FUNCTION mediumblob not null(f1 mediumblob not null) returns mediumblob not null
1905    return f1;
1906
1907--error ER_PARSE_ERROR
1908CREATE FUNCTION longblob not null(f1 longblob not null) returns longblob not null
1909    return f1;
1910
1911--error ER_PARSE_ERROR
1912CREATE FUNCTION binary(f1 binary) returns binary
1913    return f1;
1914
1915--error ER_PARSE_ERROR
1916CREATE FUNCTION binary not null(f1 binary not null) returns binary not null
1917    return f1;
1918
1919--error ER_PARSE_ERROR
1920CREATE FUNCTION tinyint(f1 tinyint) returns tinyint
1921    return f1;
1922
1923--error ER_PARSE_ERROR
1924CREATE FUNCTION tinyint unsigned(f1 tinyint unsigned) returns tinyint unsigned
1925    return f1;
1926
1927--error ER_PARSE_ERROR
1928CREATE FUNCTION tinyint zerofill(f1 tinyint zerofill) returns tinyint zerofill
1929    return f1;
1930
1931--error ER_PARSE_ERROR
1932CREATE FUNCTION tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
1933    return f1;
1934
1935--error ER_PARSE_ERROR
1936CREATE FUNCTION smallint(f1 smallint) returns smallint
1937    return f1;
1938
1939--error ER_PARSE_ERROR
1940CREATE FUNCTION smallint unsigned(f1 smallint unsigned) returns smallint unsigned
1941    return f1;
1942
1943--error ER_PARSE_ERROR
1944CREATE FUNCTION smallint zerofill(f1 smallint zerofill) returns smallint zerofill
1945    return f1;
1946
1947--error ER_PARSE_ERROR
1948CREATE FUNCTION smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsigned zerofill
1949    return f1;
1950
1951--error ER_PARSE_ERROR
1952CREATE FUNCTION mediumint(f1 mediumint) returns mediumint
1953    return f1;
1954
1955--error ER_PARSE_ERROR
1956CREATE FUNCTION mediumint unsigned(f1 mediumint unsigned) returns mediumint unsigned
1957    return f1;
1958
1959--error ER_PARSE_ERROR
1960CREATE FUNCTION mediumint zerofill(f1 mediumint zerofill) returns mediumint zerofill
1961    return f1;
1962
1963--error ER_PARSE_ERROR
1964CREATE FUNCTION mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
1965    return f1;
1966
1967--error ER_PARSE_ERROR
1968CREATE FUNCTION int(f1 int) returns int
1969    return f1;
1970
1971--error ER_PARSE_ERROR
1972CREATE FUNCTION int1(f1 int1) returns int1
1973    return f1;
1974
1975--error ER_PARSE_ERROR
1976CREATE FUNCTION int2(f1 int2) returns int2
1977    return f1;
1978
1979--error ER_PARSE_ERROR
1980CREATE FUNCTION int3(f1 int3) returns int3
1981    return f1;
1982
1983--error ER_PARSE_ERROR
1984CREATE FUNCTION int4(f1 int4) returns int4
1985    return f1;
1986
1987--error ER_PARSE_ERROR
1988CREATE FUNCTION int8(f1 int8) returns int8
1989    return f1;
1990
1991--error ER_PARSE_ERROR
1992CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned
1993    return f1;
1994
1995--error ER_PARSE_ERROR
1996CREATE FUNCTION int zerofill(f1 int zerofill) returns int zerofill
1997    return f1;
1998
1999--error ER_PARSE_ERROR
2000CREATE FUNCTION int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill
2001    return f1;
2002
2003--error ER_PARSE_ERROR
2004CREATE FUNCTION bigint(f1 bigint) returns bigint
2005    return f1;
2006
2007--error ER_PARSE_ERROR
2008CREATE FUNCTION bigint unsigned(f1 bigint unsigned) returns bigint unsigned
2009    return f1;
2010
2011--error ER_PARSE_ERROR
2012CREATE FUNCTION bigint zerofill(f1 bigint zerofill) returns bigint zerofill
2013    return f1;
2014
2015--error ER_PARSE_ERROR
2016CREATE FUNCTION bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned zerofill
2017    return f1;
2018
2019--error ER_PARSE_ERROR
2020CREATE FUNCTION decimal(f1 decimal) returns decimal
2021    return f1;
2022
2023--error ER_PARSE_ERROR
2024CREATE FUNCTION decimal unsigned(f1 decimal unsigned) returns decimal unsigned
2025    return f1;
2026
2027--error ER_PARSE_ERROR
2028CREATE FUNCTION decimal zerofill(f1 decimal zerofill) returns decimal zerofill
2029    return f1;
2030
2031--error ER_PARSE_ERROR
2032CREATE FUNCTION decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned zerofill
2033    return f1;
2034
2035--error ER_PARSE_ERROR
2036CREATE FUNCTION numeric(f1 numeric) returns numeric
2037    return f1;
2038
2039--error ER_PARSE_ERROR
2040CREATE FUNCTION numeric unsigned(f1 numeric unsigned) returns numeric unsigned
2041    return f1;
2042
2043--error ER_PARSE_ERROR
2044CREATE FUNCTION numeric zerofill(f1 numeric zerofill) returns numeric zerofill
2045    return f1;
2046
2047--error ER_PARSE_ERROR
2048CREATE FUNCTION numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned zerofill
2049    return f1;
2050
2051--error ER_PARSE_ERROR
2052CREATE FUNCTION real(f1 real) returns real
2053    return f1;
2054
2055--error ER_PARSE_ERROR
2056CREATE FUNCTION real unsigned(f1 real unsigned) returns real unsigned
2057    return f1;
2058
2059--error ER_PARSE_ERROR
2060CREATE FUNCTION real zerofill(f1 real zerofill) returns real zerofill
2061    return f1;
2062
2063--error ER_PARSE_ERROR
2064CREATE FUNCTION real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill
2065    return f1;
2066
2067--error ER_PARSE_ERROR
2068CREATE FUNCTION float(f1 float) returns float
2069    return f1;
2070
2071--error ER_PARSE_ERROR
2072CREATE FUNCTION float unsigned(f1 float unsigned) returns float unsigned
2073    return f1;
2074
2075--error ER_PARSE_ERROR
2076CREATE FUNCTION float zerofill(f1 float zerofill) returns float zerofill
2077    return f1;
2078
2079--error ER_PARSE_ERROR
2080CREATE FUNCTION float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerofill
2081    return f1;
2082
2083CREATE FUNCTION date(f1 date) returns date
2084    return f1;
2085DROP FUNCTION date;
2086
2087CREATE FUNCTION time(f1 time) returns time
2088    return f1;
2089DROP FUNCTION time;
2090
2091CREATE FUNCTION datetime(f1 datetime) returns datetime
2092    return f1;
2093DROP FUNCTION datetime;
2094
2095CREATE FUNCTION timestamp(f1 timestamp) returns timestamp
2096    return f1;
2097DROP FUNCTION timestamp;
2098
2099CREATE FUNCTION year(f1 year) returns year
2100    return f1;
2101DROP FUNCTION year;
2102
2103--error ER_PARSE_ERROR
2104CREATE FUNCTION year(3)(f1 year(3)) returns year(3)
2105    return f1;
2106
2107--error ER_PARSE_ERROR
2108CREATE FUNCTION year(4)(f1 year(4)) returns year(4)
2109    return f1;
2110
2111--error ER_PARSE_ERROR
2112CREATE FUNCTION enum("1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum")
2113    return f1;
2114
2115--error ER_PARSE_ERROR
2116CREATE FUNCTION set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set")
2117    return f1;
2118--enable_warnings
2119
2120DROP FUNCTION IF EXISTS fn1;
2121CREATE FUNCTION fn1(f1 char ) returns char
2122    return f1;
2123
2124DROP FUNCTION IF EXISTS fn1;
2125--error ER_NOT_SUPPORTED_YET
2126CREATE FUNCTION fn1(f1 char binary ) returns char binary
2127    return f1;
2128
2129DROP FUNCTION IF EXISTS fn1;
2130CREATE FUNCTION fn1(f1 char ascii ) returns char ascii
2131    return f1;
2132
2133DROP FUNCTION IF EXISTS fn1;
2134--error ER_PARSE_ERROR
2135CREATE FUNCTION fn1(f1 char not null ) returns char not null
2136    return f1;
2137
2138DROP FUNCTION IF EXISTS fn1;
2139--error ER_PARSE_ERROR
2140CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null
2141    return f1;
2142
2143DROP FUNCTION IF EXISTS fn1;
2144--error ER_PARSE_ERROR
2145CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null
2146    return f1;
2147
2148DROP FUNCTION IF EXISTS fn1;
2149CREATE FUNCTION fn1(f1 tinytext ) returns tinytext
2150    return f1;
2151
2152DROP FUNCTION IF EXISTS fn1;
2153CREATE FUNCTION fn1(f1 text ) returns text
2154    return f1;
2155
2156DROP FUNCTION IF EXISTS fn1;
2157CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext
2158    return f1;
2159
2160DROP FUNCTION IF EXISTS fn1;
2161CREATE FUNCTION fn1(f1 longtext ) returns longtext
2162    return f1;
2163
2164DROP FUNCTION IF EXISTS fn1;
2165--error ER_PARSE_ERROR
2166CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null
2167    return f1;
2168
2169DROP FUNCTION IF EXISTS fn1;
2170--error ER_PARSE_ERROR
2171CREATE FUNCTION fn1(f1 text not null ) returns text not null
2172    return f1;
2173
2174DROP FUNCTION IF EXISTS fn1;
2175--error ER_PARSE_ERROR
2176CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null
2177    return f1;
2178
2179DROP FUNCTION IF EXISTS fn1;
2180--error ER_PARSE_ERROR
2181CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null
2182    return f1;
2183
2184DROP FUNCTION IF EXISTS fn1;
2185CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob
2186    return f1;
2187
2188DROP FUNCTION IF EXISTS fn1;
2189CREATE FUNCTION fn1(f1 blob ) returns blob
2190    return f1;
2191
2192DROP FUNCTION IF EXISTS fn1;
2193CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob
2194    return f1;
2195
2196DROP FUNCTION IF EXISTS fn1;
2197CREATE FUNCTION fn1(f1 longblob ) returns longblob
2198    return f1;
2199
2200DROP FUNCTION IF EXISTS fn1;
2201--error ER_PARSE_ERROR
2202CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null
2203    return f1;
2204
2205DROP FUNCTION IF EXISTS fn1;
2206--error ER_PARSE_ERROR
2207CREATE FUNCTION fn1(f1 blob not null ) returns blob not null
2208    return f1;
2209
2210DROP FUNCTION IF EXISTS fn1;
2211--error ER_PARSE_ERROR
2212CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null
2213    return f1;
2214
2215DROP FUNCTION IF EXISTS fn1;
2216--error ER_PARSE_ERROR
2217CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null
2218    return f1;
2219
2220DROP FUNCTION IF EXISTS fn1;
2221CREATE FUNCTION fn1(f1 binary ) returns binary
2222    return f1;
2223
2224DROP FUNCTION IF EXISTS fn1;
2225--error ER_PARSE_ERROR
2226CREATE FUNCTION fn1(f1 binary not null ) returns binary not null
2227    return f1;
2228
2229DROP FUNCTION IF EXISTS fn1;
2230CREATE FUNCTION fn1(f1 tinyint ) returns tinyint
2231    return f1;
2232
2233DROP FUNCTION IF EXISTS fn1;
2234CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned
2235    return f1;
2236
2237DROP FUNCTION IF EXISTS fn1;
2238CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill
2239    return f1;
2240
2241DROP FUNCTION IF EXISTS fn1;
2242CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill
2243    return f1;
2244
2245DROP FUNCTION IF EXISTS fn1;
2246CREATE FUNCTION fn1(f1 smallint ) returns smallint
2247    return f1;
2248
2249DROP FUNCTION IF EXISTS fn1;
2250CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned
2251    return f1;
2252
2253DROP FUNCTION IF EXISTS fn1;
2254CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill
2255    return f1;
2256
2257DROP FUNCTION IF EXISTS fn1;
2258CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill
2259    return f1;
2260
2261DROP FUNCTION IF EXISTS fn1;
2262CREATE FUNCTION fn1(f1 mediumint ) returns mediumint
2263    return f1;
2264
2265DROP FUNCTION IF EXISTS fn1;
2266CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned
2267    return f1;
2268
2269DROP FUNCTION IF EXISTS fn1;
2270CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill
2271    return f1;
2272
2273DROP FUNCTION IF EXISTS fn1;
2274CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill
2275    return f1;
2276
2277DROP FUNCTION IF EXISTS fn1;
2278CREATE FUNCTION fn1(f1 int ) returns int
2279    return f1;
2280
2281DROP FUNCTION IF EXISTS fn1;
2282CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned
2283    return f1;
2284
2285DROP FUNCTION IF EXISTS fn1;
2286CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned
2287    return f1;
2288
2289DROP FUNCTION IF EXISTS fn1;
2290CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned
2291    return f1;
2292
2293DROP FUNCTION IF EXISTS fn1;
2294CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned
2295    return f1;
2296
2297DROP FUNCTION IF EXISTS fn1;
2298CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned
2299    return f1;
2300
2301DROP FUNCTION IF EXISTS fn1;
2302CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned
2303    return f1;
2304
2305DROP FUNCTION IF EXISTS fn1;
2306CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill
2307    return f1;
2308
2309DROP FUNCTION IF EXISTS fn1;
2310CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill
2311    return f1;
2312
2313DROP FUNCTION IF EXISTS fn1;
2314CREATE FUNCTION fn1(f1 bigint ) returns bigint
2315    return f1;
2316
2317DROP FUNCTION IF EXISTS fn1;
2318CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned
2319    return f1;
2320
2321DROP FUNCTION IF EXISTS fn1;
2322CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill
2323    return f1;
2324
2325DROP FUNCTION IF EXISTS fn1;
2326CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill
2327    return f1;
2328
2329DROP FUNCTION IF EXISTS fn1;
2330CREATE FUNCTION fn1(f1 decimal ) returns decimal
2331    return f1;
2332
2333DROP FUNCTION IF EXISTS fn1;
2334CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned
2335    return f1;
2336
2337DROP FUNCTION IF EXISTS fn1;
2338CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill
2339    return f1;
2340
2341DROP FUNCTION IF EXISTS fn1;
2342CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill
2343    return f1;
2344
2345DROP FUNCTION IF EXISTS fn1;
2346CREATE FUNCTION fn1(f1 numeric ) returns numeric
2347    return f1;
2348
2349DROP FUNCTION IF EXISTS fn1;
2350CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned
2351    return f1;
2352
2353DROP FUNCTION IF EXISTS fn1;
2354CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill
2355    return f1;
2356
2357DROP FUNCTION IF EXISTS fn1;
2358CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill
2359    return f1;
2360
2361DROP FUNCTION IF EXISTS fn1;
2362CREATE FUNCTION fn1(f1 real ) returns real
2363    return f1;
2364
2365DROP FUNCTION IF EXISTS fn1;
2366CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned
2367    return f1;
2368
2369DROP FUNCTION IF EXISTS fn1;
2370CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill
2371    return f1;
2372
2373DROP FUNCTION IF EXISTS fn1;
2374CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill
2375    return f1;
2376
2377DROP FUNCTION IF EXISTS fn1;
2378CREATE FUNCTION fn1(f1 float ) returns float
2379    return f1;
2380
2381DROP FUNCTION IF EXISTS fn1;
2382CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned
2383    return f1;
2384
2385DROP FUNCTION IF EXISTS fn1;
2386CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill
2387    return f1;
2388
2389DROP FUNCTION IF EXISTS fn1;
2390CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill
2391    return f1;
2392
2393DROP FUNCTION IF EXISTS fn1;
2394CREATE FUNCTION fn1(f1 date ) returns date
2395    return f1;
2396
2397DROP FUNCTION IF EXISTS fn1;
2398CREATE FUNCTION fn1(f1 time ) returns time
2399    return f1;
2400
2401DROP FUNCTION IF EXISTS fn1;
2402CREATE FUNCTION fn1(f1 datetime ) returns datetime
2403    return f1;
2404
2405DROP FUNCTION IF EXISTS fn1;
2406CREATE FUNCTION fn1(f1 timestamp ) returns timestamp
2407    return f1;
2408
2409DROP FUNCTION IF EXISTS fn1;
2410CREATE FUNCTION fn1(f1 year ) returns year
2411    return f1;
2412
2413DROP FUNCTION IF EXISTS fn1;
2414--error ER_PARSE_ERROR
2415CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3)
2416    return f1;
2417
2418DROP FUNCTION IF EXISTS fn1;
2419--error ER_PARSE_ERROR
2420CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4)
2421    return f1;
2422
2423DROP FUNCTION IF EXISTS fn1;
2424--error ER_PARSE_ERROR
2425CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum")
2426    return f1;
2427
2428DROP FUNCTION IF EXISTS fn1;
2429--error ER_PARSE_ERROR
2430CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set")
2431    return f1;
2432
2433
2434# ------------------------------------------------------------------------------
2435let $message= Testcase 4.1.16:
2436              ----------------
2437Ensure that a reference to a non-existent stored procedure is rejected with an
2438appropriate error message;
2439--source include/show_msg80.inc
2440
2441DROP PROCEDURE IF EXISTS sp16;
2442
2443--error ER_SP_DOES_NOT_EXIST
2444CALL sp16( 'xyz' );
2445
2446CREATE DATABASE db1;
2447USE db1;
2448
2449delimiter //;
2450CREATE PROCEDURE sp16()
2451BEGIN
2452    set @var1 = 1;
2453    SELECT @var1;
2454END//
2455delimiter ;//
2456
2457--error ER_SP_DOES_NOT_EXIST
2458CALL db_storedproc.sp16();
2459
2460# cleanup
2461USE db_storedproc;
2462DROP PROCEDURE db1.sp16;
2463DROP DATABASE db1;
2464
2465
2466# ------------------------------------------------------------------------------
2467let $message= Testcase 4.1.17:
2468              ----------------
2469Ensure that it is possible to drop, create and CALL/execute a procedure and a
2470function with the same name, even in the same database;
2471--source include/show_msg80.inc
2472
2473USE db_storedproc;
2474DROP FUNCTION IF EXISTS sp1;
2475DROP PROCEDURE IF EXISTS sp1;
2476
2477delimiter //;
2478CREATE PROCEDURE sp1 ()
2479BEGIN
2480    declare x enum( 'db1', 'test' ) default 'test';
2481    SELECT x;
2482END//
2483delimiter ;//
2484
2485CALL sp1();
2486
2487
2488CREATE FUNCTION sp1 (y char) returns char return y;
2489  SELECT sp1( 'a' );
2490
2491DROP DATABASE IF EXISTS db1;
2492CREATE DATABASE db1;
2493USE db1;
2494CALL db_storedproc.sp1( );
2495SELECT db_storedproc.sp1( 'a' );
2496
2497DROP FUNCTION db_storedproc.sp1;
2498USE db_storedproc;
2499
2500--error ER_SP_DOES_NOT_EXIST
2501SELECT sp1('a');
2502
2503DROP PROCEDURE sp1;
2504
2505--error ER_SP_DOES_NOT_EXIST
2506CALL sp1();
2507
2508--error ER_SP_DOES_NOT_EXIST
2509SELECT sp1('a');
2510
2511# cleanup
2512USE db_storedproc;
2513DROP DATABASE db1;
2514
2515
2516# ------------------------------------------------------------------------------
2517let $message= Testcase 4.1.18:
2518              ----------------
2519Ensure that it is possible to alter a procedure and
2520a function with the same name, in the same database;
2521--source include/show_msg80.inc
2522
2523
2524USE db_storedproc;
2525DROP PROCEDURE IF EXISTS sp1;
2526DROP FUNCTION IF EXISTS sp1;
2527set @x=null; set @y=null;
2528
2529delimiter //;
2530CREATE PROCEDURE sp1()
2531BEGIN
2532    set @x= 1;
2533    SELECT @x;
2534END//
2535delimiter ;//
2536
2537CREATE FUNCTION sp1 () returns int return 2.2;
2538CALL db_storedproc.sp1();
2539SELECT db_storedproc.sp1();
2540
2541DROP DATABASE IF EXISTS db1;
2542CREATE DATABASE db1;
2543USE db1;
2544alter procedure db_storedproc.sp1 sql security invoker;
2545--sorted_result
2546SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
2547
2548alter function db_storedproc.sp1 sql security invoker;
2549--sorted_result
2550SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
2551
2552CALL db_storedproc.sp1();
2553
2554SELECT db_storedproc.sp1();
2555
2556USE db_storedproc;
2557alter procedure sp1 sql security DEFINER;
2558CALL db_storedproc.sp1();
2559
2560SELECT db_storedproc.sp1();
2561
2562alter function sp1 sql security DEFINER;
2563--sorted_result
2564SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1';
2565CALL db_storedproc.sp1();
2566
2567SELECT db_storedproc.sp1();
2568
2569# cleanup
2570USE db_storedproc;
2571DROP DATABASE db1;
2572DROP PROCEDURE db_storedproc.sp1;
2573DROP FUNCTION db_storedproc.sp1;
2574
2575# ------------------------------------------------------------------------------
2576let $message= Testcase 4.1.19:
2577              ----------------
2578verify altering procedure and function with the same name, does not affect
2579properties of a procedure and a function with the same name in the different
2580database.;
2581--source include/show_msg80.inc
2582
2583
2584--disable_warnings ONCE
2585DROP DATABASE IF EXISTS db_storedproc_3122;
2586
2587CREATE DATABASE db_storedproc_3122;
2588USE db_storedproc;
2589SET @x = NULL;
2590SET @y = NULL;
2591DROP PROCEDURE IF EXISTS sp1;
2592DROP FUNCTION IF EXISTS sp1;
2593DROP PROCEDURE IF EXISTS db_storedproc_3122.sp1;
2594DROP FUNCTION IF EXISTS db_storedproc_3122.sp1;
2595delimiter //;
2596CREATE PROCEDURE sp1()
2597BEGIN
2598    SET @x = 1;
2599    SELECT @x;
2600END//
2601delimiter ;//
2602
2603# FIXME ps-protocol vs. normal difference when returning float instead of double
2604CREATE FUNCTION db_storedproc_3122.sp1() RETURNS DOUBLE RETURN 2.2;
2605CALL sp1();
2606  SELECT db_storedproc_3122.sp1();
2607  USE db_storedproc_3122;
2608
2609delimiter //;
2610CREATE PROCEDURE sp1 ()
2611BEGIN
2612    SET @x = 3;
2613    SELECT @x;
2614END//
2615delimiter ;//
2616
2617CREATE FUNCTION db_storedproc.sp1() RETURNS DOUBLE RETURN 4.4;
2618CALL sp1();
2619SELECT db_storedproc.sp1();
2620
2621ALTER PROCEDURE db_storedproc_3122.sp1 SQL SECURITY INVOKER;
2622ALTER FUNCTION sp1 SQL SECURITY INVOKER;
2623
2624--sorted_result
2625SELECT db, name, type, security_type FROM mysql.proc WHERE db LIKE 'db_storedproc%' AND specific_name='sp1';
2626
2627CALL db_storedproc.sp1();
2628
2629SELECT db_storedproc.sp1();
2630CALL db_storedproc_3122.sp1();
2631SELECT db_storedproc_3122.sp1();
2632
2633# clean up
2634USE db_storedproc;
2635DROP DATABASE db_storedproc_3122;
2636DROP FUNCTION db_storedproc.sp1;
2637DROP PROCEDURE db_storedproc.sp1;
2638
2639
2640# ------------------------------------------------------------------------------
2641let $message= Testcase 4.1.20:
2642              ----------------
2643Ensure that it is possible to alter the comment of a procedure
2644and a function with the same name, even in the same database;
2645--source include/show_msg80.inc
2646
2647
2648USE db_storedproc;
2649set @x=null;
2650
2651--disable_warnings
2652DROP PROCEDURE IF EXISTS sp1;
2653DROP FUNCTION IF EXISTS sp1;
2654--enable_warnings
2655
2656CREATE PROCEDURE sp1 () set @x= 1;
2657CREATE FUNCTION sp1 () returns int return 2;
2658
2659DROP DATABASE IF EXISTS db_storedproc_3122;
2660CREATE DATABASE db_storedproc_3122;
2661USE db_storedproc_3122;
2662
2663CREATE PROCEDURE sp1 () set @x= 3;
2664CREATE FUNCTION sp1 () returns int return 4;
2665
2666alter procedure sp1 sql security invoker comment 'this is a procedure';
2667alter function sp1 sql security invoker comment 'this is a function';
2668
2669alter procedure sp1 sql security DEFINER;
2670alter function sp1 sql security DEFINER;
2671--replace_column 5 <modified> 6 <created>
2672show CREATE PROCEDURE sp1;
2673--replace_column 5 <modified> 6 <created>
2674show CREATE FUNCTION sp1;
2675
2676# clean up
2677USE db_storedproc;
2678DROP DATABASE db_storedproc_3122;
2679DROP FUNCTION db_storedproc.sp1;
2680DROP PROCEDURE db_storedproc.sp1;
2681
2682
2683# ------------------------------------------------------------------------------
2684let $message= Testcase 4.1.21:
2685              ----------------
2686Ensure that it is not possible to create two procedures with same name
2687in same database;
2688--source include/show_msg80.inc
2689
2690USE db_storedproc;
2691set @x=null;
2692set @y=null;
2693
2694--disable_warnings ONCE
2695DROP DATABASE IF EXISTS db1;
2696
2697CREATE DATABASE db1;
2698DROP PROCEDURE IF EXISTS sp1;
2699CREATE PROCEDURE sp1 () set @x=1;
2700
2701--error ER_SP_ALREADY_EXISTS
2702CREATE PROCEDURE sp1 () set @x=2;
2703
2704CALL sp1();
2705SELECT @x;
2706USE db1;
2707--error ER_SP_ALREADY_EXISTS
2708CREATE PROCEDURE db_storedproc.sp1 () set @x=3;
2709CALL db_storedproc.sp1();
2710  SELECT @x;
2711
2712DROP PROCEDURE IF EXISTS db_storedproc.sp1;
2713CREATE PROCEDURE db_storedproc.sp1 () set @x=1;
2714--error ER_SP_ALREADY_EXISTS
2715CREATE PROCEDURE db_storedproc.sp1 () set @x=2;
2716CALL db_storedproc.sp1();
2717SELECT @x;
2718
2719# clean up
2720USE db_storedproc;
2721DROP DATABASE db1;
2722DROP PROCEDURE db_storedproc.sp1;
2723
2724
2725
2726# ------------------------------------------------------------------------------
2727let $message= Testcase 4.1.22:
2728              ----------------
2729Ensure that it is not possible to create two functions with same name in the
2730same database;
2731--source include/show_msg80.inc
2732
2733USE db_storedproc;
2734DROP DATABASE IF EXISTS db1;
2735CREATE DATABASE db1;
2736DROP FUNCTION IF EXISTS fn1;
2737CREATE FUNCTION fn1 () returns int return 1;
2738--error ER_SP_ALREADY_EXISTS
2739CREATE FUNCTION fn1 () returns int return 2;
2740SELECT fn1();
2741USE db1;
2742--error ER_SP_ALREADY_EXISTS
2743CREATE FUNCTION db_storedproc.fn1 () returns int return 3;
2744SELECT db_storedproc.fn1();
2745DROP FUNCTION IF EXISTS db_storedproc.fn1;
2746CREATE FUNCTION db_storedproc.fn1 () returns int return 1;
2747--error ER_SP_ALREADY_EXISTS
2748CREATE FUNCTION db_storedproc.fn1 () returns int return 2;
2749SELECT db_storedproc.fn1();
2750
2751# clean up
2752USE db_storedproc;
2753DROP DATABASE db1;
2754DROP FUNCTION db_storedproc.fn1;
2755
2756
2757# ------------------------------------------------------------------------------
2758let $message= Testcase 4.1.23:
2759              ----------------
2760Ensure that it is possible to create two or more procedures with the same name,
2761providing each resides in different databases;
2762--source include/show_msg80.inc
2763
2764
2765USE db_storedproc;
2766set @x=null;
2767set @y=null;
2768DROP PROCEDURE IF EXISTS sp1;
2769CREATE PROCEDURE sp1 () set @x= 1;
2770DROP DATABASE IF EXISTS test3124;
2771CREATE DATABASE test3124;
2772USE test3124;
2773CREATE PROCEDURE sp1 () set @y= 2;
2774CALL sp1();
2775SELECT @x, @y;
2776USE db_storedproc;
2777CALL sp1();
2778SELECT @x, @y;
2779
2780# clean up
2781USE db_storedproc;
2782DROP DATABASE test3124;
2783DROP PROCEDURE db_storedproc.sp1;
2784
2785
2786# ------------------------------------------------------------------------------
2787let $message= Testcase 4.1.24:
2788              ----------------
2789Ensure that it is possible to create two or more functions with the same name,
2790providing each resides in different databases.;
2791--source include/show_msg80.inc
2792
2793
2794USE db_storedproc;
2795DROP FUNCTION IF EXISTS f1;
2796CREATE FUNCTION f1 () returns int return 1;
2797DROP DATABASE IF EXISTS test3125;
2798CREATE DATABASE test3125;
2799USE test3125; CREATE FUNCTION f1 () returns int return 2;
2800SELECT f1();
2801USE db_storedproc;
2802SELECT f1();
2803
2804# clean up
2805USE db_storedproc;
2806DROP DATABASE test3125;
2807DROP FUNCTION db_storedproc.f1;
2808
2809
2810# ------------------------------------------------------------------------------
2811let $message= Testcase 4.1.25:
2812              ----------------
2813Ensure that any invalid function name is never accepted, and that an appropriate
2814error message is returned when the name is rejected. (invalid func name);
2815--source include/show_msg80.inc
2816
2817delimiter //;
2818--error ER_PARSE_ERROR
2819CREATE FUNCTION !_fn1( f1 char(20) ) returns int
2820BEGIN
2821   SELECT * from t1 where f2 = f1;
2822   return 1;
2823END//
2824delimiter ;//
2825
2826delimiter //;
2827--error ER_PARSE_ERROR
2828CREATE FUNCTION fn1( f1 char(20) ) return int
2829BEGIN
2830   SELECT * from t1 where f2 = f1;
2831   return 1;
2832END//
2833delimiter ;//
2834
2835CREATE FUNCTION fn1() returns int
2836  return 'a';
2837
2838--error ER_PARSE_ERROR
2839CREATE FUNCTION procedure() returns int
2840  return 1;
2841
2842--error ER_PARSE_ERROR
2843CREATE FUNCTION fn1(a char) returns int lang sql return 1;
2844
2845--error ER_PARSE_ERROR
2846CREATE FUNCTION fn1(a char) returns int deterministic( return 1);
2847
2848--error ER_PARSE_ERROR
2849CREATE FUNCTION fn1(a char) returns int non deterministic return 1;
2850
2851--error ER_PARSE_ERROR
2852CREATE FUNCTION fn1(a char) returns int not deterministic comment 'abc' language sql sql security refiner return 1;
2853
2854# clean up
2855--disable_warnings ONCE
2856DROP FUNCTION IF EXISTS fn1;
2857
2858
2859# ==============================================================================
2860#
2861# test plan section: 4.2 - syntax checks for programming statements - 1
2862#
2863# ==============================================================================
2864
2865# ------------------------------------------------------------------------------
2866let $message= Testcase 4.1.1:
2867              ---------------
2868              Ensure that all clauses that should be supported are supported.
2869              CREATE PROCEDURE;
2870--source include/show_msg80.inc
2871
2872
2873USE db_storedproc;
2874
2875  set @count = 0;
2876
2877--disable_warnings ONCE
2878DROP PROCEDURE IF EXISTS sp1;
2879
2880delimiter //;
2881CREATE PROCEDURE sp1(cnt int(20))
2882BEGIN
2883    SELECT count(*) into cnt from t2;
2884    set @count = cnt;
2885END//
2886delimiter ;//
2887
2888CALL sp1( 10 );
2889
2890  SELECT @count;
2891
2892# clean up
2893DROP PROCEDURE sp1;
2894
2895# ------------------------------------------------------------------------------
2896let $message= Testcase 4.2.2:
2897BEGINend;
2898--source include/show_msg80.inc
2899
2900
2901--disable_warnings ONCE
2902DROP PROCEDURE IF EXISTS sp1;
2903
2904delimiter //;
2905CREATE PROCEDURE sp1( cnt int(20) )
2906BEGIN
2907    SELECT count(*) into cnt from t2;
2908    set @count = cnt;
2909    SELECT @count;
2910END//
2911delimiter ;//
2912
2913CALL sp1( 10 );
2914
2915--disable_warnings ONCE
2916DROP PROCEDURE IF EXISTS sp1;
2917
2918# missing BEGIN
2919# PLEASE NOTE:
2920# this test client has the MULTI_QUERY capability,
2921# so that the following request (starting at 'CREATE' and ending at the //
2922# delimiter) is interpreted as follows:
2923# 1) it's a multi query
2924# 2) the first query is a valid CREATE PROCEDURE statement, and the
2925# procedure consist of only one SELECT statement
2926# 3) the second query is a SET statement, which is broken since it's
2927# referencing an unknown column 'cnt'
2928# 4) the next query (SELECT @count) is not parsed or executed, since 3)
2929# failed
2930
2931delimiter //;
2932--error ER_BAD_FIELD_ERROR
2933CREATE PROCEDURE sp1( cnt int(20) )
2934    SELECT count(*) into cnt from t2;
2935    set @count = cnt;
2936    SELECT @count;
2937END//
2938delimiter ;//
2939
2940CALL sp1( 10 );
2941
2942--disable_warnings ONCE
2943DROP PROCEDURE sp1;
2944
2945# wrong order of BEGIN and END
2946delimiter //;
2947--error ER_PARSE_ERROR
2948CREATE PROCEDURE sp1( cnt int(20) )
2949END
2950    SELECT count(*) into cnt from t2;
2951    set @count = cnt;
2952    SELECT @count;
2953BEGIN//
2954delimiter ;//
2955
2956--error ER_SP_DOES_NOT_EXIST
2957CALL sp1( 10 );
2958
2959--disable_warnings ONCE
2960DROP PROCEDURE IF EXISTS sp1;
2961
2962# invalid usage of BEGIN + END
2963delimiter //;
2964--error ER_PARSE_ERROR
2965CREATE PROCEDURE sp1( cnt int(20) )
2966BEGIN
2967   SELECT count(*) into cnt from t2;
2968   BEGIN
2969      BEGIN END;
2970   BEGIN
2971   END;
2972   set @count = cnt;
2973   SELECT @count;
2974END//
2975delimiter ;//
2976
2977# ------------------------------------------------------------------------------
2978let $message= Testcase 4.2.4:
2979              ---------------
2980Ensure that every BEGIN statement is coupled with a terminating END statement.
2981(BEGIN with no END);
2982--source include/show_msg80.inc
2983
2984--disable_warnings ONCE
2985DROP PROCEDURE IF EXISTS sp1;
2986
2987delimiter //;
2988CREATE PROCEDURE sp1( )
2989BEGIN
2990    declare x char;
2991    declare y char;
2992    SELECT f1, f2 into x, y from t2 limit 1;
2993END//
2994delimiter ;//
2995
2996# ------------------------------------------------------------------------------
2997let $message= Testcase ....:
2998              --------------
2999;
3000--source include/show_msg80.inc
3001
3002--disable_warnings ONCE
3003DROP PROCEDURE IF EXISTS sp1;
3004
3005delimiter //;
3006--error ER_PARSE_ERROR
3007CREATE PROCEDURE sp1()
3008  accessible:BEGIN
3009    SELECT @x;
3010END//
3011delimiter ;//
3012
3013--disable_warnings ONCE
3014DROP PROCEDURE IF EXISTS sp1;
3015
3016delimiter //;
3017--error ER_PARSE_ERROR
3018CREATE PROCEDURE sp1()
3019  add:BEGIN
3020    SELECT @x;
3021END//
3022delimiter ;//
3023
3024--disable_warnings ONCE
3025DROP PROCEDURE IF EXISTS sp1;
3026
3027delimiter //;
3028--error ER_PARSE_ERROR
3029CREATE PROCEDURE sp1()
3030  all:BEGIN
3031    SELECT @x;
3032END//
3033delimiter ;//
3034
3035--disable_warnings ONCE
3036DROP PROCEDURE IF EXISTS sp1;
3037
3038delimiter //;
3039--error ER_SP_BADSTATEMENT
3040CREATE PROCEDURE sp1()
3041  alter:BEGIN
3042    SELECT @x;
3043END//
3044delimiter ;//
3045
3046--disable_warnings ONCE
3047DROP PROCEDURE IF EXISTS sp1;
3048
3049delimiter //;
3050--error ER_PARSE_ERROR
3051CREATE PROCEDURE sp1()
3052  analyze:BEGIN
3053    SELECT @x;
3054END//
3055delimiter ;//
3056
3057--disable_warnings ONCE
3058DROP PROCEDURE IF EXISTS sp1;
3059
3060delimiter //;
3061--error ER_PARSE_ERROR
3062CREATE PROCEDURE sp1()
3063  and:BEGIN
3064    SELECT @x;
3065END//
3066delimiter ;//
3067
3068--disable_warnings ONCE
3069DROP PROCEDURE IF EXISTS sp1;
3070
3071delimiter //;
3072--error ER_PARSE_ERROR
3073CREATE PROCEDURE sp1()
3074  as:BEGIN
3075    SELECT @x;
3076END//
3077delimiter ;//
3078
3079--disable_warnings ONCE
3080DROP PROCEDURE IF EXISTS sp1;
3081
3082delimiter //;
3083--error ER_PARSE_ERROR
3084CREATE PROCEDURE sp1()
3085  asc:BEGIN
3086    SELECT @x;
3087END//
3088delimiter ;//
3089
3090--disable_warnings ONCE
3091DROP PROCEDURE IF EXISTS sp1;
3092
3093delimiter //;
3094--error ER_PARSE_ERROR
3095CREATE PROCEDURE sp1()
3096  asensitive:BEGIN
3097    SELECT @x;
3098END//
3099delimiter ;//
3100
3101--disable_warnings ONCE
3102DROP PROCEDURE IF EXISTS sp1;
3103
3104delimiter //;
3105--error ER_PARSE_ERROR
3106CREATE PROCEDURE sp1()
3107  before:BEGIN
3108    SELECT @x;
3109END//
3110delimiter ;//
3111
3112--disable_warnings ONCE
3113DROP PROCEDURE IF EXISTS sp1;
3114
3115delimiter //;
3116--error ER_PARSE_ERROR
3117CREATE PROCEDURE sp1()
3118  between:BEGIN
3119    SELECT @x;
3120END//
3121delimiter ;//
3122
3123--disable_warnings ONCE
3124DROP PROCEDURE IF EXISTS sp1;
3125
3126delimiter //;
3127--error ER_PARSE_ERROR
3128CREATE PROCEDURE sp1()
3129  bigint:BEGIN
3130    SELECT @x;
3131END//
3132delimiter ;//
3133
3134--disable_warnings ONCE
3135DROP PROCEDURE IF EXISTS sp1;
3136
3137delimiter //;
3138--error ER_PARSE_ERROR
3139CREATE PROCEDURE sp1()
3140  binary:BEGIN
3141    SELECT @x;
3142END//
3143delimiter ;//
3144
3145--disable_warnings ONCE
3146DROP PROCEDURE IF EXISTS sp1;
3147
3148delimiter //;
3149--error ER_PARSE_ERROR
3150CREATE PROCEDURE sp1()
3151  blob:BEGIN
3152    SELECT @x;
3153END//
3154delimiter ;//
3155
3156--disable_warnings ONCE
3157DROP PROCEDURE IF EXISTS sp1;
3158
3159delimiter //;
3160--error ER_PARSE_ERROR
3161CREATE PROCEDURE sp1()
3162  both:BEGIN
3163    SELECT @x;
3164END//
3165delimiter ;//
3166
3167--disable_warnings ONCE
3168DROP PROCEDURE IF EXISTS sp1;
3169
3170delimiter //;
3171--error ER_PARSE_ERROR
3172CREATE PROCEDURE sp1()
3173  by:BEGIN
3174    SELECT @x;
3175END//
3176delimiter ;//
3177
3178--disable_warnings ONCE
3179DROP PROCEDURE IF EXISTS sp1;
3180
3181delimiter //;
3182--error ER_PARSE_ERROR
3183CREATE PROCEDURE sp1()
3184  call:BEGIN
3185    SELECT @x;
3186END//
3187delimiter ;//
3188
3189--disable_warnings ONCE
3190DROP PROCEDURE IF EXISTS sp1;
3191
3192delimiter //;
3193--error ER_PARSE_ERROR
3194CREATE PROCEDURE sp1()
3195  cascade:BEGIN
3196    SELECT @x;
3197END//
3198delimiter ;//
3199
3200--disable_warnings ONCE
3201DROP PROCEDURE IF EXISTS sp1;
3202
3203delimiter //;
3204--error ER_PARSE_ERROR
3205CREATE PROCEDURE sp1()
3206  case:BEGIN
3207    SELECT @x;
3208END//
3209delimiter ;//
3210
3211--disable_warnings ONCE
3212DROP PROCEDURE IF EXISTS sp1;
3213
3214delimiter //;
3215--error ER_PARSE_ERROR
3216CREATE PROCEDURE sp1()
3217  change:BEGIN
3218    SELECT @x;
3219END//
3220delimiter ;//
3221
3222--disable_warnings ONCE
3223DROP PROCEDURE IF EXISTS sp1;
3224
3225delimiter //;
3226--error ER_PARSE_ERROR
3227CREATE PROCEDURE sp1()
3228  char:BEGIN
3229    SELECT @x;
3230END//
3231delimiter ;//
3232
3233--disable_warnings ONCE
3234DROP PROCEDURE IF EXISTS sp1;
3235
3236delimiter //;
3237--error ER_PARSE_ERROR
3238CREATE PROCEDURE sp1()
3239  character:BEGIN
3240    SELECT @x;
3241END//
3242delimiter ;//
3243
3244--disable_warnings ONCE
3245DROP PROCEDURE IF EXISTS sp1;
3246
3247delimiter //;
3248--error ER_PARSE_ERROR
3249CREATE PROCEDURE sp1()
3250  check:BEGIN
3251    SELECT @x;
3252END//
3253delimiter ;//
3254
3255--disable_warnings ONCE
3256DROP PROCEDURE IF EXISTS sp1;
3257
3258delimiter //;
3259--error ER_PARSE_ERROR
3260CREATE PROCEDURE sp1()
3261  collate:BEGIN
3262    SELECT @x;
3263END//
3264delimiter ;//
3265
3266--disable_warnings ONCE
3267DROP PROCEDURE IF EXISTS sp1;
3268
3269delimiter //;
3270--error ER_PARSE_ERROR
3271CREATE PROCEDURE sp1()
3272  column:BEGIN
3273    SELECT @x;
3274END//
3275delimiter ;//
3276
3277--disable_warnings ONCE
3278DROP PROCEDURE IF EXISTS sp1;
3279
3280delimiter //;
3281--error ER_PARSE_ERROR
3282CREATE PROCEDURE sp1()
3283  condition:BEGIN
3284    SELECT @x;
3285END//
3286delimiter ;//
3287
3288--disable_warnings ONCE
3289DROP PROCEDURE IF EXISTS sp1;
3290
3291delimiter //;
3292--error ER_PARSE_ERROR
3293CREATE PROCEDURE sp1()
3294  constraint:BEGIN
3295    SELECT @x;
3296END//
3297delimiter ;//
3298
3299--disable_warnings ONCE
3300DROP PROCEDURE IF EXISTS sp1;
3301
3302delimiter //;
3303--error ER_PARSE_ERROR
3304CREATE PROCEDURE sp1()
3305  continue:BEGIN
3306    SELECT @x;
3307END//
3308delimiter ;//
3309
3310--disable_warnings ONCE
3311DROP PROCEDURE IF EXISTS sp1;
3312
3313delimiter //;
3314--error ER_PARSE_ERROR
3315CREATE PROCEDURE sp1()
3316  convert:BEGIN
3317    SELECT @x;
3318END//
3319delimiter ;//
3320
3321--disable_warnings ONCE
3322DROP PROCEDURE IF EXISTS sp1;
3323
3324delimiter //;
3325--error ER_PARSE_ERROR
3326CREATE PROCEDURE sp1()
3327  create:BEGIN
3328    SELECT @x;
3329END//
3330delimiter ;//
3331
3332--disable_warnings ONCE
3333DROP PROCEDURE IF EXISTS sp1;
3334
3335delimiter //;
3336--error ER_PARSE_ERROR
3337CREATE PROCEDURE sp1()
3338  cross:BEGIN
3339    SELECT @x;
3340END//
3341delimiter ;//
3342
3343--disable_warnings ONCE
3344DROP PROCEDURE IF EXISTS sp1;
3345
3346delimiter //;
3347--error ER_PARSE_ERROR
3348CREATE PROCEDURE sp1()
3349  current_date:BEGIN
3350    SELECT @x;
3351END//
3352delimiter ;//
3353
3354--disable_warnings ONCE
3355DROP PROCEDURE IF EXISTS sp1;
3356
3357delimiter //;
3358--error ER_PARSE_ERROR
3359CREATE PROCEDURE sp1()
3360  current_time:BEGIN
3361    SELECT @x;
3362END//
3363delimiter ;//
3364
3365--disable_warnings ONCE
3366DROP PROCEDURE IF EXISTS sp1;
3367
3368delimiter //;
3369--error ER_PARSE_ERROR
3370CREATE PROCEDURE sp1()
3371  current_timestamp:BEGIN
3372    SELECT @x;
3373END//
3374delimiter ;//
3375
3376--disable_warnings ONCE
3377DROP PROCEDURE IF EXISTS sp1;
3378
3379delimiter //;
3380--error ER_PARSE_ERROR
3381CREATE PROCEDURE sp1()
3382  current_user:BEGIN
3383    SELECT @x;
3384END//
3385delimiter ;//
3386
3387--disable_warnings ONCE
3388DROP PROCEDURE IF EXISTS sp1;
3389
3390delimiter //;
3391--error ER_PARSE_ERROR
3392CREATE PROCEDURE sp1()
3393  cursor:BEGIN
3394    SELECT @x;
3395END//
3396delimiter ;//
3397
3398--disable_warnings ONCE
3399DROP PROCEDURE IF EXISTS sp1;
3400
3401delimiter //;
3402--error ER_PARSE_ERROR
3403CREATE PROCEDURE sp1()
3404  database:BEGIN
3405    SELECT @x;
3406END//
3407delimiter ;//
3408
3409--disable_warnings ONCE
3410DROP PROCEDURE IF EXISTS sp1;
3411
3412delimiter //;
3413--error ER_PARSE_ERROR
3414CREATE PROCEDURE sp1()
3415  databases:BEGIN
3416    SELECT @x;
3417END//
3418delimiter ;//
3419
3420--disable_warnings ONCE
3421DROP PROCEDURE IF EXISTS sp1;
3422
3423delimiter //;
3424--error ER_PARSE_ERROR
3425CREATE PROCEDURE sp1()
3426  day_hour:BEGIN
3427    SELECT @x;
3428END//
3429delimiter ;//
3430
3431--disable_warnings ONCE
3432DROP PROCEDURE IF EXISTS sp1;
3433
3434delimiter //;
3435--error ER_PARSE_ERROR
3436CREATE PROCEDURE sp1()
3437  day_microsecond:BEGIN
3438    SELECT @x;
3439END//
3440delimiter ;//
3441
3442--disable_warnings ONCE
3443DROP PROCEDURE IF EXISTS sp1;
3444
3445delimiter //;
3446--error ER_PARSE_ERROR
3447CREATE PROCEDURE sp1()
3448  day_minute:BEGIN
3449    SELECT @x;
3450END//
3451delimiter ;//
3452
3453--disable_warnings ONCE
3454DROP PROCEDURE IF EXISTS sp1;
3455
3456delimiter //;
3457--error ER_PARSE_ERROR
3458CREATE PROCEDURE sp1()
3459  day_second:BEGIN
3460    SELECT @x;
3461END//
3462delimiter ;//
3463
3464--disable_warnings ONCE
3465DROP PROCEDURE IF EXISTS sp1;
3466
3467delimiter //;
3468--error ER_PARSE_ERROR
3469CREATE PROCEDURE sp1()
3470  dec:BEGIN
3471    SELECT @x;
3472END//
3473delimiter ;//
3474
3475--disable_warnings ONCE
3476DROP PROCEDURE IF EXISTS sp1;
3477
3478delimiter //;
3479--error ER_PARSE_ERROR
3480CREATE PROCEDURE sp1()
3481  decimal:BEGIN
3482    SELECT @x;
3483END//
3484delimiter ;//
3485
3486--disable_warnings ONCE
3487DROP PROCEDURE IF EXISTS sp1;
3488
3489delimiter //;
3490--error ER_PARSE_ERROR
3491CREATE PROCEDURE sp1()
3492  declare:BEGIN
3493    SELECT @x;
3494END//
3495delimiter ;//
3496
3497--disable_warnings ONCE
3498DROP PROCEDURE IF EXISTS sp1;
3499
3500delimiter //;
3501--error ER_PARSE_ERROR
3502CREATE PROCEDURE sp1()
3503  default:BEGIN
3504    SELECT @x;
3505END//
3506delimiter ;//
3507
3508--disable_warnings ONCE
3509DROP PROCEDURE IF EXISTS sp1;
3510
3511delimiter //;
3512--error ER_PARSE_ERROR
3513CREATE PROCEDURE sp1()
3514  delayed:BEGIN
3515    SELECT @x;
3516END//
3517delimiter ;//
3518
3519--disable_warnings ONCE
3520DROP PROCEDURE IF EXISTS sp1;
3521
3522delimiter //;
3523--error ER_PARSE_ERROR
3524CREATE PROCEDURE sp1()
3525  delete:BEGIN
3526    SELECT @x;
3527END//
3528delimiter ;//
3529
3530--disable_warnings ONCE
3531DROP PROCEDURE IF EXISTS sp1;
3532
3533delimiter //;
3534--error ER_PARSE_ERROR
3535CREATE PROCEDURE sp1()
3536  desc:BEGIN
3537    SELECT @x;
3538END//
3539delimiter ;//
3540
3541--disable_warnings ONCE
3542DROP PROCEDURE IF EXISTS sp1;
3543
3544delimiter //;
3545--error ER_PARSE_ERROR
3546CREATE PROCEDURE sp1()
3547  describe:BEGIN
3548    SELECT @x;
3549END//
3550delimiter ;//
3551
3552--disable_warnings ONCE
3553DROP PROCEDURE IF EXISTS sp1;
3554
3555delimiter //;
3556--error ER_PARSE_ERROR
3557CREATE PROCEDURE sp1()
3558  deterministic:BEGIN
3559    SELECT @x;
3560END//
3561delimiter ;//
3562
3563--disable_warnings ONCE
3564DROP PROCEDURE IF EXISTS sp1;
3565
3566delimiter //;
3567--error ER_PARSE_ERROR
3568CREATE PROCEDURE sp1()
3569  distinct:BEGIN
3570    SELECT @x;
3571END//
3572delimiter ;//
3573
3574--disable_warnings ONCE
3575DROP PROCEDURE IF EXISTS sp1;
3576
3577delimiter //;
3578--error ER_PARSE_ERROR
3579CREATE PROCEDURE sp1()
3580  distinctrow:BEGIN
3581    SELECT @x;
3582END//
3583delimiter ;//
3584
3585--disable_warnings ONCE
3586DROP PROCEDURE IF EXISTS sp1;
3587
3588delimiter //;
3589--error ER_PARSE_ERROR
3590CREATE PROCEDURE sp1()
3591  div:BEGIN
3592    SELECT @x;
3593END//
3594delimiter ;//
3595
3596--disable_warnings ONCE
3597DROP PROCEDURE IF EXISTS sp1;
3598
3599delimiter //;
3600--error ER_PARSE_ERROR
3601CREATE PROCEDURE sp1()
3602  double:BEGIN
3603    SELECT @x;
3604END//
3605delimiter ;//
3606
3607--disable_warnings ONCE
3608DROP PROCEDURE IF EXISTS sp1;
3609
3610delimiter //;
3611--error ER_PARSE_ERROR
3612CREATE PROCEDURE sp1()
3613drop:BEGIN
3614    SELECT @x;
3615END//
3616delimiter ;//
3617
3618--disable_warnings ONCE
3619DROP PROCEDURE IF EXISTS sp1;
3620
3621delimiter //;
3622--error ER_PARSE_ERROR
3623CREATE PROCEDURE sp1()
3624  dual:BEGIN
3625    SELECT @x;
3626END//
3627delimiter ;//
3628
3629--disable_warnings ONCE
3630DROP PROCEDURE IF EXISTS sp1;
3631
3632delimiter //;
3633--error ER_PARSE_ERROR
3634CREATE PROCEDURE sp1()
3635  each:BEGIN
3636    SELECT @x;
3637END//
3638delimiter ;//
3639
3640--disable_warnings ONCE
3641DROP PROCEDURE IF EXISTS sp1;
3642
3643delimiter //;
3644--error ER_PARSE_ERROR
3645CREATE PROCEDURE sp1()
3646  else:BEGIN
3647    SELECT @x;
3648END//
3649delimiter ;//
3650
3651--disable_warnings ONCE
3652DROP PROCEDURE IF EXISTS sp1;
3653
3654delimiter //;
3655--error ER_PARSE_ERROR
3656CREATE PROCEDURE sp1()
3657  elseif:BEGIN
3658    SELECT @x;
3659END//
3660delimiter ;//
3661
3662--disable_warnings ONCE
3663DROP PROCEDURE IF EXISTS sp1;
3664
3665delimiter //;
3666--error ER_PARSE_ERROR
3667CREATE PROCEDURE sp1()
3668  enclosed:BEGIN
3669    SELECT @x;
3670END//
3671delimiter ;//
3672
3673--disable_warnings ONCE
3674DROP PROCEDURE IF EXISTS sp1;
3675
3676delimiter //;
3677--error ER_PARSE_ERROR
3678CREATE PROCEDURE sp1()
3679  escaped:BEGIN
3680    SELECT @x;
3681END//
3682delimiter ;//
3683
3684--disable_warnings ONCE
3685DROP PROCEDURE IF EXISTS sp1;
3686
3687delimiter //;
3688--error ER_PARSE_ERROR
3689CREATE PROCEDURE sp1()
3690  exists:BEGIN
3691    SELECT @x;
3692END//
3693delimiter ;//
3694
3695--disable_warnings ONCE
3696DROP PROCEDURE IF EXISTS sp1;
3697
3698delimiter //;
3699--error ER_PARSE_ERROR
3700CREATE PROCEDURE sp1()
3701  exit:BEGIN
3702    SELECT @x;
3703END//
3704delimiter ;//
3705
3706--disable_warnings ONCE
3707DROP PROCEDURE IF EXISTS sp1;
3708
3709delimiter //;
3710--error ER_PARSE_ERROR
3711CREATE PROCEDURE sp1()
3712  explain:BEGIN
3713    SELECT @x;
3714END//
3715delimiter ;//
3716
3717--disable_warnings ONCE
3718DROP PROCEDURE IF EXISTS sp1;
3719
3720delimiter //;
3721--error ER_PARSE_ERROR
3722CREATE PROCEDURE sp1()
3723  false:BEGIN
3724    SELECT @x;
3725END//
3726delimiter ;//
3727
3728--disable_warnings ONCE
3729DROP PROCEDURE IF EXISTS sp1;
3730
3731delimiter //;
3732--error ER_PARSE_ERROR
3733CREATE PROCEDURE sp1()
3734  fetch:BEGIN
3735    SELECT @x;
3736END//
3737delimiter ;//
3738
3739--disable_warnings ONCE
3740DROP PROCEDURE IF EXISTS sp1;
3741
3742delimiter //;
3743--error ER_PARSE_ERROR
3744CREATE PROCEDURE sp1()
3745  float:BEGIN
3746    SELECT @x;
3747END//
3748delimiter ;//
3749
3750--disable_warnings ONCE
3751DROP PROCEDURE IF EXISTS sp1;
3752
3753delimiter //;
3754--error ER_PARSE_ERROR
3755CREATE PROCEDURE sp1()
3756  float4:BEGIN
3757    SELECT @x;
3758END//
3759delimiter ;//
3760
3761--disable_warnings ONCE
3762DROP PROCEDURE IF EXISTS sp1;
3763
3764delimiter //;
3765--error ER_PARSE_ERROR
3766CREATE PROCEDURE sp1()
3767  float8:BEGIN
3768    SELECT @x;
3769END//
3770delimiter ;//
3771
3772--disable_warnings ONCE
3773DROP PROCEDURE IF EXISTS sp1;
3774
3775delimiter //;
3776--error ER_PARSE_ERROR
3777CREATE PROCEDURE sp1()
3778  for:BEGIN
3779    SELECT @x;
3780END//
3781delimiter ;//
3782
3783--disable_warnings ONCE
3784DROP PROCEDURE IF EXISTS sp1;
3785
3786delimiter //;
3787--error ER_PARSE_ERROR
3788CREATE PROCEDURE sp1()
3789  force:BEGIN
3790    SELECT @x;
3791END//
3792delimiter ;//
3793
3794--disable_warnings ONCE
3795DROP PROCEDURE IF EXISTS sp1;
3796
3797delimiter //;
3798--error ER_PARSE_ERROR
3799CREATE PROCEDURE sp1()
3800  foreign:BEGIN
3801    SELECT @x;
3802END//
3803delimiter ;//
3804
3805--disable_warnings ONCE
3806DROP PROCEDURE IF EXISTS sp1;
3807
3808delimiter //;
3809--error ER_PARSE_ERROR
3810CREATE PROCEDURE sp1()
3811  from:BEGIN
3812    SELECT @x;
3813END//
3814delimiter ;//
3815
3816--disable_warnings ONCE
3817DROP PROCEDURE IF EXISTS sp1;
3818
3819delimiter //;
3820--error ER_PARSE_ERROR
3821CREATE PROCEDURE sp1()
3822  fulltext:BEGIN
3823    SELECT @x;
3824END//
3825delimiter ;//
3826
3827--disable_warnings ONCE
3828DROP PROCEDURE IF EXISTS sp1;
3829
3830delimiter //;
3831--error ER_PARSE_ERROR
3832CREATE PROCEDURE sp1()
3833  grant:BEGIN
3834    SELECT @x;
3835END//
3836delimiter ;//
3837
3838--disable_warnings ONCE
3839DROP PROCEDURE IF EXISTS sp1;
3840
3841delimiter //;
3842--error ER_PARSE_ERROR
3843CREATE PROCEDURE sp1()
3844  group:BEGIN
3845    SELECT @x;
3846END//
3847delimiter ;//
3848
3849--disable_warnings ONCE
3850DROP PROCEDURE IF EXISTS sp1;
3851
3852delimiter //;
3853--error ER_PARSE_ERROR
3854CREATE PROCEDURE sp1()
3855  having:BEGIN
3856    SELECT @x;
3857END//
3858delimiter ;//
3859
3860--disable_warnings ONCE
3861DROP PROCEDURE IF EXISTS sp1;
3862
3863delimiter //;
3864--error ER_PARSE_ERROR
3865CREATE PROCEDURE sp1()
3866  high_priority:BEGIN
3867    SELECT @x;
3868END//
3869delimiter ;//
3870
3871--disable_warnings ONCE
3872DROP PROCEDURE IF EXISTS sp1;
3873
3874delimiter //;
3875--error ER_PARSE_ERROR
3876CREATE PROCEDURE sp1()
3877  hour_microsecond:BEGIN
3878    SELECT @x;
3879END//
3880delimiter ;//
3881
3882--disable_warnings ONCE
3883DROP PROCEDURE IF EXISTS sp1;
3884
3885delimiter //;
3886--error ER_PARSE_ERROR
3887CREATE PROCEDURE sp1()
3888  hour_minute:BEGIN
3889    SELECT @x;
3890END//
3891delimiter ;//
3892
3893--disable_warnings ONCE
3894DROP PROCEDURE IF EXISTS sp1;
3895
3896delimiter //;
3897--error ER_PARSE_ERROR
3898CREATE PROCEDURE sp1()
3899  hour_second:BEGIN
3900    SELECT @x;
3901END//
3902delimiter ;//
3903
3904--disable_warnings ONCE
3905DROP PROCEDURE IF EXISTS sp1;
3906
3907delimiter //;
3908--error ER_PARSE_ERROR
3909CREATE PROCEDURE sp1()
3910  if:BEGIN
3911    SELECT @x;
3912END//
3913delimiter ;//
3914
3915--disable_warnings ONCE
3916DROP PROCEDURE IF EXISTS sp1;
3917
3918delimiter //;
3919--error ER_PARSE_ERROR
3920CREATE PROCEDURE sp1()
3921  ignore:BEGIN
3922    SELECT @x;
3923END//
3924delimiter ;//
3925
3926--disable_warnings ONCE
3927DROP PROCEDURE IF EXISTS sp1;
3928
3929delimiter //;
3930--error ER_PARSE_ERROR
3931CREATE PROCEDURE sp1()
3932  in:BEGIN
3933    SELECT @x;
3934END//
3935delimiter ;//
3936
3937--disable_warnings ONCE
3938DROP PROCEDURE IF EXISTS sp1;
3939
3940delimiter //;
3941--error ER_PARSE_ERROR
3942CREATE PROCEDURE sp1()
3943  index:BEGIN
3944    SELECT @x;
3945END//
3946delimiter ;//
3947
3948--disable_warnings ONCE
3949DROP PROCEDURE IF EXISTS sp1;
3950
3951delimiter //;
3952--error ER_PARSE_ERROR
3953CREATE PROCEDURE sp1()
3954  infile:BEGIN
3955    SELECT @x;
3956END//
3957delimiter ;//
3958
3959--disable_warnings ONCE
3960DROP PROCEDURE IF EXISTS sp1;
3961
3962delimiter //;
3963--error ER_PARSE_ERROR
3964CREATE PROCEDURE sp1()
3965  inner:BEGIN
3966    SELECT @x;
3967END//
3968delimiter ;//
3969
3970--disable_warnings ONCE
3971DROP PROCEDURE IF EXISTS sp1;
3972
3973delimiter //;
3974--error ER_PARSE_ERROR
3975CREATE PROCEDURE sp1()
3976  inout:BEGIN
3977    SELECT @x;
3978END//
3979delimiter ;//
3980
3981--disable_warnings ONCE
3982DROP PROCEDURE IF EXISTS sp1;
3983
3984delimiter //;
3985--error ER_PARSE_ERROR
3986CREATE PROCEDURE sp1()
3987  insensitive:BEGIN
3988    SELECT @x;
3989END//
3990delimiter ;//
3991
3992--disable_warnings ONCE
3993DROP PROCEDURE IF EXISTS sp1;
3994
3995delimiter //;
3996--error ER_PARSE_ERROR
3997CREATE PROCEDURE sp1()
3998  insert:BEGIN
3999    SELECT @x;
4000END//
4001delimiter ;//
4002
4003--disable_warnings ONCE
4004DROP PROCEDURE IF EXISTS sp1;
4005
4006delimiter //;
4007--error ER_PARSE_ERROR
4008CREATE PROCEDURE sp1()
4009  int:BEGIN
4010    SELECT @x;
4011END//
4012delimiter ;//
4013
4014--disable_warnings ONCE
4015DROP PROCEDURE IF EXISTS sp1;
4016
4017delimiter //;
4018--error ER_PARSE_ERROR
4019CREATE PROCEDURE sp1()
4020  int1:BEGIN
4021    SELECT @x;
4022END//
4023delimiter ;//
4024
4025--disable_warnings ONCE
4026DROP PROCEDURE IF EXISTS sp1;
4027
4028delimiter //;
4029--error ER_PARSE_ERROR
4030CREATE PROCEDURE sp1()
4031  int2:BEGIN
4032    SELECT @x;
4033END//
4034delimiter ;//
4035
4036--disable_warnings ONCE
4037DROP PROCEDURE IF EXISTS sp1;
4038
4039delimiter //;
4040--error ER_PARSE_ERROR
4041CREATE PROCEDURE sp1()
4042  int3:BEGIN
4043    SELECT @x;
4044END//
4045delimiter ;//
4046
4047--disable_warnings ONCE
4048DROP PROCEDURE IF EXISTS sp1;
4049
4050delimiter //;
4051--error ER_PARSE_ERROR
4052CREATE PROCEDURE sp1()
4053  int4:BEGIN
4054    SELECT @x;
4055END//
4056delimiter ;//
4057
4058--disable_warnings ONCE
4059DROP PROCEDURE IF EXISTS sp1;
4060
4061delimiter //;
4062--error ER_PARSE_ERROR
4063CREATE PROCEDURE sp1()
4064  int8:BEGIN
4065    SELECT @x;
4066END//
4067delimiter ;//
4068
4069--disable_warnings ONCE
4070DROP PROCEDURE IF EXISTS sp1;
4071
4072delimiter //;
4073--error ER_PARSE_ERROR
4074CREATE PROCEDURE sp1()
4075  integer:BEGIN
4076    SELECT @x;
4077END//
4078delimiter ;//
4079
4080--disable_warnings ONCE
4081DROP PROCEDURE IF EXISTS sp1;
4082
4083delimiter //;
4084--error ER_PARSE_ERROR
4085CREATE PROCEDURE sp1()
4086  interval:BEGIN
4087    SELECT @x;
4088END//
4089delimiter ;//
4090
4091--disable_warnings ONCE
4092DROP PROCEDURE IF EXISTS sp1;
4093
4094delimiter //;
4095--error ER_PARSE_ERROR
4096CREATE PROCEDURE sp1()
4097  into:BEGIN
4098    SELECT @x;
4099END//
4100delimiter ;//
4101
4102--disable_warnings ONCE
4103DROP PROCEDURE IF EXISTS sp1;
4104
4105delimiter //;
4106--error ER_PARSE_ERROR
4107CREATE PROCEDURE sp1()
4108  is:BEGIN
4109    SELECT @x;
4110END//
4111delimiter ;//
4112
4113--disable_warnings ONCE
4114DROP PROCEDURE IF EXISTS sp1;
4115
4116delimiter //;
4117--error ER_PARSE_ERROR
4118CREATE PROCEDURE sp1()
4119  iterate:BEGIN
4120    SELECT @x;
4121END//
4122delimiter ;//
4123
4124--disable_warnings ONCE
4125DROP PROCEDURE IF EXISTS sp1;
4126
4127delimiter //;
4128--error ER_PARSE_ERROR
4129CREATE PROCEDURE sp1()
4130  join:BEGIN
4131    SELECT @x;
4132END//
4133delimiter ;//
4134
4135--disable_warnings ONCE
4136DROP PROCEDURE IF EXISTS sp1;
4137
4138delimiter //;
4139--error ER_PARSE_ERROR
4140CREATE PROCEDURE sp1()
4141  key:BEGIN
4142    SELECT @x;
4143END//
4144delimiter ;//
4145
4146--disable_warnings ONCE
4147DROP PROCEDURE IF EXISTS sp1;
4148
4149delimiter //;
4150--error ER_PARSE_ERROR
4151CREATE PROCEDURE sp1()
4152  keys:BEGIN
4153    SELECT @x;
4154END//
4155delimiter ;//
4156
4157--disable_warnings ONCE
4158DROP PROCEDURE IF EXISTS sp1;
4159
4160delimiter //;
4161--error ER_PARSE_ERROR
4162CREATE PROCEDURE sp1()
4163  kill:BEGIN
4164    SELECT @x;
4165END//
4166delimiter ;//
4167
4168--disable_warnings ONCE
4169DROP PROCEDURE IF EXISTS sp1;
4170
4171delimiter //;
4172--error ER_PARSE_ERROR
4173CREATE PROCEDURE sp1()
4174  leading:BEGIN
4175    SELECT @x;
4176END//
4177delimiter ;//
4178
4179--disable_warnings ONCE
4180DROP PROCEDURE IF EXISTS sp1;
4181
4182delimiter //;
4183--error ER_PARSE_ERROR
4184CREATE PROCEDURE sp1()
4185  leave:BEGIN
4186    SELECT @x;
4187END//
4188delimiter ;//
4189
4190--disable_warnings ONCE
4191DROP PROCEDURE IF EXISTS sp1;
4192
4193delimiter //;
4194--error ER_PARSE_ERROR
4195CREATE PROCEDURE sp1()
4196  left:BEGIN
4197    SELECT @x;
4198END//
4199delimiter ;//
4200
4201--disable_warnings ONCE
4202DROP PROCEDURE IF EXISTS sp1;
4203
4204delimiter //;
4205--error ER_PARSE_ERROR
4206CREATE PROCEDURE sp1()
4207  like:BEGIN
4208    SELECT @x;
4209END//
4210delimiter ;//
4211
4212--disable_warnings ONCE
4213DROP PROCEDURE IF EXISTS sp1;
4214
4215delimiter //;
4216--error ER_PARSE_ERROR
4217CREATE PROCEDURE sp1()
4218  limit:BEGIN
4219    SELECT @x;
4220END//
4221delimiter ;//
4222
4223--disable_warnings ONCE
4224DROP PROCEDURE IF EXISTS sp1;
4225
4226delimiter //;
4227--error ER_PARSE_ERROR
4228CREATE PROCEDURE sp1()
4229  linear:BEGIN
4230    SELECT @x;
4231END//
4232delimiter ;//
4233
4234--disable_warnings ONCE
4235DROP PROCEDURE IF EXISTS sp1;
4236
4237delimiter //;
4238--error ER_PARSE_ERROR
4239CREATE PROCEDURE sp1()
4240  lines:BEGIN
4241    SELECT @x;
4242END//
4243delimiter ;//
4244
4245--disable_warnings ONCE
4246DROP PROCEDURE IF EXISTS sp1;
4247
4248delimiter //;
4249--error ER_PARSE_ERROR
4250CREATE PROCEDURE sp1()
4251  load:BEGIN
4252    SELECT @x;
4253END//
4254delimiter ;//
4255
4256--disable_warnings ONCE
4257DROP PROCEDURE IF EXISTS sp1;
4258
4259delimiter //;
4260--error ER_PARSE_ERROR
4261CREATE PROCEDURE sp1()
4262  localtime:BEGIN
4263    SELECT @x;
4264END//
4265delimiter ;//
4266
4267--disable_warnings ONCE
4268DROP PROCEDURE IF EXISTS sp1;
4269
4270delimiter //;
4271--error ER_PARSE_ERROR
4272CREATE PROCEDURE sp1()
4273  localtimestamp:BEGIN
4274    SELECT @x;
4275END//
4276delimiter ;//
4277
4278--disable_warnings ONCE
4279DROP PROCEDURE IF EXISTS sp1;
4280
4281delimiter //;
4282--error ER_PARSE_ERROR
4283CREATE PROCEDURE sp1()
4284  lock:BEGIN
4285    SELECT @x;
4286END//
4287delimiter ;//
4288
4289--disable_warnings ONCE
4290DROP PROCEDURE IF EXISTS sp1;
4291
4292delimiter //;
4293--error ER_PARSE_ERROR
4294CREATE PROCEDURE sp1()
4295  long:BEGIN
4296    SELECT @x;
4297END//
4298delimiter ;//
4299
4300--disable_warnings ONCE
4301DROP PROCEDURE IF EXISTS sp1;
4302
4303delimiter //;
4304--error ER_PARSE_ERROR
4305CREATE PROCEDURE sp1()
4306  longblob:BEGIN
4307    SELECT @x;
4308END//
4309delimiter ;//
4310
4311--disable_warnings ONCE
4312DROP PROCEDURE IF EXISTS sp1;
4313
4314delimiter //;
4315--error ER_PARSE_ERROR
4316CREATE PROCEDURE sp1()
4317  longtext:BEGIN
4318    SELECT @x;
4319END//
4320delimiter ;//
4321
4322--disable_warnings ONCE
4323DROP PROCEDURE IF EXISTS sp1;
4324
4325delimiter //;
4326--error ER_PARSE_ERROR
4327CREATE PROCEDURE sp1()
4328  loop:BEGIN
4329    SELECT @x;
4330END//
4331delimiter ;//
4332
4333--disable_warnings ONCE
4334DROP PROCEDURE IF EXISTS sp1;
4335
4336delimiter //;
4337--error ER_PARSE_ERROR
4338CREATE PROCEDURE sp1()
4339  low_priority:BEGIN
4340    SELECT @x;
4341END//
4342delimiter ;//
4343
4344--disable_warnings ONCE
4345DROP PROCEDURE IF EXISTS sp1;
4346
4347delimiter //;
4348--error ER_PARSE_ERROR
4349CREATE PROCEDURE sp1()
4350  master_ssl_verify_server_cert:BEGIN
4351    SELECT @x;
4352END//
4353delimiter ;//
4354
4355--disable_warnings ONCE
4356DROP PROCEDURE IF EXISTS sp1;
4357
4358delimiter //;
4359--error ER_PARSE_ERROR
4360CREATE PROCEDURE sp1()
4361  match:BEGIN
4362    SELECT @x;
4363END//
4364delimiter ;//
4365
4366--disable_warnings ONCE
4367DROP PROCEDURE IF EXISTS sp1;
4368
4369delimiter //;
4370--error ER_PARSE_ERROR
4371CREATE PROCEDURE sp1()
4372  mediumblob:BEGIN
4373    SELECT @x;
4374END//
4375delimiter ;//
4376
4377--disable_warnings ONCE
4378DROP PROCEDURE IF EXISTS sp1;
4379
4380delimiter //;
4381--error ER_PARSE_ERROR
4382CREATE PROCEDURE sp1()
4383  mediumint:BEGIN
4384    SELECT @x;
4385END//
4386delimiter ;//
4387
4388--disable_warnings ONCE
4389DROP PROCEDURE IF EXISTS sp1;
4390
4391delimiter //;
4392--error ER_PARSE_ERROR
4393CREATE PROCEDURE sp1()
4394  mediumtext:BEGIN
4395    SELECT @x;
4396END//
4397delimiter ;//
4398
4399--disable_warnings ONCE
4400DROP PROCEDURE IF EXISTS sp1;
4401
4402delimiter //;
4403--error ER_PARSE_ERROR
4404CREATE PROCEDURE sp1()
4405  middleint:BEGIN
4406    SELECT @x;
4407END//
4408delimiter ;//
4409
4410--disable_warnings ONCE
4411DROP PROCEDURE IF EXISTS sp1;
4412
4413delimiter //;
4414--error ER_PARSE_ERROR
4415CREATE PROCEDURE sp1()
4416  minute_microsecond:BEGIN
4417    SELECT @x;
4418END//
4419delimiter ;//
4420
4421--disable_warnings ONCE
4422DROP PROCEDURE IF EXISTS sp1;
4423
4424delimiter //;
4425--error ER_PARSE_ERROR
4426CREATE PROCEDURE sp1()
4427  minute_second:BEGIN
4428    SELECT @x;
4429END//
4430delimiter ;//
4431
4432--disable_warnings ONCE
4433DROP PROCEDURE IF EXISTS sp1;
4434
4435delimiter //;
4436--error ER_PARSE_ERROR
4437CREATE PROCEDURE sp1()
4438  mod:BEGIN
4439    SELECT @x;
4440END//
4441delimiter ;//
4442
4443--disable_warnings ONCE
4444DROP PROCEDURE IF EXISTS sp1;
4445
4446delimiter //;
4447--error ER_PARSE_ERROR
4448CREATE PROCEDURE sp1()
4449  modifies:BEGIN
4450    SELECT @x;
4451END//
4452delimiter ;//
4453
4454--disable_warnings ONCE
4455DROP PROCEDURE IF EXISTS sp1;
4456
4457delimiter //;
4458--error ER_PARSE_ERROR
4459CREATE PROCEDURE sp1()
4460  natural:BEGIN
4461    SELECT @x;
4462END//
4463delimiter ;//
4464
4465--disable_warnings ONCE
4466DROP PROCEDURE IF EXISTS sp1;
4467
4468delimiter //;
4469--error ER_PARSE_ERROR
4470CREATE PROCEDURE sp1()
4471  not:BEGIN
4472    SELECT @x;
4473END//
4474delimiter ;//
4475
4476--disable_warnings ONCE
4477DROP PROCEDURE IF EXISTS sp1;
4478
4479delimiter //;
4480--error ER_PARSE_ERROR
4481CREATE PROCEDURE sp1()
4482  no_write_to_binlog:BEGIN
4483    SELECT @x;
4484END//
4485delimiter ;//
4486
4487--disable_warnings ONCE
4488DROP PROCEDURE IF EXISTS sp1;
4489
4490delimiter //;
4491--error ER_PARSE_ERROR
4492CREATE PROCEDURE sp1()
4493  null:BEGIN
4494    SELECT @x;
4495END//
4496delimiter ;//
4497
4498--disable_warnings ONCE
4499DROP PROCEDURE IF EXISTS sp1;
4500
4501
4502delimiter //;
4503--error ER_PARSE_ERROR
4504CREATE PROCEDURE sp1()
4505  numeric:BEGIN
4506    SELECT @x;
4507END//
4508delimiter ;//
4509
4510--disable_warnings ONCE
4511DROP PROCEDURE IF EXISTS sp1;
4512
4513delimiter //;
4514--error ER_PARSE_ERROR
4515CREATE PROCEDURE sp1()
4516  on:BEGIN
4517    SELECT @x;
4518END//
4519delimiter ;//
4520
4521--disable_warnings ONCE
4522DROP PROCEDURE IF EXISTS sp1;
4523
4524delimiter //;
4525--error ER_PARSE_ERROR
4526CREATE PROCEDURE sp1()
4527  optimize:BEGIN
4528    SELECT @x;
4529END//
4530delimiter ;//
4531
4532--disable_warnings ONCE
4533DROP PROCEDURE IF EXISTS sp1;
4534
4535delimiter //;
4536--error ER_PARSE_ERROR
4537CREATE PROCEDURE sp1()
4538  option:BEGIN
4539    SELECT @x;
4540END//
4541delimiter ;//
4542
4543--disable_warnings ONCE
4544DROP PROCEDURE IF EXISTS sp1;
4545
4546delimiter //;
4547--error ER_PARSE_ERROR
4548CREATE PROCEDURE sp1()
4549  optionally:BEGIN
4550    SELECT @x;
4551END//
4552delimiter ;//
4553
4554--disable_warnings ONCE
4555DROP PROCEDURE IF EXISTS sp1;
4556
4557delimiter //;
4558--error ER_PARSE_ERROR
4559CREATE PROCEDURE sp1()
4560  or:BEGIN
4561    SELECT @x;
4562END//
4563delimiter ;//
4564
4565--disable_warnings ONCE
4566DROP PROCEDURE IF EXISTS sp1;
4567
4568delimiter //;
4569--error ER_PARSE_ERROR
4570CREATE PROCEDURE sp1()
4571  order:BEGIN
4572    SELECT @x;
4573END//
4574delimiter ;//
4575
4576--disable_warnings ONCE
4577DROP PROCEDURE IF EXISTS sp1;
4578
4579delimiter //;
4580--error ER_PARSE_ERROR
4581CREATE PROCEDURE sp1()
4582  out:BEGIN
4583    SELECT @x;
4584END//
4585delimiter ;//
4586
4587--disable_warnings ONCE
4588DROP PROCEDURE IF EXISTS sp1;
4589
4590delimiter //;
4591--error ER_PARSE_ERROR
4592CREATE PROCEDURE sp1()
4593  outer:BEGIN
4594    SELECT @x;
4595END//
4596delimiter ;//
4597
4598--disable_warnings ONCE
4599DROP PROCEDURE IF EXISTS sp1;
4600
4601delimiter //;
4602--error ER_PARSE_ERROR
4603CREATE PROCEDURE sp1()
4604  outfile:BEGIN
4605    SELECT @x;
4606END//
4607delimiter ;//
4608
4609--disable_warnings ONCE
4610DROP PROCEDURE IF EXISTS sp1;
4611
4612delimiter //;
4613--error ER_PARSE_ERROR
4614CREATE PROCEDURE sp1()
4615  precision:BEGIN
4616    SELECT @x;
4617END//
4618delimiter ;//
4619
4620--disable_warnings ONCE
4621DROP PROCEDURE IF EXISTS sp1;
4622
4623delimiter //;
4624--error ER_PARSE_ERROR
4625CREATE PROCEDURE sp1()
4626  primary:BEGIN
4627    SELECT @x;
4628END//
4629delimiter ;//
4630
4631--disable_warnings ONCE
4632DROP PROCEDURE IF EXISTS sp1;
4633
4634delimiter //;
4635--error ER_PARSE_ERROR
4636CREATE PROCEDURE sp1()
4637  procedure:BEGIN
4638    SELECT @x;
4639END//
4640delimiter ;//
4641
4642--disable_warnings ONCE
4643DROP PROCEDURE IF EXISTS sp1;
4644
4645delimiter //;
4646--error ER_PARSE_ERROR
4647CREATE PROCEDURE sp1()
4648  purge:BEGIN
4649    SELECT @x;
4650END//
4651delimiter ;//
4652
4653--disable_warnings ONCE
4654DROP PROCEDURE IF EXISTS sp1;
4655
4656delimiter //;
4657--error ER_PARSE_ERROR
4658CREATE PROCEDURE sp1()
4659  range:BEGIN
4660    SELECT @x;
4661END//
4662delimiter ;//
4663
4664--disable_warnings ONCE
4665DROP PROCEDURE IF EXISTS sp1;
4666
4667delimiter //;
4668--error ER_PARSE_ERROR
4669CREATE PROCEDURE sp1()
4670  read:BEGIN
4671    SELECT @x;
4672END//
4673delimiter ;//
4674
4675--disable_warnings ONCE
4676DROP PROCEDURE IF EXISTS sp1;
4677
4678delimiter //;
4679--error ER_PARSE_ERROR
4680CREATE PROCEDURE sp1()
4681  reads:BEGIN
4682    SELECT @x;
4683END//
4684delimiter ;//
4685
4686--disable_warnings ONCE
4687DROP PROCEDURE IF EXISTS sp1;
4688
4689# delimiter //;
4690# --error ER_PARSE_ERROR
4691# CREATE PROCEDURE sp1()
4692#   read_only:BEGIN
4693#     SELECT @x;
4694# END//
4695# delimiter ;//
4696
4697--disable_warnings ONCE
4698DROP PROCEDURE IF EXISTS sp1;
4699
4700delimiter //;
4701--error ER_PARSE_ERROR
4702CREATE PROCEDURE sp1()
4703  read_write:BEGIN
4704    SELECT @x;
4705END//
4706delimiter ;//
4707
4708--disable_warnings ONCE
4709DROP PROCEDURE IF EXISTS sp1;
4710
4711delimiter //;
4712--error ER_PARSE_ERROR
4713CREATE PROCEDURE sp1()
4714  real:BEGIN
4715    SELECT @x;
4716END//
4717delimiter ;//
4718
4719--disable_warnings ONCE
4720DROP PROCEDURE IF EXISTS sp1;
4721
4722delimiter //;
4723--error ER_PARSE_ERROR
4724CREATE PROCEDURE sp1()
4725  references:BEGIN
4726    SELECT @x;
4727END//
4728delimiter ;//
4729
4730--disable_warnings ONCE
4731DROP PROCEDURE IF EXISTS sp1;
4732
4733delimiter //;
4734--error ER_PARSE_ERROR
4735CREATE PROCEDURE sp1()
4736  regexp:BEGIN
4737    SELECT @x;
4738END//
4739delimiter ;//
4740
4741--disable_warnings ONCE
4742DROP PROCEDURE IF EXISTS sp1;
4743
4744delimiter //;
4745--error ER_PARSE_ERROR
4746CREATE PROCEDURE sp1()
4747  release:BEGIN
4748    SELECT @x;
4749END//
4750delimiter ;//
4751
4752--disable_warnings ONCE
4753DROP PROCEDURE IF EXISTS sp1;
4754
4755delimiter //;
4756--error ER_PARSE_ERROR
4757CREATE PROCEDURE sp1()
4758  rename:BEGIN
4759    SELECT @x;
4760END//
4761delimiter ;//
4762
4763--disable_warnings ONCE
4764DROP PROCEDURE IF EXISTS sp1;
4765
4766delimiter //;
4767--error ER_PARSE_ERROR
4768CREATE PROCEDURE sp1()
4769  repeat:BEGIN
4770    SELECT @x;
4771END//
4772delimiter ;//
4773
4774--disable_warnings ONCE
4775DROP PROCEDURE IF EXISTS sp1;
4776
4777delimiter //;
4778--error ER_PARSE_ERROR
4779CREATE PROCEDURE sp1()
4780  replace:BEGIN
4781    SELECT @x;
4782END//
4783delimiter ;//
4784
4785--disable_warnings ONCE
4786DROP PROCEDURE IF EXISTS sp1;
4787
4788delimiter //;
4789--error ER_PARSE_ERROR
4790CREATE PROCEDURE sp1()
4791  require:BEGIN
4792    SELECT @x;
4793END//
4794delimiter ;//
4795
4796--disable_warnings ONCE
4797DROP PROCEDURE IF EXISTS sp1;
4798
4799delimiter //;
4800--error ER_PARSE_ERROR
4801CREATE PROCEDURE sp1()
4802  restrict:BEGIN
4803    SELECT @x;
4804END//
4805delimiter ;//
4806
4807--disable_warnings ONCE
4808DROP PROCEDURE IF EXISTS sp1;
4809
4810delimiter //;
4811--error ER_PARSE_ERROR
4812CREATE PROCEDURE sp1()
4813  return:BEGIN
4814    SELECT @x;
4815END//
4816delimiter ;//
4817
4818--disable_warnings ONCE
4819DROP PROCEDURE IF EXISTS sp1;
4820
4821delimiter //;
4822--error ER_PARSE_ERROR
4823CREATE PROCEDURE sp1()
4824  revoke:BEGIN
4825    SELECT @x;
4826END//
4827delimiter ;//
4828
4829--disable_warnings ONCE
4830DROP PROCEDURE IF EXISTS sp1;
4831
4832delimiter //;
4833--error ER_PARSE_ERROR
4834CREATE PROCEDURE sp1()
4835  right:BEGIN
4836    SELECT @x;
4837END//
4838delimiter ;//
4839
4840--disable_warnings ONCE
4841DROP PROCEDURE IF EXISTS sp1;
4842
4843delimiter //;
4844--error ER_PARSE_ERROR
4845CREATE PROCEDURE sp1()
4846  rlike:BEGIN
4847    SELECT @x;
4848END//
4849delimiter ;//
4850
4851--disable_warnings ONCE
4852DROP PROCEDURE IF EXISTS sp1;
4853
4854delimiter //;
4855--error ER_PARSE_ERROR
4856CREATE PROCEDURE sp1()
4857  schema:BEGIN
4858    SELECT @x;
4859END//
4860delimiter ;//
4861
4862--disable_warnings ONCE
4863DROP PROCEDURE IF EXISTS sp1;
4864
4865delimiter //;
4866--error ER_PARSE_ERROR
4867CREATE PROCEDURE sp1()
4868  schemas:BEGIN
4869    SELECT @x;
4870END//
4871delimiter ;//
4872
4873--disable_warnings ONCE
4874DROP PROCEDURE IF EXISTS sp1;
4875
4876delimiter //;
4877--error ER_PARSE_ERROR
4878CREATE PROCEDURE sp1()
4879  second_microsecond:BEGIN
4880    SELECT @x;
4881END//
4882delimiter ;//
4883
4884--disable_warnings ONCE
4885DROP PROCEDURE IF EXISTS sp1;
4886
4887delimiter //;
4888--error ER_PARSE_ERROR
4889CREATE PROCEDURE sp1()
4890  select:BEGIN
4891    SELECT @x;
4892END//
4893delimiter ;//
4894
4895--disable_warnings ONCE
4896DROP PROCEDURE IF EXISTS sp1;
4897
4898delimiter //;
4899--error ER_PARSE_ERROR
4900CREATE PROCEDURE sp1()
4901  sensitive:BEGIN
4902    SELECT @x;
4903END//
4904delimiter ;//
4905
4906--disable_warnings ONCE
4907DROP PROCEDURE IF EXISTS sp1;
4908
4909delimiter //;
4910--error ER_PARSE_ERROR
4911CREATE PROCEDURE sp1()
4912  separator:BEGIN
4913    SELECT @x;
4914END//
4915delimiter ;//
4916
4917--disable_warnings ONCE
4918DROP PROCEDURE IF EXISTS sp1;
4919
4920delimiter //;
4921--error ER_PARSE_ERROR
4922CREATE PROCEDURE sp1()
4923  set:BEGIN
4924    SELECT @x;
4925END//
4926delimiter ;//
4927
4928--disable_warnings ONCE
4929DROP PROCEDURE IF EXISTS sp1;
4930
4931delimiter //;
4932--error ER_PARSE_ERROR
4933CREATE PROCEDURE sp1()
4934  show:BEGIN
4935    SELECT @x;
4936END//
4937delimiter ;//
4938
4939--disable_warnings ONCE
4940DROP PROCEDURE IF EXISTS sp1;
4941
4942delimiter //;
4943--error ER_PARSE_ERROR
4944CREATE PROCEDURE sp1()
4945  smallint:BEGIN
4946    SELECT @x;
4947END//
4948delimiter ;//
4949
4950--disable_warnings ONCE
4951DROP PROCEDURE IF EXISTS sp1;
4952
4953delimiter //;
4954--error ER_PARSE_ERROR
4955CREATE PROCEDURE sp1()
4956  spatial:BEGIN
4957    SELECT @x;
4958END//
4959delimiter ;//
4960
4961--disable_warnings ONCE
4962DROP PROCEDURE IF EXISTS sp1;
4963
4964delimiter //;
4965--error ER_PARSE_ERROR
4966CREATE PROCEDURE sp1()
4967  specific:BEGIN
4968    SELECT @x;
4969END//
4970delimiter ;//
4971
4972--disable_warnings ONCE
4973DROP PROCEDURE IF EXISTS sp1;
4974
4975delimiter //;
4976--error ER_PARSE_ERROR
4977CREATE PROCEDURE sp1()
4978  sql:BEGIN
4979    SELECT @x;
4980END//
4981delimiter ;//
4982
4983--disable_warnings ONCE
4984DROP PROCEDURE IF EXISTS sp1;
4985
4986delimiter //;
4987--error ER_PARSE_ERROR
4988CREATE PROCEDURE sp1()
4989  sqlexception:BEGIN
4990    SELECT @x;
4991END//
4992delimiter ;//
4993
4994--disable_warnings ONCE
4995DROP PROCEDURE IF EXISTS sp1;
4996
4997delimiter //;
4998--error ER_PARSE_ERROR
4999CREATE PROCEDURE sp1()
5000  sqlstate:BEGIN
5001    SELECT @x;
5002END//
5003delimiter ;//
5004
5005--disable_warnings ONCE
5006DROP PROCEDURE IF EXISTS sp1;
5007
5008delimiter //;
5009--error ER_PARSE_ERROR
5010CREATE PROCEDURE sp1()
5011  sqlwarning:BEGIN
5012    SELECT @x;
5013END//
5014delimiter ;//
5015
5016--disable_warnings ONCE
5017DROP PROCEDURE IF EXISTS sp1;
5018
5019delimiter //;
5020--error ER_PARSE_ERROR
5021CREATE PROCEDURE sp1()
5022  sql_big_result:BEGIN
5023    SELECT @x;
5024END//
5025delimiter ;//
5026
5027--disable_warnings ONCE
5028DROP PROCEDURE IF EXISTS sp1;
5029
5030delimiter //;
5031--error ER_PARSE_ERROR
5032CREATE PROCEDURE sp1()
5033  sql_calc_found_rows:BEGIN
5034    SELECT @x;
5035END//
5036delimiter ;//
5037
5038--disable_warnings ONCE
5039DROP PROCEDURE IF EXISTS sp1;
5040
5041delimiter //;
5042--error ER_PARSE_ERROR
5043CREATE PROCEDURE sp1()
5044  sql_small_result:BEGIN
5045    SELECT @x;
5046END//
5047delimiter ;//
5048
5049--disable_warnings ONCE
5050DROP PROCEDURE IF EXISTS sp1;
5051
5052delimiter //;
5053--error ER_PARSE_ERROR
5054CREATE PROCEDURE sp1()
5055  ssl:BEGIN
5056    SELECT @x;
5057END//
5058delimiter ;//
5059
5060--disable_warnings ONCE
5061DROP PROCEDURE IF EXISTS sp1;
5062
5063delimiter //;
5064--error ER_PARSE_ERROR
5065CREATE PROCEDURE sp1()
5066  starting:BEGIN
5067    SELECT @x;
5068END//
5069delimiter ;//
5070
5071--disable_warnings ONCE
5072DROP PROCEDURE IF EXISTS sp1;
5073
5074delimiter //;
5075--error ER_PARSE_ERROR
5076CREATE PROCEDURE sp1()
5077  straight_join:BEGIN
5078    SELECT @x;
5079END//
5080delimiter ;//
5081
5082--disable_warnings ONCE
5083DROP PROCEDURE IF EXISTS sp1;
5084
5085delimiter //;
5086--error ER_PARSE_ERROR
5087CREATE PROCEDURE sp1()
5088  table:BEGIN
5089    SELECT @x;
5090END//
5091delimiter ;//
5092
5093--disable_warnings ONCE
5094DROP PROCEDURE IF EXISTS sp1;
5095
5096delimiter //;
5097--error ER_PARSE_ERROR
5098CREATE PROCEDURE sp1()
5099  terminated:BEGIN
5100    SELECT @x;
5101END//
5102delimiter ;//
5103
5104--disable_warnings ONCE
5105DROP PROCEDURE IF EXISTS sp1;
5106
5107delimiter //;
5108--error ER_PARSE_ERROR
5109CREATE PROCEDURE sp1()
5110  then:BEGIN
5111    SELECT @x;
5112END//
5113delimiter ;//
5114
5115--disable_warnings ONCE
5116DROP PROCEDURE IF EXISTS sp1;
5117
5118delimiter //;
5119--error ER_PARSE_ERROR
5120CREATE PROCEDURE sp1()
5121  tinyblob:BEGIN
5122    SELECT @x;
5123END//
5124delimiter ;//
5125
5126--disable_warnings ONCE
5127DROP PROCEDURE IF EXISTS sp1;
5128
5129delimiter //;
5130--error ER_PARSE_ERROR
5131CREATE PROCEDURE sp1()
5132  tinyint:BEGIN
5133    SELECT @x;
5134END//
5135delimiter ;//
5136
5137--disable_warnings ONCE
5138DROP PROCEDURE IF EXISTS sp1;
5139
5140delimiter //;
5141--error ER_PARSE_ERROR
5142CREATE PROCEDURE sp1()
5143  tinytext:BEGIN
5144    SELECT @x;
5145END//
5146delimiter ;//
5147
5148--disable_warnings ONCE
5149DROP PROCEDURE IF EXISTS sp1;
5150
5151delimiter //;
5152--error ER_PARSE_ERROR
5153CREATE PROCEDURE sp1()
5154  to:BEGIN
5155    SELECT @x;
5156END//
5157delimiter ;//
5158
5159--disable_warnings ONCE
5160DROP PROCEDURE IF EXISTS sp1;
5161
5162delimiter //;
5163--error ER_PARSE_ERROR
5164CREATE PROCEDURE sp1()
5165  trailing:BEGIN
5166    SELECT @x;
5167END//
5168delimiter ;//
5169
5170--disable_warnings ONCE
5171DROP PROCEDURE IF EXISTS sp1;
5172
5173delimiter //;
5174--error ER_PARSE_ERROR
5175CREATE PROCEDURE sp1()
5176  trigger:BEGIN
5177    SELECT @x;
5178END//
5179delimiter ;//
5180
5181--disable_warnings ONCE
5182DROP PROCEDURE IF EXISTS sp1;
5183
5184delimiter //;
5185--error ER_PARSE_ERROR
5186CREATE PROCEDURE sp1()
5187  true:BEGIN
5188    SELECT @x;
5189END//
5190delimiter ;//
5191
5192--disable_warnings ONCE
5193DROP PROCEDURE IF EXISTS sp1;
5194
5195delimiter //;
5196--error ER_PARSE_ERROR
5197CREATE PROCEDURE sp1()
5198  undo:BEGIN
5199    SELECT @x;
5200END//
5201delimiter ;//
5202
5203--disable_warnings ONCE
5204DROP PROCEDURE IF EXISTS sp1;
5205
5206delimiter //;
5207--error ER_PARSE_ERROR
5208CREATE PROCEDURE sp1()
5209  union:BEGIN
5210    SELECT @x;
5211END//
5212delimiter ;//
5213
5214--disable_warnings ONCE
5215DROP PROCEDURE IF EXISTS sp1;
5216
5217delimiter //;
5218--error ER_PARSE_ERROR
5219CREATE PROCEDURE sp1()
5220  unique:BEGIN
5221    SELECT @x;
5222END//
5223delimiter ;//
5224
5225--disable_warnings ONCE
5226DROP PROCEDURE IF EXISTS sp1;
5227
5228delimiter //;
5229--error ER_SP_BADSTATEMENT
5230CREATE PROCEDURE sp1()
5231  unlock:BEGIN
5232    SELECT @x;
5233END//
5234delimiter ;//
5235
5236--disable_warnings ONCE
5237DROP PROCEDURE IF EXISTS sp1;
5238
5239delimiter //;
5240--error ER_PARSE_ERROR
5241CREATE PROCEDURE sp1()
5242  unsigned:BEGIN
5243    SELECT @x;
5244END//
5245delimiter ;//
5246
5247--disable_warnings ONCE
5248DROP PROCEDURE IF EXISTS sp1;
5249
5250delimiter //;
5251--error ER_PARSE_ERROR
5252CREATE PROCEDURE sp1()
5253  update:BEGIN
5254    SELECT @x;
5255END//
5256delimiter ;//
5257
5258--disable_warnings ONCE
5259DROP PROCEDURE IF EXISTS sp1;
5260
5261delimiter //;
5262--error ER_PARSE_ERROR
5263CREATE PROCEDURE sp1()
5264  usage:BEGIN
5265    SELECT @x;
5266END//
5267delimiter ;//
5268
5269--disable_warnings ONCE
5270DROP PROCEDURE IF EXISTS sp1;
5271
5272delimiter //;
5273--error ER_PARSE_ERROR
5274CREATE PROCEDURE sp1()
5275  use:BEGIN
5276    SELECT @x;
5277END//
5278delimiter ;//
5279
5280--disable_warnings ONCE
5281DROP PROCEDURE IF EXISTS sp1;
5282
5283delimiter //;
5284--error ER_PARSE_ERROR
5285CREATE PROCEDURE sp1()
5286  using:BEGIN
5287    SELECT @x;
5288END//
5289delimiter ;//
5290
5291--disable_warnings ONCE
5292DROP PROCEDURE IF EXISTS sp1;
5293
5294delimiter //;
5295--error ER_PARSE_ERROR
5296CREATE PROCEDURE sp1()
5297  utc_date:BEGIN
5298    SELECT @x;
5299END//
5300delimiter ;//
5301
5302--disable_warnings ONCE
5303DROP PROCEDURE IF EXISTS sp1;
5304
5305delimiter //;
5306--error ER_PARSE_ERROR
5307CREATE PROCEDURE sp1()
5308  utc_time:BEGIN
5309    SELECT @x;
5310END//
5311delimiter ;//
5312
5313--disable_warnings ONCE
5314DROP PROCEDURE IF EXISTS sp1;
5315
5316delimiter //;
5317--error ER_PARSE_ERROR
5318CREATE PROCEDURE sp1()
5319  utc_timestamp:BEGIN
5320    SELECT @x;
5321END//
5322delimiter ;//
5323
5324--disable_warnings ONCE
5325DROP PROCEDURE IF EXISTS sp1;
5326
5327delimiter //;
5328--error ER_PARSE_ERROR
5329CREATE PROCEDURE sp1()
5330  values:BEGIN
5331    SELECT @x;
5332END//
5333delimiter ;//
5334
5335--disable_warnings ONCE
5336DROP PROCEDURE IF EXISTS sp1;
5337
5338delimiter //;
5339--error ER_PARSE_ERROR
5340CREATE PROCEDURE sp1()
5341  varbinary:BEGIN
5342    SELECT @x;
5343END//
5344delimiter ;//
5345
5346--disable_warnings ONCE
5347DROP PROCEDURE IF EXISTS sp1;
5348
5349delimiter //;
5350--error ER_PARSE_ERROR
5351CREATE PROCEDURE sp1()
5352  varchar:BEGIN
5353    SELECT @x;
5354END//
5355delimiter ;//
5356
5357--disable_warnings ONCE
5358DROP PROCEDURE IF EXISTS sp1;
5359
5360delimiter //;
5361--error ER_PARSE_ERROR
5362CREATE PROCEDURE sp1()
5363  varcharacter:BEGIN
5364    SELECT @x;
5365END//
5366delimiter ;//
5367
5368--disable_warnings ONCE
5369DROP PROCEDURE IF EXISTS sp1;
5370
5371delimiter //;
5372--error ER_PARSE_ERROR
5373CREATE PROCEDURE sp1()
5374  varying:BEGIN
5375    SELECT @x;
5376END//
5377delimiter ;//
5378
5379--disable_warnings ONCE
5380DROP PROCEDURE IF EXISTS sp1;
5381
5382delimiter //;
5383--error ER_PARSE_ERROR
5384CREATE PROCEDURE sp1()
5385  when:BEGIN
5386    SELECT @x;
5387END//
5388delimiter ;//
5389
5390--disable_warnings ONCE
5391DROP PROCEDURE IF EXISTS sp1;
5392
5393delimiter //;
5394--error ER_PARSE_ERROR
5395CREATE PROCEDURE sp1()
5396  where:BEGIN
5397    SELECT @x;
5398END//
5399delimiter ;//
5400
5401--disable_warnings ONCE
5402DROP PROCEDURE IF EXISTS sp1;
5403
5404delimiter //;
5405--error ER_PARSE_ERROR
5406CREATE PROCEDURE sp1()
5407  while:BEGIN
5408    SELECT @x;
5409END//
5410delimiter ;//
5411
5412--disable_warnings ONCE
5413DROP PROCEDURE IF EXISTS sp1;
5414
5415delimiter //;
5416--error ER_PARSE_ERROR
5417CREATE PROCEDURE sp1()
5418  with:BEGIN
5419    SELECT @x;
5420END//
5421delimiter ;//
5422
5423--disable_warnings ONCE
5424DROP PROCEDURE IF EXISTS sp1;
5425
5426delimiter //;
5427--error ER_PARSE_ERROR
5428CREATE PROCEDURE sp1()
5429  write:BEGIN
5430    SELECT @x;
5431END//
5432delimiter ;//
5433
5434--disable_warnings ONCE
5435DROP PROCEDURE IF EXISTS sp1;
5436
5437delimiter //;
5438--error ER_PARSE_ERROR
5439CREATE PROCEDURE sp1()
5440  xor:BEGIN
5441    SELECT @x;
5442END//
5443delimiter ;//
5444
5445--disable_warnings ONCE
5446DROP PROCEDURE IF EXISTS sp1;
5447
5448delimiter //;
5449--error ER_PARSE_ERROR
5450CREATE PROCEDURE sp1()
5451  year_month:BEGIN
5452    SELECT @x;
5453END//
5454delimiter ;//
5455
5456--disable_warnings ONCE
5457DROP PROCEDURE IF EXISTS sp1;
5458
5459delimiter //;
5460--error ER_PARSE_ERROR
5461CREATE PROCEDURE sp1()
5462  zerofill:BEGIN
5463    SELECT @x;
5464END//
5465delimiter ;//
5466
5467# ------------------------------------------------------------------------------
5468let $message= Testcase 4.2.6:
5469              ---------------
5470Ensure that the labels for multiple BEGIN an END work properly;
5471--source include/show_msg80.inc
5472
5473--disable_warnings ONCE
5474DROP PROCEDURE IF EXISTS sp1;
5475
5476
5477delimiter //;
5478CREATE PROCEDURE sp1( )
5479begin_label: BEGIN
5480    declare x char;
5481    declare y char;
5482    set x = '1';
5483    set y = '2';
5484    label1: BEGIN
5485      declare x char;
5486      declare y char;
5487      SELECT f1, f2 into x, y from t2 limit 1;
5488    END label1;
5489    set @v1 = x;
5490    set @v2 = y;
5491    SELECT @v1, @v2;
5492END begin_label//
5493delimiter ;//
5494
5495CALL sp1();
5496
5497# clean up
5498DROP PROCEDURE sp1;
5499
5500# ------------------------------------------------------------------------------
5501let $message= Testcase 4.2.7:
5502              ---------------
5503Ensure that the labels enclosing each BEGIN/END compound statement must match.;
5504--source include/show_msg80.inc
5505
5506--disable_warnings ONCE
5507DROP PROCEDURE IF EXISTS sp1;
5508
5509delimiter //;
5510--error ER_SP_LABEL_MISMATCH
5511CREATE PROCEDURE sp1( )
5512begin1_label: BEGIN
5513    declare x char;
5514    declare y char;
5515    SELECT lf1, f1 into x, y from t2 limit 1;
5516    begin2_label: BEGIN
5517      declare x char;
5518      declare y char;
5519      SELECT f1, f2 into x, y from t2 limit 1;
5520    END begin2_changed;
5521END begin1_changed//
5522delimiter ;//
5523
5524# ------------------------------------------------------------------------------
5525let $message= Testcase 4.2.8:
5526              ---------------
5527Ensure that it is possible to put a beginning label at the start of a
5528BEGIN/END compound statement without also requiring an ending label
5529at the END of the same statement.;
5530--source include/show_msg80.inc
5531
5532--disable_warnings ONCE
5533DROP PROCEDURE IF EXISTS sp1;
5534
5535delimiter //;
5536CREATE PROCEDURE sp1( )
5537    begin_label: BEGIN
5538    declare x char;
5539    declare y char;
5540    SELECT f1, f2 into x, y from t2 limit 1;
5541END//
5542delimiter ;//
5543
5544CALL sp1();
5545
5546# clean up
5547DROP PROCEDURE sp1;
5548
5549# ------------------------------------------------------------------------------
5550let $message= Testcase 4.2.9:
5551              ---------------
5552Ensure that it is not possible to put an ending label at the END of
5553a BEGIN/END compound statement without also requiring a matching
5554beginning label at the start of the same statement;
5555--source include/show_msg80.inc
5556
5557--disable_warnings ONCE
5558DROP PROCEDURE IF EXISTS sp1;
5559
5560delimiter //;
5561--error ER_PARSE_ERROR
5562CREATE PROCEDURE sp1( )
5563BEGIN
5564    declare x char;
5565    declare y char;
5566    SELECT f1, f2 into x, y from t2 limit 1;
5567END begin_label//
5568delimiter ;//
5569
5570# ------------------------------------------------------------------------------
5571let $message= Testcase 4.2.10:
5572              ----------------
5573Ensure that every beginning label must END with a colon(:);
5574--source include/show_msg80.inc
5575
5576--disable_warnings ONCE
5577DROP PROCEDURE IF EXISTS sp1;
5578
5579delimiter //;
5580--error ER_PARSE_ERROR
5581CREATE PROCEDURE sp1( )
5582begin_label BEGIN
5583   declare x char;
5584   declare y char;
5585   SELECT f1, f2 into x, y from t2 limit 1;
5586END begin_label//
5587delimiter ;//
5588
5589# ------------------------------------------------------------------------------
5590let $message= Testcase 4.2.11:
5591              ----------------
5592Ensure that every beginning label with the same scope must be unique. (same label names);
5593--source include/show_msg80.inc
5594
5595
5596--disable_warnings ONCE
5597DROP PROCEDURE IF EXISTS sp6;
5598
5599delimiter //;
5600--error ER_SP_LABEL_REDEFINE
5601CREATE PROCEDURE sp6( )
5602begin_samelabel: BEGIN
5603    declare x char;
5604    declare y char;
5605    SELECT f1, f2 into x, y from t2 limit 1;
5606    begin_samelabel: BEGIN
5607      declare x char;
5608      declare y char;
5609      SELECT f1, f2 into x, y from t2 limit 1;
5610    END begin_samelabel;
5611    begin_samelabel: BEGIN
5612      declare x char;
5613      declare y char;
5614      SELECT f1, f2 into x, y from t2 limit 1;
5615    END begin_samelabel;
5616END begin_samelabel//
5617delimiter ;//
5618
5619
5620# ------------------------------------------------------------------------------
5621let $message= Testcase 4.2.12:
5622              ----------------
5623Ensure that the variables, cursors, conditions, and handlers declared for
5624a stored procedure (with the declare statement) may only be properly defined;
5625--source include/show_msg80.inc
5626
5627--disable_warnings ONCE
5628DROP PROCEDURE IF EXISTS sp6;
5629
5630delimiter //;
5631--error ER_TOO_BIG_SCALE
5632CREATE PROCEDURE sp6( )
5633BEGIN
5634    declare x char default 'a';
5635    declare y integer default 1;
5636    declare z float default 1.1;
5637    declare a enum("value1", "value2") default 'value1';
5638    declare b decimal(255, 255) default 1.2e+12;
5639    declare c mediumtext default 'mediumtext';
5640    declare d datetime default '2005-02-02 12:12:12';
5641    declare e char default 'b';
5642    declare cur1 cursor for SELECT f1 from db_storedproc.t2;
5643    declare continue handler for sqlstate '02000' set @x2 = 1;
5644    open cur1;
5645    fetch cur1 into e;
5646    SELECT x, y, z, a, b, c, d, e;
5647    close cur1;
5648END//
5649delimiter ;//
5650
5651CALL sp6();
5652
5653--disable_warnings ONCE
5654DROP PROCEDURE IF EXISTS sp6;
5655
5656delimiter //;
5657CREATE PROCEDURE sp6( )
5658BEGIN
5659    declare x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 char default '0';
5660    SELECT x12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567;
5661END//
5662delimiter ;//
5663
5664CALL sp6();
5665
5666# clean up
5667DROP PROCEDURE sp6;
5668
5669# ------------------------------------------------------------------------------
5670let $message= Testcase 4.2.13:
5671              ----------------
5672Ensure that the variables declared for a stored procedure (with the declare
5673statement) may only be defined in the correct order.;
5674--source include/show_msg80.inc
5675
5676--disable_warnings ONCE
5677DROP PROCEDURE IF EXISTS sp6;
5678
5679delimiter //;
5680--error ER_PARSE_ERROR
5681CREATE PROCEDURE sp6( )
5682BEGIN
5683    declare x default '0' char;
5684    SELECT x;
5685END//
5686delimiter ;//
5687
5688--disable_warnings ONCE
5689DROP PROCEDURE IF EXISTS sp6;
5690
5691delimiter //;
5692--error ER_PARSE_ERROR
5693CREATE PROCEDURE sp6( )
5694BEGIN
5695    declare x char, integer default '0';
5696    SELECT x;
5697END//
5698delimiter ;//
5699
5700--disable_warnings ONCE
5701DROP PROCEDURE IF EXISTS sp6;
5702
5703delimiter //;
5704--error ER_PARSE_ERROR
5705CREATE PROCEDURE sp6( )
5706BEGIN
5707    declare x1, x2 char, integer default '0', 1;
5708    SELECT x;
5709END//
5710delimiter ;//
5711
5712--disable_warnings ONCE
5713DROP PROCEDURE IF EXISTS sp6;
5714
5715delimiter //;
5716--error ER_PARSE_ERROR
5717CREATE PROCEDURE sp1( )
5718BEGIN
5719   declare char x;
5720   declare char y;
5721   SELECT f1, f2 into x, y from t2 limit 1;
5722END//
5723delimiter ;//
5724
5725--disable_warnings ONCE
5726DROP PROCEDURE IF EXISTS sp6;
5727
5728delimiter //;
5729--error ER_PARSE_ERROR
5730CREATE PROCEDURE sp1( )
5731BEGIN
5732   declare char x, y1 integer default 0;
5733   declare char y;
5734   SELECT f1, f2 into x, y from t2 limit 1;
5735END//
5736delimiter ;//
5737
5738--disable_warnings ONCE
5739DROP PROCEDURE IF EXISTS sp6;
5740
5741delimiter //;
5742--error ER_PARSE_ERROR
5743CREATE PROCEDURE sp6( )
5744BEGIN
5745    declare x default 'a' char;
5746END//
5747delimiter ;//
5748
5749--disable_warnings ONCE
5750DROP PROCEDURE IF EXISTS sp6;
5751
5752delimiter //;
5753--error ER_PARSE_ERROR
5754CREATE PROCEDURE sp6( )
5755BEGIN
5756    declare condition notable for sqlstate '42s22';
5757END//
5758delimiter ;//
5759
5760--disable_warnings ONCE
5761DROP PROCEDURE IF EXISTS sp6;
5762
5763delimiter //;
5764--error ER_PARSE_ERROR
5765CREATE PROCEDURE sp6( )
5766BEGIN
5767    declare condition for notable sqlstate '42s22';
5768END//
5769delimiter ;//
5770
5771--disable_warnings ONCE
5772DROP PROCEDURE IF EXISTS sp6;
5773
5774delimiter //;
5775--error ER_PARSE_ERROR
5776CREATE PROCEDURE sp6( )
5777BEGIN
5778    declare condition for sqlstate notable '42s22';
5779END//
5780delimiter ;//
5781
5782--disable_warnings ONCE
5783DROP PROCEDURE IF EXISTS sp6;
5784
5785delimiter //;
5786--error ER_PARSE_ERROR
5787CREATE PROCEDURE sp6( )
5788BEGIN
5789    declare condition for sqlstate '42s22' notable;
5790END//
5791delimiter ;//
5792
5793--disable_warnings ONCE
5794DROP PROCEDURE IF EXISTS sp6;
5795
5796delimiter //;
5797--error ER_PARSE_ERROR
5798CREATE PROCEDURE sp6( )
5799BEGIN
5800    declare cursor cur1 for SELECT f1 from db_storedproc.t2;
5801END//
5802delimiter ;//
5803
5804--disable_warnings ONCE
5805DROP PROCEDURE IF EXISTS sp6;
5806
5807delimiter //;
5808--error ER_PARSE_ERROR
5809CREATE PROCEDURE sp6( )
5810BEGIN
5811    declare cursor for cur1 SELECT f1 from db_storedproc.t2;
5812END//
5813delimiter ;//
5814
5815--disable_warnings ONCE
5816DROP PROCEDURE IF EXISTS sp6;
5817
5818delimiter //;
5819--error ER_PARSE_ERROR
5820CREATE PROCEDURE sp6( )
5821BEGIN
5822    declare cursor for SELECT cur1 f1 from db_storedproc.t2;
5823END//
5824delimiter ;//
5825
5826--disable_warnings ONCE
5827DROP PROCEDURE IF EXISTS sp6;
5828
5829delimiter //;
5830--error ER_PARSE_ERROR
5831CREATE PROCEDURE sp6( )
5832BEGIN
5833    declare handler continue for sqlstate '02000' set @x2 = 1;
5834END//
5835delimiter ;//
5836
5837--disable_warnings ONCE
5838DROP PROCEDURE IF EXISTS sp6;
5839
5840delimiter //;
5841--error ER_PARSE_ERROR
5842CREATE PROCEDURE sp6( )
5843BEGIN
5844    declare handler exit for sqlstate '02000' set @x2 = 1;
5845END//
5846delimiter ;//
5847
5848--disable_warnings ONCE
5849DROP PROCEDURE IF EXISTS sp6;
5850
5851delimiter //;
5852--error ER_PARSE_ERROR
5853CREATE PROCEDURE sp6( )
5854BEGIN
5855    declare handler undo for sqlstate '02000' set @x2 = 1;
5856END//
5857delimiter ;//
5858
5859--disable_warnings ONCE
5860DROP PROCEDURE IF EXISTS sp1;
5861
5862delimiter //;
5863--error ER_PARSE_ERROR
5864CREATE PROCEDURE sp1( )
5865BEGIN
5866    declare char x;
5867    SELECT f1 into x from tb1 limit 9998, 1;
5868END//
5869delimiter ;//
5870
5871--disable_warnings ONCE
5872DROP PROCEDURE IF EXISTS sp1;
5873
5874delimiter //;
5875--error ER_PARSE_ERROR
5876CREATE PROCEDURE sp1( )
5877BEGIN
5878    declare char binary  x;
5879    SELECT f2 into x from tb1 limit 9998, 1;
5880END//
5881delimiter ;//
5882
5883--disable_warnings ONCE
5884DROP PROCEDURE IF EXISTS sp1;
5885
5886delimiter //;
5887--error ER_PARSE_ERROR
5888CREATE PROCEDURE sp1( )
5889BEGIN
5890    declare char ascii  x;
5891    SELECT f3 into x from tb1 limit 9998, 1;
5892END//
5893delimiter ;//
5894
5895--disable_warnings ONCE
5896DROP PROCEDURE IF EXISTS sp1;
5897
5898delimiter //;
5899--error ER_PARSE_ERROR
5900CREATE PROCEDURE sp1( )
5901BEGIN
5902    declare tinytext  x;
5903    SELECT f4 into x from tb1 limit 9998, 1;
5904END//
5905delimiter ;//
5906
5907--disable_warnings ONCE
5908DROP PROCEDURE IF EXISTS sp1;
5909
5910delimiter //;
5911--error ER_PARSE_ERROR
5912CREATE PROCEDURE sp1( )
5913BEGIN
5914    declare  x;
5915    SELECT f5 text  into x from tb1 limit 9998, 1;
5916END//
5917delimiter ;//
5918
5919--disable_warnings ONCE
5920DROP PROCEDURE IF EXISTS sp1;
5921
5922delimiter //;
5923--error ER_PARSE_ERROR
5924CREATE PROCEDURE sp1( )
5925BEGIN
5926    declare mediumtext  x;
5927    SELECT f6 into x from tb1 limit 9998, 1;
5928END//
5929delimiter ;//
5930
5931--disable_warnings ONCE
5932DROP PROCEDURE IF EXISTS sp1;
5933
5934delimiter //;
5935--error ER_PARSE_ERROR
5936CREATE PROCEDURE sp1( )
5937BEGIN
5938    declare longtext  x;
5939    SELECT f7 into x from tb1 limit 9998, 1;
5940END//
5941delimiter ;//
5942
5943--disable_warnings ONCE
5944DROP PROCEDURE IF EXISTS sp1;
5945
5946delimiter //;
5947--error ER_PARSE_ERROR
5948CREATE PROCEDURE sp1( )
5949BEGIN
5950    declare tinyblob  x;
5951    SELECT f8 into x from tb1 limit 9998, 1;
5952END//
5953delimiter ;//
5954
5955--disable_warnings ONCE
5956DROP PROCEDURE IF EXISTS sp1;
5957
5958delimiter //;
5959--error ER_PARSE_ERROR
5960CREATE PROCEDURE sp1( )
5961BEGIN
5962    declare blob x;
5963    SELECT f9 into x from tb1 limit 9998, 1;
5964END//
5965delimiter ;//
5966
5967--disable_warnings ONCE
5968DROP PROCEDURE IF EXISTS sp1;
5969
5970delimiter //;
5971--error ER_PARSE_ERROR
5972CREATE PROCEDURE sp1( )
5973BEGIN
5974    declare mediumblob  x;
5975    SELECT f10 into x from tb1 limit 9998, 1;
5976END//
5977delimiter ;//
5978
5979--disable_warnings ONCE
5980DROP PROCEDURE IF EXISTS sp1;
5981
5982delimiter //;
5983--error ER_PARSE_ERROR
5984CREATE PROCEDURE sp1( )
5985BEGIN
5986    declare longblob  x;
5987    SELECT f11 into x from tb1 limit 9998, 1;
5988END//
5989delimiter ;//
5990
5991--disable_warnings ONCE
5992DROP PROCEDURE IF EXISTS sp1;
5993
5994delimiter //;
5995--error ER_PARSE_ERROR
5996CREATE PROCEDURE sp1( )
5997BEGIN
5998    declare binary  x;
5999    SELECT f12 into x from tb1 limit 9998, 1;
6000END//
6001delimiter ;//
6002
6003--disable_warnings ONCE
6004DROP PROCEDURE IF EXISTS sp1;
6005
6006delimiter //;
6007--error ER_PARSE_ERROR
6008CREATE PROCEDURE sp1( )
6009BEGIN
6010    declare tinyint  x;
6011    SELECT f13 into x from tb1 limit 9998, 1;
6012END//
6013delimiter ;//
6014
6015--disable_warnings ONCE
6016DROP PROCEDURE IF EXISTS sp1;
6017
6018delimiter //;
6019--error ER_PARSE_ERROR
6020CREATE PROCEDURE sp1( )
6021BEGIN
6022    declare tinyint unsigned  x;
6023    SELECT f14 into x from tb1 limit 9998, 1;
6024END//
6025delimiter ;//
6026
6027--disable_warnings ONCE
6028DROP PROCEDURE IF EXISTS sp1;
6029
6030delimiter //;
6031--error ER_PARSE_ERROR
6032CREATE PROCEDURE sp1( )
6033BEGIN
6034    declare tinyint zerofill  x;
6035    SELECT f15 into x from tb1 limit 9998, 1;
6036END//
6037delimiter ;//
6038
6039--disable_warnings ONCE
6040DROP PROCEDURE IF EXISTS sp1;
6041
6042delimiter //;
6043--error ER_PARSE_ERROR
6044CREATE PROCEDURE sp1( )
6045BEGIN
6046    declare tinyint unsigned zerofill  x;
6047    SELECT f16 into x from tb1 limit 9998, 1;
6048END//
6049delimiter ;//
6050
6051--disable_warnings ONCE
6052DROP PROCEDURE IF EXISTS sp1;
6053
6054delimiter //;
6055--error ER_PARSE_ERROR
6056CREATE PROCEDURE sp1( )
6057BEGIN
6058    declare smallint  x;
6059    SELECT f17 into x from tb1 limit 9998, 1;
6060END//
6061delimiter ;//
6062
6063--disable_warnings ONCE
6064DROP PROCEDURE IF EXISTS sp1;
6065
6066delimiter //;
6067--error ER_PARSE_ERROR
6068CREATE PROCEDURE sp1( )
6069BEGIN
6070    declare smallint unsigned   x;
6071    SELECT f18 into x from tb1 limit 9998, 1;
6072END//
6073delimiter ;//
6074
6075--disable_warnings ONCE
6076DROP PROCEDURE IF EXISTS sp1;
6077
6078delimiter //;
6079--error ER_PARSE_ERROR
6080CREATE PROCEDURE sp1( )
6081BEGIN
6082    declare smallint zerofill  x;
6083    SELECT f19 into x from tb1 limit 9998, 1;
6084END//
6085delimiter ;//
6086
6087--disable_warnings ONCE
6088DROP PROCEDURE IF EXISTS sp1;
6089
6090delimiter //;
6091--error ER_PARSE_ERROR
6092CREATE PROCEDURE sp1( )
6093BEGIN
6094    declare smallint unsigned zerofill  x;
6095    SELECT f20 into x from tb1 limit 9998, 1;
6096END//
6097delimiter ;//
6098
6099--disable_warnings ONCE
6100DROP PROCEDURE IF EXISTS sp1;
6101
6102delimiter //;
6103--error ER_PARSE_ERROR
6104CREATE PROCEDURE sp1( )
6105BEGIN
6106    declare mediumint  x;
6107    SELECT f21 into x from tb1 limit 9998, 1;
6108END//
6109delimiter ;//
6110
6111--disable_warnings ONCE
6112DROP PROCEDURE IF EXISTS sp1;
6113
6114delimiter //;
6115--error ER_PARSE_ERROR
6116CREATE PROCEDURE sp1( )
6117BEGIN
6118    declare mediumint unsigned  x;
6119    SELECT f22 into x from tb1 limit 9998, 1;
6120END//
6121delimiter ;//
6122
6123--disable_warnings ONCE
6124DROP PROCEDURE IF EXISTS sp1;
6125
6126delimiter //;
6127--error ER_PARSE_ERROR
6128CREATE PROCEDURE sp1( )
6129BEGIN
6130    declare mediumint zerofill  x;
6131    SELECT f23 into x from tb1 limit 9998, 1;
6132END//
6133delimiter ;//
6134
6135--disable_warnings ONCE
6136DROP PROCEDURE IF EXISTS sp1;
6137
6138delimiter //;
6139--error ER_PARSE_ERROR
6140CREATE PROCEDURE sp1( )
6141BEGIN
6142    declare mediumint unsigned zerofill  x;
6143    SELECT f24 into x from tb1 limit 9998, 1;
6144END//
6145delimiter ;//
6146
6147--disable_warnings ONCE
6148DROP PROCEDURE IF EXISTS sp1;
6149
6150delimiter //;
6151--error ER_PARSE_ERROR
6152CREATE PROCEDURE sp1( )
6153BEGIN
6154    declare int  x;
6155    SELECT f25 into x from tb1 limit 9998, 1;
6156END//
6157delimiter ;//
6158
6159--disable_warnings ONCE
6160DROP PROCEDURE IF EXISTS sp1;
6161
6162delimiter //;
6163--error ER_PARSE_ERROR
6164CREATE PROCEDURE sp1( )
6165BEGIN
6166    declare int unsigned  x;
6167    SELECT f26 into x from tb1 limit 9998, 1;
6168END//
6169delimiter ;//
6170
6171--disable_warnings ONCE
6172DROP PROCEDURE IF EXISTS sp1;
6173
6174delimiter //;
6175--error ER_PARSE_ERROR
6176CREATE PROCEDURE sp1( )
6177BEGIN
6178    declare int zerofill  x;
6179    SELECT f27 into x from tb1 limit 9998, 1;
6180END//
6181delimiter ;//
6182
6183--disable_warnings ONCE
6184DROP PROCEDURE IF EXISTS sp1;
6185
6186delimiter //;
6187--error ER_PARSE_ERROR
6188CREATE PROCEDURE sp1( )
6189BEGIN
6190    declare int unsigned zerofill  x;
6191    SELECT f28 into x from tb1 limit 9998, 1;
6192END//
6193delimiter ;//
6194
6195--disable_warnings ONCE
6196DROP PROCEDURE IF EXISTS sp1;
6197
6198delimiter //;
6199--error ER_PARSE_ERROR
6200CREATE PROCEDURE sp1( )
6201BEGIN
6202    declare bigint  x;
6203    SELECT f29 into x from tb1 limit 9998, 1;
6204END//
6205delimiter ;//
6206
6207--disable_warnings ONCE
6208DROP PROCEDURE IF EXISTS sp1;
6209
6210delimiter //;
6211--error ER_PARSE_ERROR
6212CREATE PROCEDURE sp1( )
6213BEGIN
6214    declare bigint unsigned  x;
6215    elect f30 into x from tb1 limit 9998, 1;
6216END//
6217delimiter ;//
6218
6219
6220--disable_warnings ONCE
6221DROP PROCEDURE IF EXISTS sp1;
6222
6223delimiter //;
6224--error ER_PARSE_ERROR
6225CREATE PROCEDURE sp1( )
6226BEGIN
6227    declare bigint zerofill  x;
6228    SELECT f31 into x from tb1 limit 9998, 1;
6229END//
6230delimiter ;//
6231
6232--disable_warnings ONCE
6233DROP PROCEDURE IF EXISTS sp1;
6234
6235delimiter //;
6236--error ER_PARSE_ERROR
6237CREATE PROCEDURE sp1( )
6238BEGIN
6239    declare bigint unsigned zerofill  x;
6240    SELECT f32 into x from tb1 limit 9998, 1;
6241END//
6242delimiter ;//
6243
6244--disable_warnings ONCE
6245DROP PROCEDURE IF EXISTS sp1;
6246
6247delimiter //;
6248--error ER_PARSE_ERROR
6249CREATE PROCEDURE sp1( )
6250BEGIN
6251    declare decimal  x;
6252    SELECT f33 into x from tb1 limit 9998, 1;
6253END//
6254delimiter ;//
6255
6256--disable_warnings ONCE
6257DROP PROCEDURE IF EXISTS sp1;
6258
6259delimiter //;
6260--error ER_PARSE_ERROR
6261CREATE PROCEDURE sp1( )
6262BEGIN
6263    declare decimal unsigned  x;
6264    SELECT f34 into x from tb1 limit 9998, 1;
6265END//
6266delimiter ;//
6267
6268--disable_warnings ONCE
6269DROP PROCEDURE IF EXISTS sp1;
6270
6271delimiter //;
6272--error ER_PARSE_ERROR
6273CREATE PROCEDURE sp1( )
6274BEGIN
6275    declare decimal zerofill  x;
6276    SELECT f35 into x from tb1 limit 9998, 1;
6277END//
6278delimiter ;//
6279
6280--disable_warnings ONCE
6281DROP PROCEDURE IF EXISTS sp1;
6282
6283delimiter //;
6284--error ER_PARSE_ERROR
6285CREATE PROCEDURE sp1( )
6286BEGIN
6287    declare decimal unsigned zerofill not null  x;
6288    SELECT f36 into x from tb1 limit 9998, 1;
6289END//
6290delimiter ;//
6291
6292--disable_warnings ONCE
6293DROP PROCEDURE IF EXISTS sp1;
6294
6295delimiter //;
6296--error ER_PARSE_ERROR
6297CREATE PROCEDURE sp1( )
6298BEGIN
6299    declare decimal (0) not null  x;
6300    SELECT f37 into x from tb1 limit 9998, 1;
6301END//
6302delimiter ;//
6303
6304--disable_warnings ONCE
6305DROP PROCEDURE IF EXISTS sp1;
6306
6307delimiter //;
6308--error ER_PARSE_ERROR
6309CREATE PROCEDURE sp1( )
6310BEGIN
6311    declare decimal (64) not null  x;
6312    SELECT f38 into x from tb1 limit 9998, 1;
6313END//
6314delimiter ;//
6315
6316--disable_warnings ONCE
6317DROP PROCEDURE IF EXISTS sp1;
6318
6319delimiter //;
6320--error ER_PARSE_ERROR
6321CREATE PROCEDURE sp1( )
6322BEGIN
6323    declare decimal (0) unsigned not null  x;
6324    SELECT f39 into x from tb1 limit 9998, 1;
6325END//
6326delimiter ;//
6327
6328--disable_warnings ONCE
6329DROP PROCEDURE IF EXISTS sp1;
6330
6331delimiter //;
6332--error ER_PARSE_ERROR
6333CREATE PROCEDURE sp1( )
6334BEGIN
6335    declare decimal (64) unsigned not null  x;
6336    SELECT f40 into x from tb1 limit 9998, 1;
6337END//
6338delimiter ;//
6339
6340--disable_warnings ONCE
6341DROP PROCEDURE IF EXISTS sp1;
6342
6343delimiter //;
6344--error ER_PARSE_ERROR
6345CREATE PROCEDURE sp1( )
6346BEGIN
6347    declare decimal (0) zerofill not null  x;
6348    SELECT f41 into x from tb1 limit 9998, 1;
6349END//
6350delimiter ;//
6351
6352--disable_warnings ONCE
6353DROP PROCEDURE IF EXISTS sp1;
6354
6355delimiter //;
6356--error ER_PARSE_ERROR
6357CREATE PROCEDURE sp1( )
6358BEGIN
6359    declare decimal (64) zerofill not null  x;
6360    SELECT f42 into x from tb1 limit 9998, 1;
6361END//
6362delimiter ;//
6363
6364--disable_warnings ONCE
6365DROP PROCEDURE IF EXISTS sp1;
6366
6367delimiter //;
6368--error ER_PARSE_ERROR
6369CREATE PROCEDURE sp1( )
6370BEGIN
6371    declare decimal (0) unsigned zerofill not null  x;
6372    SELECT f43 into x from tb1 limit 9998, 1;
6373END//
6374delimiter ;//
6375
6376--disable_warnings ONCE
6377DROP PROCEDURE IF EXISTS sp1;
6378
6379delimiter //;
6380--error ER_PARSE_ERROR
6381CREATE PROCEDURE sp1( )
6382BEGIN
6383    declare decimal (64) unsigned zerofill not null  x;
6384    SELECT f44 into x from tb1 limit 9998, 1;
6385END//
6386delimiter ;//
6387
6388--disable_warnings ONCE
6389DROP PROCEDURE IF EXISTS sp1;
6390
6391delimiter //;
6392--error ER_PARSE_ERROR
6393CREATE PROCEDURE sp1( )
6394BEGIN
6395    declare decimal (00) not null  x;
6396    SELECT f45 into x from tb1 limit 9998, 1;
6397END//
6398delimiter ;//
6399
6400--disable_warnings ONCE
6401DROP PROCEDURE IF EXISTS sp1;
6402
6403delimiter //;
6404--error ER_PARSE_ERROR
6405CREATE PROCEDURE sp1( )
6406BEGIN
6407    declare decimal (63, 30) not null  x;
6408    SELECT f46 into x from tb1 limit 9998, 1;
6409END//
6410delimiter ;//
6411
6412--disable_warnings ONCE
6413DROP PROCEDURE IF EXISTS sp1;
6414
6415delimiter //;
6416--error ER_PARSE_ERROR
6417CREATE PROCEDURE sp1( )
6418BEGIN
6419    declare decimal (00) unsigned not null  x;
6420    SELECT f47 into x from tb1 limit 9998, 1;
6421END//
6422delimiter ;//
6423
6424--disable_warnings ONCE
6425DROP PROCEDURE IF EXISTS sp1;
6426
6427delimiter //;
6428--error ER_PARSE_ERROR
6429CREATE PROCEDURE sp1( )
6430BEGIN
6431    declare decimal (63, 30) unsigned not null  x;
6432    SELECT f48 into x from tb1 limit 9998, 1;
6433END//
6434delimiter ;//
6435
6436--disable_warnings ONCE
6437DROP PROCEDURE IF EXISTS sp1;
6438
6439delimiter //;
6440--error ER_PARSE_ERROR
6441CREATE PROCEDURE sp1( )
6442BEGIN
6443    declare decimal (00) zerofill not null  x;
6444    SELECT f49 into x from tb1 limit 9998, 1;
6445END//
6446delimiter ;//
6447
6448--disable_warnings ONCE
6449DROP PROCEDURE IF EXISTS sp1;
6450
6451delimiter //;
6452--error ER_PARSE_ERROR
6453CREATE PROCEDURE sp1( )
6454BEGIN
6455    declare decimal (63, 30) zerofill not null  x;
6456    SELECT f50 into x from tb1 limit 9998, 1;
6457END//
6458delimiter ;//
6459
6460--disable_warnings ONCE
6461DROP PROCEDURE IF EXISTS sp1;
6462
6463delimiter //;
6464--error ER_PARSE_ERROR
6465CREATE PROCEDURE sp1( )
6466BEGIN
6467    declare decimal (00) unsigned zerofill not null  x;
6468    SELECT f51 into x from tb1 limit 9998, 1;
6469END//
6470delimiter ;//
6471
6472--disable_warnings ONCE
6473DROP PROCEDURE IF EXISTS sp1;
6474
6475delimiter //;
6476--error ER_PARSE_ERROR
6477CREATE PROCEDURE sp1( )
6478BEGIN
6479    declare decimal (63, 30) unsigned zerofill not null  x;
6480    SELECT f52 into x from tb1 limit 9998, 1;
6481END//
6482delimiter ;//
6483
6484--disable_warnings ONCE
6485DROP PROCEDURE IF EXISTS sp1;
6486
6487delimiter //;
6488--error ER_PARSE_ERROR
6489CREATE PROCEDURE sp1( )
6490BEGIN
6491    declare numeric not null  x;
6492    SELECT f53 into x from tb1 limit 9998, 1;
6493END//
6494delimiter ;//
6495
6496--disable_warnings ONCE
6497DROP PROCEDURE IF EXISTS sp1;
6498
6499delimiter //;
6500--error ER_PARSE_ERROR
6501CREATE PROCEDURE sp1( )
6502BEGIN
6503    declare numeric unsigned not null  x;
6504    SELECT f54 into x from tb1 limit 9998, 1;
6505END//
6506delimiter ;//
6507
6508--disable_warnings ONCE
6509DROP PROCEDURE IF EXISTS sp1;
6510
6511delimiter //;
6512--error ER_PARSE_ERROR
6513CREATE PROCEDURE sp1( )
6514BEGIN
6515    declare numeric zerofill not null  x;
6516    SELECT f55 into x from tb1 limit 9998, 1;
6517END//
6518delimiter ;//
6519
6520--disable_warnings ONCE
6521DROP PROCEDURE IF EXISTS sp1;
6522
6523delimiter //;
6524--error ER_PARSE_ERROR
6525CREATE PROCEDURE sp1( )
6526BEGIN
6527    declare numeric unsigned zerofill not null  x;
6528    SELECT f56 into x from tb1 limit 9998, 1;
6529END//
6530delimiter ;//
6531
6532--disable_warnings ONCE
6533DROP PROCEDURE IF EXISTS sp1;
6534
6535delimiter //;
6536--error ER_PARSE_ERROR
6537CREATE PROCEDURE sp1( )
6538BEGIN
6539    declare numeric (0) not null  x;
6540    SELECT f57 into x from tb1 limit 9998, 1;
6541END//
6542delimiter ;//
6543
6544--disable_warnings ONCE
6545DROP PROCEDURE IF EXISTS sp1;
6546
6547delimiter //;
6548--error ER_PARSE_ERROR
6549CREATE PROCEDURE sp1( )
6550BEGIN
6551    declare numeric (64) not nul x;
6552    SELECT f58 into x from tb1 limit 9998, 1;
6553END//
6554delimiter ;//
6555
6556--disable_warnings ONCE
6557DROP PROCEDURE IF EXISTS sp1;
6558
6559delimiter //;
6560--error ER_PARSE_ERROR
6561CREATE PROCEDURE sp1( )
6562BEGIN
6563    declare numeric (0) unsigned  x;
6564    SELECT f59 into x from tb2 limit 9998, 1;
6565END//
6566delimiter ;//
6567
6568--disable_warnings ONCE
6569DROP PROCEDURE IF EXISTS sp1;
6570
6571delimiter //;
6572--error ER_PARSE_ERROR
6573CREATE PROCEDURE sp1( )
6574BEGIN
6575    declare numeric (64) unsigned  x;
6576    SELECT f60 into x from tb2 limit 9998, 1;
6577END//
6578delimiter ;//
6579
6580--disable_warnings ONCE
6581DROP PROCEDURE IF EXISTS sp1;
6582
6583delimiter //;
6584--error ER_PARSE_ERROR
6585CREATE PROCEDURE sp1( )
6586BEGIN
6587    declare numeric (0) zerofill  x;
6588    SELECT f61 into x from tb2 limit 9998, 1;
6589END//
6590delimiter ;//
6591
6592--disable_warnings ONCE
6593DROP PROCEDURE IF EXISTS sp1;
6594
6595delimiter //;
6596--error ER_PARSE_ERROR
6597CREATE PROCEDURE sp1( )
6598BEGIN
6599    declare numeric (64) zerofill  x;
6600    SELECT f62 into x from tb2 limit 9998, 1;
6601END//
6602delimiter ;//
6603
6604--disable_warnings ONCE
6605DROP PROCEDURE IF EXISTS sp1;
6606
6607delimiter //;
6608--error ER_PARSE_ERROR
6609CREATE PROCEDURE sp1( )
6610BEGIN
6611    declare numeric (0) unsigned zerofill  x;
6612    SELECT f63 into x from tb2 limit 9998, 1;
6613END//
6614delimiter ;//
6615
6616--disable_warnings ONCE
6617DROP PROCEDURE IF EXISTS sp1;
6618
6619delimiter //;
6620--error ER_PARSE_ERROR
6621CREATE PROCEDURE sp1( )
6622BEGIN
6623    declare numeric (64) unsigned zerofill  x;
6624    SELECT f64 into x from tb2 limit 9998, 1;
6625END//
6626delimiter ;//
6627
6628--disable_warnings ONCE
6629DROP PROCEDURE IF EXISTS sp1;
6630
6631delimiter //;
6632--error ER_PARSE_ERROR
6633CREATE PROCEDURE sp1( )
6634BEGIN
6635    declare numeric (00)  x;
6636    SELECT f65 into x from tb2 limit 9998, 1;
6637END//
6638delimiter ;//
6639
6640--disable_warnings ONCE
6641DROP PROCEDURE IF EXISTS sp1;
6642
6643delimiter //;
6644--error ER_PARSE_ERROR
6645CREATE PROCEDURE sp1( )
6646BEGIN
6647    declare numeric (63, 30)  x;
6648    SELECT f66 into x from tb2 limit 9998, 1;
6649END//
6650delimiter ;//
6651
6652--disable_warnings ONCE
6653DROP PROCEDURE IF EXISTS sp1;
6654
6655
6656delimiter //;
6657--error ER_PARSE_ERROR
6658CREATE PROCEDURE sp1( )
6659BEGIN
6660    declare numeric (00) unsigned  x;
6661    SELECT f67 into x from tb2 limit 9998, 1;
6662END//
6663delimiter ;//
6664
6665--disable_warnings ONCE
6666DROP PROCEDURE IF EXISTS sp1;
6667
6668delimiter //;
6669--error ER_PARSE_ERROR
6670CREATE PROCEDURE sp1( )
6671BEGIN
6672    declare numeric (63, 30) unsigned  x;
6673    SELECT f68 into x from tb2 limit 9998, 1;
6674END//
6675delimiter ;//
6676
6677--disable_warnings ONCE
6678DROP PROCEDURE IF EXISTS sp1;
6679
6680delimiter //;
6681--error ER_PARSE_ERROR
6682CREATE PROCEDURE sp1( )
6683BEGIN
6684    declare numeric (00) zerofill  x;
6685    SELECT f69 into x from tb2 limit 9998, 1;
6686END//
6687delimiter ;//
6688
6689--disable_warnings ONCE
6690DROP PROCEDURE IF EXISTS sp1;
6691
6692delimiter //;
6693--error ER_PARSE_ERROR
6694CREATE PROCEDURE sp1( )
6695BEGIN
6696    declare numeric (63, 30) zerofill  x;
6697    SELECT f70 into x from tb2 limit 9998, 1;
6698END//
6699delimiter ;//
6700
6701--disable_warnings ONCE
6702DROP PROCEDURE IF EXISTS sp1;
6703
6704delimiter //;
6705--error ER_PARSE_ERROR
6706CREATE PROCEDURE sp1( )
6707BEGIN
6708    declare numeric (00) unsigned zerofill  x;
6709    SELECT f71 into x from tb2 limit 9998, 1;
6710END//
6711delimiter ;//
6712
6713--disable_warnings ONCE
6714DROP PROCEDURE IF EXISTS sp1;
6715
6716delimiter //;
6717--error ER_PARSE_ERROR
6718CREATE PROCEDURE sp1( )
6719BEGIN
6720    declare numeric (63, 30) unsigned zerofill  x;
6721    SELECT f72 into x from tb2 limit 9998, 1;
6722END//
6723delimiter ;//
6724
6725--disable_warnings ONCE
6726DROP PROCEDURE IF EXISTS sp1;
6727
6728delimiter //;
6729--error ER_PARSE_ERROR
6730CREATE PROCEDURE sp1( )
6731BEGIN
6732    declare real  x;
6733    SELECT f73 into x from tb2 limit 9998, 1;
6734END//
6735delimiter ;//
6736
6737--disable_warnings ONCE
6738DROP PROCEDURE IF EXISTS sp1;
6739
6740delimiter //;
6741--error ER_PARSE_ERROR
6742CREATE PROCEDURE sp1( )
6743BEGIN
6744    declare real unsigned  x;
6745    SELECT f74 into x from tb2 limit 9998, 1;
6746END//
6747delimiter ;//
6748
6749--disable_warnings ONCE
6750DROP PROCEDURE IF EXISTS sp1;
6751
6752delimiter //;
6753--error ER_PARSE_ERROR
6754CREATE PROCEDURE sp1( )
6755BEGIN
6756    declare real zerofill  x;
6757    SELECT f75 into x from tb2 limit 9998, 1;
6758END//
6759delimiter ;//
6760
6761--disable_warnings ONCE
6762DROP PROCEDURE IF EXISTS sp1;
6763
6764delimiter //;
6765--error ER_PARSE_ERROR
6766CREATE PROCEDURE sp1( )
6767BEGIN
6768    declare real unsigned zerofill  x;
6769    SELECT f76 into x from tb2 limit 9998, 1;
6770END//
6771delimiter ;//
6772
6773--disable_warnings ONCE
6774DROP PROCEDURE IF EXISTS sp1;
6775
6776delimiter //;
6777--error ER_PARSE_ERROR
6778CREATE PROCEDURE sp1( )
6779BEGIN
6780    declare double  x;
6781    SELECT f77 into x from tb2 limit 9998, 1;
6782END//
6783delimiter ;//
6784
6785--disable_warnings ONCE
6786DROP PROCEDURE IF EXISTS sp1;
6787
6788delimiter //;
6789--error ER_PARSE_ERROR
6790CREATE PROCEDURE sp1( )
6791BEGIN
6792    declare double unsigned  x;
6793    SELECT f78 into x from tb2 limit 9998, 1;
6794END//
6795delimiter ;//
6796
6797--disable_warnings ONCE
6798DROP PROCEDURE IF EXISTS sp1;
6799
6800delimiter //;
6801--error ER_PARSE_ERROR
6802CREATE PROCEDURE sp1( )
6803BEGIN
6804    declare double zerofill  x;
6805    SELECT f79 into x from tb2 limit 9998, 1;
6806END//
6807delimiter ;//
6808
6809--disable_warnings ONCE
6810DROP PROCEDURE IF EXISTS sp1;
6811
6812delimiter //;
6813--error ER_PARSE_ERROR
6814CREATE PROCEDURE sp1( )
6815BEGIN
6816    declare double unsigned zerofill  x;
6817    SELECT f80 into x from tb2 limit 9998, 1;
6818END//
6819delimiter ;//
6820
6821--disable_warnings ONCE
6822DROP PROCEDURE IF EXISTS sp1;
6823
6824delimiter //;
6825--error ER_PARSE_ERROR
6826CREATE PROCEDURE sp1( )
6827BEGIN
6828    declare float not null  x;
6829    SELECT f81 into x from tb2 limit 9998, 1;
6830END//
6831delimiter ;//
6832
6833--disable_warnings ONCE
6834DROP PROCEDURE IF EXISTS sp1;
6835
6836delimiter //;
6837--error ER_PARSE_ERROR
6838CREATE PROCEDURE sp1( )
6839BEGIN
6840    declare float unsigned not null  x;
6841    SELECT f82 into x from tb2 limit 9998, 1;
6842END//
6843delimiter ;//
6844
6845--disable_warnings ONCE
6846DROP PROCEDURE IF EXISTS sp1;
6847
6848delimiter //;
6849--error ER_PARSE_ERROR
6850CREATE PROCEDURE sp1( )
6851BEGIN
6852    declare float zerofill not null  x;
6853    SELECT f83 into x from tb2 limit 9998, 1;
6854END//
6855delimiter ;//
6856
6857--disable_warnings ONCE
6858DROP PROCEDURE IF EXISTS sp1;
6859
6860delimiter //;
6861--error ER_PARSE_ERROR
6862CREATE PROCEDURE sp1( )
6863BEGIN
6864    declare float unsigned zerofill not null  x;
6865    SELECT f84 into x from tb2 limit 9998, 1;
6866END//
6867delimiter ;//
6868
6869--disable_warnings ONCE
6870DROP PROCEDURE IF EXISTS sp1;
6871
6872delimiter //;
6873--error ER_PARSE_ERROR
6874CREATE PROCEDURE sp1( )
6875BEGIN
6876    declare float(0) not null  x;
6877    SELECT f85 into x from tb2 limit 9998, 1;
6878END//
6879delimiter ;//
6880
6881--disable_warnings ONCE
6882DROP PROCEDURE IF EXISTS sp1;
6883
6884delimiter //;
6885--error ER_PARSE_ERROR
6886CREATE PROCEDURE sp1( )
6887BEGIN
6888    declare float(23) not null  x;
6889    SELECT f86 into x from tb2 limit 9998, 1;
6890END//
6891delimiter ;//
6892
6893--disable_warnings ONCE
6894DROP PROCEDURE IF EXISTS sp1;
6895
6896delimiter //;
6897--error ER_PARSE_ERROR
6898CREATE PROCEDURE sp1( )
6899BEGIN
6900    declare float(0) unsigned not null  x;
6901    SELECT f87 into x from tb2 limit 9998, 1;
6902END//
6903delimiter ;//
6904
6905--disable_warnings ONCE
6906DROP PROCEDURE IF EXISTS sp1;
6907
6908delimiter //;
6909--error ER_PARSE_ERROR
6910CREATE PROCEDURE sp1( )
6911BEGIN
6912    declare float(23) unsigned not null  x;
6913    SELECT f88 into x from tb2 limit 9998, 1;
6914END//
6915delimiter ;//
6916
6917--disable_warnings ONCE
6918DROP PROCEDURE IF EXISTS sp1;
6919
6920delimiter //;
6921--error ER_PARSE_ERROR
6922CREATE PROCEDURE sp1( )
6923BEGIN
6924    declare float(0) zerofill not null  x;
6925    SELECT f89 into x from tb2 limit 9998, 1;
6926END//
6927delimiter ;//
6928
6929--disable_warnings ONCE
6930DROP PROCEDURE IF EXISTS sp1;
6931
6932delimiter //;
6933--error ER_PARSE_ERROR
6934CREATE PROCEDURE sp1( )
6935BEGIN
6936    declare float(23) zerofill not null  x;
6937    SELECT f90 into x from tb2 limit 9998, 1;
6938END//
6939delimiter ;//
6940
6941--disable_warnings ONCE
6942DROP PROCEDURE IF EXISTS sp1;
6943
6944delimiter //;
6945--error ER_PARSE_ERROR
6946CREATE PROCEDURE sp1( )
6947BEGIN
6948    declare float(0) unsigned zerofill not null  x;
6949    SELECT f91 into x from tb2 limit 9998, 1;
6950END//
6951delimiter ;//
6952
6953--disable_warnings ONCE
6954DROP PROCEDURE IF EXISTS sp1;
6955
6956delimiter //;
6957--error ER_PARSE_ERROR
6958CREATE PROCEDURE sp1( )
6959BEGIN
6960    declare float(23) unsigned zerofill not null  x;
6961    SELECT f92 into x from tb2 limit 9998, 1;
6962END//
6963delimiter ;//
6964
6965--disable_warnings ONCE
6966DROP PROCEDURE IF EXISTS sp1;
6967
6968delimiter //;
6969--error ER_PARSE_ERROR
6970CREATE PROCEDURE sp1( )
6971BEGIN
6972    declare float(24) not null  x;
6973    SELECT f93 into x from tb2 limit 9998, 1;
6974END//
6975delimiter ;//
6976
6977--disable_warnings ONCE
6978DROP PROCEDURE IF EXISTS sp1;
6979
6980delimiter //;
6981--error ER_PARSE_ERROR
6982CREATE PROCEDURE sp1( )
6983BEGIN
6984    declare float(53) not null  x;
6985    SELECT f94 into x from tb2 limit 9998, 1;
6986END//
6987delimiter ;//
6988
6989--disable_warnings ONCE
6990DROP PROCEDURE IF EXISTS sp1;
6991
6992delimiter //;
6993--error ER_PARSE_ERROR
6994CREATE PROCEDURE sp1( )
6995BEGIN
6996    declare float(24) unsigned not null  x;
6997    SELECT f95 into x from tb2 limit 9998, 1;
6998END//
6999delimiter ;//
7000
7001--disable_warnings ONCE
7002DROP PROCEDURE IF EXISTS sp1;
7003
7004delimiter //;
7005--error ER_PARSE_ERROR
7006CREATE PROCEDURE sp1( )
7007BEGIN
7008    declare float(53) unsigned not null  x;
7009    SELECT f96 into x from tb2 limit 9998, 1;
7010END//
7011delimiter ;//
7012
7013--disable_warnings ONCE
7014DROP PROCEDURE IF EXISTS sp1;
7015
7016delimiter //;
7017--error ER_PARSE_ERROR
7018CREATE PROCEDURE sp1( )
7019BEGIN
7020    declare float(24) zerofill not null  x;
7021    SELECT f97 into x from tb2 limit 9998, 1;
7022END//
7023delimiter ;//
7024
7025--disable_warnings ONCE
7026DROP PROCEDURE IF EXISTS sp1;
7027
7028delimiter //;
7029--error ER_PARSE_ERROR
7030CREATE PROCEDURE sp1( )
7031BEGIN
7032    declare float(53) zerofill not null  x;
7033    SELECT f98 into x from tb2 limit 9998, 1;
7034END//
7035delimiter ;//
7036
7037--disable_warnings ONCE
7038DROP PROCEDURE IF EXISTS sp1;
7039
7040delimiter //;
7041--error ER_PARSE_ERROR
7042CREATE PROCEDURE sp1( )
7043BEGIN
7044    declare float(24) unsigned zerofill not null  x;
7045    SELECT f99 into x from tb2 limit 9998, 1;
7046END//
7047delimiter ;//
7048
7049--disable_warnings ONCE
7050DROP PROCEDURE IF EXISTS sp1;
7051
7052delimiter //;
7053--error ER_PARSE_ERROR
7054CREATE PROCEDURE sp1( )
7055BEGIN
7056    declare float(53) unsigned zerofill not null  x;
7057    SELECT f100 into x from tb2 limit 9998, 1;
7058END//
7059delimiter ;//
7060
7061--disable_warnings ONCE
7062DROP PROCEDURE IF EXISTS sp1;
7063
7064delimiter //;
7065--error ER_PARSE_ERROR
7066CREATE PROCEDURE sp1( )
7067BEGIN
7068    declare date not null  x;
7069    SELECT f101 into x from tb2 limit 9998, 1;
7070END//
7071delimiter ;//
7072
7073--disable_warnings ONCE
7074DROP PROCEDURE IF EXISTS sp1;
7075
7076delimiter //;
7077--error ER_PARSE_ERROR
7078CREATE PROCEDURE sp1( )
7079BEGIN
7080    declare time not null  x;
7081    SELECT f102 into x from tb2 limit 9998, 1;
7082END//
7083delimiter ;//
7084
7085--disable_warnings ONCE
7086DROP PROCEDURE IF EXISTS sp1;
7087
7088delimiter //;
7089--error ER_PARSE_ERROR
7090CREATE PROCEDURE sp1( )
7091BEGIN
7092    declare datetime not null  x;
7093    SELECT f103 into x from tb2 limit 9998, 1;
7094END//
7095delimiter ;//
7096
7097--disable_warnings ONCE
7098DROP PROCEDURE IF EXISTS sp1;
7099
7100delimiter //;
7101--error ER_PARSE_ERROR
7102CREATE PROCEDURE sp1( )
7103BEGIN
7104    declare timestamp not null  x;
7105    SELECT f104 into x from tb2 limit 9998, 1;
7106END//
7107delimiter ;//
7108
7109--disable_warnings ONCE
7110DROP PROCEDURE IF EXISTS sp1;
7111
7112delimiter //;
7113--error ER_PARSE_ERROR
7114CREATE PROCEDURE sp1( )
7115BEGIN
7116    declare year not null  x;
7117    SELECT f105 into x from tb2 limit 9998, 1;
7118END//
7119delimiter ;//
7120
7121--disable_warnings ONCE
7122DROP PROCEDURE IF EXISTS sp1;
7123
7124delimiter //;
7125--error ER_PARSE_ERROR
7126CREATE PROCEDURE sp1( )
7127BEGIN
7128    declare year(3) not null  x;
7129    SELECT f106 into x from tb2 limit 9998, 1;
7130END//
7131delimiter ;//
7132
7133--disable_warnings ONCE
7134DROP PROCEDURE IF EXISTS sp1;
7135
7136delimiter //;
7137--error ER_PARSE_ERROR
7138CREATE PROCEDURE sp1( )
7139BEGIN
7140    declare year(4) not null  x;
7141    SELECT f107 into x from tb2 limit 9998, 1;
7142END//
7143delimiter ;//
7144
7145--disable_warnings ONCE
7146DROP PROCEDURE IF EXISTS sp1;
7147
7148delimiter //;
7149--error ER_PARSE_ERROR
7150CREATE PROCEDURE sp1( )
7151BEGIN
7152    declare enum("1enum", "2enum") not null  x;
7153    SELECT f108 into x from tb2 limit 9998, 1;
7154END//
7155delimiter ;//
7156
7157--disable_warnings ONCE
7158DROP PROCEDURE IF EXISTS sp1;
7159
7160delimiter //;
7161--error ER_PARSE_ERROR
7162CREATE PROCEDURE sp1( )
7163BEGIN
7164    declare set("1set", "2set") not nul x;
7165    SELECT f109 into x from tb2 limit 9998, 1;
7166END//
7167delimiter ;//
7168
7169# ------------------------------------------------------------------------------
7170let $message= Testcase 4.2.14:
7171              ----------------
7172Ensure that the handlers declared for a stored procedure (with the declare
7173statement) may only be defined in the correct order;
7174--source include/show_msg80.inc
7175
7176
7177--disable_warnings ONCE
7178DROP PROCEDURE IF EXISTS sp1;
7179
7180delimiter //;
7181--error ER_SP_VARCOND_AFTER_CURSHNDLR
7182CREATE PROCEDURE sp1()
7183BEGIN
7184   declare continue handler for sqlstate '23000' set @x2 = 1;
7185   declare x char;
7186END//
7187delimiter ;//
7188
7189--disable_warnings ONCE
7190DROP PROCEDURE IF EXISTS sp6;
7191
7192delimiter //;
7193--error ER_SP_VARCOND_AFTER_CURSHNDLR
7194CREATE PROCEDURE sp6( )
7195BEGIN
7196    declare cursor1 cursor for SELECT f1 from tb1;
7197    declare x char;
7198END//
7199delimiter ;//
7200
7201--disable_warnings ONCE
7202DROP PROCEDURE IF EXISTS sp6;
7203
7204delimiter //;
7205--error ER_SP_VARCOND_AFTER_CURSHNDLR
7206CREATE PROCEDURE sp6( )
7207BEGIN
7208    declare cursor1 cursor for SELECT f1 from tb1;
7209    declare sqlcondition condition for sqlstate '02000';
7210END//
7211delimiter ;//
7212
7213--disable_warnings ONCE
7214DROP PROCEDURE IF EXISTS sp6;
7215
7216delimiter //;
7217--error ER_SP_CURSOR_AFTER_HANDLER
7218CREATE PROCEDURE sp6( )
7219BEGIN
7220    declare sqlcondition condition for sqlstate '02000';
7221    declare continue handler for sqlcondition set @x=1;
7222    declare cursor1 cursor for SELECT f1 from tb1;
7223END//
7224delimiter ;//
7225
7226# ------------------------------------------------------------------------------
7227let $message= Testcase 4.2.15:
7228              ----------------
7229Ensure that the declare statement can declare multiple variables both separately
7230and all at once from a variable list. (multiple declaration);
7231--source include/show_msg80.inc
7232
7233--disable_warnings ONCE
7234DROP PROCEDURE IF EXISTS sp1;
7235
7236delimiter //;
7237CREATE PROCEDURE sp1()
7238   BEGIN
7239      DECLARE x1 CHAR(100) DEFAULT 'outer';
7240      BEGIN
7241         DECLARE x1 CHAR(100) DEFAULT x1;
7242      END;
7243   END//
7244delimiter ;//
7245
7246CALL sp1();
7247
7248--disable_warnings ONCE
7249DROP PROCEDURE IF EXISTS sp1;
7250
7251
7252delimiter //;
7253CREATE PROCEDURE sp1( )
7254BEGIN
7255    declare x, y, z char default null;
7256    SELECT x, y, z;
7257END//
7258delimiter ;//
7259
7260CALL sp1();
7261
7262--disable_warnings ONCE
7263DROP PROCEDURE IF EXISTS sp1;
7264
7265delimiter //;
7266CREATE PROCEDURE sp1( )
7267BEGIN
7268    declare x, y, z char ascii default null;
7269    SELECT x, y, z;
7270END//
7271delimiter ;//
7272
7273CALL sp1();
7274
7275--disable_warnings ONCE
7276DROP PROCEDURE IF EXISTS sp1;
7277
7278delimiter //;
7279CREATE PROCEDURE sp1( )
7280BEGIN
7281    declare x, y, z tinytext default null;
7282    SELECT x, y, z;
7283END//
7284delimiter ;//
7285
7286CALL sp1();
7287
7288--disable_warnings ONCE
7289DROP PROCEDURE IF EXISTS sp1;
7290
7291delimiter //;
7292CREATE PROCEDURE sp1( )
7293BEGIN
7294    declare x, y, z text default null;
7295    SELECT x, y, z;
7296END//
7297delimiter ;//
7298
7299CALL sp1();
7300
7301--disable_warnings ONCE
7302DROP PROCEDURE IF EXISTS sp1;
7303
7304delimiter //;
7305CREATE PROCEDURE sp1( )
7306BEGIN
7307    declare x, y, z mediumtext default null;
7308    SELECT x, y, z;
7309END//
7310delimiter ;//
7311
7312CALL sp1();
7313
7314--disable_warnings ONCE
7315DROP PROCEDURE IF EXISTS sp1;
7316
7317delimiter //;
7318CREATE PROCEDURE sp1( )
7319BEGIN
7320    declare x, y, z longtext default null;
7321    SELECT x, y, z;
7322END//
7323delimiter ;//
7324
7325CALL sp1();
7326
7327--disable_warnings ONCE
7328DROP PROCEDURE IF EXISTS sp1;
7329
7330delimiter //;
7331CREATE PROCEDURE sp1( )
7332BEGIN
7333    declare x, y, z tinyblob default null;
7334    SELECT x, y, z;
7335END//
7336delimiter ;//
7337
7338CALL sp1();
7339
7340--disable_warnings ONCE
7341DROP PROCEDURE IF EXISTS sp1;
7342
7343delimiter //;
7344CREATE PROCEDURE sp1( )
7345BEGIN
7346    declare x, y, z blob default null;
7347    SELECT x, y, z;
7348END//
7349delimiter ;//
7350
7351CALL sp1();
7352
7353--disable_warnings ONCE
7354DROP PROCEDURE IF EXISTS sp1;
7355
7356delimiter //;
7357CREATE PROCEDURE sp1( )
7358BEGIN
7359    declare x, y, z mediumblob default null;
7360    SELECT x, y, z;
7361END//
7362delimiter ;//
7363
7364CALL sp1();
7365
7366--disable_warnings ONCE
7367DROP PROCEDURE IF EXISTS sp1;
7368
7369delimiter //;
7370CREATE PROCEDURE sp1( )
7371BEGIN
7372    declare x, y, z longblob default null;
7373    SELECT x, y, z;
7374END//
7375delimiter ;//
7376
7377CALL sp1();
7378
7379--disable_warnings ONCE
7380DROP PROCEDURE IF EXISTS sp1;
7381
7382delimiter //;
7383CREATE PROCEDURE sp1( )
7384BEGIN
7385    declare x, y, z binary default null;
7386    SELECT x, y, z;
7387END//
7388delimiter ;//
7389
7390CALL sp1();
7391
7392--disable_warnings ONCE
7393DROP PROCEDURE IF EXISTS sp1;
7394
7395delimiter //;
7396CREATE PROCEDURE sp1( )
7397BEGIN
7398    declare x, y, z tinyint default -126;
7399    SELECT x, y, z;
7400END//
7401delimiter ;//
7402
7403CALL sp1();
7404
7405--disable_warnings ONCE
7406DROP PROCEDURE IF EXISTS sp1;
7407
7408delimiter //;
7409CREATE PROCEDURE sp1( )
7410BEGIN
7411    declare x, y, z tinyint unsigned default 253;
7412    SELECT x, y, z;
7413END//
7414delimiter ;//
7415
7416CALL sp1();
7417
7418--disable_warnings ONCE
7419DROP PROCEDURE IF EXISTS sp1;
7420
7421delimiter //;
7422CREATE PROCEDURE sp1( )
7423BEGIN
7424    declare x, y, z tinyint zerofill default -1;
7425    SELECT x, y, z;
7426END//
7427delimiter ;//
7428
7429CALL sp1();
7430
7431--disable_warnings ONCE
7432DROP PROCEDURE IF EXISTS sp1;
7433
7434delimiter //;
7435CREATE PROCEDURE sp1( )
7436BEGIN
7437    declare x, y, z tinyint unsigned zerofill default 1;
7438    SELECT x, y, z;
7439END//
7440delimiter ;//
7441
7442CALL sp1();
7443
7444--disable_warnings ONCE
7445DROP PROCEDURE IF EXISTS sp1;
7446
7447delimiter //;
7448CREATE PROCEDURE sp1( )
7449BEGIN
7450    declare x, y, z smallint default -32768;
7451    SELECT x, y, z;
7452END//
7453delimiter ;//
7454
7455CALL sp1();
7456
7457--disable_warnings ONCE
7458DROP PROCEDURE IF EXISTS sp1;
7459
7460delimiter //;
7461CREATE PROCEDURE sp1( )
7462BEGIN
7463    declare x, y, z smallint unsigned default 65535;
7464    SELECT x, y, z;
7465END//
7466delimiter ;//
7467
7468CALL sp1();
7469
7470--disable_warnings ONCE
7471DROP PROCEDURE IF EXISTS sp1;
7472
7473delimiter //;
7474CREATE PROCEDURE sp1( )
7475BEGIN
7476    declare x, y, z smallint zerofill default -1;
7477    SELECT x, y, z;
7478END//
7479delimiter ;//
7480
7481CALL sp1();
7482
7483--disable_warnings ONCE
7484DROP PROCEDURE IF EXISTS sp1;
7485
7486delimiter //;
7487CREATE PROCEDURE sp1( )
7488BEGIN
7489    declare x, y, z smallint unsigned zerofill default 1;
7490    SELECT x, y, z;
7491END//
7492delimiter ;//
7493
7494CALL sp1();
7495
7496--disable_warnings ONCE
7497DROP PROCEDURE IF EXISTS sp1;
7498
7499delimiter //;
7500CREATE PROCEDURE sp1( )
7501BEGIN
7502    declare x, y, z mediumint default -8388608;
7503    SELECT x, y, z;
7504END//
7505delimiter ;//
7506
7507CALL sp1();
7508
7509--disable_warnings ONCE
7510DROP PROCEDURE IF EXISTS sp1;
7511
7512delimiter //;
7513CREATE PROCEDURE sp1( )
7514BEGIN
7515    declare x, y, z mediumint unsigned default 16777215;
7516    SELECT x, y, z;
7517END//
7518delimiter ;//
7519
7520CALL sp1();
7521
7522--disable_warnings ONCE
7523DROP PROCEDURE IF EXISTS sp1;
7524
7525delimiter //;
7526CREATE PROCEDURE sp1( )
7527BEGIN
7528    declare x, y, z mediumint zerofill default -1;
7529    SELECT x, y, z;
7530END//
7531delimiter ;//
7532
7533CALL sp1();
7534
7535--disable_warnings ONCE
7536DROP PROCEDURE IF EXISTS sp1;
7537
7538delimiter //;
7539CREATE PROCEDURE sp1( )
7540BEGIN
7541    declare x, y, z mediumint unsigned zerofill default 1;
7542    SELECT x, y, z;
7543END//
7544delimiter ;//
7545
7546CALL sp1();
7547
7548--disable_warnings ONCE
7549DROP PROCEDURE IF EXISTS sp1;
7550
7551delimiter //;
7552CREATE PROCEDURE sp1( )
7553BEGIN
7554    declare x, y, z int default -2147483648;
7555    SELECT x, y, z;
7556END//
7557delimiter ;//
7558
7559CALL sp1();
7560
7561--disable_warnings ONCE
7562DROP PROCEDURE IF EXISTS sp1;
7563
7564delimiter //;
7565CREATE PROCEDURE sp1( )
7566BEGIN
7567    declare x, y, z int unsigned default 4294967295;
7568    SELECT x, y, z;
7569END//
7570delimiter ;//
7571
7572CALL sp1();
7573
7574--disable_warnings ONCE
7575DROP PROCEDURE IF EXISTS sp1;
7576
7577delimiter //;
7578CREATE PROCEDURE sp1( )
7579BEGIN
7580    declare x, y, z int zerofill default -1;
7581    SELECT x, y, z;
7582END//
7583delimiter ;//
7584
7585CALL sp1();
7586
7587--disable_warnings ONCE
7588DROP PROCEDURE IF EXISTS sp1;
7589
7590delimiter //;
7591CREATE PROCEDURE sp1( )
7592BEGIN
7593    declare x, y, z int unsigned zerofill default 1;
7594    SELECT x, y, z;
7595END//
7596delimiter ;//
7597
7598CALL sp1();
7599
7600--disable_warnings ONCE
7601DROP PROCEDURE IF EXISTS sp1;
7602
7603delimiter //;
7604CREATE PROCEDURE sp1( )
7605BEGIN
7606    declare x, y, z bigint default -9223372036854775808;
7607    SELECT x, y, z;
7608END//
7609delimiter ;//
7610
7611CALL sp1();
7612
7613--disable_warnings ONCE
7614DROP PROCEDURE IF EXISTS sp1;
7615
7616delimiter //;
7617CREATE PROCEDURE sp1( )
7618BEGIN
7619    declare x, y, z bigint unsigned default 18446744073709551615;
7620    SELECT x, y, z;
7621END//
7622delimiter ;//
7623
7624CALL sp1();
7625
7626--disable_warnings ONCE
7627DROP PROCEDURE IF EXISTS sp1;
7628
7629delimiter //;
7630CREATE PROCEDURE sp1( )
7631BEGIN
7632    declare x, y, z bigint zerofill default -1;
7633    SELECT x, y, z;
7634END//
7635delimiter ;//
7636
7637CALL sp1();
7638
7639--disable_warnings ONCE
7640DROP PROCEDURE IF EXISTS sp1;
7641
7642delimiter //;
7643CREATE PROCEDURE sp1( )
7644BEGIN
7645    declare x, y, z bigint unsigned zerofill default 1;
7646    SELECT x, y, z;
7647END//
7648delimiter ;//
7649
7650CALL sp1();
7651
7652--disable_warnings ONCE
7653DROP PROCEDURE IF EXISTS sp1;
7654
7655#FIXME check again with -3.402823466e+38
7656let $default_minus38= -34028234660123456789012345678901234567;
7657
7658delimiter //;
7659eval CREATE PROCEDURE sp1( )
7660BEGIN
7661    declare x, y, z decimal default $default_minus38;
7662    SELECT x, y, z;
7663END//
7664delimiter ;//
7665
7666CALL sp1();
7667
7668--disable_warnings ONCE
7669DROP PROCEDURE IF EXISTS sp1;
7670
7671delimiter //;
7672CREATE PROCEDURE sp1( )
7673BEGIN
7674    declare x, y, z decimal unsigned default 1.175494351e-38;
7675    SELECT x, y, z;
7676END//
7677delimiter ;//
7678
7679CALL sp1();
7680
7681--disable_warnings ONCE
7682DROP PROCEDURE IF EXISTS sp1;
7683
7684#FIXME check again with -3.402823466e+38
7685delimiter //;
7686eval CREATE PROCEDURE sp1( )
7687BEGIN
7688    declare x, y, z decimal zerofill default $default_minus38;
7689    SELECT x, y, z;
7690END//
7691delimiter ;//
7692
7693CALL sp1();
7694
7695--disable_warnings ONCE
7696DROP PROCEDURE IF EXISTS sp1;
7697
7698delimiter //;
7699CREATE PROCEDURE sp1( )
7700BEGIN
7701    declare x, y, z decimal unsigned zerofill default 1.175494351e-38;
7702    SELECT x, y, z;
7703END//
7704delimiter ;//
7705
7706CALL sp1();
7707
7708--disable_warnings ONCE
7709DROP PROCEDURE IF EXISTS sp1;
7710
7711delimiter //;
7712CREATE PROCEDURE sp1( )
7713BEGIN
7714    declare x, y, z numeric default 1.175494351e-38;
7715    SELECT x, y, z;
7716END//
7717delimiter ;//
7718
7719CALL sp1();
7720
7721--disable_warnings ONCE
7722DROP PROCEDURE IF EXISTS sp1;
7723
7724delimiter //;
7725CREATE PROCEDURE sp1( )
7726BEGIN
7727    declare x, y, z numeric unsigned default 1.175494351e-38;
7728    SELECT x, y, z;
7729END//
7730delimiter ;//
7731
7732CALL sp1();
7733
7734--disable_warnings ONCE
7735DROP PROCEDURE IF EXISTS sp1;
7736
7737delimiter //;
7738CREATE PROCEDURE sp1( )
7739BEGIN
7740    declare x, y, z numeric zerofill default 1.175494351e-38;
7741    SELECT x, y, z;
7742END//
7743delimiter ;//
7744
7745CALL sp1();
7746
7747--disable_warnings ONCE
7748DROP PROCEDURE IF EXISTS sp1;
7749
7750delimiter //;
7751CREATE PROCEDURE sp1( )
7752BEGIN
7753    declare x, y, z numeric unsigned zerofill default 1.175494351e-38;
7754    SELECT x, y, z;
7755END//
7756delimiter ;//
7757
7758CALL sp1();
7759
7760--disable_warnings ONCE
7761DROP PROCEDURE IF EXISTS sp1;
7762
7763delimiter //;
7764CREATE PROCEDURE sp1( )
7765BEGIN
7766    declare x, y, z real default 1.175494351e-38;
7767    SELECT x, y, z;
7768END//
7769delimiter ;//
7770
7771--replace_result e-038 e-38
7772CALL sp1();
7773
7774--disable_warnings ONCE
7775DROP PROCEDURE IF EXISTS sp1;
7776
7777delimiter //;
7778CREATE PROCEDURE sp1( )
7779BEGIN
7780    declare x, y, z real unsigned default 1.175494351e-38;
7781    SELECT x, y, z;
7782END//
7783delimiter ;//
7784
7785--replace_result e-038 e-38
7786CALL sp1();
7787
7788--disable_warnings ONCE
7789DROP PROCEDURE IF EXISTS sp1;
7790
7791delimiter //;
7792CREATE PROCEDURE sp1( )
7793BEGIN
7794    declare x, y, z real zerofill default 1.175494351e-38;
7795    SELECT x, y, z;
7796END//
7797delimiter ;//
7798
7799--replace_result e-038 e-38
7800CALL sp1();
7801
7802--disable_warnings ONCE
7803DROP PROCEDURE IF EXISTS sp1;
7804
7805delimiter //;
7806CREATE PROCEDURE sp1( )
7807BEGIN
7808    declare x, y, z real unsigned zerofill default 1.175494351e-38;
7809    SELECT x, y, z;
7810END//
7811delimiter ;//
7812
7813--replace_result e-038 e-38
7814CALL sp1();
7815
7816--disable_warnings ONCE
7817DROP PROCEDURE IF EXISTS sp1;
7818
7819delimiter //;
7820CREATE PROCEDURE sp1( )
7821BEGIN
7822    declare x, y, z float default 1.175494351e-38;
7823    SELECT x, y, z;
7824END//
7825delimiter ;//
7826
7827--replace_result e-038 e-38
7828CALL sp1();
7829
7830--disable_warnings ONCE
7831DROP PROCEDURE IF EXISTS sp1;
7832
7833delimiter //;
7834CREATE PROCEDURE sp1( )
7835BEGIN
7836    declare x, y, z float unsigned default 1.175494351e-38;
7837    SELECT x, y, z;
7838END//
7839delimiter ;//
7840
7841--replace_result e-038 e-38
7842CALL sp1();
7843
7844--disable_warnings ONCE
7845DROP PROCEDURE IF EXISTS sp1;
7846
7847delimiter //;
7848CREATE PROCEDURE sp1( )
7849BEGIN
7850    declare x, y, z float zerofill default 1.175494351e-38;
7851    SELECT x, y, z;
7852END//
7853delimiter ;//
7854
7855--replace_result e-038 e-38
7856CALL sp1();
7857
7858--disable_warnings ONCE
7859DROP PROCEDURE IF EXISTS sp1;
7860
7861delimiter //;
7862CREATE PROCEDURE sp1( )
7863BEGIN
7864    declare x, y, z float unsigned zerofill default 1.175494351e-38;
7865    SELECT x, y, z;
7866END//
7867delimiter ;//
7868
7869--replace_result e-038 e-38
7870CALL sp1();
7871
7872--disable_warnings ONCE
7873DROP PROCEDURE IF EXISTS sp1;
7874
7875delimiter //;
7876CREATE PROCEDURE sp1( )
7877BEGIN
7878    declare x, y, z date default '2005-02-02';
7879    SELECT x, y, z;
7880END//
7881delimiter ;//
7882
7883CALL sp1();
7884
7885--disable_warnings ONCE
7886DROP PROCEDURE IF EXISTS sp1;
7887
7888delimiter //;
7889CREATE PROCEDURE sp1( )
7890BEGIN
7891    declare x, y, z time default '12:20:12';
7892    SELECT x, y, z;
7893END//
7894delimiter ;//
7895
7896CALL sp1();
7897
7898--disable_warnings ONCE
7899DROP PROCEDURE IF EXISTS sp1;
7900
7901delimiter //;
7902CREATE PROCEDURE sp1( )
7903BEGIN
7904    declare x, y, z datetime default '2005-02-02 12:20:12';
7905    SELECT x, y, z;
7906END//
7907delimiter ;//
7908
7909CALL sp1();
7910
7911--disable_warnings ONCE
7912DROP PROCEDURE IF EXISTS sp1;
7913
7914delimiter //;
7915CREATE PROCEDURE sp1( )
7916BEGIN
7917    declare x, y, z timestamp default '20050202122012';
7918    SELECT x, y, z;
7919END//
7920delimiter ;//
7921
7922CALL sp1();
7923
7924--disable_warnings ONCE
7925DROP PROCEDURE IF EXISTS sp1;
7926
7927delimiter //;
7928CREATE PROCEDURE sp1( )
7929BEGIN
7930    declare x, y, z year default 2005;
7931    SELECT x, y, z;
7932END//
7933delimiter ;//
7934
7935CALL sp1();
7936
7937--disable_warnings ONCE
7938DROP PROCEDURE IF EXISTS sp1;
7939
7940delimiter //;
7941CREATE PROCEDURE sp1( )
7942BEGIN
7943    declare x, y, z year(3) default 2005;
7944    SELECT x, y, z;
7945END//
7946delimiter ;//
7947
7948CALL sp1();
7949
7950--disable_warnings ONCE
7951DROP PROCEDURE IF EXISTS sp1;
7952
7953delimiter //;
7954CREATE PROCEDURE sp1( )
7955BEGIN
7956    declare x, y, z year(4) default 2005;
7957    SELECT x, y, z;
7958END//
7959delimiter ;//
7960
7961CALL sp1();
7962
7963--disable_warnings ONCE
7964DROP PROCEDURE IF EXISTS sp1;
7965
7966delimiter //;
7967CREATE PROCEDURE sp1( )
7968BEGIN
7969    declare x, y, z enum("1enum", "2enum") default "2enum";
7970    SELECT x, y, z;
7971END//
7972delimiter ;//
7973
7974CALL sp1();
7975
7976--disable_warnings ONCE
7977DROP PROCEDURE IF EXISTS sp1;
7978
7979delimiter //;
7980CREATE PROCEDURE sp1( )
7981BEGIN
7982    declare x, y, z set("1set", "2set") default "2set";
7983    SELECT x, y, z;
7984END//
7985delimiter ;//
7986
7987CALL sp1();
7988
7989# clean up
7990DROP PROCEDURE sp1;
7991
7992# ------------------------------------------------------------------------------
7993let $message= Testcase 4.2.16:
7994              ----------------
7995Ensure that the declare statement can declare multiple variables both separately
7996and all at once from a variable list. (multiple declaration).;
7997--source include/show_msg80.inc
7998
7999--disable_warnings ONCE
8000DROP PROCEDURE IF EXISTS sp6;
8001
8002delimiter //;
8003CREATE PROCEDURE sp6( )
8004BEGIN
8005   declare a, b char default '2';
8006   declare c, d float default 1.3;
8007   declare e, f text default 'text';
8008   declare g, h enum("value1", "value2" ) default 'value1';
8009   declare i, j datetime default '2005-02-02 12:12:12';
8010   declare k, l blob default 'blob';
8011   SELECT a, b, c, d, e, f, g, h, k, l;
8012END//
8013delimiter ;//
8014
8015CALL sp6();
8016
8017# clean up
8018DROP PROCEDURE sp6;
8019
8020# ------------------------------------------------------------------------------
8021let $message= Testcase 4.2.17:
8022              ----------------
8023Ensure that the invalid variable declarations are rejected, with an appropriate
8024error message.;
8025--source include/show_msg80.inc
8026
8027--disable_warnings ONCE
8028DROP PROCEDURE IF EXISTS sp1;
8029
8030delimiter //;
8031--error ER_PARSE_ERROR
8032CREATE PROCEDURE sp1( )
8033BEGIN
8034   declare @x char;
8035   SELECT f2 into x from t2 limit 1;
8036END//
8037delimiter ;//
8038
8039--disable_warnings ONCE
8040DROP PROCEDURE IF EXISTS sp1;
8041
8042delimiter //;
8043--error ER_PARSE_ERROR
8044CREATE PROCEDURE sp1()
8045BEGIN
8046    declare accessible char;
8047END//
8048delimiter ;//
8049
8050--disable_warnings ONCE
8051DROP PROCEDURE IF EXISTS sp1;
8052
8053delimiter //;
8054--error ER_PARSE_ERROR
8055CREATE PROCEDURE sp1()
8056BEGIN
8057    declare add char;
8058END//
8059delimiter ;//
8060
8061--disable_warnings ONCE
8062DROP PROCEDURE IF EXISTS sp1;
8063
8064delimiter //;
8065--error ER_PARSE_ERROR
8066CREATE PROCEDURE sp1()
8067BEGIN
8068    declare all char;
8069END//
8070delimiter ;//
8071
8072--disable_warnings ONCE
8073DROP PROCEDURE IF EXISTS sp1;
8074
8075delimiter //;
8076--error ER_PARSE_ERROR
8077CREATE PROCEDURE sp1()
8078BEGIN
8079    declare alter char;
8080END//
8081delimiter ;//
8082
8083--disable_warnings ONCE
8084DROP PROCEDURE IF EXISTS sp1;
8085
8086delimiter //;
8087--error ER_PARSE_ERROR
8088CREATE PROCEDURE sp1()
8089BEGIN
8090    declare analyze char;
8091END//
8092delimiter ;//
8093
8094--disable_warnings ONCE
8095DROP PROCEDURE IF EXISTS sp1;
8096
8097delimiter //;
8098--error ER_PARSE_ERROR
8099CREATE PROCEDURE sp1()
8100BEGIN
8101    declare and char;
8102END//
8103delimiter ;//
8104
8105--disable_warnings ONCE
8106DROP PROCEDURE IF EXISTS sp1;
8107
8108delimiter //;
8109--error ER_PARSE_ERROR
8110CREATE PROCEDURE sp1()
8111BEGIN
8112    declare as char;
8113END//
8114delimiter ;//
8115
8116--disable_warnings ONCE
8117DROP PROCEDURE IF EXISTS sp1;
8118
8119delimiter //;
8120--error ER_PARSE_ERROR
8121CREATE PROCEDURE sp1()
8122BEGIN
8123    declare asc char;
8124END//
8125delimiter ;//
8126
8127--disable_warnings ONCE
8128DROP PROCEDURE IF EXISTS sp1;
8129
8130delimiter //;
8131--error ER_PARSE_ERROR
8132CREATE PROCEDURE sp1()
8133BEGIN
8134    declare asensitive char;
8135END//
8136delimiter ;//
8137
8138--disable_warnings ONCE
8139DROP PROCEDURE IF EXISTS sp1;
8140
8141delimiter //;
8142--error ER_PARSE_ERROR
8143CREATE PROCEDURE sp1()
8144BEGIN
8145    declare before char;
8146END//
8147delimiter ;//
8148
8149--disable_warnings ONCE
8150DROP PROCEDURE IF EXISTS sp1;
8151
8152delimiter //;
8153--error ER_PARSE_ERROR
8154CREATE PROCEDURE sp1()
8155BEGIN
8156    declare between char;
8157END//
8158delimiter ;//
8159
8160--disable_warnings ONCE
8161DROP PROCEDURE IF EXISTS sp1;
8162
8163delimiter //;
8164--error ER_PARSE_ERROR
8165CREATE PROCEDURE sp1()
8166BEGIN
8167    declare bigint char;
8168END//
8169delimiter ;//
8170
8171--disable_warnings ONCE
8172DROP PROCEDURE IF EXISTS sp1;
8173
8174delimiter //;
8175--error ER_PARSE_ERROR
8176CREATE PROCEDURE sp1()
8177BEGIN
8178    declare binary char;
8179END//
8180delimiter ;//
8181
8182--disable_warnings ONCE
8183DROP PROCEDURE IF EXISTS sp1;
8184
8185delimiter //;
8186--error ER_PARSE_ERROR
8187CREATE PROCEDURE sp1()
8188BEGIN
8189    declare blob char;
8190END//
8191delimiter ;//
8192
8193--disable_warnings ONCE
8194DROP PROCEDURE IF EXISTS sp1;
8195
8196delimiter //;
8197--error ER_PARSE_ERROR
8198CREATE PROCEDURE sp1()
8199BEGIN
8200    declare both char;
8201END//
8202delimiter ;//
8203
8204--disable_warnings ONCE
8205DROP PROCEDURE IF EXISTS sp1;
8206
8207delimiter //;
8208--error ER_PARSE_ERROR
8209CREATE PROCEDURE sp1()
8210BEGIN
8211    declare by char;
8212END//
8213delimiter ;//
8214
8215--disable_warnings ONCE
8216DROP PROCEDURE IF EXISTS sp1;
8217
8218delimiter //;
8219--error ER_PARSE_ERROR
8220CREATE PROCEDURE sp1()
8221BEGIN
8222    declare call char;
8223END//
8224delimiter ;//
8225
8226--disable_warnings ONCE
8227DROP PROCEDURE IF EXISTS sp1;
8228
8229delimiter //;
8230--error ER_PARSE_ERROR
8231CREATE PROCEDURE sp1()
8232BEGIN
8233    declare cascade char;
8234END//
8235delimiter ;//
8236
8237--disable_warnings ONCE
8238DROP PROCEDURE IF EXISTS sp1;
8239
8240delimiter //;
8241--error ER_PARSE_ERROR
8242CREATE PROCEDURE sp1()
8243BEGIN
8244    declare case char;
8245END//
8246delimiter ;//
8247
8248--disable_warnings ONCE
8249DROP PROCEDURE IF EXISTS sp1;
8250
8251delimiter //;
8252--error ER_PARSE_ERROR
8253CREATE PROCEDURE sp1()
8254BEGIN
8255    declare change char;
8256END//
8257delimiter ;//
8258
8259--disable_warnings ONCE
8260DROP PROCEDURE IF EXISTS sp1;
8261
8262delimiter //;
8263--error ER_PARSE_ERROR
8264CREATE PROCEDURE sp1()
8265BEGIN
8266    declare char char;
8267END//
8268delimiter ;//
8269
8270--disable_warnings ONCE
8271DROP PROCEDURE IF EXISTS sp1;
8272
8273delimiter //;
8274--error ER_PARSE_ERROR
8275CREATE PROCEDURE sp1()
8276BEGIN
8277    declare character char;
8278END//
8279delimiter ;//
8280
8281--disable_warnings ONCE
8282DROP PROCEDURE IF EXISTS sp1;
8283
8284delimiter //;
8285--error ER_PARSE_ERROR
8286CREATE PROCEDURE sp1()
8287BEGIN
8288    declare check char;
8289END//
8290delimiter ;//
8291
8292--disable_warnings ONCE
8293DROP PROCEDURE IF EXISTS sp1;
8294
8295delimiter //;
8296--error ER_PARSE_ERROR
8297CREATE PROCEDURE sp1()
8298BEGIN
8299    declare collate char;
8300END//
8301delimiter ;//
8302
8303--disable_warnings ONCE
8304DROP PROCEDURE IF EXISTS sp1;
8305
8306delimiter //;
8307--error ER_PARSE_ERROR
8308CREATE PROCEDURE sp1()
8309BEGIN
8310    declare column char;
8311END//
8312delimiter ;//
8313
8314--disable_warnings ONCE
8315DROP PROCEDURE IF EXISTS sp1;
8316
8317delimiter //;
8318--error ER_PARSE_ERROR
8319CREATE PROCEDURE sp1()
8320BEGIN
8321    declare condition char;
8322END//
8323delimiter ;//
8324
8325--disable_warnings ONCE
8326DROP PROCEDURE IF EXISTS sp1;
8327
8328delimiter //;
8329--error ER_PARSE_ERROR
8330CREATE PROCEDURE sp1()
8331BEGIN
8332    declare constraint char;
8333END//
8334delimiter ;//
8335
8336--disable_warnings ONCE
8337DROP PROCEDURE IF EXISTS sp1;
8338
8339delimiter //;
8340--error ER_PARSE_ERROR
8341CREATE PROCEDURE sp1()
8342BEGIN
8343    declare continue char;
8344END//
8345delimiter ;//
8346
8347--disable_warnings ONCE
8348DROP PROCEDURE IF EXISTS sp1;
8349
8350delimiter //;
8351--error ER_PARSE_ERROR
8352CREATE PROCEDURE sp1()
8353BEGIN
8354    declare convert char;
8355END//
8356delimiter ;//
8357
8358--disable_warnings ONCE
8359DROP PROCEDURE IF EXISTS sp1;
8360
8361delimiter //;
8362--error ER_PARSE_ERROR
8363CREATE PROCEDURE sp1()
8364BEGIN
8365    declare create char;
8366END//
8367delimiter ;//
8368
8369--disable_warnings ONCE
8370DROP PROCEDURE IF EXISTS sp1;
8371
8372delimiter //;
8373--error ER_PARSE_ERROR
8374CREATE PROCEDURE sp1()
8375BEGIN
8376    declare cross char;
8377END//
8378delimiter ;//
8379
8380--disable_warnings ONCE
8381DROP PROCEDURE IF EXISTS sp1;
8382
8383delimiter //;
8384--error ER_PARSE_ERROR
8385CREATE PROCEDURE sp1()
8386BEGIN
8387    declare current_date char;
8388END//
8389delimiter ;//
8390
8391--disable_warnings ONCE
8392DROP PROCEDURE IF EXISTS sp1;
8393
8394delimiter //;
8395--error ER_PARSE_ERROR
8396CREATE PROCEDURE sp1()
8397BEGIN
8398    declare current_time char;
8399END//
8400delimiter ;//
8401
8402--disable_warnings ONCE
8403DROP PROCEDURE IF EXISTS sp1;
8404
8405delimiter //;
8406--error ER_PARSE_ERROR
8407CREATE PROCEDURE sp1()
8408BEGIN
8409    declare current_timestamp char;
8410END//
8411delimiter ;//
8412
8413--disable_warnings ONCE
8414DROP PROCEDURE IF EXISTS sp1;
8415
8416delimiter //;
8417--error ER_PARSE_ERROR
8418CREATE PROCEDURE sp1()
8419BEGIN
8420    declare current_user char;
8421END//
8422delimiter ;//
8423
8424--disable_warnings ONCE
8425DROP PROCEDURE IF EXISTS sp1;
8426
8427delimiter //;
8428--error ER_PARSE_ERROR
8429CREATE PROCEDURE sp1()
8430BEGIN
8431    declare cursor char;
8432END//
8433delimiter ;//
8434
8435--disable_warnings ONCE
8436DROP PROCEDURE IF EXISTS sp1;
8437
8438delimiter //;
8439--error ER_PARSE_ERROR
8440CREATE PROCEDURE sp1()
8441BEGIN
8442    declare database char;
8443END//
8444delimiter ;//
8445
8446--disable_warnings ONCE
8447DROP PROCEDURE IF EXISTS sp1;
8448
8449delimiter //;
8450--error ER_PARSE_ERROR
8451CREATE PROCEDURE sp1()
8452BEGIN
8453    declare databases char;
8454END//
8455delimiter ;//
8456
8457--disable_warnings ONCE
8458DROP PROCEDURE IF EXISTS sp1;
8459
8460delimiter //;
8461--error ER_PARSE_ERROR
8462CREATE PROCEDURE sp1()
8463BEGIN
8464    declare day_hour char;
8465END//
8466delimiter ;//
8467
8468--disable_warnings ONCE
8469DROP PROCEDURE IF EXISTS sp1;
8470
8471delimiter //;
8472--error ER_PARSE_ERROR
8473CREATE PROCEDURE sp1()
8474BEGIN
8475    declare day_microsecond char;
8476END//
8477delimiter ;//
8478
8479--disable_warnings ONCE
8480DROP PROCEDURE IF EXISTS sp1;
8481
8482delimiter //;
8483--error ER_PARSE_ERROR
8484CREATE PROCEDURE sp1()
8485BEGIN
8486    declare day_minute char;
8487END//
8488delimiter ;//
8489
8490--disable_warnings ONCE
8491DROP PROCEDURE IF EXISTS sp1;
8492
8493delimiter //;
8494--error ER_PARSE_ERROR
8495CREATE PROCEDURE sp1()
8496BEGIN
8497    declare day_second char;
8498END//
8499delimiter ;//
8500
8501--disable_warnings ONCE
8502DROP PROCEDURE IF EXISTS sp1;
8503
8504delimiter //;
8505--error ER_PARSE_ERROR
8506CREATE PROCEDURE sp1()
8507BEGIN
8508    declare dec char;
8509END//
8510delimiter ;//
8511
8512--disable_warnings ONCE
8513DROP PROCEDURE IF EXISTS sp1;
8514
8515delimiter //;
8516--error ER_PARSE_ERROR
8517CREATE PROCEDURE sp1()
8518BEGIN
8519    declare decimal char;
8520END//
8521delimiter ;//
8522
8523--disable_warnings ONCE
8524DROP PROCEDURE IF EXISTS sp1;
8525
8526delimiter //;
8527--error ER_PARSE_ERROR
8528CREATE PROCEDURE sp1()
8529BEGIN
8530    declare declare char;
8531END//
8532delimiter ;//
8533
8534--disable_warnings ONCE
8535DROP PROCEDURE IF EXISTS sp1;
8536
8537delimiter //;
8538--error ER_PARSE_ERROR
8539CREATE PROCEDURE sp1()
8540BEGIN
8541    declare default char;
8542END//
8543delimiter ;//
8544
8545--disable_warnings ONCE
8546DROP PROCEDURE IF EXISTS sp1;
8547
8548delimiter //;
8549--error ER_PARSE_ERROR
8550CREATE PROCEDURE sp1()
8551BEGIN
8552    declare delayed char;
8553END//
8554delimiter ;//
8555
8556--disable_warnings ONCE
8557DROP PROCEDURE IF EXISTS sp1;
8558
8559delimiter //;
8560--error ER_PARSE_ERROR
8561CREATE PROCEDURE sp1()
8562BEGIN
8563    declare delete char;
8564END//
8565delimiter ;//
8566
8567--disable_warnings ONCE
8568DROP PROCEDURE IF EXISTS sp1;
8569
8570delimiter //;
8571--error ER_PARSE_ERROR
8572CREATE PROCEDURE sp1()
8573BEGIN
8574    declare desc char;
8575END//
8576delimiter ;//
8577
8578--disable_warnings ONCE
8579DROP PROCEDURE IF EXISTS sp1;
8580
8581delimiter //;
8582--error ER_PARSE_ERROR
8583CREATE PROCEDURE sp1()
8584BEGIN
8585    declare describe char;
8586END//
8587delimiter ;//
8588
8589--disable_warnings ONCE
8590DROP PROCEDURE IF EXISTS sp1;
8591
8592delimiter //;
8593--error ER_PARSE_ERROR
8594CREATE PROCEDURE sp1()
8595BEGIN
8596    declare deterministic char;
8597END//
8598delimiter ;//
8599
8600--disable_warnings ONCE
8601DROP PROCEDURE IF EXISTS sp1;
8602
8603delimiter //;
8604--error ER_PARSE_ERROR
8605CREATE PROCEDURE sp1()
8606BEGIN
8607    declare distinct char;
8608END//
8609delimiter ;//
8610
8611--disable_warnings ONCE
8612DROP PROCEDURE IF EXISTS sp1;
8613
8614delimiter //;
8615--error ER_PARSE_ERROR
8616CREATE PROCEDURE sp1()
8617BEGIN
8618    declare distinctrow char;
8619END//
8620delimiter ;//
8621
8622--disable_warnings ONCE
8623DROP PROCEDURE IF EXISTS sp1;
8624
8625delimiter //;
8626--error ER_PARSE_ERROR
8627CREATE PROCEDURE sp1()
8628BEGIN
8629    declare div char;
8630END//
8631delimiter ;//
8632
8633--disable_warnings ONCE
8634DROP PROCEDURE IF EXISTS sp1;
8635
8636delimiter //;
8637--error ER_PARSE_ERROR
8638CREATE PROCEDURE sp1()
8639BEGIN
8640    declare double char;
8641END//
8642delimiter ;//
8643
8644--disable_warnings ONCE
8645DROP PROCEDURE IF EXISTS sp1;
8646
8647delimiter //;
8648--error ER_PARSE_ERROR
8649CREATE PROCEDURE sp1()
8650BEGIN
8651    declare drop char;
8652END//
8653delimiter ;//
8654
8655--disable_warnings ONCE
8656DROP PROCEDURE IF EXISTS sp1;
8657
8658delimiter //;
8659--error ER_PARSE_ERROR
8660CREATE PROCEDURE sp1()
8661BEGIN
8662    declare dual char;
8663END//
8664delimiter ;//
8665
8666--disable_warnings ONCE
8667DROP PROCEDURE IF EXISTS sp1;
8668
8669delimiter //;
8670--error ER_PARSE_ERROR
8671CREATE PROCEDURE sp1()
8672BEGIN
8673    declare each char;
8674END//
8675delimiter ;//
8676
8677--disable_warnings ONCE
8678DROP PROCEDURE IF EXISTS sp1;
8679
8680delimiter //;
8681--error ER_PARSE_ERROR
8682CREATE PROCEDURE sp1()
8683BEGIN
8684    declare else char;
8685END//
8686delimiter ;//
8687
8688--disable_warnings ONCE
8689DROP PROCEDURE IF EXISTS sp1;
8690
8691delimiter //;
8692--error ER_PARSE_ERROR
8693CREATE PROCEDURE sp1()
8694BEGIN
8695    declare elseif char;
8696END//
8697delimiter ;//
8698
8699--disable_warnings ONCE
8700DROP PROCEDURE IF EXISTS sp1;
8701
8702delimiter //;
8703--error ER_PARSE_ERROR
8704CREATE PROCEDURE sp1()
8705BEGIN
8706    declare enclosed char;
8707END//
8708delimiter ;//
8709
8710--disable_warnings ONCE
8711DROP PROCEDURE IF EXISTS sp1;
8712
8713delimiter //;
8714--error ER_PARSE_ERROR
8715CREATE PROCEDURE sp1()
8716BEGIN
8717    declare escaped char;
8718END//
8719delimiter ;//
8720
8721--disable_warnings ONCE
8722DROP PROCEDURE IF EXISTS sp1;
8723
8724delimiter //;
8725--error ER_PARSE_ERROR
8726CREATE PROCEDURE sp1()
8727BEGIN
8728    declare exists char;
8729END//
8730delimiter ;//
8731
8732--disable_warnings ONCE
8733DROP PROCEDURE IF EXISTS sp1;
8734
8735delimiter //;
8736--error ER_PARSE_ERROR
8737CREATE PROCEDURE sp1()
8738BEGIN
8739    declare exit char;
8740END//
8741delimiter ;//
8742
8743--disable_warnings ONCE
8744DROP PROCEDURE IF EXISTS sp1;
8745
8746delimiter //;
8747--error ER_PARSE_ERROR
8748CREATE PROCEDURE sp1()
8749BEGIN
8750    declare explain char;
8751END//
8752delimiter ;//
8753
8754--disable_warnings ONCE
8755DROP PROCEDURE IF EXISTS sp1;
8756
8757delimiter //;
8758--error ER_PARSE_ERROR
8759CREATE PROCEDURE sp1()
8760BEGIN
8761    declare false char;
8762END//
8763delimiter ;//
8764
8765--disable_warnings ONCE
8766DROP PROCEDURE IF EXISTS sp1;
8767
8768delimiter //;
8769--error ER_PARSE_ERROR
8770CREATE PROCEDURE sp1()
8771BEGIN
8772    declare fetch char;
8773END//
8774delimiter ;//
8775
8776--disable_warnings ONCE
8777DROP PROCEDURE IF EXISTS sp1;
8778
8779delimiter //;
8780--error ER_PARSE_ERROR
8781CREATE PROCEDURE sp1()
8782BEGIN
8783    declare float char;
8784END//
8785delimiter ;//
8786
8787--disable_warnings ONCE
8788DROP PROCEDURE IF EXISTS sp1;
8789
8790delimiter //;
8791--error ER_PARSE_ERROR
8792CREATE PROCEDURE sp1()
8793BEGIN
8794    declare float4 char;
8795END//
8796delimiter ;//
8797
8798--disable_warnings ONCE
8799DROP PROCEDURE IF EXISTS sp1;
8800
8801delimiter //;
8802--error ER_PARSE_ERROR
8803CREATE PROCEDURE sp1()
8804BEGIN
8805    declare float8 char;
8806END//
8807delimiter ;//
8808
8809--disable_warnings ONCE
8810DROP PROCEDURE IF EXISTS sp1;
8811
8812delimiter //;
8813--error ER_PARSE_ERROR
8814CREATE PROCEDURE sp1()
8815BEGIN
8816    declare for char;
8817END//
8818delimiter ;//
8819
8820--disable_warnings ONCE
8821DROP PROCEDURE IF EXISTS sp1;
8822
8823delimiter //;
8824--error ER_PARSE_ERROR
8825CREATE PROCEDURE sp1()
8826BEGIN
8827    declare force char;
8828END//
8829delimiter ;//
8830
8831--disable_warnings ONCE
8832DROP PROCEDURE IF EXISTS sp1;
8833
8834delimiter //;
8835--error ER_PARSE_ERROR
8836CREATE PROCEDURE sp1()
8837BEGIN
8838    declare foreign char;
8839END//
8840delimiter ;//
8841
8842--disable_warnings ONCE
8843DROP PROCEDURE IF EXISTS sp1;
8844
8845delimiter //;
8846--error ER_PARSE_ERROR
8847CREATE PROCEDURE sp1()
8848BEGIN
8849    declare from char;
8850END//
8851delimiter ;//
8852
8853--disable_warnings ONCE
8854DROP PROCEDURE IF EXISTS sp1;
8855
8856delimiter //;
8857--error ER_PARSE_ERROR
8858CREATE PROCEDURE sp1()
8859BEGIN
8860    declare fulltext char;
8861END//
8862delimiter ;//
8863
8864--disable_warnings ONCE
8865DROP PROCEDURE IF EXISTS sp1;
8866
8867delimiter //;
8868--error ER_PARSE_ERROR
8869CREATE PROCEDURE sp1()
8870BEGIN
8871    declare grant char;
8872END//
8873delimiter ;//
8874
8875--disable_warnings ONCE
8876DROP PROCEDURE IF EXISTS sp1;
8877
8878delimiter //;
8879--error ER_PARSE_ERROR
8880CREATE PROCEDURE sp1()
8881BEGIN
8882    declare group char;
8883END//
8884delimiter ;//
8885
8886--disable_warnings ONCE
8887DROP PROCEDURE IF EXISTS sp1;
8888
8889delimiter //;
8890--error ER_PARSE_ERROR
8891CREATE PROCEDURE sp1()
8892BEGIN
8893    declare having char;
8894END//
8895delimiter ;//
8896
8897--disable_warnings ONCE
8898DROP PROCEDURE IF EXISTS sp1;
8899
8900delimiter //;
8901--error ER_PARSE_ERROR
8902CREATE PROCEDURE sp1()
8903BEGIN
8904    declare high_priority char;
8905END//
8906delimiter ;//
8907
8908--disable_warnings ONCE
8909DROP PROCEDURE IF EXISTS sp1;
8910
8911delimiter //;
8912--error ER_PARSE_ERROR
8913CREATE PROCEDURE sp1()
8914BEGIN
8915    declare hour_microsecond char;
8916END//
8917delimiter ;//
8918
8919--disable_warnings ONCE
8920DROP PROCEDURE IF EXISTS sp1;
8921
8922delimiter //;
8923--error ER_PARSE_ERROR
8924CREATE PROCEDURE sp1()
8925BEGIN
8926    declare hour_minute char;
8927END//
8928delimiter ;//
8929
8930--disable_warnings ONCE
8931DROP PROCEDURE IF EXISTS sp1;
8932
8933delimiter //;
8934--error ER_PARSE_ERROR
8935CREATE PROCEDURE sp1()
8936BEGIN
8937    declare hour_second char;
8938END//
8939delimiter ;//
8940
8941--disable_warnings ONCE
8942DROP PROCEDURE IF EXISTS sp1;
8943
8944delimiter //;
8945--error ER_PARSE_ERROR
8946CREATE PROCEDURE sp1()
8947BEGIN
8948    declare if char;
8949END//
8950delimiter ;//
8951
8952--disable_warnings ONCE
8953DROP PROCEDURE IF EXISTS sp1;
8954
8955delimiter //;
8956--error ER_PARSE_ERROR
8957CREATE PROCEDURE sp1()
8958BEGIN
8959    declare ignore char;
8960END//
8961delimiter ;//
8962
8963--disable_warnings ONCE
8964DROP PROCEDURE IF EXISTS sp1;
8965
8966delimiter //;
8967--error ER_PARSE_ERROR
8968CREATE PROCEDURE sp1()
8969BEGIN
8970    declare in char;
8971END//
8972delimiter ;//
8973
8974--disable_warnings ONCE
8975DROP PROCEDURE IF EXISTS sp1;
8976
8977delimiter //;
8978--error ER_PARSE_ERROR
8979CREATE PROCEDURE sp1()
8980BEGIN
8981    declare index char;
8982END//
8983delimiter ;//
8984
8985--disable_warnings ONCE
8986DROP PROCEDURE IF EXISTS sp1;
8987
8988delimiter //;
8989--error ER_PARSE_ERROR
8990CREATE PROCEDURE sp1()
8991BEGIN
8992    declare infile char;
8993END//
8994delimiter ;//
8995
8996--disable_warnings ONCE
8997DROP PROCEDURE IF EXISTS sp1;
8998
8999delimiter //;
9000--error ER_PARSE_ERROR
9001CREATE PROCEDURE sp1()
9002BEGIN
9003    declare inner char;
9004END//
9005delimiter ;//
9006
9007--disable_warnings ONCE
9008DROP PROCEDURE IF EXISTS sp1;
9009
9010delimiter //;
9011--error ER_PARSE_ERROR
9012CREATE PROCEDURE sp1()
9013BEGIN
9014    declare inout char;
9015END//
9016delimiter ;//
9017
9018--disable_warnings ONCE
9019DROP PROCEDURE IF EXISTS sp1;
9020
9021delimiter //;
9022--error ER_PARSE_ERROR
9023CREATE PROCEDURE sp1()
9024BEGIN
9025    declare insensitive char;
9026END//
9027delimiter ;//
9028
9029--disable_warnings ONCE
9030DROP PROCEDURE IF EXISTS sp1;
9031
9032delimiter //;
9033--error ER_PARSE_ERROR
9034CREATE PROCEDURE sp1()
9035BEGIN
9036    declare insert char;
9037END//
9038delimiter ;//
9039
9040--disable_warnings ONCE
9041DROP PROCEDURE IF EXISTS sp1;
9042
9043delimiter //;
9044--error ER_PARSE_ERROR
9045CREATE PROCEDURE sp1()
9046BEGIN
9047    declare int char;
9048END//
9049delimiter ;//
9050
9051--disable_warnings ONCE
9052DROP PROCEDURE IF EXISTS sp1;
9053
9054delimiter //;
9055--error ER_PARSE_ERROR
9056CREATE PROCEDURE sp1()
9057BEGIN
9058    declare int1 char;
9059END//
9060delimiter ;//
9061
9062--disable_warnings ONCE
9063DROP PROCEDURE IF EXISTS sp1;
9064
9065delimiter //;
9066--error ER_PARSE_ERROR
9067CREATE PROCEDURE sp1()
9068BEGIN
9069    declare int2 char;
9070END//
9071delimiter ;//
9072
9073--disable_warnings ONCE
9074DROP PROCEDURE IF EXISTS sp1;
9075
9076delimiter //;
9077--error ER_PARSE_ERROR
9078CREATE PROCEDURE sp1()
9079BEGIN
9080    declare int3 char;
9081END//
9082delimiter ;//
9083
9084--disable_warnings ONCE
9085DROP PROCEDURE IF EXISTS sp1;
9086
9087delimiter //;
9088--error ER_PARSE_ERROR
9089CREATE PROCEDURE sp1()
9090BEGIN
9091    declare int4 char;
9092END//
9093delimiter ;//
9094
9095--disable_warnings ONCE
9096DROP PROCEDURE IF EXISTS sp1;
9097
9098delimiter //;
9099--error ER_PARSE_ERROR
9100CREATE PROCEDURE sp1()
9101BEGIN
9102    declare int8 char;
9103END//
9104delimiter ;//
9105
9106--disable_warnings ONCE
9107DROP PROCEDURE IF EXISTS sp1;
9108
9109delimiter //;
9110--error ER_PARSE_ERROR
9111CREATE PROCEDURE sp1()
9112BEGIN
9113    declare integer char;
9114END//
9115delimiter ;//
9116
9117--disable_warnings ONCE
9118DROP PROCEDURE IF EXISTS sp1;
9119
9120delimiter //;
9121--error ER_PARSE_ERROR
9122CREATE PROCEDURE sp1()
9123BEGIN
9124    declare interval char;
9125END//
9126delimiter ;//
9127
9128--disable_warnings ONCE
9129DROP PROCEDURE IF EXISTS sp1;
9130
9131delimiter //;
9132--error ER_PARSE_ERROR
9133CREATE PROCEDURE sp1()
9134BEGIN
9135    declare into char;
9136END//
9137delimiter ;//
9138
9139--disable_warnings ONCE
9140DROP PROCEDURE IF EXISTS sp1;
9141
9142delimiter //;
9143--error ER_PARSE_ERROR
9144CREATE PROCEDURE sp1()
9145BEGIN
9146    declare is char;
9147END//
9148delimiter ;//
9149
9150--disable_warnings ONCE
9151DROP PROCEDURE IF EXISTS sp1;
9152
9153delimiter //;
9154--error ER_PARSE_ERROR
9155CREATE PROCEDURE sp1()
9156BEGIN
9157    declare iterate char;
9158END//
9159delimiter ;//
9160
9161--disable_warnings ONCE
9162DROP PROCEDURE IF EXISTS sp1;
9163
9164delimiter //;
9165--error ER_PARSE_ERROR
9166CREATE PROCEDURE sp1()
9167BEGIN
9168    declare join char;
9169END//
9170delimiter ;//
9171
9172--disable_warnings ONCE
9173DROP PROCEDURE IF EXISTS sp1;
9174
9175delimiter //;
9176--error ER_PARSE_ERROR
9177CREATE PROCEDURE sp1()
9178BEGIN
9179    declare key char;
9180END//
9181delimiter ;//
9182
9183--disable_warnings ONCE
9184DROP PROCEDURE IF EXISTS sp1;
9185
9186delimiter //;
9187--error ER_PARSE_ERROR
9188CREATE PROCEDURE sp1()
9189BEGIN
9190    declare keys char;
9191END//
9192delimiter ;//
9193
9194--disable_warnings ONCE
9195DROP PROCEDURE IF EXISTS sp1;
9196
9197delimiter //;
9198--error ER_PARSE_ERROR
9199CREATE PROCEDURE sp1()
9200BEGIN
9201    declare kill char;
9202END//
9203delimiter ;//
9204
9205--disable_warnings ONCE
9206DROP PROCEDURE IF EXISTS sp1;
9207
9208delimiter //;
9209--error ER_PARSE_ERROR
9210CREATE PROCEDURE sp1()
9211BEGIN
9212    declare leading char;
9213END//
9214delimiter ;//
9215
9216--disable_warnings ONCE
9217DROP PROCEDURE IF EXISTS sp1;
9218
9219delimiter //;
9220--error ER_PARSE_ERROR
9221CREATE PROCEDURE sp1()
9222BEGIN
9223    declare leave char;
9224END//
9225delimiter ;//
9226
9227--disable_warnings ONCE
9228DROP PROCEDURE IF EXISTS sp1;
9229
9230delimiter //;
9231--error ER_PARSE_ERROR
9232CREATE PROCEDURE sp1()
9233BEGIN
9234    declare left char;
9235END//
9236delimiter ;//
9237
9238--disable_warnings ONCE
9239DROP PROCEDURE IF EXISTS sp1;
9240
9241delimiter //;
9242--error ER_PARSE_ERROR
9243CREATE PROCEDURE sp1()
9244BEGIN
9245    declare like char;
9246END//
9247delimiter ;//
9248
9249--disable_warnings ONCE
9250DROP PROCEDURE IF EXISTS sp1;
9251
9252delimiter //;
9253--error ER_PARSE_ERROR
9254CREATE PROCEDURE sp1()
9255BEGIN
9256    declare limit char;
9257END//
9258delimiter ;//
9259
9260--disable_warnings ONCE
9261DROP PROCEDURE IF EXISTS sp1;
9262
9263delimiter //;
9264--error ER_PARSE_ERROR
9265CREATE PROCEDURE sp1()
9266BEGIN
9267    declare linear char;
9268END//
9269delimiter ;//
9270
9271--disable_warnings ONCE
9272DROP PROCEDURE IF EXISTS sp1;
9273
9274delimiter //;
9275--error ER_PARSE_ERROR
9276CREATE PROCEDURE sp1()
9277BEGIN
9278    declare lines char;
9279END//
9280delimiter ;//
9281
9282--disable_warnings ONCE
9283DROP PROCEDURE IF EXISTS sp1;
9284
9285delimiter //;
9286--error ER_PARSE_ERROR
9287CREATE PROCEDURE sp1()
9288BEGIN
9289    declare load char;
9290END//
9291delimiter ;//
9292
9293--disable_warnings ONCE
9294DROP PROCEDURE IF EXISTS sp1;
9295
9296delimiter //;
9297--error ER_PARSE_ERROR
9298CREATE PROCEDURE sp1()
9299BEGIN
9300    declare localtime char;
9301END//
9302delimiter ;//
9303
9304--disable_warnings ONCE
9305DROP PROCEDURE IF EXISTS sp1;
9306
9307delimiter //;
9308--error ER_PARSE_ERROR
9309CREATE PROCEDURE sp1()
9310BEGIN
9311    declare localtimestamp char;
9312END//
9313delimiter ;//
9314
9315--disable_warnings ONCE
9316DROP PROCEDURE IF EXISTS sp1;
9317
9318delimiter //;
9319--error ER_PARSE_ERROR
9320CREATE PROCEDURE sp1()
9321BEGIN
9322    declare lock char;
9323END//
9324delimiter ;//
9325
9326--disable_warnings ONCE
9327DROP PROCEDURE IF EXISTS sp1;
9328
9329delimiter //;
9330--error ER_PARSE_ERROR
9331CREATE PROCEDURE sp1()
9332BEGIN
9333    declare long char;
9334END//
9335delimiter ;//
9336
9337--disable_warnings ONCE
9338DROP PROCEDURE IF EXISTS sp1;
9339
9340delimiter //;
9341--error ER_PARSE_ERROR
9342CREATE PROCEDURE sp1()
9343BEGIN
9344    declare longblob char;
9345END//
9346delimiter ;//
9347
9348--disable_warnings ONCE
9349DROP PROCEDURE IF EXISTS sp1;
9350
9351delimiter //;
9352--error ER_PARSE_ERROR
9353CREATE PROCEDURE sp1()
9354BEGIN
9355    declare longtext char;
9356END//
9357delimiter ;//
9358
9359--disable_warnings ONCE
9360DROP PROCEDURE IF EXISTS sp1;
9361
9362delimiter //;
9363--error ER_PARSE_ERROR
9364CREATE PROCEDURE sp1()
9365BEGIN
9366    declare loop char;
9367END//
9368delimiter ;//
9369
9370--disable_warnings ONCE
9371DROP PROCEDURE IF EXISTS sp1;
9372
9373delimiter //;
9374--error ER_PARSE_ERROR
9375CREATE PROCEDURE sp1()
9376BEGIN
9377    declare low_priority char;
9378END//
9379delimiter ;//
9380
9381--disable_warnings ONCE
9382DROP PROCEDURE IF EXISTS sp1;
9383
9384delimiter //;
9385--error ER_PARSE_ERROR
9386CREATE PROCEDURE sp1()
9387BEGIN
9388    declare master_ssl_verify_server_cert char;
9389END//
9390delimiter ;//
9391
9392--disable_warnings ONCE
9393DROP PROCEDURE IF EXISTS sp1;
9394
9395delimiter //;
9396--error ER_PARSE_ERROR
9397CREATE PROCEDURE sp1()
9398BEGIN
9399    declare match char;
9400END//
9401delimiter ;//
9402
9403--disable_warnings ONCE
9404DROP PROCEDURE IF EXISTS sp1;
9405
9406delimiter //;
9407--error ER_PARSE_ERROR
9408CREATE PROCEDURE sp1()
9409BEGIN
9410    declare mediumblob char;
9411END//
9412delimiter ;//
9413
9414--disable_warnings ONCE
9415DROP PROCEDURE IF EXISTS sp1;
9416
9417delimiter //;
9418--error ER_PARSE_ERROR
9419CREATE PROCEDURE sp1()
9420BEGIN
9421    declare mediumint char;
9422END//
9423delimiter ;//
9424
9425--disable_warnings ONCE
9426DROP PROCEDURE IF EXISTS sp1;
9427
9428delimiter //;
9429--error ER_PARSE_ERROR
9430CREATE PROCEDURE sp1()
9431BEGIN
9432    declare mediumtext char;
9433END//
9434delimiter ;//
9435
9436--disable_warnings ONCE
9437DROP PROCEDURE IF EXISTS sp1;
9438
9439delimiter //;
9440--error ER_PARSE_ERROR
9441CREATE PROCEDURE sp1()
9442BEGIN
9443    declare middleint char;
9444END//
9445delimiter ;//
9446
9447--disable_warnings ONCE
9448DROP PROCEDURE IF EXISTS sp1;
9449
9450delimiter //;
9451--error ER_PARSE_ERROR
9452CREATE PROCEDURE sp1()
9453BEGIN
9454    declare minute_microsecond char;
9455END//
9456delimiter ;//
9457
9458--disable_warnings ONCE
9459DROP PROCEDURE IF EXISTS sp1;
9460
9461delimiter //;
9462--error ER_PARSE_ERROR
9463CREATE PROCEDURE sp1()
9464BEGIN
9465    declare minute_second char;
9466END//
9467delimiter ;//
9468
9469--disable_warnings ONCE
9470DROP PROCEDURE IF EXISTS sp1;
9471
9472delimiter //;
9473--error ER_PARSE_ERROR
9474CREATE PROCEDURE sp1()
9475BEGIN
9476    declare mod char;
9477END//
9478delimiter ;//
9479
9480--disable_warnings ONCE
9481DROP PROCEDURE IF EXISTS sp1;
9482
9483delimiter //;
9484--error ER_PARSE_ERROR
9485CREATE PROCEDURE sp1()
9486BEGIN
9487    declare modifies char;
9488END//
9489delimiter ;//
9490
9491--disable_warnings ONCE
9492DROP PROCEDURE IF EXISTS sp1;
9493
9494delimiter //;
9495--error ER_PARSE_ERROR
9496CREATE PROCEDURE sp1()
9497BEGIN
9498    declare natural char;
9499END//
9500delimiter ;//
9501
9502--disable_warnings ONCE
9503DROP PROCEDURE IF EXISTS sp1;
9504
9505delimiter //;
9506--error ER_PARSE_ERROR
9507CREATE PROCEDURE sp1()
9508BEGIN
9509    declare not char;
9510END//
9511delimiter ;//
9512
9513--disable_warnings ONCE
9514DROP PROCEDURE IF EXISTS sp1;
9515
9516delimiter //;
9517--error ER_PARSE_ERROR
9518CREATE PROCEDURE sp1()
9519BEGIN
9520    declare no_write_to_binlog char;
9521END//
9522delimiter ;//
9523
9524--disable_warnings ONCE
9525DROP PROCEDURE IF EXISTS sp1;
9526
9527delimiter //;
9528--error ER_PARSE_ERROR
9529CREATE PROCEDURE sp1()
9530BEGIN
9531    declare null char;
9532END//
9533delimiter ;//
9534
9535--disable_warnings ONCE
9536DROP PROCEDURE IF EXISTS sp1;
9537
9538delimiter //;
9539--error ER_PARSE_ERROR
9540CREATE PROCEDURE sp1()
9541BEGIN
9542    declare numeric char;
9543END//
9544delimiter ;//
9545
9546--disable_warnings ONCE
9547DROP PROCEDURE IF EXISTS sp1;
9548
9549delimiter //;
9550--error ER_PARSE_ERROR
9551CREATE PROCEDURE sp1()
9552BEGIN
9553    declare on char;
9554END//
9555delimiter ;//
9556
9557--disable_warnings ONCE
9558DROP PROCEDURE IF EXISTS sp1;
9559
9560delimiter //;
9561--error ER_PARSE_ERROR
9562CREATE PROCEDURE sp1()
9563BEGIN
9564    declare optimize char;
9565END//
9566delimiter ;//
9567
9568--disable_warnings ONCE
9569DROP PROCEDURE IF EXISTS sp1;
9570
9571delimiter //;
9572--error ER_PARSE_ERROR
9573CREATE PROCEDURE sp1()
9574BEGIN
9575    declare option char;
9576END//
9577delimiter ;//
9578
9579--disable_warnings ONCE
9580DROP PROCEDURE IF EXISTS sp1;
9581
9582delimiter //;
9583--error ER_PARSE_ERROR
9584CREATE PROCEDURE sp1()
9585BEGIN
9586    declare optionally char;
9587END//
9588delimiter ;//
9589
9590--disable_warnings ONCE
9591DROP PROCEDURE IF EXISTS sp1;
9592
9593delimiter //;
9594--error ER_PARSE_ERROR
9595CREATE PROCEDURE sp1()
9596BEGIN
9597    declare or char;
9598END//
9599delimiter ;//
9600
9601--disable_warnings ONCE
9602DROP PROCEDURE IF EXISTS sp1;
9603
9604delimiter //;
9605--error ER_PARSE_ERROR
9606CREATE PROCEDURE sp1()
9607BEGIN
9608    declare order char;
9609END//
9610delimiter ;//
9611
9612--disable_warnings ONCE
9613DROP PROCEDURE IF EXISTS sp1;
9614
9615delimiter //;
9616--error ER_PARSE_ERROR
9617CREATE PROCEDURE sp1()
9618BEGIN
9619    declare out char;
9620END//
9621delimiter ;//
9622
9623--disable_warnings ONCE
9624DROP PROCEDURE IF EXISTS sp1;
9625
9626delimiter //;
9627--error ER_PARSE_ERROR
9628CREATE PROCEDURE sp1()
9629BEGIN
9630    declare outer char;
9631END//
9632delimiter ;//
9633
9634--disable_warnings ONCE
9635DROP PROCEDURE IF EXISTS sp1;
9636
9637delimiter //;
9638--error ER_PARSE_ERROR
9639CREATE PROCEDURE sp1()
9640BEGIN
9641    declare outfile char;
9642END//
9643delimiter ;//
9644
9645--disable_warnings ONCE
9646DROP PROCEDURE IF EXISTS sp1;
9647
9648delimiter //;
9649--error ER_PARSE_ERROR
9650CREATE PROCEDURE sp1()
9651BEGIN
9652    declare precision char;
9653END//
9654delimiter ;//
9655
9656--disable_warnings ONCE
9657DROP PROCEDURE IF EXISTS sp1;
9658
9659delimiter //;
9660--error ER_PARSE_ERROR
9661CREATE PROCEDURE sp1()
9662BEGIN
9663    declare primary char;
9664END//
9665delimiter ;//
9666
9667--disable_warnings ONCE
9668DROP PROCEDURE IF EXISTS sp1;
9669
9670delimiter //;
9671--error ER_PARSE_ERROR
9672CREATE PROCEDURE sp1()
9673BEGIN
9674    declare procedure char;
9675END//
9676delimiter ;//
9677
9678--disable_warnings ONCE
9679DROP PROCEDURE IF EXISTS sp1;
9680
9681delimiter //;
9682--error ER_PARSE_ERROR
9683CREATE PROCEDURE sp1()
9684BEGIN
9685    declare purge char;
9686END//
9687delimiter ;//
9688
9689--disable_warnings ONCE
9690DROP PROCEDURE IF EXISTS sp1;
9691
9692delimiter //;
9693--error ER_PARSE_ERROR
9694CREATE PROCEDURE sp1()
9695BEGIN
9696    declare range char;
9697END//
9698delimiter ;//
9699
9700--disable_warnings ONCE
9701DROP PROCEDURE IF EXISTS sp1;
9702
9703delimiter //;
9704--error ER_PARSE_ERROR
9705CREATE PROCEDURE sp1()
9706BEGIN
9707    declare read char;
9708END//
9709delimiter ;//
9710
9711--disable_warnings ONCE
9712DROP PROCEDURE IF EXISTS sp1;
9713
9714delimiter //;
9715--error ER_PARSE_ERROR
9716CREATE PROCEDURE sp1()
9717BEGIN
9718    declare reads char;
9719END//
9720delimiter ;//
9721
9722--disable_warnings ONCE
9723DROP PROCEDURE IF EXISTS sp1;
9724
9725delimiter //;
9726# FIXME 31947
9727#--error ER_PARSE_ERROR
9728CREATE PROCEDURE sp1()
9729BEGIN
9730    declare read_only char;
9731END//
9732delimiter ;//
9733
9734--disable_warnings ONCE
9735DROP PROCEDURE IF EXISTS sp1;
9736
9737delimiter //;
9738--error ER_PARSE_ERROR
9739CREATE PROCEDURE sp1()
9740BEGIN
9741    declare read_write char;
9742END//
9743delimiter ;//
9744
9745--disable_warnings ONCE
9746DROP PROCEDURE IF EXISTS sp1;
9747
9748delimiter //;
9749--error ER_PARSE_ERROR
9750CREATE PROCEDURE sp1()
9751BEGIN
9752    declare real char;
9753END//
9754delimiter ;//
9755
9756--disable_warnings ONCE
9757DROP PROCEDURE IF EXISTS sp1;
9758
9759delimiter //;
9760--error ER_PARSE_ERROR
9761CREATE PROCEDURE sp1()
9762BEGIN
9763    declare references char;
9764END//
9765delimiter ;//
9766
9767--disable_warnings ONCE
9768DROP PROCEDURE IF EXISTS sp1;
9769
9770delimiter //;
9771--error ER_PARSE_ERROR
9772CREATE PROCEDURE sp1()
9773BEGIN
9774    declare regexp char;
9775END//
9776delimiter ;//
9777
9778--disable_warnings ONCE
9779DROP PROCEDURE IF EXISTS sp1;
9780
9781delimiter //;
9782--error ER_PARSE_ERROR
9783CREATE PROCEDURE sp1()
9784BEGIN
9785    declare release char;
9786END//
9787delimiter ;//
9788
9789--disable_warnings ONCE
9790DROP PROCEDURE IF EXISTS sp1;
9791
9792delimiter //;
9793--error ER_PARSE_ERROR
9794CREATE PROCEDURE sp1()
9795BEGIN
9796    declare rename char;
9797END//
9798delimiter ;//
9799
9800--disable_warnings ONCE
9801DROP PROCEDURE IF EXISTS sp1;
9802
9803delimiter //;
9804--error ER_PARSE_ERROR
9805CREATE PROCEDURE sp1()
9806BEGIN
9807    declare repeat char;
9808END//
9809delimiter ;//
9810
9811--disable_warnings ONCE
9812DROP PROCEDURE IF EXISTS sp1;
9813
9814delimiter //;
9815--error ER_PARSE_ERROR
9816CREATE PROCEDURE sp1()
9817BEGIN
9818    declare replace char;
9819END//
9820delimiter ;//
9821DROP PROCEDURE IF EXISTS sp1;
9822
9823delimiter //;
9824--error ER_PARSE_ERROR
9825CREATE PROCEDURE sp1()
9826BEGIN
9827   declare require char;
9828END//
9829delimiter ;//
9830DROP PROCEDURE IF EXISTS sp1;
9831
9832delimiter //;
9833--error ER_PARSE_ERROR
9834CREATE PROCEDURE sp1()
9835BEGIN
9836    declare restrict char;
9837END//
9838delimiter ;//
9839
9840DROP PROCEDURE IF EXISTS sp1;
9841
9842delimiter //;
9843--error ER_PARSE_ERROR
9844CREATE PROCEDURE sp1()
9845BEGIN
9846    declare return char;
9847END//
9848delimiter ;//
9849
9850DROP PROCEDURE IF EXISTS sp1;
9851
9852delimiter //;
9853--error ER_PARSE_ERROR
9854CREATE PROCEDURE sp1()
9855BEGIN
9856    declare revoke char;
9857END//
9858delimiter ;//
9859
9860DROP PROCEDURE IF EXISTS sp1;
9861
9862delimiter //;
9863--error ER_PARSE_ERROR
9864CREATE PROCEDURE sp1()
9865BEGIN
9866    declare right char;
9867END//
9868delimiter ;//
9869
9870DROP PROCEDURE IF EXISTS sp1;
9871
9872delimiter //;
9873--error ER_PARSE_ERROR
9874CREATE PROCEDURE sp1()
9875BEGIN
9876    declare rlike char;
9877END//
9878delimiter ;//
9879
9880DROP PROCEDURE IF EXISTS sp1;
9881
9882delimiter //;
9883--error ER_PARSE_ERROR
9884CREATE PROCEDURE sp1()
9885BEGIN
9886    declare schema char;
9887END//
9888delimiter ;//
9889
9890DROP PROCEDURE IF EXISTS sp1;
9891
9892delimiter //;
9893--error ER_PARSE_ERROR
9894CREATE PROCEDURE sp1()
9895BEGIN
9896    declare schemas char;
9897END//
9898delimiter ;//
9899
9900DROP PROCEDURE IF EXISTS sp1;
9901
9902delimiter //;
9903--error ER_PARSE_ERROR
9904CREATE PROCEDURE sp1()
9905BEGIN
9906    declare second_microsecond char;
9907END//
9908delimiter ;//
9909
9910DROP PROCEDURE IF EXISTS sp1;
9911
9912delimiter //;
9913--error ER_PARSE_ERROR
9914CREATE PROCEDURE sp1()
9915BEGIN
9916    declare SELECT char;
9917END//
9918delimiter ;//
9919
9920DROP PROCEDURE IF EXISTS sp1;
9921
9922delimiter //;
9923--error ER_PARSE_ERROR
9924CREATE PROCEDURE sp1()
9925BEGIN
9926    declare sensitive char;
9927END//
9928delimiter ;//
9929
9930DROP PROCEDURE IF EXISTS sp1;
9931
9932delimiter //;
9933--error ER_PARSE_ERROR
9934CREATE PROCEDURE sp1()
9935BEGIN
9936    declare separator char;
9937END//
9938delimiter ;//
9939
9940DROP PROCEDURE IF EXISTS sp1;
9941
9942delimiter //;
9943--error ER_PARSE_ERROR
9944CREATE PROCEDURE sp1()
9945BEGIN
9946    declare set char;
9947END//
9948delimiter ;//
9949
9950DROP PROCEDURE IF EXISTS sp1;
9951
9952delimiter //;
9953--error ER_PARSE_ERROR
9954CREATE PROCEDURE sp1()
9955BEGIN
9956    declare show char;
9957END//
9958delimiter ;//
9959
9960DROP PROCEDURE IF EXISTS sp1;
9961
9962delimiter //;
9963--error ER_PARSE_ERROR
9964CREATE PROCEDURE sp1()
9965BEGIN
9966    declare smallint char;
9967END//
9968delimiter ;//
9969
9970DROP PROCEDURE IF EXISTS sp1;
9971
9972delimiter //;
9973--error ER_PARSE_ERROR
9974CREATE PROCEDURE sp1()
9975BEGIN
9976    declare spatial char;
9977END//
9978delimiter ;//
9979
9980DROP PROCEDURE IF EXISTS sp1;
9981
9982delimiter //;
9983--error ER_PARSE_ERROR
9984CREATE PROCEDURE sp1()
9985BEGIN
9986    declare specific char;
9987END//
9988delimiter ;//
9989
9990DROP PROCEDURE IF EXISTS sp1;
9991
9992delimiter //;
9993--error ER_PARSE_ERROR
9994CREATE PROCEDURE sp1()
9995BEGIN
9996    declare sql char;
9997END//
9998delimiter ;//
9999
10000DROP PROCEDURE IF EXISTS sp1;
10001
10002delimiter //;
10003--error ER_PARSE_ERROR
10004CREATE PROCEDURE sp1()
10005BEGIN
10006    declare sqlexception char;
10007END//
10008delimiter ;//
10009
10010DROP PROCEDURE IF EXISTS sp1;
10011
10012delimiter //;
10013--error ER_PARSE_ERROR
10014CREATE PROCEDURE sp1()
10015BEGIN
10016    declare sqlstate char;
10017END//
10018delimiter ;//
10019
10020DROP PROCEDURE IF EXISTS sp1;
10021
10022delimiter //;
10023--error ER_PARSE_ERROR
10024CREATE PROCEDURE sp1()
10025BEGIN
10026    declare sqlwarning char;
10027END//
10028delimiter ;//
10029
10030DROP PROCEDURE IF EXISTS sp1;
10031
10032delimiter //;
10033--error ER_PARSE_ERROR
10034CREATE PROCEDURE sp1()
10035BEGIN
10036    declare sql_big_result char;
10037END//
10038delimiter ;//
10039
10040DROP PROCEDURE IF EXISTS sp1;
10041
10042delimiter //;
10043--error ER_PARSE_ERROR
10044CREATE PROCEDURE sp1()
10045BEGIN
10046    declare sql_calc_found_rows char;
10047END//
10048delimiter ;//
10049
10050DROP PROCEDURE IF EXISTS sp1;
10051
10052delimiter //;
10053--error ER_PARSE_ERROR
10054CREATE PROCEDURE sp1()
10055BEGIN
10056    declare sql_small_result char;
10057END//
10058delimiter ;//
10059
10060DROP PROCEDURE IF EXISTS sp1;
10061
10062delimiter //;
10063--error ER_PARSE_ERROR
10064CREATE PROCEDURE sp1()
10065BEGIN
10066    declare ssl char;
10067END//
10068delimiter ;//
10069
10070DROP PROCEDURE IF EXISTS sp1;
10071
10072delimiter //;
10073--error ER_PARSE_ERROR
10074CREATE PROCEDURE sp1()
10075BEGIN
10076    declare starting char;
10077END//
10078delimiter ;//
10079
10080DROP PROCEDURE IF EXISTS sp1;
10081
10082delimiter //;
10083--error ER_PARSE_ERROR
10084CREATE PROCEDURE sp1()
10085BEGIN
10086    declare straight_join char;
10087END//
10088delimiter ;//
10089
10090DROP PROCEDURE IF EXISTS sp1;
10091
10092delimiter //;
10093--error ER_PARSE_ERROR
10094CREATE PROCEDURE sp1()
10095BEGIN
10096    declare table char;
10097END//
10098delimiter ;//
10099
10100DROP PROCEDURE IF EXISTS sp1;
10101
10102delimiter //;
10103--error ER_PARSE_ERROR
10104CREATE PROCEDURE sp1()
10105BEGIN
10106    declare terminated char;
10107END//
10108delimiter ;//
10109
10110DROP PROCEDURE IF EXISTS sp1;
10111
10112delimiter //;
10113--error ER_PARSE_ERROR
10114CREATE PROCEDURE sp1()
10115BEGIN
10116    declare then char;
10117END//
10118delimiter ;//
10119
10120DROP PROCEDURE IF EXISTS sp1;
10121
10122delimiter //;
10123--error ER_PARSE_ERROR
10124CREATE PROCEDURE sp1()
10125BEGIN
10126    declare tinyblob char;
10127END//
10128delimiter ;//
10129
10130DROP PROCEDURE IF EXISTS sp1;
10131
10132delimiter //;
10133--error ER_PARSE_ERROR
10134CREATE PROCEDURE sp1()
10135BEGIN
10136    declare tinyint char;
10137END//
10138delimiter ;//
10139
10140DROP PROCEDURE IF EXISTS sp1;
10141
10142delimiter //;
10143--error ER_PARSE_ERROR
10144CREATE PROCEDURE sp1()
10145BEGIN
10146    declare tinytext char;
10147END//
10148delimiter ;//
10149
10150DROP PROCEDURE IF EXISTS sp1;
10151
10152delimiter //;
10153--error ER_PARSE_ERROR
10154CREATE PROCEDURE sp1()
10155BEGIN
10156    declare to char;
10157END//
10158delimiter ;//
10159
10160DROP PROCEDURE IF EXISTS sp1;
10161
10162delimiter //;
10163--error ER_PARSE_ERROR
10164CREATE PROCEDURE sp1()
10165BEGIN
10166    declare trailing char;
10167END//
10168delimiter ;//
10169DROP PROCEDURE IF EXISTS sp1;
10170
10171delimiter //;
10172--error ER_PARSE_ERROR
10173CREATE PROCEDURE sp1()
10174BEGIN
10175    declare trigger char;
10176END//
10177delimiter ;//
10178DROP PROCEDURE IF EXISTS sp1;
10179
10180delimiter //;
10181--error ER_PARSE_ERROR
10182CREATE PROCEDURE sp1()
10183BEGIN
10184    declare true char;
10185END//
10186delimiter ;//
10187
10188DROP PROCEDURE IF EXISTS sp1;
10189
10190delimiter //;
10191--error ER_PARSE_ERROR
10192CREATE PROCEDURE sp1()
10193BEGIN
10194    declare undo char;
10195END//
10196delimiter ;//
10197
10198DROP PROCEDURE IF EXISTS sp1;
10199
10200delimiter //;
10201--error ER_PARSE_ERROR
10202CREATE PROCEDURE sp1()
10203BEGIN
10204    declare union char;
10205END//
10206delimiter ;//
10207
10208DROP PROCEDURE IF EXISTS sp1;
10209
10210delimiter //;
10211--error ER_PARSE_ERROR
10212CREATE PROCEDURE sp1()
10213BEGIN
10214    declare unique char;
10215END//
10216delimiter ;//
10217
10218DROP PROCEDURE IF EXISTS sp1;
10219
10220delimiter //;
10221--error ER_PARSE_ERROR
10222CREATE PROCEDURE sp1()
10223BEGIN
10224    declare unlock char;
10225END//
10226delimiter ;//
10227
10228DROP PROCEDURE IF EXISTS sp1;
10229
10230delimiter //;
10231--error ER_PARSE_ERROR
10232CREATE PROCEDURE sp1()
10233BEGIN
10234    declare unsigned char;
10235END//
10236delimiter ;//
10237
10238DROP PROCEDURE IF EXISTS sp1;
10239
10240delimiter //;
10241--error ER_PARSE_ERROR
10242CREATE PROCEDURE sp1()
10243BEGIN
10244    declare update char;
10245END//
10246delimiter ;//
10247
10248DROP PROCEDURE IF EXISTS sp1;
10249
10250delimiter //;
10251--error ER_PARSE_ERROR
10252CREATE PROCEDURE sp1()
10253BEGIN
10254    declare usage char;
10255END//
10256delimiter ;//
10257
10258DROP PROCEDURE IF EXISTS sp1;
10259
10260delimiter //;
10261--error ER_PARSE_ERROR
10262CREATE PROCEDURE sp1()
10263BEGIN
10264    declare use char;
10265END//
10266delimiter ;//
10267
10268DROP PROCEDURE IF EXISTS sp1;
10269
10270delimiter //;
10271--error ER_PARSE_ERROR
10272CREATE PROCEDURE sp1()
10273BEGIN
10274    declare using char;
10275END//
10276delimiter ;//
10277
10278DROP PROCEDURE IF EXISTS sp1;
10279
10280delimiter //;
10281--error ER_PARSE_ERROR
10282CREATE PROCEDURE sp1()
10283BEGIN
10284    declare utc_date char;
10285END//
10286delimiter ;//
10287
10288DROP PROCEDURE IF EXISTS sp1;
10289
10290delimiter //;
10291--error ER_PARSE_ERROR
10292CREATE PROCEDURE sp1()
10293BEGIN
10294    declare utc_time char;
10295END//
10296delimiter ;//
10297
10298DROP PROCEDURE IF EXISTS sp1;
10299
10300delimiter //;
10301--error ER_PARSE_ERROR
10302CREATE PROCEDURE sp1()
10303BEGIN
10304    declare utc_timestamp char;
10305END//
10306delimiter ;//
10307
10308DROP PROCEDURE IF EXISTS sp1;
10309
10310delimiter //;
10311--error ER_PARSE_ERROR
10312CREATE PROCEDURE sp1()
10313BEGIN
10314    declare values char;
10315END//
10316delimiter ;//
10317
10318DROP PROCEDURE IF EXISTS sp1;
10319
10320delimiter //;
10321--error ER_PARSE_ERROR
10322CREATE PROCEDURE sp1()
10323BEGIN
10324    declare varbinary char;
10325END//
10326delimiter ;//
10327
10328DROP PROCEDURE IF EXISTS sp1;
10329
10330delimiter //;
10331--error ER_PARSE_ERROR
10332CREATE PROCEDURE sp1()
10333BEGIN
10334    declare varchar char;
10335END//
10336delimiter ;//
10337
10338DROP PROCEDURE IF EXISTS sp1;
10339
10340delimiter //;
10341--error ER_PARSE_ERROR
10342CREATE PROCEDURE sp1()
10343BEGIN
10344    declare varcharacter char;
10345END//
10346delimiter ;//
10347
10348DROP PROCEDURE IF EXISTS sp1;
10349
10350delimiter //;
10351--error ER_PARSE_ERROR
10352CREATE PROCEDURE sp1()
10353BEGIN
10354    declare varying char;
10355END//
10356delimiter ;//
10357
10358DROP PROCEDURE IF EXISTS sp1;
10359
10360delimiter //;
10361--error ER_PARSE_ERROR
10362CREATE PROCEDURE sp1()
10363BEGIN
10364    declare when char;
10365END//
10366delimiter ;//
10367
10368DROP PROCEDURE IF EXISTS sp1;
10369
10370delimiter //;
10371--error ER_PARSE_ERROR
10372CREATE PROCEDURE sp1()
10373BEGIN
10374    declare where char;
10375END//
10376delimiter ;//
10377
10378DROP PROCEDURE IF EXISTS sp1;
10379
10380delimiter //;
10381--error ER_PARSE_ERROR
10382CREATE PROCEDURE sp1()
10383BEGIN
10384    declare while char;
10385END//
10386delimiter ;//
10387
10388DROP PROCEDURE IF EXISTS sp1;
10389
10390delimiter //;
10391--error ER_PARSE_ERROR
10392CREATE PROCEDURE sp1()
10393BEGIN
10394    declare with char;
10395END//
10396delimiter ;//
10397
10398DROP PROCEDURE IF EXISTS sp1;
10399
10400delimiter //;
10401--error ER_PARSE_ERROR
10402CREATE PROCEDURE sp1()
10403BEGIN
10404    declare write char;
10405END//
10406delimiter ;//
10407
10408DROP PROCEDURE IF EXISTS sp1;
10409
10410delimiter //;
10411--error ER_PARSE_ERROR
10412CREATE PROCEDURE sp1()
10413BEGIN
10414    declare xor char;
10415END//
10416delimiter ;//
10417
10418DROP PROCEDURE IF EXISTS sp1;
10419
10420delimiter //;
10421--error ER_PARSE_ERROR
10422CREATE PROCEDURE sp1()
10423BEGIN
10424    declare year_month char;
10425END//
10426delimiter ;//
10427
10428DROP PROCEDURE IF EXISTS sp1;
10429
10430delimiter //;
10431--error ER_PARSE_ERROR
10432CREATE PROCEDURE sp1()
10433BEGIN
10434    declare zerofill char;
10435END//
10436delimiter ;//
10437
10438# ------------------------------------------------------------------------------
10439let $message= Testcase :
10440              ----------
10441Ensure that every possible type of condition may be declared for a stored procedure
10442( covered in more detail in handlers section.);
10443--source include/show_msg80.inc
10444
10445DROP PROCEDURE IF EXISTS sp1;
10446
10447delimiter //;
10448CREATE PROCEDURE sp1()
10449BEGIN
10450   declare cond1 condition for sqlstate 'HY000';
10451
10452   declare cond2 condition for sqlstate '23000';
10453
10454   declare cond3 condition for sqlstate 'HY001';
10455
10456   declare cond4 condition for sqlstate '08004';
10457
10458   declare cond5 condition for sqlstate '08S01';
10459
10460   declare cond6 condition for sqlstate '42000';
10461
10462   declare cond7 condition for sqlstate '28000';
10463
10464   declare cond8 condition for sqlstate '3D000';
10465
10466   declare cond9 condition for sqlstate '42S01';
10467
10468   declare cond10 condition for sqlstate '42S02';
10469
10470   declare cond11 condition for sqlstate '42S22';
10471
10472   declare cond12 condition for sqlstate '21S01';
10473
10474   declare cond13 condition for sqlstate '42S21';
10475
10476   declare cond14 condition for sqlstate '42S12';
10477
10478   declare cond15 condition for sqlstate '22004';
10479
10480   declare cond16 condition for sqlstate '25000';
10481
10482   declare cond17 condition for sqlstate '40001';
10483
10484   declare cond18 condition for sqlstate '21000';
10485
10486   declare cond19 condition for sqlstate '01000';
10487
10488   declare cond20 condition for sqlstate '22003';
10489
10490   declare cond21 condition for sqlstate '22007';
10491
10492   declare cond22 condition for sqlstate '0A000';
10493
10494   declare cond23 condition for sqlstate '70100';
10495
10496   declare cond24 condition for sqlstate '2F005';
10497
10498   declare cond25 condition for sqlstate '24000';
10499
10500   declare cond26 condition for sqlstate '02000';
10501
10502   declare continue handler for cond2 set @x2 = 1;
10503
10504   declare continue handler for cond1 set @x2 = 1;
10505
10506   declare continue handler for cond3 set @x2 = 1;
10507
10508   declare continue handler for cond4 set @x2 = 1;
10509
10510   declare continue handler for cond5 set @x2 = 1;
10511
10512   declare continue handler for cond7 set @x2 = 1;
10513
10514   declare continue handler for cond6 set @x2 = 1;
10515
10516   declare continue handler for cond8 set @x2 = 1;
10517
10518   declare continue handler for cond9 set @x2 = 1;
10519
10520   declare continue handler for cond10 set @x2 = 1;
10521
10522   declare continue handler for cond11 set @x2 = 1;
10523
10524   declare continue handler for cond12 set @x2 = 1;
10525
10526   declare continue handler for cond13 set @x2 = 1;
10527
10528   declare continue handler for cond14 set @x2 = 1;
10529
10530   declare continue handler for cond15 set @x2 = 1;
10531
10532   declare continue handler for cond16 set @x2 = 1;
10533
10534   declare continue handler for cond17 set @x2 = 1;
10535
10536   declare continue handler for cond18 set @x2 = 1;
10537
10538   declare continue handler for cond19 set @x2 = 1;
10539
10540   declare continue handler for cond20 set @x2 = 1;
10541
10542   declare continue handler for cond21 set @x2 = 1;
10543
10544   declare continue handler for cond22 set @x2 = 1;
10545
10546   declare continue handler for cond23 set @x2 = 1;
10547
10548   declare continue handler for cond24 set @x2 = 1;
10549
10550   declare continue handler for cond25 set @x2 = 1;
10551
10552   declare continue handler for cond26 set @x2 = 1;
10553
10554
10555   set @x = 1;
10556
10557   insert into t2 values (1);
10558
10559   set @x = 2;
10560
10561   insert into t2 values (1);
10562
10563   set @x = 3;
10564END//
10565delimiter ;//
10566
10567CALL sp1();
10568
10569# clean up
10570DROP PROCEDURE sp1;
10571
10572# testcase: ensure that invalid condition declarations are rejected, with an appropriate error message.
10573
10574
10575DROP PROCEDURE IF EXISTS sp1;
10576
10577delimiter //;
10578--error ER_PARSE_ERROR
10579CREATE PROCEDURE sp1( )
10580BEGIN
10581    declare @x char;
10582END//
10583delimiter ;//
10584
10585DROP PROCEDURE IF EXISTS sp1;
10586
10587delimiter //;
10588--error ER_PARSE_ERROR
10589CREATE PROCEDURE sp1( )
10590BEGIN
10591    declare x char1;
10592END//
10593delimiter ;//
10594DROP PROCEDURE IF EXISTS sp1;
10595
10596delimiter //;
10597--error ER_PARSE_ERROR
10598CREATE PROCEDURE sp1( )
10599BEGIN
10600    declare accessible condition for sqlstate '02000';
10601    declare exit handler for add set @var2 = 1;
10602END//
10603delimiter ;//
10604
10605DROP PROCEDURE IF EXISTS sp1;
10606
10607delimiter //;
10608--error ER_PARSE_ERROR
10609CREATE PROCEDURE sp1( )
10610BEGIN
10611    declare add condition for sqlstate '02000';
10612    declare exit handler for add set @var2 = 1;
10613END//
10614delimiter ;//
10615
10616DROP PROCEDURE IF EXISTS sp1;
10617
10618delimiter //;
10619--error ER_PARSE_ERROR
10620CREATE PROCEDURE sp1( )
10621BEGIN
10622    declare all condition for sqlstate '02000';
10623    declare exit handler for all set @var2 = 1;
10624END//
10625delimiter ;//
10626
10627DROP PROCEDURE IF EXISTS sp1;
10628
10629delimiter //;
10630--error ER_PARSE_ERROR
10631CREATE PROCEDURE sp1( )
10632BEGIN
10633    declare alter condition for sqlstate '02000';
10634    declare exit handler for alter set @var2 = 1;
10635END//
10636delimiter ;//
10637
10638DROP PROCEDURE IF EXISTS sp1;
10639
10640delimiter //;
10641--error ER_PARSE_ERROR
10642CREATE PROCEDURE sp1( )
10643BEGIN
10644    declare analyze condition for sqlstate '02000';
10645    declare exit handler for analyze set @var2 = 1;
10646END//
10647delimiter ;//
10648
10649DROP PROCEDURE IF EXISTS sp1;
10650
10651delimiter //;
10652--error ER_PARSE_ERROR
10653CREATE PROCEDURE sp1( )
10654BEGIN
10655    declare and condition for sqlstate '02000';
10656    declare exit handler for and set @var2 = 1;
10657END//
10658delimiter ;//
10659
10660DROP PROCEDURE IF EXISTS sp1;
10661
10662delimiter //;
10663--error ER_PARSE_ERROR
10664CREATE PROCEDURE sp1( )
10665BEGIN
10666    declare as condition for sqlstate '02000';
10667    declare exit handler for as set @var2 = 1;
10668END//
10669delimiter ;//
10670
10671DROP PROCEDURE IF EXISTS sp1;
10672
10673delimiter //;
10674--error ER_PARSE_ERROR
10675CREATE PROCEDURE sp1( )
10676BEGIN
10677    declare asc condition for sqlstate '02000';
10678    declare exit handler for asc set @var2 = 1;
10679END//
10680delimiter ;//
10681
10682DROP PROCEDURE IF EXISTS sp1;
10683
10684delimiter //;
10685--error ER_PARSE_ERROR
10686CREATE PROCEDURE sp1( )
10687BEGIN
10688    declare asensitive condition for sqlstate '02000';
10689    declare exit handler for asensitive set @var2 = 1;
10690END//
10691delimiter ;//
10692
10693DROP PROCEDURE IF EXISTS sp1;
10694
10695delimiter //;
10696--error ER_PARSE_ERROR
10697CREATE PROCEDURE sp1( )
10698BEGIN
10699    declare before condition for sqlstate '02000';
10700    declare exit handler for before set @var2 = 1;
10701END//
10702delimiter ;//
10703
10704DROP PROCEDURE IF EXISTS sp1;
10705
10706delimiter //;
10707--error ER_PARSE_ERROR
10708CREATE PROCEDURE sp1( )
10709BEGIN
10710    declare between condition for sqlstate '02000';
10711    declare exit handler for between set @var2 = 1;
10712END//
10713delimiter ;//
10714
10715DROP PROCEDURE IF EXISTS sp1;
10716
10717delimiter //;
10718--error ER_PARSE_ERROR
10719CREATE PROCEDURE sp1( )
10720BEGIN
10721    declare bigint condition for sqlstate '02000';
10722    declare exit handler for bigint set @var2 = 1;
10723END//
10724delimiter ;//
10725
10726DROP PROCEDURE IF EXISTS sp1;
10727
10728delimiter //;
10729--error ER_PARSE_ERROR
10730CREATE PROCEDURE sp1( )
10731BEGIN
10732    declare binary condition for sqlstate '02000';
10733    declare exit handler for binary set @var2 = 1;
10734END//
10735delimiter ;//
10736
10737DROP PROCEDURE IF EXISTS sp1;
10738
10739delimiter //;
10740--error ER_PARSE_ERROR
10741CREATE PROCEDURE sp1( )
10742BEGIN
10743    declare blob condition for sqlstate '02000';
10744    declare exit handler for blob set @var2 = 1;
10745END//
10746delimiter ;//
10747
10748DROP PROCEDURE IF EXISTS sp1;
10749
10750delimiter //;
10751--error ER_PARSE_ERROR
10752CREATE PROCEDURE sp1( )
10753BEGIN
10754    declare both condition for sqlstate '02000';
10755    declare exit handler for both set @var2 = 1;
10756END//
10757delimiter ;//
10758
10759DROP PROCEDURE IF EXISTS sp1;
10760
10761delimiter //;
10762--error ER_PARSE_ERROR
10763CREATE PROCEDURE sp1( )
10764BEGIN
10765    declare by condition for sqlstate '02000';
10766    declare exit handler for by set @var2 = 1;
10767END//
10768delimiter ;//
10769
10770DROP PROCEDURE IF EXISTS sp1;
10771
10772delimiter //;
10773--error ER_PARSE_ERROR
10774CREATE PROCEDURE sp1( )
10775BEGIN
10776    declare call condition for sqlstate '02000';
10777    declare exit handler for CALL set @var2 = 1;
10778END//
10779delimiter ;//
10780
10781DROP PROCEDURE IF EXISTS sp1;
10782
10783delimiter //;
10784--error ER_PARSE_ERROR
10785CREATE PROCEDURE sp1( )
10786BEGIN
10787    declare cascade condition for sqlstate '02000';
10788    declare exit handler for cascade set @var2 = 1;
10789END//
10790delimiter ;//
10791
10792DROP PROCEDURE IF EXISTS sp1;
10793
10794delimiter //;
10795--error ER_PARSE_ERROR
10796CREATE PROCEDURE sp1( )
10797BEGIN
10798    declare case condition for sqlstate '02000';
10799    declare exit handler for case set @var2 = 1;
10800END//
10801delimiter ;//
10802
10803DROP PROCEDURE IF EXISTS sp1;
10804
10805delimiter //;
10806--error ER_PARSE_ERROR
10807CREATE PROCEDURE sp1( )
10808BEGIN
10809    declare change condition for sqlstate '02000';
10810    declare exit handler for change set @var2 = 1;
10811END//
10812delimiter ;//
10813
10814DROP PROCEDURE IF EXISTS sp1;
10815
10816delimiter //;
10817--error ER_PARSE_ERROR
10818CREATE PROCEDURE sp1( )
10819BEGIN
10820    declare char condition for sqlstate '02000';
10821    declare exit handler for char set @var2 = 1;
10822END//
10823delimiter ;//
10824
10825DROP PROCEDURE IF EXISTS sp1;
10826
10827delimiter //;
10828--error ER_PARSE_ERROR
10829CREATE PROCEDURE sp1( )
10830BEGIN
10831    declare character condition for sqlstate '02000';
10832    declare exit handler for character set @var2 = 1;
10833END//
10834delimiter ;//
10835
10836DROP PROCEDURE IF EXISTS sp1;
10837
10838delimiter //;
10839--error ER_PARSE_ERROR
10840CREATE PROCEDURE sp1( )
10841BEGIN
10842    declare check condition for sqlstate '02000';
10843    declare exit handler for check set @var2 = 1;
10844END//
10845delimiter ;//
10846
10847DROP PROCEDURE IF EXISTS sp1;
10848
10849delimiter //;
10850#--error ER_PARSE_ERROR
10851CREATE PROCEDURE sp1( )
10852BEGIN
10853    declare collate condition for sqlstate '02000';
10854    declare exit handler for collate set @var2 = 1;
10855END//
10856delimiter ;//
10857
10858DROP PROCEDURE IF EXISTS sp1;
10859
10860delimiter //;
10861--error ER_PARSE_ERROR
10862CREATE PROCEDURE sp1( )
10863BEGIN
10864    declare column condition for sqlstate '02000';
10865    declare exit handler for column set @var2 = 1;
10866END//
10867delimiter ;//
10868DROP PROCEDURE IF EXISTS sp1;
10869
10870delimiter //;
10871--error ER_PARSE_ERROR
10872CREATE PROCEDURE sp1( )
10873BEGIN
10874    declare condition condition for sqlstate '02000';
10875    declare exit handler for condition set @var2 = 1;
10876END//
10877delimiter ;//
10878DROP PROCEDURE IF EXISTS sp1;
10879
10880delimiter //;
10881#--error ER_PARSE_ERROR
10882CREATE PROCEDURE sp1( )
10883BEGIN
10884    declare connection condition for sqlstate '02000';
10885    declare exit handler for connection set @var2 = 1;
10886END//
10887delimiter ;//
10888DROP PROCEDURE IF EXISTS sp1;
10889
10890delimiter //;
10891--error ER_PARSE_ERROR
10892CREATE PROCEDURE sp1( )
10893BEGIN
10894    declare constraint condition for sqlstate '02000';
10895    declare exit handler for constraint set @var2 = 1;
10896END//
10897delimiter ;//
10898
10899DROP PROCEDURE IF EXISTS sp1;
10900
10901delimiter //;
10902--error ER_PARSE_ERROR
10903CREATE PROCEDURE sp1( )
10904BEGIN
10905    declare continue condition for sqlstate '02000';
10906    declare exit handler for continue set @var2 = 1;
10907END//
10908delimiter ;//
10909
10910DROP PROCEDURE IF EXISTS sp1;
10911
10912delimiter //;
10913--error ER_PARSE_ERROR
10914CREATE PROCEDURE sp1( )
10915BEGIN
10916    declare convert condition for sqlstate '02000';
10917    declare exit handler for convert set @var2 = 1;
10918END//
10919delimiter ;//
10920
10921DROP PROCEDURE IF EXISTS sp1;
10922
10923delimiter //;
10924--error ER_PARSE_ERROR
10925CREATE PROCEDURE sp1( )
10926BEGIN
10927    declare create condition for sqlstate '02000';
10928    declare exit handler for create set @var2 = 1;
10929END//
10930delimiter ;//
10931
10932DROP PROCEDURE IF EXISTS sp1;
10933
10934delimiter //;
10935--error ER_PARSE_ERROR
10936CREATE PROCEDURE sp1( )
10937BEGIN
10938    declare cross condition for sqlstate '02000';
10939    declare exit handler for cross set @var2 = 1;
10940END//
10941delimiter ;//
10942
10943DROP PROCEDURE IF EXISTS sp1;
10944
10945delimiter //;
10946--error ER_PARSE_ERROR
10947CREATE PROCEDURE sp1( )
10948BEGIN
10949    declare current_date condition for sqlstate '02000';
10950    declare exit handler for current_date set @var2 = 1;
10951END//
10952delimiter ;//
10953
10954DROP PROCEDURE IF EXISTS sp1;
10955
10956delimiter //;
10957--error ER_PARSE_ERROR
10958CREATE PROCEDURE sp1( )
10959BEGIN
10960    declare current_time condition for sqlstate '02000';
10961    declare exit handler for current_time set @var2 = 1;
10962END//
10963delimiter ;//
10964
10965DROP PROCEDURE IF EXISTS sp1;
10966
10967delimiter //;
10968--error ER_PARSE_ERROR
10969CREATE PROCEDURE sp1( )
10970BEGIN
10971    declare current_timestamp condition for sqlstate '02000';
10972    declare exit handler for current_timestamp set @var2 = 1;
10973END//
10974delimiter ;//
10975
10976DROP PROCEDURE IF EXISTS sp1;
10977
10978delimiter //;
10979--error ER_PARSE_ERROR
10980CREATE PROCEDURE sp1( )
10981BEGIN
10982    declare current_user condition for sqlstate '02000';
10983    declare exit handler for current_user set @var2 = 1;
10984END//
10985delimiter ;//
10986
10987DROP PROCEDURE IF EXISTS sp1;
10988
10989delimiter //;
10990--error ER_PARSE_ERROR
10991CREATE PROCEDURE sp1( )
10992BEGIN
10993    declare cursor condition for sqlstate '02000';
10994    declare exit handler for cursor set @var2 = 1;
10995END//
10996delimiter ;//
10997
10998DROP PROCEDURE IF EXISTS sp1;
10999
11000delimiter //;
11001--error ER_PARSE_ERROR
11002CREATE PROCEDURE sp1( )
11003BEGIN
11004    declare database condition for sqlstate '02000';
11005    declare exit handler for database set @var2 = 1;
11006END//
11007delimiter ;//
11008
11009DROP PROCEDURE IF EXISTS sp1;
11010
11011delimiter //;
11012--error ER_PARSE_ERROR
11013CREATE PROCEDURE sp1( )
11014BEGIN
11015    declare databases condition for sqlstate '02000';
11016    declare exit handler for databases set @var2 = 1;
11017END//
11018delimiter ;//
11019
11020DROP PROCEDURE IF EXISTS sp1;
11021
11022delimiter //;
11023--error ER_PARSE_ERROR
11024CREATE PROCEDURE sp1( )
11025BEGIN
11026    declare day_hour condition for sqlstate '02000';
11027    declare exit handler for day_hour set @var2 = 1;
11028END//
11029delimiter ;//
11030
11031DROP PROCEDURE IF EXISTS sp1;
11032
11033delimiter //;
11034--error ER_PARSE_ERROR
11035CREATE PROCEDURE sp1( )
11036BEGIN
11037    declare day_microsecond condition for sqlstate '02000';
11038    declare exit handler for day_microsecond set @var2 = 1;
11039END//
11040delimiter ;//
11041
11042DROP PROCEDURE IF EXISTS sp1;
11043
11044delimiter //;
11045--error ER_PARSE_ERROR
11046CREATE PROCEDURE sp1( )
11047BEGIN
11048    declare day_minute condition for sqlstate '02000';
11049    declare exit handler for day_minute set @var2 = 1;
11050END//
11051delimiter ;//
11052
11053DROP PROCEDURE IF EXISTS sp1;
11054
11055delimiter //;
11056--error ER_PARSE_ERROR
11057CREATE PROCEDURE sp1( )
11058BEGIN
11059    declare day_second condition for sqlstate '02000';
11060    declare exit handler for day_second set @var2 = 1;
11061END//
11062delimiter ;//
11063
11064DROP PROCEDURE IF EXISTS sp1;
11065
11066delimiter //;
11067--error ER_PARSE_ERROR
11068CREATE PROCEDURE sp1( )
11069BEGIN
11070    declare dec condition for sqlstate '02000';
11071    declare exit handler for dec set @var2 = 1;
11072END//
11073delimiter ;//
11074
11075DROP PROCEDURE IF EXISTS sp1;
11076
11077delimiter //;
11078--error ER_PARSE_ERROR
11079CREATE PROCEDURE sp1( )
11080BEGIN
11081    declare decimal condition for sqlstate '02000';
11082    declare exit handler for decimal set @var2 = 1;
11083END//
11084delimiter ;//
11085
11086DROP PROCEDURE IF EXISTS sp1;
11087
11088delimiter //;
11089--error ER_PARSE_ERROR
11090CREATE PROCEDURE sp1( )
11091BEGIN
11092    declare declare condition for sqlstate '02000';
11093    declare exit handler for declare set @var2 = 1;
11094END//
11095delimiter ;//
11096
11097DROP PROCEDURE IF EXISTS sp1;
11098
11099delimiter //;
11100--error ER_PARSE_ERROR
11101CREATE PROCEDURE sp1( )
11102BEGIN
11103    declare default condition for sqlstate '02000';
11104    declare exit handler for default set @var2 = 1;
11105END//
11106delimiter ;//
11107
11108DROP PROCEDURE IF EXISTS sp1;
11109
11110delimiter //;
11111--error ER_PARSE_ERROR
11112CREATE PROCEDURE sp1( )
11113BEGIN
11114    declare delayed condition for sqlstate '02000';
11115    declare exit handler for delayed set @var2 = 1;
11116END//
11117delimiter ;//
11118
11119DROP PROCEDURE IF EXISTS sp1;
11120
11121delimiter //;
11122--error ER_PARSE_ERROR
11123CREATE PROCEDURE sp1( )
11124BEGIN
11125    declare delete condition for sqlstate '02000';
11126    declare exit handler for delete set @var2 = 1;
11127END//
11128delimiter ;//
11129
11130DROP PROCEDURE IF EXISTS sp1;
11131
11132delimiter //;
11133--error ER_PARSE_ERROR
11134CREATE PROCEDURE sp1( )
11135BEGIN
11136    declare desc condition for sqlstate '02000';
11137    declare exit handler for desc set @var2 = 1;
11138END//
11139delimiter ;//
11140
11141DROP PROCEDURE IF EXISTS sp1;
11142
11143delimiter //;
11144--error ER_PARSE_ERROR
11145CREATE PROCEDURE sp1( )
11146BEGIN
11147    declare describe condition for sqlstate '02000';
11148    declare exit handler for describe set @var2 = 1;
11149END//
11150delimiter ;//
11151
11152DROP PROCEDURE IF EXISTS sp1;
11153
11154delimiter //;
11155--error ER_PARSE_ERROR
11156CREATE PROCEDURE sp1( )
11157BEGIN
11158    declare deterministic condition for sqlstate '02000';
11159    declare exit handler for deterministic set @var2 = 1;
11160END//
11161delimiter ;//
11162
11163DROP PROCEDURE IF EXISTS sp1;
11164
11165delimiter //;
11166--error ER_PARSE_ERROR
11167CREATE PROCEDURE sp1( )
11168BEGIN
11169    declare distinct condition for sqlstate '02000';
11170    declare exit handler for distinct set @var2 = 1;
11171END//
11172delimiter ;//
11173
11174DROP PROCEDURE IF EXISTS sp1;
11175
11176delimiter //;
11177--error ER_PARSE_ERROR
11178CREATE PROCEDURE sp1( )
11179BEGIN
11180    declare distinctrow condition for sqlstate '02000';
11181    declare exit handler for distinctrow set @var2 = 1;
11182END//
11183delimiter ;//
11184
11185DROP PROCEDURE IF EXISTS sp1;
11186
11187delimiter //;
11188--error ER_PARSE_ERROR
11189CREATE PROCEDURE sp1( )
11190BEGIN
11191    declare div condition for sqlstate '02000';
11192    declare exit handler for div set @var2 = 1;
11193END//
11194delimiter ;//
11195
11196DROP PROCEDURE IF EXISTS sp1;
11197
11198delimiter //;
11199--error ER_PARSE_ERROR
11200CREATE PROCEDURE sp1( )
11201BEGIN
11202    declare double condition for sqlstate '02000';
11203    declare exit handler for double set @var2 = 1;
11204END//
11205delimiter ;//
11206
11207DROP PROCEDURE IF EXISTS sp1;
11208
11209delimiter //;
11210--error ER_PARSE_ERROR
11211CREATE PROCEDURE sp1( )
11212BEGIN
11213    declare drop condition for sqlstate '02000';
11214    declare exit handler for drop set @var2 = 1;
11215END//
11216delimiter ;//
11217
11218DROP PROCEDURE IF EXISTS sp1;
11219
11220delimiter //;
11221--error ER_PARSE_ERROR
11222CREATE PROCEDURE sp1( )
11223BEGIN
11224    declare dual condition for sqlstate '02000';
11225    declare exit handler for dual set @var2 = 1;
11226END//
11227delimiter ;//
11228
11229DROP PROCEDURE IF EXISTS sp1;
11230
11231delimiter //;
11232--error ER_PARSE_ERROR
11233CREATE PROCEDURE sp1( )
11234BEGIN
11235    declare each condition for sqlstate '02000';
11236    declare exit handler for each set @var2 = 1;
11237END//
11238delimiter ;//
11239
11240DROP PROCEDURE IF EXISTS sp1;
11241
11242delimiter //;
11243--error ER_PARSE_ERROR
11244CREATE PROCEDURE sp1( )
11245BEGIN
11246    declare else condition for sqlstate '02000';
11247    declare exit handler for else set @var2 = 1;
11248END//
11249delimiter ;//
11250
11251DROP PROCEDURE IF EXISTS sp1;
11252
11253delimiter //;
11254--error ER_PARSE_ERROR
11255CREATE PROCEDURE sp1( )
11256BEGIN
11257    declare elseif condition for sqlstate '02000';
11258    declare exit handler for elseif set @var2 = 1;
11259END//
11260delimiter ;//
11261
11262DROP PROCEDURE IF EXISTS sp1;
11263
11264delimiter //;
11265--error ER_PARSE_ERROR
11266CREATE PROCEDURE sp1( )
11267BEGIN
11268    declare enclosed condition for sqlstate '02000';
11269    declare exit handler for enclosed set @var2 = 1;
11270END//
11271delimiter ;//
11272
11273DROP PROCEDURE IF EXISTS sp1;
11274
11275delimiter //;
11276--error ER_PARSE_ERROR
11277CREATE PROCEDURE sp1( )
11278BEGIN
11279    declare escaped condition for sqlstate '02000';
11280    declare exit handler for escaped set @var2 = 1;
11281END//
11282delimiter ;//
11283
11284DROP PROCEDURE IF EXISTS sp1;
11285
11286delimiter //;
11287--error ER_PARSE_ERROR
11288CREATE PROCEDURE sp1( )
11289BEGIN
11290    declare exists condition for sqlstate '02000';
11291    declare exit handler for exists set @var2 = 1;
11292END//
11293delimiter ;//
11294
11295DROP PROCEDURE IF EXISTS sp1;
11296
11297delimiter //;
11298--error ER_PARSE_ERROR
11299CREATE PROCEDURE sp1( )
11300BEGIN
11301    declare exit condition for sqlstate '02000';
11302    declare exit handler for exit set @var2 = 1;
11303END//
11304delimiter ;//
11305
11306DROP PROCEDURE IF EXISTS sp1;
11307
11308delimiter //;
11309--error ER_PARSE_ERROR
11310CREATE PROCEDURE sp1( )
11311BEGIN
11312    declare explain condition for sqlstate '02000';
11313    declare exit handler for explain set @var2 = 1;
11314END//
11315delimiter ;//
11316
11317DROP PROCEDURE IF EXISTS sp1;
11318
11319delimiter //;
11320--error ER_PARSE_ERROR
11321CREATE PROCEDURE sp1( )
11322BEGIN
11323    declare false condition for sqlstate '02000';
11324    declare exit handler for false set @var2 = 1;
11325END//
11326delimiter ;//
11327
11328DROP PROCEDURE IF EXISTS sp1;
11329
11330delimiter //;
11331--error ER_PARSE_ERROR
11332CREATE PROCEDURE sp1( )
11333BEGIN
11334    declare fetch condition for sqlstate '02000';
11335    declare exit handler for fetch set @var2 = 1;
11336END//
11337delimiter ;//
11338
11339DROP PROCEDURE IF EXISTS sp1;
11340
11341delimiter //;
11342--error ER_PARSE_ERROR
11343CREATE PROCEDURE sp1( )
11344BEGIN
11345    declare float condition for sqlstate '02000';
11346    declare exit handler for float set @var2 = 1;
11347END//
11348delimiter ;//
11349
11350DROP PROCEDURE IF EXISTS sp1;
11351
11352delimiter //;
11353--error ER_PARSE_ERROR
11354CREATE PROCEDURE sp1( )
11355BEGIN
11356    declare float4 condition for sqlstate '02000';
11357    declare exit handler for add set @var2 = 1;
11358END//
11359delimiter ;//
11360
11361DROP PROCEDURE IF EXISTS sp1;
11362
11363delimiter //;
11364--error ER_PARSE_ERROR
11365CREATE PROCEDURE sp1( )
11366BEGIN
11367    declare float8 condition for sqlstate '02000';
11368    declare exit handler for add set @var2 = 1;
11369END//
11370delimiter ;//
11371
11372DROP PROCEDURE IF EXISTS sp1;
11373
11374delimiter //;
11375--error ER_PARSE_ERROR
11376CREATE PROCEDURE sp1( )
11377BEGIN
11378    declare for condition for sqlstate '02000';
11379    declare exit handler for for set @var2 = 1;
11380END//
11381delimiter ;//
11382
11383DROP PROCEDURE IF EXISTS sp1;
11384
11385delimiter //;
11386--error ER_PARSE_ERROR
11387CREATE PROCEDURE sp1( )
11388BEGIN
11389    declare force condition for sqlstate '02000';
11390    declare exit handler for force set @var2 = 1;
11391END//
11392delimiter ;//
11393
11394DROP PROCEDURE IF EXISTS sp1;
11395
11396delimiter //;
11397--error ER_PARSE_ERROR
11398CREATE PROCEDURE sp1( )
11399BEGIN
11400    declare foreign condition for sqlstate '02000';
11401    declare exit handler for foreign set @var2 = 1;
11402END//
11403delimiter ;//
11404
11405DROP PROCEDURE IF EXISTS sp1;
11406
11407delimiter //;
11408--error ER_PARSE_ERROR
11409CREATE PROCEDURE sp1( )
11410BEGIN
11411    declare from condition for sqlstate '02000';
11412    declare exit handler for from set @var2 = 1;
11413END//
11414delimiter ;//
11415
11416DROP PROCEDURE IF EXISTS sp1;
11417
11418delimiter //;
11419--error ER_PARSE_ERROR
11420CREATE PROCEDURE sp1( )
11421BEGIN
11422    declare fulltext condition for sqlstate '02000';
11423    declare exit handler for fulltext set @var2 = 1;
11424END//
11425delimiter ;//
11426
11427DROP PROCEDURE IF EXISTS sp1;
11428
11429delimiter //;
11430--error ER_PARSE_ERROR
11431CREATE PROCEDURE sp1( )
11432BEGIN
11433    declare grant condition for sqlstate '02000';
11434    declare exit handler for grant set @var2 = 1;
11435END//
11436delimiter ;//
11437
11438DROP PROCEDURE IF EXISTS sp1;
11439
11440delimiter //;
11441--error ER_PARSE_ERROR
11442CREATE PROCEDURE sp1( )
11443BEGIN
11444    declare group condition for sqlstate '02000';
11445    declare exit handler for group set @var2 = 1;
11446END//
11447delimiter ;//
11448
11449DROP PROCEDURE IF EXISTS sp1;
11450
11451delimiter //;
11452--error ER_PARSE_ERROR
11453CREATE PROCEDURE sp1( )
11454BEGIN
11455    declare having condition for sqlstate '02000';
11456    declare exit handler for having set @var2 = 1;
11457END//
11458delimiter ;//
11459
11460DROP PROCEDURE IF EXISTS sp1;
11461
11462delimiter //;
11463--error ER_PARSE_ERROR
11464CREATE PROCEDURE sp1( )
11465BEGIN
11466    declare high_priority condition for sqlstate '02000';
11467    declare exit handler for high_priority set @var2 = 1;
11468END//
11469delimiter ;//
11470
11471DROP PROCEDURE IF EXISTS sp1;
11472
11473delimiter //;
11474--error ER_PARSE_ERROR
11475CREATE PROCEDURE sp1( )
11476BEGIN
11477    declare hour_microsecond condition for sqlstate '02000';
11478    declare exit handler for hour_microsecond set @var2 = 1;
11479END//
11480delimiter ;//
11481
11482DROP PROCEDURE IF EXISTS sp1;
11483
11484delimiter //;
11485--error ER_PARSE_ERROR
11486CREATE PROCEDURE sp1( )
11487BEGIN
11488    declare hour_minute condition for sqlstate '02000';
11489    declare exit handler for hour_minute set @var2 = 1;
11490END//
11491delimiter ;//
11492
11493DROP PROCEDURE IF EXISTS sp1;
11494
11495delimiter //;
11496--error ER_PARSE_ERROR
11497CREATE PROCEDURE sp1( )
11498BEGIN
11499    declare hour_second condition for sqlstate '02000';
11500    declare exit handler for hour_second set @var2 = 1;
11501END//
11502delimiter ;//
11503
11504DROP PROCEDURE IF EXISTS sp1;
11505
11506delimiter //;
11507--error ER_PARSE_ERROR
11508CREATE PROCEDURE sp1( )
11509BEGIN
11510    declare if condition for sqlstate '02000';
11511    declare exit handler for if set @var2 = 1;
11512END//
11513delimiter ;//
11514
11515DROP PROCEDURE IF EXISTS sp1;
11516
11517delimiter //;
11518--error ER_PARSE_ERROR
11519CREATE PROCEDURE sp1( )
11520BEGIN
11521    declare ignore condition for sqlstate '02000';
11522    declare exit handler for ignore set @var2 = 1;
11523END//
11524delimiter ;//
11525
11526DROP PROCEDURE IF EXISTS sp1;
11527
11528delimiter //;
11529--error ER_PARSE_ERROR
11530CREATE PROCEDURE sp1( )
11531BEGIN
11532    declare in condition for sqlstate '02000';
11533    declare exit handler for in set @var2 = 1;
11534END//
11535delimiter ;//
11536
11537DROP PROCEDURE IF EXISTS sp1;
11538
11539delimiter //;
11540--error ER_PARSE_ERROR
11541CREATE PROCEDURE sp1( )
11542BEGIN
11543    declare index condition for sqlstate '02000';
11544    declare exit handler for index set @var2 = 1;
11545END//
11546delimiter ;//
11547
11548DROP PROCEDURE IF EXISTS sp1;
11549
11550delimiter //;
11551--error ER_PARSE_ERROR
11552CREATE PROCEDURE sp1( )
11553BEGIN
11554    declare infile condition for sqlstate '02000';
11555    declare exit handler for infile set @var2 = 1;
11556END//
11557delimiter ;//
11558
11559DROP PROCEDURE IF EXISTS sp1;
11560
11561delimiter //;
11562--error ER_PARSE_ERROR
11563CREATE PROCEDURE sp1( )
11564BEGIN
11565    declare inner condition for sqlstate '02000';
11566    declare exit handler for inner set @var2 = 1;
11567END//
11568delimiter ;//
11569
11570DROP PROCEDURE IF EXISTS sp1;
11571
11572delimiter //;
11573--error ER_PARSE_ERROR
11574CREATE PROCEDURE sp1( )
11575BEGIN
11576    declare inout condition for sqlstate '02000';
11577    declare exit handler for inout set @var2 = 1;
11578END//
11579delimiter ;//
11580
11581DROP PROCEDURE IF EXISTS sp1;
11582
11583delimiter //;
11584--error ER_PARSE_ERROR
11585CREATE PROCEDURE sp1( )
11586BEGIN
11587    declare insensitive condition for sqlstate '02000';
11588    declare exit handler for insensitive set @var2 = 1;
11589END//
11590delimiter ;//
11591
11592DROP PROCEDURE IF EXISTS sp1;
11593
11594delimiter //;
11595--error ER_PARSE_ERROR
11596CREATE PROCEDURE sp1( )
11597BEGIN
11598    declare insert condition for sqlstate '02000';
11599    declare exit handler for insert set @var2 = 1;
11600END//
11601delimiter ;//
11602
11603DROP PROCEDURE IF EXISTS sp1;
11604
11605delimiter //;
11606--error ER_PARSE_ERROR
11607CREATE PROCEDURE sp1( )
11608BEGIN
11609    declare int condition for sqlstate '02000';
11610    declare exit handler for int set @var2 = 1;
11611END//
11612delimiter ;//
11613
11614DROP PROCEDURE IF EXISTS sp1;
11615
11616delimiter //;
11617--error ER_PARSE_ERROR
11618CREATE PROCEDURE sp1( )
11619BEGIN
11620    declare int1 condition for sqlstate '02000';
11621    declare exit handler for int set @var2 = 1;
11622END//
11623delimiter ;//
11624
11625DROP PROCEDURE IF EXISTS sp1;
11626
11627delimiter //;
11628--error ER_PARSE_ERROR
11629CREATE PROCEDURE sp1( )
11630BEGIN
11631    declare int2 condition for sqlstate '02000';
11632    declare exit handler for int set @var2 = 1;
11633END//
11634delimiter ;//
11635
11636DROP PROCEDURE IF EXISTS sp1;
11637
11638delimiter //;
11639--error ER_PARSE_ERROR
11640CREATE PROCEDURE sp1( )
11641BEGIN
11642    declare int3 condition for sqlstate '02000';
11643    declare exit handler for int set @var2 = 1;
11644END//
11645delimiter ;//
11646
11647DROP PROCEDURE IF EXISTS sp1;
11648
11649delimiter //;
11650--error ER_PARSE_ERROR
11651CREATE PROCEDURE sp1( )
11652BEGIN
11653    declare int4 condition for sqlstate '02000';
11654    declare exit handler for int set @var2 = 1;
11655END//
11656delimiter ;//
11657
11658DROP PROCEDURE IF EXISTS sp1;
11659
11660delimiter //;
11661--error ER_PARSE_ERROR
11662CREATE PROCEDURE sp1( )
11663BEGIN
11664    declare int8 condition for sqlstate '02000';
11665    declare exit handler for int set @var2 = 1;
11666END//
11667delimiter ;//
11668
11669DROP PROCEDURE IF EXISTS sp1;
11670
11671delimiter //;
11672--error ER_PARSE_ERROR
11673CREATE PROCEDURE sp1( )
11674BEGIN
11675    declare integer condition for sqlstate '02000';
11676    declare exit handler for integer set @var2 = 1;
11677END//
11678delimiter ;//
11679
11680DROP PROCEDURE IF EXISTS sp1;
11681
11682delimiter //;
11683--error ER_PARSE_ERROR
11684CREATE PROCEDURE sp1( )
11685BEGIN
11686    declare interval condition for sqlstate '02000';
11687    declare exit handler for interval set @var2 = 1;
11688END//
11689delimiter ;//
11690
11691DROP PROCEDURE IF EXISTS sp1;
11692
11693delimiter //;
11694--error ER_PARSE_ERROR
11695CREATE PROCEDURE sp1( )
11696BEGIN
11697    declare into condition for sqlstate '02000';
11698    declare exit handler for into set @var2 = 1;
11699END//
11700delimiter ;//
11701
11702DROP PROCEDURE IF EXISTS sp1;
11703
11704delimiter //;
11705--error ER_PARSE_ERROR
11706CREATE PROCEDURE sp1( )
11707BEGIN
11708    declare is condition for sqlstate '02000';
11709    declare exit handler for is set @var2 = 1;
11710END//
11711delimiter ;//
11712
11713DROP PROCEDURE IF EXISTS sp1;
11714
11715delimiter //;
11716--error ER_PARSE_ERROR
11717CREATE PROCEDURE sp1( )
11718BEGIN
11719    declare iterate condition for sqlstate '02000';
11720    declare exit handler for iterate set @var2 = 1;
11721END//
11722delimiter ;//
11723
11724DROP PROCEDURE IF EXISTS sp1;
11725
11726delimiter //;
11727--error ER_PARSE_ERROR
11728CREATE PROCEDURE sp1( )
11729BEGIN
11730    declare join condition for sqlstate '02000';
11731    declare exit handler for join set @var2 = 1;
11732END//
11733delimiter ;//
11734
11735DROP PROCEDURE IF EXISTS sp1;
11736
11737delimiter //;
11738--error ER_PARSE_ERROR
11739CREATE PROCEDURE sp1( )
11740BEGIN
11741    declare key condition for sqlstate '02000';
11742    declare exit handler for key set @var2 = 1;
11743END//
11744delimiter ;//
11745
11746DROP PROCEDURE IF EXISTS sp1;
11747
11748delimiter //;
11749--error ER_PARSE_ERROR
11750CREATE PROCEDURE sp1( )
11751BEGIN
11752    declare keys condition for sqlstate '02000';
11753    declare exit handler for keys set @var2 = 1;
11754END//
11755delimiter ;//
11756
11757DROP PROCEDURE IF EXISTS sp1;
11758
11759delimiter //;
11760--error ER_PARSE_ERROR
11761CREATE PROCEDURE sp1( )
11762BEGIN
11763    declare kill condition for sqlstate '02000';
11764    declare exit handler for kill set @var2 = 1;
11765END//
11766delimiter ;//
11767
11768DROP PROCEDURE IF EXISTS sp1;
11769
11770delimiter //;
11771--error ER_PARSE_ERROR
11772CREATE PROCEDURE sp1( )
11773BEGIN
11774    declare leading condition for sqlstate '02000';
11775    declare exit handler for leading set @var2 = 1;
11776END//
11777delimiter ;//
11778
11779DROP PROCEDURE IF EXISTS sp1;
11780
11781delimiter //;
11782--error ER_PARSE_ERROR
11783CREATE PROCEDURE sp1( )
11784BEGIN
11785    declare leave condition for sqlstate '02000';
11786    declare exit handler for leave set @var2 = 1;
11787END//
11788delimiter ;//
11789
11790DROP PROCEDURE IF EXISTS sp1;
11791
11792delimiter //;
11793--error ER_PARSE_ERROR
11794CREATE PROCEDURE sp1( )
11795BEGIN
11796    declare left condition for sqlstate '02000';
11797    declare exit handler for left set @var2 = 1;
11798END//
11799delimiter ;//
11800
11801DROP PROCEDURE IF EXISTS sp1;
11802
11803delimiter //;
11804--error ER_PARSE_ERROR
11805CREATE PROCEDURE sp1( )
11806BEGIN
11807    declare like condition for sqlstate '02000';
11808    declare exit handler for like set @var2 = 1;
11809END//
11810delimiter ;//
11811
11812DROP PROCEDURE IF EXISTS sp1;
11813
11814delimiter //;
11815--error ER_PARSE_ERROR
11816CREATE PROCEDURE sp1( )
11817BEGIN
11818    declare limit condition for sqlstate '02000';
11819    declare exit handler for limit set @var2 = 1;
11820END//
11821delimiter ;//
11822
11823DROP PROCEDURE IF EXISTS sp1;
11824
11825delimiter //;
11826--error ER_PARSE_ERROR
11827CREATE PROCEDURE sp1( )
11828BEGIN
11829    declare linear condition for sqlstate '02000';
11830    declare exit handler for int set @var2 = 1;
11831END//
11832delimiter ;//
11833
11834DROP PROCEDURE IF EXISTS sp1;
11835
11836delimiter //;
11837--error ER_PARSE_ERROR
11838CREATE PROCEDURE sp1( )
11839BEGIN
11840    declare lines condition for sqlstate '02000';
11841    declare exit handler for lines set @var2 = 1;
11842END//
11843delimiter ;//
11844
11845DROP PROCEDURE IF EXISTS sp1;
11846
11847delimiter //;
11848--error ER_PARSE_ERROR
11849CREATE PROCEDURE sp1( )
11850BEGIN
11851    declare load condition for sqlstate '02000';
11852    declare exit handler for load set @var2 = 1;
11853END//
11854delimiter ;//
11855
11856DROP PROCEDURE IF EXISTS sp1;
11857
11858delimiter //;
11859--error ER_PARSE_ERROR
11860CREATE PROCEDURE sp1( )
11861BEGIN
11862    declare localtime condition for sqlstate '02000';
11863    declare exit handler for localtime set @var2 = 1;
11864END//
11865delimiter ;//
11866
11867DROP PROCEDURE IF EXISTS sp1;
11868
11869delimiter //;
11870--error ER_PARSE_ERROR
11871CREATE PROCEDURE sp1( )
11872BEGIN
11873    declare localtimestamp condition for sqlstate '02000';
11874    declare exit handler for localtimestamp set @var2 = 1;
11875END//
11876delimiter ;//
11877
11878DROP PROCEDURE IF EXISTS sp1;
11879
11880delimiter //;
11881--error ER_PARSE_ERROR
11882CREATE PROCEDURE sp1( )
11883BEGIN
11884    declare lock condition for sqlstate '02000';
11885    declare exit handler for lock set @var2 = 1;
11886END//
11887delimiter ;//
11888
11889DROP PROCEDURE IF EXISTS sp1;
11890
11891delimiter //;
11892--error ER_PARSE_ERROR
11893CREATE PROCEDURE sp1( )
11894BEGIN
11895    declare long condition for sqlstate '02000';
11896    declare exit handler for long set @var2 = 1;
11897END//
11898delimiter ;//
11899
11900DROP PROCEDURE IF EXISTS sp1;
11901
11902delimiter //;
11903--error ER_PARSE_ERROR
11904CREATE PROCEDURE sp1( )
11905BEGIN
11906    declare longblob condition for sqlstate '02000';
11907    declare exit handler for longblob set @var2 = 1;
11908END//
11909delimiter ;//
11910
11911DROP PROCEDURE IF EXISTS sp1;
11912
11913delimiter //;
11914--error ER_PARSE_ERROR
11915CREATE PROCEDURE sp1( )
11916BEGIN
11917    declare longtext condition for sqlstate '02000';
11918    declare exit handler for longtext set @var2 = 1;
11919END//
11920delimiter ;//
11921
11922DROP PROCEDURE IF EXISTS sp1;
11923
11924delimiter //;
11925--error ER_PARSE_ERROR
11926CREATE PROCEDURE sp1( )
11927BEGIN
11928    declare loop condition for sqlstate '02000';
11929    declare exit handler for loop set @var2 = 1;
11930END//
11931delimiter ;//
11932
11933DROP PROCEDURE IF EXISTS sp1;
11934
11935delimiter //;
11936--error ER_PARSE_ERROR
11937CREATE PROCEDURE sp1( )
11938BEGIN
11939    declare low_priority condition for sqlstate '02000';
11940    declare exit handler for low_priority set @var2 = 1;
11941END//
11942delimiter ;//
11943
11944DROP PROCEDURE IF EXISTS sp1;
11945
11946delimiter //;
11947--error ER_PARSE_ERROR
11948CREATE PROCEDURE sp1( )
11949BEGIN
11950    declare master_ssl_verify_server_cert condition for sqlstate '02000';
11951    declare exit handler for int set @var2 = 1;
11952END//
11953delimiter ;//
11954
11955DROP PROCEDURE IF EXISTS sp1;
11956
11957delimiter //;
11958--error ER_PARSE_ERROR
11959CREATE PROCEDURE sp1( )
11960BEGIN
11961    declare match condition for sqlstate '02000';
11962    declare exit handler for match set @var2 = 1;
11963END//
11964delimiter ;//
11965
11966DROP PROCEDURE IF EXISTS sp1;
11967
11968delimiter //;
11969--error ER_PARSE_ERROR
11970CREATE PROCEDURE sp1( )
11971BEGIN
11972    declare mediumblob condition for sqlstate '02000';
11973    declare exit handler for mediumblob set @var2 = 1;
11974END//
11975delimiter ;//
11976
11977DROP PROCEDURE IF EXISTS sp1;
11978
11979delimiter //;
11980--error ER_PARSE_ERROR
11981CREATE PROCEDURE sp1( )
11982BEGIN
11983    declare mediumint condition for sqlstate '02000';
11984    declare exit handler for mediumint set @var2 = 1;
11985END//
11986delimiter ;//
11987
11988DROP PROCEDURE IF EXISTS sp1;
11989
11990delimiter //;
11991--error ER_PARSE_ERROR
11992CREATE PROCEDURE sp1( )
11993BEGIN
11994    declare mediumtext condition for sqlstate '02000';
11995    declare exit handler for mediumtext set @var2 = 1;
11996END//
11997delimiter ;//
11998
11999DROP PROCEDURE IF EXISTS sp1;
12000
12001delimiter //;
12002--error ER_PARSE_ERROR
12003CREATE PROCEDURE sp1( )
12004BEGIN
12005    declare middleint condition for sqlstate '02000';
12006    declare exit handler for middleint set @var2 = 1;
12007END//
12008delimiter ;//
12009
12010DROP PROCEDURE IF EXISTS sp1;
12011
12012delimiter //;
12013--error ER_PARSE_ERROR
12014CREATE PROCEDURE sp1( )
12015BEGIN
12016    declare minute_microsecond condition for sqlstate '02000';
12017    declare exit handler for minute_microsecond set @var2 = 1;
12018END//
12019delimiter ;//
12020
12021DROP PROCEDURE IF EXISTS sp1;
12022
12023delimiter //;
12024--error ER_PARSE_ERROR
12025CREATE PROCEDURE sp1( )
12026BEGIN
12027    declare minute_second condition for sqlstate '02000';
12028    declare exit handler for minute_second set @var2 = 1;
12029END//
12030delimiter ;//
12031
12032DROP PROCEDURE IF EXISTS sp1;
12033
12034delimiter //;
12035--error ER_PARSE_ERROR
12036CREATE PROCEDURE sp1( )
12037BEGIN
12038    declare mod condition for sqlstate '02000';
12039    declare exit handler for mod set @var2 = 1;
12040END//
12041delimiter ;//
12042
12043DROP PROCEDURE IF EXISTS sp1;
12044
12045delimiter //;
12046--error ER_PARSE_ERROR
12047CREATE PROCEDURE sp1( )
12048BEGIN
12049    declare modifies condition for sqlstate '02000';
12050    declare exit handler for modifies set @var2 = 1;
12051END//
12052delimiter ;//
12053
12054DROP PROCEDURE IF EXISTS sp1;
12055
12056delimiter //;
12057--error ER_PARSE_ERROR
12058CREATE PROCEDURE sp1( )
12059BEGIN
12060    declare natural condition for sqlstate '02000';
12061    declare exit handler for natural set @var2 = 1;
12062END//
12063delimiter ;//
12064
12065DROP PROCEDURE IF EXISTS sp1;
12066
12067delimiter //;
12068--error ER_PARSE_ERROR
12069CREATE PROCEDURE sp1( )
12070BEGIN
12071    declare not condition for sqlstate '02000';
12072    declare exit handler for not set @var2 = 1;
12073END//
12074delimiter ;//
12075
12076DROP PROCEDURE IF EXISTS sp1;
12077
12078delimiter //;
12079--error ER_PARSE_ERROR
12080CREATE PROCEDURE sp1( )
12081BEGIN
12082    declare no_write_to_binlog condition for sqlstate '02000';
12083    declare exit handler for no_write_to_binlog set @var2 = 1;
12084END//
12085delimiter ;//
12086
12087DROP PROCEDURE IF EXISTS sp1;
12088
12089delimiter //;
12090--error ER_PARSE_ERROR
12091CREATE PROCEDURE sp1( )
12092BEGIN
12093    declare null condition for sqlstate '02000';
12094    declare exit handler for null set @var2 = 1;
12095END//
12096delimiter ;//
12097
12098DROP PROCEDURE IF EXISTS sp1;
12099
12100delimiter //;
12101--error ER_PARSE_ERROR
12102CREATE PROCEDURE sp1( )
12103BEGIN
12104    declare numeric condition for sqlstate '02000';
12105    declare exit handler for numeric set @var2 = 1;
12106END//
12107delimiter ;//
12108
12109DROP PROCEDURE IF EXISTS sp1;
12110
12111delimiter //;
12112--error ER_PARSE_ERROR
12113CREATE PROCEDURE sp1( )
12114BEGIN
12115    declare on condition for sqlstate '02000';
12116    declare exit handler for on set @var2 = 1;
12117END//
12118delimiter ;//
12119
12120DROP PROCEDURE IF EXISTS sp1;
12121
12122delimiter //;
12123--error ER_PARSE_ERROR
12124CREATE PROCEDURE sp1( )
12125BEGIN
12126    declare optimize condition for sqlstate '02000';
12127    declare exit handler for optimize set @var2 = 1;
12128END//
12129delimiter ;//
12130
12131DROP PROCEDURE IF EXISTS sp1;
12132
12133delimiter //;
12134--error ER_PARSE_ERROR
12135CREATE PROCEDURE sp1( )
12136BEGIN
12137    declare option condition for sqlstate '02000';
12138    declare exit handler for option set @var2 = 1;
12139END//
12140delimiter ;//
12141
12142DROP PROCEDURE IF EXISTS sp1;
12143
12144delimiter //;
12145--error ER_PARSE_ERROR
12146CREATE PROCEDURE sp1( )
12147BEGIN
12148    declare optionally condition for sqlstate '02000';
12149    declare exit handler for optionally set @var2 = 1;
12150END//
12151delimiter ;//
12152
12153DROP PROCEDURE IF EXISTS sp1;
12154
12155delimiter //;
12156--error ER_PARSE_ERROR
12157CREATE PROCEDURE sp1( )
12158BEGIN
12159    declare or condition for sqlstate '02000';
12160    declare exit handler for or set @var2 = 1;
12161END//
12162delimiter ;//
12163
12164DROP PROCEDURE IF EXISTS sp1;
12165
12166delimiter //;
12167--error ER_PARSE_ERROR
12168CREATE PROCEDURE sp1( )
12169BEGIN
12170    declare order condition for sqlstate '02000';
12171    declare exit handler for order set @var2 = 1;
12172END//
12173delimiter ;//
12174
12175DROP PROCEDURE IF EXISTS sp1;
12176
12177delimiter //;
12178--error ER_PARSE_ERROR
12179CREATE PROCEDURE sp1( )
12180BEGIN
12181    declare out condition for sqlstate '02000';
12182    declare exit handler for out set @var2 = 1;
12183END//
12184delimiter ;//
12185
12186DROP PROCEDURE IF EXISTS sp1;
12187
12188delimiter //;
12189--error ER_PARSE_ERROR
12190CREATE PROCEDURE sp1( )
12191BEGIN
12192    declare outer condition for sqlstate '02000';
12193    declare exit handler for outer set @var2 = 1;
12194END//
12195delimiter ;//
12196
12197DROP PROCEDURE IF EXISTS sp1;
12198
12199delimiter //;
12200--error ER_PARSE_ERROR
12201CREATE PROCEDURE sp1( )
12202BEGIN
12203    declare outfile condition for sqlstate '02000';
12204    declare exit handler for outfile set @var2 = 1;
12205END//
12206delimiter ;//
12207
12208DROP PROCEDURE IF EXISTS sp1;
12209
12210delimiter //;
12211--error ER_PARSE_ERROR
12212CREATE PROCEDURE sp1( )
12213BEGIN
12214    declare precision condition for sqlstate '02000';
12215    declare exit handler for precision set @var2 = 1;
12216END//
12217delimiter ;//
12218
12219DROP PROCEDURE IF EXISTS sp1;
12220
12221delimiter //;
12222--error ER_PARSE_ERROR
12223CREATE PROCEDURE sp1( )
12224BEGIN
12225    declare primary condition for sqlstate '02000';
12226    declare exit handler for primary set @var2 = 1;
12227END//
12228delimiter ;//
12229
12230DROP PROCEDURE IF EXISTS sp1;
12231
12232delimiter //;
12233--error ER_PARSE_ERROR
12234CREATE PROCEDURE sp1( )
12235BEGIN
12236    declare procedure condition for sqlstate '02000';
12237    declare exit handler for procedure set @var2 = 1;
12238END//
12239delimiter ;//
12240
12241DROP PROCEDURE IF EXISTS sp1;
12242
12243delimiter //;
12244--error ER_PARSE_ERROR
12245CREATE PROCEDURE sp1( )
12246BEGIN
12247    declare purge condition for sqlstate '02000';
12248    declare exit handler for purge set @var2 = 1;
12249END//
12250delimiter ;//
12251
12252DROP PROCEDURE IF EXISTS sp1;
12253
12254delimiter //;
12255--error ER_PARSE_ERROR
12256CREATE PROCEDURE sp1( )
12257BEGIN
12258    declare range condition for sqlstate '02000';
12259    declare exit handler for int set @var2 = 1;
12260END//
12261delimiter ;//
12262
12263DROP PROCEDURE IF EXISTS sp1;
12264
12265delimiter //;
12266--error ER_PARSE_ERROR
12267CREATE PROCEDURE sp1( )
12268BEGIN
12269    declare read condition for sqlstate '02000';
12270    declare exit handler for read set @var2 = 1;
12271END//
12272delimiter ;//
12273
12274DROP PROCEDURE IF EXISTS sp1;
12275
12276delimiter //;
12277--error ER_PARSE_ERROR
12278CREATE PROCEDURE sp1( )
12279BEGIN
12280    declare reads condition for sqlstate '02000';
12281    declare exit handler for reads set @var2 = 1;
12282END//
12283delimiter ;//
12284
12285DROP PROCEDURE IF EXISTS sp1;
12286
12287delimiter //;
12288--error ER_PARSE_ERROR
12289CREATE PROCEDURE sp1( )
12290BEGIN
12291    declare read_only condition for sqlstate '02000';
12292    declare exit handler for int set @var2 = 1;
12293END//
12294delimiter ;//
12295
12296DROP PROCEDURE IF EXISTS sp1;
12297
12298delimiter //;
12299--error ER_PARSE_ERROR
12300CREATE PROCEDURE sp1( )
12301BEGIN
12302    declare read_write condition for sqlstate '02000';
12303    declare exit handler for int set @var2 = 1;
12304END//
12305delimiter ;//
12306
12307DROP PROCEDURE IF EXISTS sp1;
12308
12309delimiter //;
12310--error ER_PARSE_ERROR
12311CREATE PROCEDURE sp1( )
12312BEGIN
12313    declare real condition for sqlstate '02000';
12314    declare exit handler for real set @var2 = 1;
12315END//
12316delimiter ;//
12317
12318DROP PROCEDURE IF EXISTS sp1;
12319
12320delimiter //;
12321--error ER_PARSE_ERROR
12322CREATE PROCEDURE sp1( )
12323BEGIN
12324    declare references condition for sqlstate '02000';
12325    declare exit handler for references set @var2 = 1;
12326END//
12327delimiter ;//
12328
12329DROP PROCEDURE IF EXISTS sp1;
12330
12331delimiter //;
12332--error ER_PARSE_ERROR
12333CREATE PROCEDURE sp1( )
12334BEGIN
12335    declare regexp condition for sqlstate '02000';
12336    declare exit handler for regexp set @var2 = 1;
12337END//
12338delimiter ;//
12339
12340DROP PROCEDURE IF EXISTS sp1;
12341
12342delimiter //;
12343--error ER_PARSE_ERROR
12344CREATE PROCEDURE sp1( )
12345BEGIN
12346    declare release condition for sqlstate '02000';
12347    declare exit handler for int set @var2 = 1;
12348END//
12349delimiter ;//
12350
12351DROP PROCEDURE IF EXISTS sp1;
12352
12353delimiter //;
12354--error ER_PARSE_ERROR
12355CREATE PROCEDURE sp1( )
12356BEGIN
12357    declare rename condition for sqlstate '02000';
12358    declare exit handler for rename set @var2 = 1;
12359END//
12360delimiter ;//
12361
12362DROP PROCEDURE IF EXISTS sp1;
12363
12364delimiter //;
12365--error ER_PARSE_ERROR
12366CREATE PROCEDURE sp1( )
12367BEGIN
12368    declare repeat condition for sqlstate '02000';
12369    declare exit handler for repeat set @var2 = 1;
12370END//
12371delimiter ;//
12372
12373DROP PROCEDURE IF EXISTS sp1;
12374
12375delimiter //;
12376--error ER_PARSE_ERROR
12377CREATE PROCEDURE sp1( )
12378BEGIN
12379    declare replace condition for sqlstate '02000';
12380    declare exit handler for replace set @var2 = 1;
12381END//
12382delimiter ;//
12383
12384DROP PROCEDURE IF EXISTS sp1;
12385
12386delimiter //;
12387--error ER_PARSE_ERROR
12388CREATE PROCEDURE sp1( )
12389BEGIN
12390    declare require condition for sqlstate '02000';
12391    declare exit handler for require set @var2 = 1;
12392END//
12393delimiter ;//
12394
12395DROP PROCEDURE IF EXISTS sp1;
12396
12397delimiter //;
12398--error ER_PARSE_ERROR
12399CREATE PROCEDURE sp1( )
12400BEGIN
12401    declare restrict condition for sqlstate '02000';
12402    declare exit handler for restrict set @var2 = 1;
12403END//
12404delimiter ;//
12405
12406DROP PROCEDURE IF EXISTS sp1;
12407
12408delimiter //;
12409--error ER_PARSE_ERROR
12410CREATE PROCEDURE sp1( )
12411BEGIN
12412    declare return condition for sqlstate '02000';
12413    declare exit handler for return set @var2 = 1;
12414END//
12415delimiter ;//
12416
12417DROP PROCEDURE IF EXISTS sp1;
12418
12419delimiter //;
12420--error ER_PARSE_ERROR
12421CREATE PROCEDURE sp1( )
12422BEGIN
12423    declare revoke condition for sqlstate '02000';
12424    declare exit handler for revoke set @var2 = 1;
12425END//
12426delimiter ;//
12427
12428DROP PROCEDURE IF EXISTS sp1;
12429
12430delimiter //;
12431--error ER_PARSE_ERROR
12432CREATE PROCEDURE sp1( )
12433BEGIN
12434    declare right condition for sqlstate '02000';
12435    declare exit handler for right set @var2 = 1;
12436END//
12437delimiter ;//
12438
12439DROP PROCEDURE IF EXISTS sp1;
12440
12441delimiter //;
12442--error ER_PARSE_ERROR
12443CREATE PROCEDURE sp1( )
12444BEGIN
12445    declare rlike condition for sqlstate '02000';
12446    declare exit handler for rlike set @var2 = 1;
12447END//
12448delimiter ;//
12449
12450DROP PROCEDURE IF EXISTS sp1;
12451
12452delimiter //;
12453--error ER_PARSE_ERROR
12454CREATE PROCEDURE sp1( )
12455BEGIN
12456    declare schema condition for sqlstate '02000';
12457    declare exit handler for schema set @var2 = 1;
12458END//
12459delimiter ;//
12460
12461DROP PROCEDURE IF EXISTS sp1;
12462
12463delimiter //;
12464--error ER_PARSE_ERROR
12465CREATE PROCEDURE sp1( )
12466BEGIN
12467    declare schemas condition for sqlstate '02000';
12468    declare exit handler for schemas set @var2 = 1;
12469END//
12470delimiter ;//
12471
12472DROP PROCEDURE IF EXISTS sp1;
12473
12474delimiter //;
12475--error ER_PARSE_ERROR
12476CREATE PROCEDURE sp1( )
12477BEGIN
12478    declare second_microsecond condition for sqlstate '02000';
12479    declare exit handler for second_microsecond set @var2 = 1;
12480END//
12481delimiter ;//
12482
12483DROP PROCEDURE IF EXISTS sp1;
12484
12485delimiter //;
12486--error ER_PARSE_ERROR
12487CREATE PROCEDURE sp1( )
12488BEGIN
12489    declare select condition for sqlstate '02000';
12490    declare exit handler for SELECT set @var2 = 1;
12491END//
12492delimiter ;//
12493
12494DROP PROCEDURE IF EXISTS sp1;
12495
12496delimiter //;
12497--error ER_PARSE_ERROR
12498CREATE PROCEDURE sp1( )
12499BEGIN
12500    declare sensitive condition for sqlstate '02000';
12501    declare exit handler for sensitive set @var2 = 1;
12502END//
12503delimiter ;//
12504
12505DROP PROCEDURE IF EXISTS sp1;
12506
12507delimiter //;
12508--error ER_PARSE_ERROR
12509CREATE PROCEDURE sp1( )
12510BEGIN
12511    declare separator condition for sqlstate '02000';
12512    declare exit handler for separator set @var2 = 1;
12513END//
12514delimiter ;//
12515
12516DROP PROCEDURE IF EXISTS sp1;
12517
12518delimiter //;
12519--error ER_PARSE_ERROR
12520CREATE PROCEDURE sp1( )
12521BEGIN
12522    declare set condition for sqlstate '02000';
12523    declare exit handler for set set @var2 = 1;
12524END//
12525delimiter ;//
12526
12527DROP PROCEDURE IF EXISTS sp1;
12528
12529delimiter //;
12530--error ER_PARSE_ERROR
12531CREATE PROCEDURE sp1( )
12532BEGIN
12533    declare show condition for sqlstate '02000';
12534    declare exit handler for show set @var2 = 1;
12535END//
12536delimiter ;//
12537
12538DROP PROCEDURE IF EXISTS sp1;
12539
12540delimiter //;
12541--error ER_PARSE_ERROR
12542CREATE PROCEDURE sp1( )
12543BEGIN
12544    declare smallint condition for sqlstate '02000';
12545    declare exit handler for smallint set @var2 = 1;
12546END//
12547delimiter ;//
12548
12549DROP PROCEDURE IF EXISTS sp1;
12550
12551delimiter //;
12552--error ER_PARSE_ERROR
12553CREATE PROCEDURE sp1( )
12554BEGIN
12555    declare spatial condition for sqlstate '02000';
12556    declare exit handler for spatial set @var2 = 1;
12557END//
12558delimiter ;//
12559
12560DROP PROCEDURE IF EXISTS sp1;
12561
12562delimiter //;
12563--error ER_PARSE_ERROR
12564CREATE PROCEDURE sp1( )
12565BEGIN
12566    declare specific condition for sqlstate '02000';
12567    declare exit handler for specific set @var2 = 1;
12568END//
12569delimiter ;//
12570
12571DROP PROCEDURE IF EXISTS sp1;
12572
12573delimiter //;
12574--error ER_PARSE_ERROR
12575CREATE PROCEDURE sp1( )
12576BEGIN
12577    declare sql condition for sqlstate '02000';
12578    declare exit handler for sql set @var2 = 1;
12579END//
12580delimiter ;//
12581
12582DROP PROCEDURE IF EXISTS sp1;
12583
12584delimiter //;
12585--error ER_PARSE_ERROR
12586CREATE PROCEDURE sp1( )
12587BEGIN
12588    declare sqlexception condition for sqlstate '02000';
12589    declare exit handler for sqlexception set @var2 = 1;
12590END//
12591delimiter ;//
12592
12593DROP PROCEDURE IF EXISTS sp1;
12594
12595delimiter //;
12596--error ER_PARSE_ERROR
12597CREATE PROCEDURE sp1( )
12598BEGIN
12599    declare sqlstate condition for sqlstate '02000';
12600    declare exit handler for sqlstate set @var2 = 1;
12601END//
12602delimiter ;//
12603
12604DROP PROCEDURE IF EXISTS sp1;
12605
12606delimiter //;
12607--error ER_PARSE_ERROR
12608CREATE PROCEDURE sp1( )
12609BEGIN
12610    declare sqlwarning condition for sqlstate '02000';
12611    declare exit handler for sqlwarning set @var2 = 1;
12612END//
12613delimiter ;//
12614
12615DROP PROCEDURE IF EXISTS sp1;
12616
12617delimiter //;
12618--error ER_PARSE_ERROR
12619CREATE PROCEDURE sp1( )
12620BEGIN
12621    declare sql_big_result condition for sqlstate '02000';
12622    declare exit handler for sql_big_result set @var2 = 1;
12623END//
12624delimiter ;//
12625
12626DROP PROCEDURE IF EXISTS sp1;
12627
12628delimiter //;
12629--error ER_PARSE_ERROR
12630CREATE PROCEDURE sp1( )
12631BEGIN
12632    declare sql_calc_found_rows condition for sqlstate '02000';
12633    declare exit handler for sql_calc_found_rows set @var2 = 1;
12634END//
12635delimiter ;//
12636
12637DROP PROCEDURE IF EXISTS sp1;
12638
12639delimiter //;
12640--error ER_PARSE_ERROR
12641CREATE PROCEDURE sp1( )
12642BEGIN
12643    declare sql_small_result condition for sqlstate '02000';
12644    declare exit handler for sql_small_result set @var2 = 1;
12645END//
12646delimiter ;//
12647
12648DROP PROCEDURE IF EXISTS sp1;
12649
12650delimiter //;
12651--error ER_PARSE_ERROR
12652CREATE PROCEDURE sp1( )
12653BEGIN
12654    declare ssl condition for sqlstate '02000';
12655    declare exit handler for ssl set @var2 = 1;
12656END//
12657delimiter ;//
12658
12659DROP PROCEDURE IF EXISTS sp1;
12660
12661delimiter //;
12662--error ER_PARSE_ERROR
12663CREATE PROCEDURE sp1( )
12664BEGIN
12665    declare starting condition for sqlstate '02000';
12666    declare exit handler for starting set @var2 = 1;
12667END//
12668delimiter ;//
12669
12670DROP PROCEDURE IF EXISTS sp1;
12671
12672delimiter //;
12673--error ER_PARSE_ERROR
12674CREATE PROCEDURE sp1( )
12675BEGIN
12676    declare straight_join condition for sqlstate '02000';
12677    declare exit handler for straight_join set @var2 = 1;
12678END//
12679delimiter ;//
12680
12681DROP PROCEDURE IF EXISTS sp1;
12682
12683delimiter //;
12684--error ER_PARSE_ERROR
12685CREATE PROCEDURE sp1( )
12686BEGIN
12687    declare table condition for sqlstate '02000';
12688    declare exit handler for table set @var2 = 1;
12689END//
12690delimiter ;//
12691
12692DROP PROCEDURE IF EXISTS sp1;
12693
12694delimiter //;
12695--error ER_PARSE_ERROR
12696CREATE PROCEDURE sp1( )
12697BEGIN
12698    declare terminated condition for sqlstate '02000';
12699    declare exit handler for terminated set @var2 = 1;
12700END//
12701delimiter ;//
12702
12703DROP PROCEDURE IF EXISTS sp1;
12704
12705delimiter //;
12706--error ER_PARSE_ERROR
12707CREATE PROCEDURE sp1( )
12708BEGIN
12709    declare then condition for sqlstate '02000';
12710    declare exit handler for then set @var2 = 1;
12711END//
12712delimiter ;//
12713
12714DROP PROCEDURE IF EXISTS sp1;
12715
12716delimiter //;
12717--error ER_PARSE_ERROR
12718CREATE PROCEDURE sp1( )
12719BEGIN
12720    declare tinyblob condition for sqlstate '02000';
12721    declare exit handler for tinyblob set @var2 = 1;
12722END//
12723delimiter ;//
12724
12725DROP PROCEDURE IF EXISTS sp1;
12726
12727delimiter //;
12728--error ER_PARSE_ERROR
12729CREATE PROCEDURE sp1( )
12730BEGIN
12731    declare tinyint condition for sqlstate '02000';
12732    declare exit handler for tinyint set @var2 = 1;
12733END//
12734delimiter ;//
12735
12736DROP PROCEDURE IF EXISTS sp1;
12737
12738delimiter //;
12739--error ER_PARSE_ERROR
12740CREATE PROCEDURE sp1( )
12741BEGIN
12742    declare tinytext condition for sqlstate '02000';
12743    declare exit handler for tinytext set @var2 = 1;
12744END//
12745delimiter ;//
12746
12747DROP PROCEDURE IF EXISTS sp1;
12748
12749delimiter //;
12750--error ER_PARSE_ERROR
12751CREATE PROCEDURE sp1( )
12752BEGIN
12753    declare to condition for sqlstate '02000';
12754    declare exit handler for to set @var2 = 1;
12755END//
12756delimiter ;//
12757
12758DROP PROCEDURE IF EXISTS sp1;
12759
12760delimiter //;
12761--error ER_PARSE_ERROR
12762CREATE PROCEDURE sp1( )
12763BEGIN
12764    declare trailing condition for sqlstate '02000';
12765    declare exit handler for trailing set @var2 = 1;
12766END//
12767delimiter ;//
12768
12769DROP PROCEDURE IF EXISTS sp1;
12770
12771delimiter //;
12772--error ER_PARSE_ERROR
12773CREATE PROCEDURE sp1( )
12774BEGIN
12775    declare trigger condition for sqlstate '02000';
12776    declare exit handler for trigger set @var2 = 1;
12777END//
12778delimiter ;//
12779
12780DROP PROCEDURE IF EXISTS sp1;
12781
12782delimiter //;
12783--error ER_PARSE_ERROR
12784CREATE PROCEDURE sp1( )
12785BEGIN
12786    declare true condition for sqlstate '02000';
12787    declare exit handler for true set @var2 = 1;
12788END//
12789delimiter ;//
12790
12791DROP PROCEDURE IF EXISTS sp1;
12792
12793delimiter //;
12794--error ER_PARSE_ERROR
12795CREATE PROCEDURE sp1( )
12796BEGIN
12797    declare undo condition for sqlstate '02000';
12798    declare exit handler for undo set @var2 = 1;
12799END//
12800delimiter ;//
12801
12802DROP PROCEDURE IF EXISTS sp1;
12803
12804delimiter //;
12805--error ER_PARSE_ERROR
12806CREATE PROCEDURE sp1( )
12807BEGIN
12808    declare union condition for sqlstate '02000';
12809    declare exit handler for union set @var2 = 1;
12810END//
12811delimiter ;//
12812
12813DROP PROCEDURE IF EXISTS sp1;
12814
12815delimiter //;
12816--error ER_PARSE_ERROR
12817CREATE PROCEDURE sp1( )
12818BEGIN
12819    declare unique condition for sqlstate '02000';
12820    declare exit handler for unique set @var2 = 1;
12821END//
12822delimiter ;//
12823
12824DROP PROCEDURE IF EXISTS sp1;
12825
12826delimiter //;
12827--error ER_PARSE_ERROR
12828CREATE PROCEDURE sp1( )
12829BEGIN
12830    declare unlock condition for sqlstate '02000';
12831    declare exit handler for unlock set @var2 = 1;
12832END//
12833delimiter ;//
12834
12835DROP PROCEDURE IF EXISTS sp1;
12836
12837delimiter //;
12838--error ER_PARSE_ERROR
12839CREATE PROCEDURE sp1( )
12840BEGIN
12841    declare unsigned condition for sqlstate '02000';
12842    declare exit handler for unsigned set @var2 = 1;
12843END//
12844delimiter ;//
12845
12846DROP PROCEDURE IF EXISTS sp1;
12847
12848delimiter //;
12849--error ER_PARSE_ERROR
12850CREATE PROCEDURE sp1( )
12851BEGIN
12852    declare update condition for sqlstate '02000';
12853    declare exit handler for update set @var2 = 1;
12854END//
12855delimiter ;//
12856
12857DROP PROCEDURE IF EXISTS sp1;
12858
12859delimiter //;
12860--error ER_PARSE_ERROR
12861CREATE PROCEDURE sp1( )
12862BEGIN
12863    declare usage condition for sqlstate '02000';
12864    declare exit handler for usage set @var2 = 1;
12865END//
12866delimiter ;//
12867
12868DROP PROCEDURE IF EXISTS sp1;
12869
12870delimiter //;
12871--error ER_PARSE_ERROR
12872CREATE PROCEDURE sp1( )
12873BEGIN
12874    declare use condition for sqlstate '02000';
12875    declare exit handler for USE set @var2 = 1;
12876END//
12877delimiter ;//
12878
12879DROP PROCEDURE IF EXISTS sp1;
12880
12881delimiter //;
12882--error ER_PARSE_ERROR
12883CREATE PROCEDURE sp1( )
12884BEGIN
12885    declare using condition for sqlstate '02000';
12886    declare exit handler for using set @var2 = 1;
12887END//
12888delimiter ;//
12889
12890DROP PROCEDURE IF EXISTS sp1;
12891
12892delimiter //;
12893--error ER_PARSE_ERROR
12894CREATE PROCEDURE sp1( )
12895BEGIN
12896    declare utc_date condition for sqlstate '02000';
12897    declare exit handler for utc_date set @var2 = 1;
12898END//
12899delimiter ;//
12900
12901DROP PROCEDURE IF EXISTS sp1;
12902
12903delimiter //;
12904--error ER_PARSE_ERROR
12905CREATE PROCEDURE sp1( )
12906BEGIN
12907    declare utc_time condition for sqlstate '02000';
12908    declare exit handler for utc_time set @var2 = 1;
12909END//
12910delimiter ;//
12911
12912DROP PROCEDURE IF EXISTS sp1;
12913
12914delimiter //;
12915--error ER_PARSE_ERROR
12916CREATE PROCEDURE sp1( )
12917BEGIN
12918    declare utc_timestamp condition for sqlstate '02000';
12919    declare exit handler for utc_timestamp set @var2 = 1;
12920END//
12921delimiter ;//
12922
12923DROP PROCEDURE IF EXISTS sp1;
12924
12925delimiter //;
12926--error ER_PARSE_ERROR
12927CREATE PROCEDURE sp1( )
12928BEGIN
12929    declare values condition for sqlstate '02000';
12930    declare exit handler for values set @var2 = 1;
12931END//
12932delimiter ;//
12933
12934DROP PROCEDURE IF EXISTS sp1;
12935
12936delimiter //;
12937--error ER_PARSE_ERROR
12938CREATE PROCEDURE sp1( )
12939BEGIN
12940    declare varbinary condition for sqlstate '02000';
12941    declare exit handler for varbinary set @var2 = 1;
12942END//
12943delimiter ;//
12944
12945DROP PROCEDURE IF EXISTS sp1;
12946
12947delimiter //;
12948--error ER_PARSE_ERROR
12949CREATE PROCEDURE sp1( )
12950BEGIN
12951    declare varchar condition for sqlstate '02000';
12952    declare exit handler for varchar set @var2 = 1;
12953END//
12954delimiter ;//
12955
12956DROP PROCEDURE IF EXISTS sp1;
12957
12958delimiter //;
12959--error ER_PARSE_ERROR
12960CREATE PROCEDURE sp1( )
12961BEGIN
12962    declare varcharacter condition for sqlstate '02000';
12963    declare exit handler for varcharacter set @var2 = 1;
12964END//
12965delimiter ;//
12966
12967DROP PROCEDURE IF EXISTS sp1;
12968
12969delimiter //;
12970--error ER_PARSE_ERROR
12971CREATE PROCEDURE sp1( )
12972BEGIN
12973    declare varying condition for sqlstate '02000';
12974    declare exit handler for varying set @var2 = 1;
12975END//
12976delimiter ;//
12977
12978DROP PROCEDURE IF EXISTS sp1;
12979
12980delimiter //;
12981--error ER_PARSE_ERROR
12982CREATE PROCEDURE sp1( )
12983BEGIN
12984    declare when condition for sqlstate '02000';
12985    declare exit handler for when set @var2 = 1;
12986END//
12987delimiter ;//
12988
12989DROP PROCEDURE IF EXISTS sp1;
12990
12991delimiter //;
12992--error ER_PARSE_ERROR
12993CREATE PROCEDURE sp1( )
12994BEGIN
12995    declare where condition for sqlstate '02000';
12996    declare exit handler for where set @var2 = 1;
12997END//
12998delimiter ;//
12999
13000DROP PROCEDURE IF EXISTS sp1;
13001
13002delimiter //;
13003--error ER_PARSE_ERROR
13004CREATE PROCEDURE sp1( )
13005BEGIN
13006    declare while condition for sqlstate '02000';
13007    declare exit handler for while set @var2 = 1;
13008END//
13009delimiter ;//
13010
13011DROP PROCEDURE IF EXISTS sp1;
13012
13013delimiter //;
13014--error ER_PARSE_ERROR
13015CREATE PROCEDURE sp1( )
13016BEGIN
13017    declare with condition for sqlstate '02000';
13018    declare exit handler for with set @var2 = 1;
13019END//
13020delimiter ;//
13021
13022DROP PROCEDURE IF EXISTS sp1;
13023
13024delimiter //;
13025--error ER_PARSE_ERROR
13026CREATE PROCEDURE sp1( )
13027BEGIN
13028    declare write condition for sqlstate '02000';
13029    declare exit handler for write set @var2 = 1;
13030END//
13031delimiter ;//
13032
13033DROP PROCEDURE IF EXISTS sp1;
13034
13035delimiter //;
13036--error ER_PARSE_ERROR
13037CREATE PROCEDURE sp1( )
13038BEGIN
13039    declare xor condition for sqlstate '02000';
13040    declare exit handler for xor set @var2 = 1;
13041END//
13042delimiter ;//
13043
13044DROP PROCEDURE IF EXISTS sp1;
13045
13046delimiter //;
13047--error ER_PARSE_ERROR
13048CREATE PROCEDURE sp1( )
13049BEGIN
13050    declare year_month condition for sqlstate '02000';
13051    declare exit handler for year_month set @var2 = 1;
13052END//
13053delimiter ;//
13054
13055DROP PROCEDURE IF EXISTS sp1;
13056
13057delimiter //;
13058--error ER_PARSE_ERROR
13059CREATE PROCEDURE sp1( )
13060BEGIN
13061    declare zerofill condition for sqlstate '02000';
13062    declare exit handler for zerofill set @var2 = 1;
13063END//
13064delimiter ;//
13065
13066# ------------------------------------------------------------------------------
13067let $message= Testcase :
13068              ----------
13069Ensure that every possible type of handler may be declared for
13070a stored procedure (continue- handler_type ).;
13071--source include/show_msg80.inc
13072
13073DROP PROCEDURE IF EXISTS sp1;
13074
13075delimiter //;
13076CREATE PROCEDURE sp1()
13077BEGIN
13078    declare continue handler for sqlstate '23000' set @x2 = 1;
13079
13080    set @x = 1;
13081
13082    insert into t2(f1) values (1);
13083
13084    set @x = 2;
13085
13086    insert into t2(f1) values (1);
13087
13088    set @x = 3;
13089END//
13090delimiter ;//
13091
13092CALL sp1();
13093
13094# cleanup
13095
13096DROP PROCEDURE sp1;
13097
13098
13099# testcase: ensure that every possible type of handler may be declared
13100#            for a stored procedure (undo - handler_type ).
13101# ?????????? undo handler not supported as of now
13102
13103
13104DROP PROCEDURE IF EXISTS handler1;
13105
13106delimiter //;
13107--error ER_PARSE_ERROR
13108CREATE PROCEDURE handler1()
13109BEGIN
13110    declare undo handler for sqlstate '23000' set @x2 = 1;
13111
13112    set @x = 1;
13113
13114    insert into t values (1);
13115
13116    set @x = 2;
13117
13118    insert into t values (1);
13119
13120    set @x = 3;
13121END//
13122delimiter ;//
13123
13124# testcase: ensure that invalid handler declarations are rejected with an
13125#            appropriate error message. (continue- handler_type).
13126
13127
13128DROP PROCEDURE IF EXISTS handler1;
13129
13130delimiter //;
13131--error ER_PARSE_ERROR
13132CREATE PROCEDURE handler1()
13133BEGIN
13134    declare continueinv handler for sqlstate '2300' set @x2 = 1;
13135
13136    set @x = 1;
13137
13138    insert into t values (1);
13139
13140    set @x = 2;
13141
13142    insert into t values (1);
13143
13144    set @x = 3;
13145END//
13146delimiter ;//
13147
13148# testcase: ensure that invalid handler declarations are rejected with
13149#            an appropriate error message (undo - handler_type ).
13150
13151
13152DROP PROCEDURE IF EXISTS handler1;
13153
13154delimiter //;
13155--error ER_PARSE_ERROR
13156CREATE PROCEDURE handler1()
13157BEGIN
13158    declare undoinv handler for sqlstate '2300' set @x2 = 1;
13159
13160    set @x = 1;
13161
13162    insert into t values (1);
13163
13164    set @x = 2;
13165
13166    insert into t values (1);
13167
13168    set @x = 3;
13169END//
13170delimiter ;//
13171
13172# testcase: ensure that invalid handler declarations are rejected with an
13173#            appropriate error message (exit- handler_type )
13174
13175
13176DROP PROCEDURE IF EXISTS handler1;
13177
13178delimiter //;
13179--error ER_PARSE_ERROR
13180CREATE PROCEDURE handler1 ()
13181BEGIN
13182    declare exitinv handler for sqlstate '2300' set @x2 = 1;
13183
13184    set @x = 1;
13185
13186    insert into t values (1);
13187
13188    set @x = 2;
13189
13190    insert into t values (1);
13191
13192    set @x = 3;
13193END//
13194delimiter ;//
13195
13196DROP PROCEDURE IF EXISTS sp1;
13197
13198delimiter //;
13199--error ER_PARSE_ERROR
13200CREATE PROCEDURE sp1( )
13201BEGIN
13202    declare accessible handler for sqlstate '02000' set @var2 = 1;
13203END//
13204delimiter ;//
13205
13206DROP PROCEDURE IF EXISTS sp1;
13207
13208delimiter //;
13209--error ER_PARSE_ERROR
13210CREATE PROCEDURE sp1( )
13211BEGIN
13212    declare add handler for sqlstate '02000' set @var2 = 1;
13213END//
13214delimiter ;//
13215
13216DROP PROCEDURE IF EXISTS sp1;
13217
13218delimiter //;
13219--error ER_PARSE_ERROR
13220CREATE PROCEDURE sp1( )
13221BEGIN
13222    declare all handler for sqlstate '02000' set @var2 = 1;
13223END//
13224delimiter ;//
13225
13226DROP PROCEDURE IF EXISTS sp1;
13227
13228delimiter //;
13229--error ER_PARSE_ERROR
13230CREATE PROCEDURE sp1( )
13231BEGIN
13232    declare alter handler for sqlstate '02000' set @var2 = 1;
13233END//
13234delimiter ;//
13235
13236DROP PROCEDURE IF EXISTS sp1;
13237
13238delimiter //;
13239--error ER_PARSE_ERROR
13240CREATE PROCEDURE sp1( )
13241BEGIN
13242    declare analyze handler for sqlstate '02000' set @var2 = 1;
13243END//
13244delimiter ;//
13245
13246DROP PROCEDURE IF EXISTS sp1;
13247
13248delimiter //;
13249--error ER_PARSE_ERROR
13250CREATE PROCEDURE sp1( )
13251BEGIN
13252    declare and handler for sqlstate '02000' set @var2 = 1;
13253END//
13254delimiter ;//
13255
13256DROP PROCEDURE IF EXISTS sp1;
13257
13258delimiter //;
13259--error ER_PARSE_ERROR
13260CREATE PROCEDURE sp1( )
13261BEGIN
13262    declare as handler for sqlstate '02000' set @var2 = 1;
13263END//
13264delimiter ;//
13265
13266DROP PROCEDURE IF EXISTS sp1;
13267
13268delimiter //;
13269--error ER_PARSE_ERROR
13270CREATE PROCEDURE sp1( )
13271BEGIN
13272    declare asc handler for sqlstate '02000' set @var2 = 1;
13273END//
13274delimiter ;//
13275
13276DROP PROCEDURE IF EXISTS sp1;
13277
13278delimiter //;
13279--error ER_PARSE_ERROR
13280CREATE PROCEDURE sp1( )
13281BEGIN
13282    declare asensitive handler for sqlstate '02000' set @var2 = 1;
13283END//
13284delimiter ;//
13285
13286DROP PROCEDURE IF EXISTS sp1;
13287
13288delimiter //;
13289--error ER_PARSE_ERROR
13290CREATE PROCEDURE sp1( )
13291BEGIN
13292    declare before handler for sqlstate '02000' set @var2 = 1;
13293END//
13294delimiter ;//
13295
13296DROP PROCEDURE IF EXISTS sp1;
13297
13298delimiter //;
13299--error ER_PARSE_ERROR
13300CREATE PROCEDURE sp1( )
13301BEGIN
13302    declare between handler for sqlstate '02000' set @var2 = 1;
13303END//
13304delimiter ;//
13305
13306DROP PROCEDURE IF EXISTS sp1;
13307
13308delimiter //;
13309--error ER_PARSE_ERROR
13310CREATE PROCEDURE sp1( )
13311BEGIN
13312    declare bigint handler for sqlstate '02000' set @var2 = 1;
13313END//
13314delimiter ;//
13315
13316DROP PROCEDURE IF EXISTS sp1;
13317
13318delimiter //;
13319--error ER_PARSE_ERROR
13320CREATE PROCEDURE sp1( )
13321BEGIN
13322    declare binary handler for sqlstate '02000' set @var2 = 1;
13323END//
13324delimiter ;//
13325
13326DROP PROCEDURE IF EXISTS sp1;
13327
13328delimiter //;
13329--error ER_PARSE_ERROR
13330CREATE PROCEDURE sp1( )
13331BEGIN
13332    declare blob handler for sqlstate '02000' set @var2 = 1;
13333END//
13334delimiter ;//
13335
13336DROP PROCEDURE IF EXISTS sp1;
13337
13338delimiter //;
13339--error ER_PARSE_ERROR
13340CREATE PROCEDURE sp1( )
13341BEGIN
13342    declare both handler for sqlstate '02000' set @var2 = 1;
13343END//
13344delimiter ;//
13345
13346DROP PROCEDURE IF EXISTS sp1;
13347
13348delimiter //;
13349--error ER_PARSE_ERROR
13350CREATE PROCEDURE sp1( )
13351BEGIN
13352    declare by handler for sqlstate '02000' set @var2 = 1;
13353END//
13354delimiter ;//
13355
13356DROP PROCEDURE IF EXISTS sp1;
13357
13358delimiter //;
13359--error ER_PARSE_ERROR
13360CREATE PROCEDURE sp1( )
13361BEGIN
13362    declare call handler for sqlstate '02000' set @var2 = 1;
13363END//
13364delimiter ;//
13365
13366DROP PROCEDURE IF EXISTS sp1;
13367
13368delimiter //;
13369--error ER_PARSE_ERROR
13370CREATE PROCEDURE sp1( )
13371BEGIN
13372    declare cascade handler for sqlstate '02000' set @var2 = 1;
13373END//
13374delimiter ;//
13375
13376DROP PROCEDURE IF EXISTS sp1;
13377
13378delimiter //;
13379--error ER_PARSE_ERROR
13380CREATE PROCEDURE sp1( )
13381BEGIN
13382    declare case handler for sqlstate '02000' set @var2 = 1;
13383END//
13384delimiter ;//
13385
13386DROP PROCEDURE IF EXISTS sp1;
13387
13388delimiter //;
13389--error ER_PARSE_ERROR
13390CREATE PROCEDURE sp1( )
13391BEGIN
13392    declare change handler for sqlstate '02000' set @var2 = 1;
13393END//
13394delimiter ;//
13395
13396DROP PROCEDURE IF EXISTS sp1;
13397
13398delimiter //;
13399--error ER_PARSE_ERROR
13400CREATE PROCEDURE sp1( )
13401BEGIN
13402    declare char handler for sqlstate '02000' set @var2 = 1;
13403END//
13404delimiter ;//
13405
13406DROP PROCEDURE IF EXISTS sp1;
13407
13408delimiter //;
13409--error ER_PARSE_ERROR
13410CREATE PROCEDURE sp1( )
13411BEGIN
13412    declare character handler for sqlstate '02000' set @var2 = 1;
13413END//
13414delimiter ;//
13415
13416DROP PROCEDURE IF EXISTS sp1;
13417
13418delimiter //;
13419--error ER_PARSE_ERROR
13420CREATE PROCEDURE sp1( )
13421BEGIN
13422    declare check handler for sqlstate '02000' set @var2 = 1;
13423END//
13424delimiter ;//
13425
13426DROP PROCEDURE IF EXISTS sp1;
13427
13428delimiter //;
13429--error ER_PARSE_ERROR
13430CREATE PROCEDURE sp1( )
13431BEGIN
13432    declare collate handler for sqlstate '02000' set @var2 = 1;
13433END//
13434delimiter ;//
13435
13436DROP PROCEDURE IF EXISTS sp1;
13437
13438delimiter //;
13439--error ER_PARSE_ERROR
13440CREATE PROCEDURE sp1( )
13441BEGIN
13442    declare column handler for sqlstate '02000' set @var2 = 1;
13443END//
13444delimiter ;//
13445
13446DROP PROCEDURE IF EXISTS sp1;
13447
13448delimiter //;
13449--error ER_PARSE_ERROR
13450CREATE PROCEDURE sp1( )
13451BEGIN
13452    declare condition handler for sqlstate '02000' set @var2 = 1;
13453END//
13454delimiter ;//
13455
13456DROP PROCEDURE IF EXISTS sp1;
13457
13458delimiter //;
13459--error ER_PARSE_ERROR
13460CREATE PROCEDURE sp1( )
13461BEGIN
13462    declare constraint handler for sqlstate '02000' set @var2 = 1;
13463END//
13464delimiter ;//
13465
13466DROP PROCEDURE IF EXISTS sp1;
13467
13468--error ER_PARSE_ERROR
13469delimiter //;
13470CREATE PROCEDURE sp1( )
13471 BEGIN
13472   declare continue handler for sqlstate '02000' set @var2 = 1;
13473END//
13474delimiter ;//
13475
13476DROP PROCEDURE IF EXISTS sp1;
13477
13478delimiter //;
13479--error ER_PARSE_ERROR
13480CREATE PROCEDURE sp1( )
13481BEGIN
13482    declare convert handler for sqlstate '02000' set @var2 = 1;
13483END//
13484delimiter ;//
13485
13486DROP PROCEDURE IF EXISTS sp1;
13487
13488delimiter //;
13489--error ER_PARSE_ERROR
13490CREATE PROCEDURE sp1( )
13491BEGIN
13492    declare create handler for sqlstate '02000' set @var2 = 1;
13493END//
13494delimiter ;//
13495
13496DROP PROCEDURE IF EXISTS sp1;
13497
13498delimiter //;
13499--error ER_PARSE_ERROR
13500CREATE PROCEDURE sp1( )
13501BEGIN
13502    declare cross handler for sqlstate '02000' set @var2 = 1;
13503END//
13504delimiter ;//
13505
13506DROP PROCEDURE IF EXISTS sp1;
13507
13508delimiter //;
13509--error ER_PARSE_ERROR
13510CREATE PROCEDURE sp1( )
13511BEGIN
13512    declare current_date handler for sqlstate '02000' set @var2 = 1;
13513END//
13514delimiter ;//
13515
13516DROP PROCEDURE IF EXISTS sp1;
13517
13518delimiter //;
13519--error ER_PARSE_ERROR
13520CREATE PROCEDURE sp1( )
13521BEGIN
13522    declare current_time handler for sqlstate '02000' set @var2 = 1;
13523END//
13524delimiter ;//
13525
13526DROP PROCEDURE IF EXISTS sp1;
13527
13528delimiter //;
13529--error ER_PARSE_ERROR
13530CREATE PROCEDURE sp1( )
13531BEGIN
13532    declare current_timestamp handler for sqlstate '02000' set @var2 = 1;
13533END//
13534delimiter ;//
13535
13536DROP PROCEDURE IF EXISTS sp1;
13537
13538delimiter //;
13539--error ER_PARSE_ERROR
13540CREATE PROCEDURE sp1( )
13541BEGIN
13542    declare current_user handler for sqlstate '02000' set @var2 = 1;
13543END//
13544delimiter ;//
13545
13546DROP PROCEDURE IF EXISTS sp1;
13547
13548delimiter //;
13549--error ER_PARSE_ERROR
13550CREATE PROCEDURE sp1( )
13551BEGIN
13552    declare cursor handler for sqlstate '02000' set @var2 = 1;
13553END//
13554delimiter ;//
13555
13556DROP PROCEDURE IF EXISTS sp1;
13557
13558delimiter //;
13559--error ER_PARSE_ERROR
13560CREATE PROCEDURE sp1( )
13561BEGIN
13562    declare database handler for sqlstate '02000' set @var2 = 1;
13563END//
13564delimiter ;//
13565
13566DROP PROCEDURE IF EXISTS sp1;
13567
13568delimiter //;
13569--error ER_PARSE_ERROR
13570CREATE PROCEDURE sp1( )
13571BEGIN
13572    declare databases handler for sqlstate '02000' set @var2 = 1;
13573END//
13574delimiter ;//
13575
13576DROP PROCEDURE IF EXISTS sp1;
13577
13578delimiter //;
13579--error ER_PARSE_ERROR
13580CREATE PROCEDURE sp1( )
13581BEGIN
13582    declare day_hour handler for sqlstate '02000' set @var2 = 1;
13583END//
13584delimiter ;//
13585
13586DROP PROCEDURE IF EXISTS sp1;
13587
13588delimiter //;
13589--error ER_PARSE_ERROR
13590CREATE PROCEDURE sp1( )
13591BEGIN
13592    declare day_microsecond handler for sqlstate '02000' set @var2 = 1;
13593END//
13594delimiter ;//
13595
13596DROP PROCEDURE IF EXISTS sp1;
13597
13598delimiter //;
13599--error ER_PARSE_ERROR
13600CREATE PROCEDURE sp1( )
13601BEGIN
13602    declare day_minute handler for sqlstate '02000' set @var2 = 1;
13603END//
13604delimiter ;//
13605
13606DROP PROCEDURE IF EXISTS sp1;
13607
13608delimiter //;
13609--error ER_PARSE_ERROR
13610CREATE PROCEDURE sp1( )
13611BEGIN
13612    declare day_second handler for sqlstate '02000' set @var2 = 1;
13613END//
13614delimiter ;//
13615
13616DROP PROCEDURE IF EXISTS sp1;
13617
13618delimiter //;
13619--error ER_PARSE_ERROR
13620CREATE PROCEDURE sp1( )
13621BEGIN
13622    declare dec handler for sqlstate '02000' set @var2 = 1;
13623END//
13624delimiter ;//
13625
13626DROP PROCEDURE IF EXISTS sp1;
13627
13628delimiter //;
13629--error ER_PARSE_ERROR
13630CREATE PROCEDURE sp1( )
13631BEGIN
13632    declare decimal handler for sqlstate '02000' set @var2 = 1;
13633END//
13634delimiter ;//
13635
13636DROP PROCEDURE IF EXISTS sp1;
13637
13638delimiter //;
13639--error ER_PARSE_ERROR
13640CREATE PROCEDURE sp1( )
13641BEGIN
13642    declare declare handler for sqlstate '02000' set @var2 = 1;
13643END//
13644delimiter ;//
13645
13646DROP PROCEDURE IF EXISTS sp1;
13647
13648delimiter //;
13649--error ER_PARSE_ERROR
13650CREATE PROCEDURE sp1( )
13651BEGIN
13652    declare default handler for sqlstate '02000' set @var2 = 1;
13653END//
13654delimiter ;//
13655
13656DROP PROCEDURE IF EXISTS sp1;
13657
13658delimiter //;
13659--error ER_PARSE_ERROR
13660CREATE PROCEDURE sp1( )
13661BEGIN
13662    declare delayed handler for sqlstate '02000' set @var2 = 1;
13663END//
13664delimiter ;//
13665
13666DROP PROCEDURE IF EXISTS sp1;
13667
13668delimiter //;
13669--error ER_PARSE_ERROR
13670CREATE PROCEDURE sp1( )
13671BEGIN
13672    declare delete handler for sqlstate '02000' set @var2 = 1;
13673END//
13674delimiter ;//
13675
13676DROP PROCEDURE IF EXISTS sp1;
13677
13678delimiter //;
13679--error ER_PARSE_ERROR
13680CREATE PROCEDURE sp1( )
13681BEGIN
13682    declare desc handler for sqlstate '02000' set @var2 = 1;
13683END//
13684delimiter ;//
13685
13686DROP PROCEDURE IF EXISTS sp1;
13687
13688delimiter //;
13689--error ER_PARSE_ERROR
13690CREATE PROCEDURE sp1( )
13691BEGIN
13692    declare describe handler for sqlstate '02000' set @var2 = 1;
13693END//
13694delimiter ;//
13695
13696DROP PROCEDURE IF EXISTS sp1;
13697
13698delimiter //;
13699--error ER_PARSE_ERROR
13700CREATE PROCEDURE sp1( )
13701BEGIN
13702    declare deterministic handler for sqlstate '02000' set @var2 = 1;
13703END//
13704delimiter ;//
13705
13706DROP PROCEDURE IF EXISTS sp1;
13707
13708delimiter //;
13709--error ER_PARSE_ERROR
13710CREATE PROCEDURE sp1( )
13711BEGIN
13712    declare distinct handler for sqlstate '02000' set @var2 = 1;
13713END//
13714delimiter ;//
13715
13716DROP PROCEDURE IF EXISTS sp1;
13717
13718delimiter //;
13719--error ER_PARSE_ERROR
13720CREATE PROCEDURE sp1( )
13721BEGIN
13722    declare distinctrow handler for sqlstate '02000' set @var2 = 1;
13723END//
13724delimiter ;//
13725
13726DROP PROCEDURE IF EXISTS sp1;
13727
13728delimiter //;
13729--error ER_PARSE_ERROR
13730CREATE PROCEDURE sp1( )
13731BEGIN
13732    declare div handler for sqlstate '02000' set @var2 = 1;
13733END//
13734delimiter ;//
13735
13736DROP PROCEDURE IF EXISTS sp1;
13737
13738delimiter //;
13739--error ER_PARSE_ERROR
13740CREATE PROCEDURE sp1( )
13741BEGIN
13742    declare double handler for sqlstate '02000' set @var2 = 1;
13743END//
13744delimiter ;//
13745
13746DROP PROCEDURE IF EXISTS sp1;
13747
13748delimiter //;
13749--error ER_PARSE_ERROR
13750CREATE PROCEDURE sp1( )
13751BEGIN
13752    declare drop handler for sqlstate '02000' set @var2 = 1;
13753END//
13754delimiter ;//
13755
13756DROP PROCEDURE IF EXISTS sp1;
13757
13758delimiter //;
13759--error ER_PARSE_ERROR
13760CREATE PROCEDURE sp1( )
13761BEGIN
13762    declare dual handler for sqlstate '02000' set @var2 = 1;
13763END//
13764delimiter ;//
13765
13766DROP PROCEDURE IF EXISTS sp1;
13767
13768delimiter //;
13769--error ER_PARSE_ERROR
13770CREATE PROCEDURE sp1( )
13771BEGIN
13772    declare each handler for sqlstate '02000' set @var2 = 1;
13773END//
13774delimiter ;//
13775
13776DROP PROCEDURE IF EXISTS sp1;
13777
13778delimiter //;
13779--error ER_PARSE_ERROR
13780CREATE PROCEDURE sp1( )
13781BEGIN
13782    declare else handler for sqlstate '02000' set @var2 = 1;
13783END//
13784delimiter ;//
13785
13786DROP PROCEDURE IF EXISTS sp1;
13787
13788delimiter //;
13789--error ER_PARSE_ERROR
13790CREATE PROCEDURE sp1( )
13791BEGIN
13792    declare elseif handler for sqlstate '02000' set @var2 = 1;
13793END//
13794delimiter ;//
13795
13796DROP PROCEDURE IF EXISTS sp1;
13797
13798delimiter //;
13799--error ER_PARSE_ERROR
13800CREATE PROCEDURE sp1( )
13801BEGIN
13802    declare enclosed handler for sqlstate '02000' set @var2 = 1;
13803END//
13804delimiter ;//
13805
13806DROP PROCEDURE IF EXISTS sp1;
13807
13808delimiter //;
13809--error ER_PARSE_ERROR
13810CREATE PROCEDURE sp1( )
13811BEGIN
13812    declare escaped handler for sqlstate '02000' set @var2 = 1;
13813END//
13814delimiter ;//
13815
13816DROP PROCEDURE IF EXISTS sp1;
13817
13818delimiter //;
13819--error ER_PARSE_ERROR
13820CREATE PROCEDURE sp1( )
13821BEGIN
13822    declare exists handler for sqlstate '02000' set @var2 = 1;
13823END//
13824delimiter ;//
13825
13826DROP PROCEDURE IF EXISTS sp1;
13827
13828--error ER_PARSE_ERROR
13829delimiter //;
13830CREATE PROCEDURE sp1( )
13831 BEGIN
13832   declare exit handler for sqlstate '02000' set @var2 = 1;
13833END//
13834delimiter ;//
13835
13836DROP PROCEDURE IF EXISTS sp1;
13837
13838delimiter //;
13839--error ER_PARSE_ERROR
13840CREATE PROCEDURE sp1( )
13841BEGIN
13842    declare explain handler for sqlstate '02000' set @var2 = 1;
13843END//
13844delimiter ;//
13845
13846DROP PROCEDURE IF EXISTS sp1;
13847
13848delimiter //;
13849--error ER_PARSE_ERROR
13850CREATE PROCEDURE sp1( )
13851BEGIN
13852    declare false handler for sqlstate '02000' set @var2 = 1;
13853END//
13854delimiter ;//
13855
13856DROP PROCEDURE IF EXISTS sp1;
13857
13858delimiter //;
13859--error ER_PARSE_ERROR
13860CREATE PROCEDURE sp1( )
13861BEGIN
13862    declare fetch handler for sqlstate '02000' set @var2 = 1;
13863END//
13864delimiter ;//
13865
13866DROP PROCEDURE IF EXISTS sp1;
13867
13868delimiter //;
13869--error ER_PARSE_ERROR
13870CREATE PROCEDURE sp1( )
13871BEGIN
13872    declare float handler for sqlstate '02000' set @var2 = 1;
13873END//
13874delimiter ;//
13875
13876DROP PROCEDURE IF EXISTS sp1;
13877
13878delimiter //;
13879--error ER_PARSE_ERROR
13880CREATE PROCEDURE sp1( )
13881BEGIN
13882    declare float4 handler for sqlstate '02000' set @var2 = 1;
13883END//
13884delimiter ;//
13885
13886DROP PROCEDURE IF EXISTS sp1;
13887
13888delimiter //;
13889--error ER_PARSE_ERROR
13890CREATE PROCEDURE sp1( )
13891BEGIN
13892    declare float8 handler for sqlstate '02000' set @var2 = 1;
13893END//
13894delimiter ;//
13895
13896DROP PROCEDURE IF EXISTS sp1;
13897
13898delimiter //;
13899--error ER_PARSE_ERROR
13900CREATE PROCEDURE sp1( )
13901BEGIN
13902    declare for handler for sqlstate '02000' set @var2 = 1;
13903END//
13904delimiter ;//
13905
13906DROP PROCEDURE IF EXISTS sp1;
13907
13908delimiter //;
13909--error ER_PARSE_ERROR
13910CREATE PROCEDURE sp1( )
13911BEGIN
13912    declare force handler for sqlstate '02000' set @var2 = 1;
13913END//
13914delimiter ;//
13915
13916DROP PROCEDURE IF EXISTS sp1;
13917
13918delimiter //;
13919--error ER_PARSE_ERROR
13920CREATE PROCEDURE sp1( )
13921BEGIN
13922    declare foreign handler for sqlstate '02000' set @var2 = 1;
13923END//
13924delimiter ;//
13925
13926DROP PROCEDURE IF EXISTS sp1;
13927
13928delimiter //;
13929--error ER_PARSE_ERROR
13930CREATE PROCEDURE sp1( )
13931BEGIN
13932    declare from handler for sqlstate '02000' set @var2 = 1;
13933END//
13934delimiter ;//
13935
13936DROP PROCEDURE IF EXISTS sp1;
13937
13938delimiter //;
13939--error ER_PARSE_ERROR
13940CREATE PROCEDURE sp1( )
13941BEGIN
13942    declare fulltext handler for sqlstate '02000' set @var2 = 1;
13943END//
13944delimiter ;//
13945
13946DROP PROCEDURE IF EXISTS sp1;
13947
13948delimiter //;
13949--error ER_PARSE_ERROR
13950CREATE PROCEDURE sp1( )
13951BEGIN
13952    declare grant handler for sqlstate '02000' set @var2 = 1;
13953END//
13954delimiter ;//
13955
13956DROP PROCEDURE IF EXISTS sp1;
13957
13958delimiter //;
13959--error ER_PARSE_ERROR
13960CREATE PROCEDURE sp1( )
13961BEGIN
13962    declare group handler for sqlstate '02000' set @var2 = 1;
13963END//
13964delimiter ;//
13965
13966DROP PROCEDURE IF EXISTS sp1;
13967
13968delimiter //;
13969--error ER_PARSE_ERROR
13970CREATE PROCEDURE sp1( )
13971BEGIN
13972    declare having handler for sqlstate '02000' set @var2 = 1;
13973END//
13974delimiter ;//
13975
13976DROP PROCEDURE IF EXISTS sp1;
13977
13978delimiter //;
13979--error ER_PARSE_ERROR
13980CREATE PROCEDURE sp1( )
13981BEGIN
13982    declare high_priority handler for sqlstate '02000' set @var2 = 1;
13983END//
13984delimiter ;//
13985
13986DROP PROCEDURE IF EXISTS sp1;
13987
13988delimiter //;
13989--error ER_PARSE_ERROR
13990CREATE PROCEDURE sp1( )
13991BEGIN
13992    declare hour_microsecond handler for sqlstate '02000' set @var2 = 1;
13993END//
13994delimiter ;//
13995
13996DROP PROCEDURE IF EXISTS sp1;
13997
13998delimiter //;
13999--error ER_PARSE_ERROR
14000CREATE PROCEDURE sp1( )
14001BEGIN
14002    declare hour_minute handler for sqlstate '02000' set @var2 = 1;
14003END//
14004delimiter ;//
14005
14006DROP PROCEDURE IF EXISTS sp1;
14007
14008delimiter //;
14009--error ER_PARSE_ERROR
14010CREATE PROCEDURE sp1( )
14011BEGIN
14012    declare hour_second handler for sqlstate '02000' set @var2 = 1;
14013END//
14014delimiter ;//
14015
14016DROP PROCEDURE IF EXISTS sp1;
14017
14018delimiter //;
14019--error ER_PARSE_ERROR
14020CREATE PROCEDURE sp1( )
14021BEGIN
14022    declare if handler for sqlstate '02000' set @var2 = 1;
14023END//
14024delimiter ;//
14025
14026DROP PROCEDURE IF EXISTS sp1;
14027
14028delimiter //;
14029--error ER_PARSE_ERROR
14030CREATE PROCEDURE sp1( )
14031BEGIN
14032    declare ignore handler for sqlstate '02000' set @var2 = 1;
14033END//
14034delimiter ;//
14035
14036DROP PROCEDURE IF EXISTS sp1;
14037
14038delimiter //;
14039--error ER_PARSE_ERROR
14040CREATE PROCEDURE sp1( )
14041BEGIN
14042    declare in handler for sqlstate '02000' set @var2 = 1;
14043END//
14044delimiter ;//
14045
14046DROP PROCEDURE IF EXISTS sp1;
14047
14048delimiter //;
14049--error ER_PARSE_ERROR
14050CREATE PROCEDURE sp1( )
14051BEGIN
14052    declare index handler for sqlstate '02000' set @var2 = 1;
14053END//
14054delimiter ;//
14055
14056DROP PROCEDURE IF EXISTS sp1;
14057
14058delimiter //;
14059--error ER_PARSE_ERROR
14060CREATE PROCEDURE sp1( )
14061BEGIN
14062    declare infile handler for sqlstate '02000' set @var2 = 1;
14063END//
14064delimiter ;//
14065
14066DROP PROCEDURE IF EXISTS sp1;
14067
14068delimiter //;
14069--error ER_PARSE_ERROR
14070CREATE PROCEDURE sp1( )
14071BEGIN
14072    declare inner handler for sqlstate '02000' set @var2 = 1;
14073END//
14074delimiter ;//
14075
14076DROP PROCEDURE IF EXISTS sp1;
14077
14078delimiter //;
14079--error ER_PARSE_ERROR
14080CREATE PROCEDURE sp1( )
14081BEGIN
14082    declare inout handler for sqlstate '02000' set @var2 = 1;
14083END//
14084delimiter ;//
14085
14086DROP PROCEDURE IF EXISTS sp1;
14087
14088delimiter //;
14089--error ER_PARSE_ERROR
14090CREATE PROCEDURE sp1( )
14091BEGIN
14092    declare insensitive handler for sqlstate '02000' set @var2 = 1;
14093END//
14094delimiter ;//
14095
14096DROP PROCEDURE IF EXISTS sp1;
14097
14098delimiter //;
14099--error ER_PARSE_ERROR
14100CREATE PROCEDURE sp1( )
14101BEGIN
14102    declare insert handler for sqlstate '02000' set @var2 = 1;
14103END//
14104delimiter ;//
14105
14106DROP PROCEDURE IF EXISTS sp1;
14107
14108delimiter //;
14109--error ER_PARSE_ERROR
14110CREATE PROCEDURE sp1( )
14111BEGIN
14112    declare int handler for sqlstate '02000' set @var2 = 1;
14113END//
14114delimiter ;//
14115
14116DROP PROCEDURE IF EXISTS sp1;
14117
14118delimiter //;
14119--error ER_PARSE_ERROR
14120CREATE PROCEDURE sp1( )
14121BEGIN
14122    declare int1 handler for sqlstate '02000' set @var2 = 1;
14123END//
14124delimiter ;//
14125
14126DROP PROCEDURE IF EXISTS sp1;
14127
14128delimiter //;
14129--error ER_PARSE_ERROR
14130CREATE PROCEDURE sp1( )
14131BEGIN
14132    declare int2 handler for sqlstate '02000' set @var2 = 1;
14133END//
14134delimiter ;//
14135
14136DROP PROCEDURE IF EXISTS sp1;
14137
14138delimiter //;
14139--error ER_PARSE_ERROR
14140CREATE PROCEDURE sp1( )
14141BEGIN
14142    declare int3 handler for sqlstate '02000' set @var2 = 1;
14143END//
14144delimiter ;//
14145
14146DROP PROCEDURE IF EXISTS sp1;
14147
14148delimiter //;
14149--error ER_PARSE_ERROR
14150CREATE PROCEDURE sp1( )
14151BEGIN
14152    declare int4 handler for sqlstate '02000' set @var2 = 1;
14153END//
14154delimiter ;//
14155
14156DROP PROCEDURE IF EXISTS sp1;
14157
14158delimiter //;
14159--error ER_PARSE_ERROR
14160CREATE PROCEDURE sp1( )
14161BEGIN
14162    declare int8 handler for sqlstate '02000' set @var2 = 1;
14163END//
14164delimiter ;//
14165
14166DROP PROCEDURE IF EXISTS sp1;
14167
14168delimiter //;
14169--error ER_PARSE_ERROR
14170CREATE PROCEDURE sp1( )
14171BEGIN
14172    declare integer handler for sqlstate '02000' set @var2 = 1;
14173END//
14174delimiter ;//
14175
14176DROP PROCEDURE IF EXISTS sp1;
14177
14178delimiter //;
14179--error ER_PARSE_ERROR
14180CREATE PROCEDURE sp1( )
14181BEGIN
14182    declare interval handler for sqlstate '02000' set @var2 = 1;
14183END//
14184delimiter ;//
14185
14186DROP PROCEDURE IF EXISTS sp1;
14187
14188delimiter //;
14189--error ER_PARSE_ERROR
14190CREATE PROCEDURE sp1( )
14191BEGIN
14192    declare into handler for sqlstate '02000' set @var2 = 1;
14193END//
14194delimiter ;//
14195
14196DROP PROCEDURE IF EXISTS sp1;
14197
14198delimiter //;
14199--error ER_PARSE_ERROR
14200CREATE PROCEDURE sp1( )
14201BEGIN
14202    declare is handler for sqlstate '02000' set @var2 = 1;
14203END//
14204delimiter ;//
14205
14206DROP PROCEDURE IF EXISTS sp1;
14207
14208delimiter //;
14209--error ER_PARSE_ERROR
14210CREATE PROCEDURE sp1( )
14211BEGIN
14212    declare iterate handler for sqlstate '02000' set @var2 = 1;
14213END//
14214delimiter ;//
14215
14216DROP PROCEDURE IF EXISTS sp1;
14217
14218delimiter //;
14219--error ER_PARSE_ERROR
14220CREATE PROCEDURE sp1( )
14221BEGIN
14222    declare join handler for sqlstate '02000' set @var2 = 1;
14223END//
14224delimiter ;//
14225
14226DROP PROCEDURE IF EXISTS sp1;
14227
14228delimiter //;
14229--error ER_PARSE_ERROR
14230CREATE PROCEDURE sp1( )
14231BEGIN
14232    declare key handler for sqlstate '02000' set @var2 = 1;
14233END//
14234delimiter ;//
14235
14236DROP PROCEDURE IF EXISTS sp1;
14237
14238delimiter //;
14239--error ER_PARSE_ERROR
14240CREATE PROCEDURE sp1( )
14241BEGIN
14242    declare keys handler for sqlstate '02000' set @var2 = 1;
14243END//
14244delimiter ;//
14245
14246DROP PROCEDURE IF EXISTS sp1;
14247
14248delimiter //;
14249--error ER_PARSE_ERROR
14250CREATE PROCEDURE sp1( )
14251BEGIN
14252    declare kill handler for sqlstate '02000' set @var2 = 1;
14253END//
14254delimiter ;//
14255
14256DROP PROCEDURE IF EXISTS sp1;
14257
14258delimiter //;
14259--error ER_PARSE_ERROR
14260CREATE PROCEDURE sp1( )
14261BEGIN
14262    declare leading handler for sqlstate '02000' set @var2 = 1;
14263END//
14264delimiter ;//
14265
14266DROP PROCEDURE IF EXISTS sp1;
14267
14268delimiter //;
14269--error ER_PARSE_ERROR
14270CREATE PROCEDURE sp1( )
14271BEGIN
14272    declare leave handler for sqlstate '02000' set @var2 = 1;
14273END//
14274delimiter ;//
14275
14276DROP PROCEDURE IF EXISTS sp1;
14277
14278delimiter //;
14279--error ER_PARSE_ERROR
14280CREATE PROCEDURE sp1( )
14281BEGIN
14282    declare left handler for sqlstate '02000' set @var2 = 1;
14283END//
14284delimiter ;//
14285
14286DROP PROCEDURE IF EXISTS sp1;
14287
14288delimiter //;
14289--error ER_PARSE_ERROR
14290CREATE PROCEDURE sp1( )
14291BEGIN
14292    declare like handler for sqlstate '02000' set @var2 = 1;
14293END//
14294delimiter ;//
14295
14296DROP PROCEDURE IF EXISTS sp1;
14297
14298delimiter //;
14299--error ER_PARSE_ERROR
14300CREATE PROCEDURE sp1( )
14301BEGIN
14302    declare limit handler for sqlstate '02000' set @var2 = 1;
14303END//
14304delimiter ;//
14305
14306DROP PROCEDURE IF EXISTS sp1;
14307
14308delimiter //;
14309--error ER_PARSE_ERROR
14310CREATE PROCEDURE sp1( )
14311BEGIN
14312    declare linear handler for sqlstate '02000' set @var2 = 1;
14313END//
14314delimiter ;//
14315
14316DROP PROCEDURE IF EXISTS sp1;
14317
14318delimiter //;
14319--error ER_PARSE_ERROR
14320CREATE PROCEDURE sp1( )
14321BEGIN
14322    declare lines handler for sqlstate '02000' set @var2 = 1;
14323END//
14324delimiter ;//
14325
14326DROP PROCEDURE IF EXISTS sp1;
14327
14328delimiter //;
14329--error ER_PARSE_ERROR
14330CREATE PROCEDURE sp1( )
14331BEGIN
14332    declare load handler for sqlstate '02000' set @var2 = 1;
14333END//
14334delimiter ;//
14335
14336DROP PROCEDURE IF EXISTS sp1;
14337
14338delimiter //;
14339--error ER_PARSE_ERROR
14340CREATE PROCEDURE sp1( )
14341BEGIN
14342    declare localtime handler for sqlstate '02000' set @var2 = 1;
14343END//
14344delimiter ;//
14345
14346DROP PROCEDURE IF EXISTS sp1;
14347
14348delimiter //;
14349--error ER_PARSE_ERROR
14350CREATE PROCEDURE sp1( )
14351BEGIN
14352    declare localtimestamp handler for sqlstate '02000' set @var2 = 1;
14353END//
14354delimiter ;//
14355
14356DROP PROCEDURE IF EXISTS sp1;
14357
14358delimiter //;
14359--error ER_PARSE_ERROR
14360CREATE PROCEDURE sp1( )
14361BEGIN
14362    declare lock handler for sqlstate '02000' set @var2 = 1;
14363END//
14364delimiter ;//
14365
14366DROP PROCEDURE IF EXISTS sp1;
14367
14368delimiter //;
14369--error ER_PARSE_ERROR
14370CREATE PROCEDURE sp1( )
14371BEGIN
14372    declare long handler for sqlstate '02000' set @var2 = 1;
14373END//
14374delimiter ;//
14375
14376DROP PROCEDURE IF EXISTS sp1;
14377
14378delimiter //;
14379--error ER_PARSE_ERROR
14380CREATE PROCEDURE sp1( )
14381BEGIN
14382    declare longblob handler for sqlstate '02000' set @var2 = 1;
14383END//
14384delimiter ;//
14385
14386DROP PROCEDURE IF EXISTS sp1;
14387
14388delimiter //;
14389--error ER_PARSE_ERROR
14390CREATE PROCEDURE sp1( )
14391BEGIN
14392    declare longtext handler for sqlstate '02000' set @var2 = 1;
14393END//
14394delimiter ;//
14395
14396DROP PROCEDURE IF EXISTS sp1;
14397
14398delimiter //;
14399--error ER_PARSE_ERROR
14400CREATE PROCEDURE sp1( )
14401BEGIN
14402    declare loop handler for sqlstate '02000' set @var2 = 1;
14403END//
14404delimiter ;//
14405
14406DROP PROCEDURE IF EXISTS sp1;
14407
14408delimiter //;
14409--error ER_PARSE_ERROR
14410CREATE PROCEDURE sp1( )
14411BEGIN
14412    declare low_priority handler for sqlstate '02000' set @var2 = 1;
14413END//
14414delimiter ;//
14415
14416DROP PROCEDURE IF EXISTS sp1;
14417
14418delimiter //;
14419--error ER_PARSE_ERROR
14420CREATE PROCEDURE sp1( )
14421BEGIN
14422    declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
14423END//
14424delimiter ;//
14425
14426DROP PROCEDURE IF EXISTS sp1;
14427
14428delimiter //;
14429--error ER_PARSE_ERROR
14430CREATE PROCEDURE sp1( )
14431BEGIN
14432    declare match handler for sqlstate '02000' set @var2 = 1;
14433END//
14434delimiter ;//
14435
14436DROP PROCEDURE IF EXISTS sp1;
14437
14438delimiter //;
14439--error ER_PARSE_ERROR
14440CREATE PROCEDURE sp1( )
14441BEGIN
14442    declare mediumblob handler for sqlstate '02000' set @var2 = 1;
14443END//
14444delimiter ;//
14445
14446DROP PROCEDURE IF EXISTS sp1;
14447
14448delimiter //;
14449--error ER_PARSE_ERROR
14450CREATE PROCEDURE sp1( )
14451BEGIN
14452    declare mediumint handler for sqlstate '02000' set @var2 = 1;
14453END//
14454delimiter ;//
14455
14456DROP PROCEDURE IF EXISTS sp1;
14457
14458delimiter //;
14459--error ER_PARSE_ERROR
14460CREATE PROCEDURE sp1( )
14461BEGIN
14462    declare mediumtext handler for sqlstate '02000' set @var2 = 1;
14463END//
14464delimiter ;//
14465
14466DROP PROCEDURE IF EXISTS sp1;
14467
14468delimiter //;
14469--error ER_PARSE_ERROR
14470CREATE PROCEDURE sp1( )
14471BEGIN
14472    declare middleint handler for sqlstate '02000' set @var2 = 1;
14473END//
14474delimiter ;//
14475
14476DROP PROCEDURE IF EXISTS sp1;
14477
14478delimiter //;
14479--error ER_PARSE_ERROR
14480CREATE PROCEDURE sp1( )
14481BEGIN
14482    declare minute_microsecond handler for sqlstate '02000' set @var2 = 1;
14483END//
14484delimiter ;//
14485
14486DROP PROCEDURE IF EXISTS sp1;
14487
14488delimiter //;
14489--error ER_PARSE_ERROR
14490CREATE PROCEDURE sp1( )
14491BEGIN
14492    declare minute_second handler for sqlstate '02000' set @var2 = 1;
14493END//
14494delimiter ;//
14495
14496DROP PROCEDURE IF EXISTS sp1;
14497
14498delimiter //;
14499--error ER_PARSE_ERROR
14500CREATE PROCEDURE sp1( )
14501BEGIN
14502    declare mod handler for sqlstate '02000' set @var2 = 1;
14503END//
14504delimiter ;//
14505
14506DROP PROCEDURE IF EXISTS sp1;
14507
14508delimiter //;
14509--error ER_PARSE_ERROR
14510CREATE PROCEDURE sp1( )
14511BEGIN
14512    declare modifies handler for sqlstate '02000' set @var2 = 1;
14513END//
14514delimiter ;//
14515
14516DROP PROCEDURE IF EXISTS sp1;
14517
14518delimiter //;
14519--error ER_PARSE_ERROR
14520CREATE PROCEDURE sp1( )
14521BEGIN
14522    declare natural handler for sqlstate '02000' set @var2 = 1;
14523END//
14524delimiter ;//
14525
14526DROP PROCEDURE IF EXISTS sp1;
14527
14528delimiter //;
14529--error ER_PARSE_ERROR
14530CREATE PROCEDURE sp1( )
14531BEGIN
14532    declare not handler for sqlstate '02000' set @var2 = 1;
14533END//
14534delimiter ;//
14535
14536DROP PROCEDURE IF EXISTS sp1;
14537
14538delimiter //;
14539--error ER_PARSE_ERROR
14540CREATE PROCEDURE sp1( )
14541BEGIN
14542    declare no_write_to_binlog handler for sqlstate '02000' set @var2 = 1;
14543END//
14544delimiter ;//
14545
14546DROP PROCEDURE IF EXISTS sp1;
14547
14548delimiter //;
14549--error ER_PARSE_ERROR
14550CREATE PROCEDURE sp1( )
14551BEGIN
14552    declare null handler for sqlstate '02000' set @var2 = 1;
14553END//
14554delimiter ;//
14555
14556DROP PROCEDURE IF EXISTS sp1;
14557
14558delimiter //;
14559--error ER_PARSE_ERROR
14560CREATE PROCEDURE sp1( )
14561BEGIN
14562    declare numeric handler for sqlstate '02000' set @var2 = 1;
14563END//
14564delimiter ;//
14565
14566DROP PROCEDURE IF EXISTS sp1;
14567
14568delimiter //;
14569--error ER_PARSE_ERROR
14570CREATE PROCEDURE sp1( )
14571BEGIN
14572    declare on handler for sqlstate '02000' set @var2 = 1;
14573END//
14574delimiter ;//
14575
14576DROP PROCEDURE IF EXISTS sp1;
14577
14578delimiter //;
14579--error ER_PARSE_ERROR
14580CREATE PROCEDURE sp1( )
14581BEGIN
14582    declare optimize handler for sqlstate '02000' set @var2 = 1;
14583END//
14584delimiter ;//
14585
14586DROP PROCEDURE IF EXISTS sp1;
14587
14588delimiter //;
14589--error ER_PARSE_ERROR
14590CREATE PROCEDURE sp1( )
14591BEGIN
14592    declare option handler for sqlstate '02000' set @var2 = 1;
14593END//
14594delimiter ;//
14595
14596DROP PROCEDURE IF EXISTS sp1;
14597
14598delimiter //;
14599--error ER_PARSE_ERROR
14600CREATE PROCEDURE sp1( )
14601BEGIN
14602    declare optionally handler for sqlstate '02000' set @var2 = 1;
14603END//
14604delimiter ;//
14605
14606DROP PROCEDURE IF EXISTS sp1;
14607
14608delimiter //;
14609--error ER_PARSE_ERROR
14610CREATE PROCEDURE sp1( )
14611BEGIN
14612    declare or handler for sqlstate '02000' set @var2 = 1;
14613END//
14614delimiter ;//
14615
14616DROP PROCEDURE IF EXISTS sp1;
14617
14618delimiter //;
14619--error ER_PARSE_ERROR
14620CREATE PROCEDURE sp1( )
14621BEGIN
14622    declare order handler for sqlstate '02000' set @var2 = 1;
14623END//
14624delimiter ;//
14625
14626DROP PROCEDURE IF EXISTS sp1;
14627
14628delimiter //;
14629--error ER_PARSE_ERROR
14630CREATE PROCEDURE sp1( )
14631BEGIN
14632    declare out handler for sqlstate '02000' set @var2 = 1;
14633END//
14634delimiter ;//
14635
14636DROP PROCEDURE IF EXISTS sp1;
14637
14638delimiter //;
14639--error ER_PARSE_ERROR
14640CREATE PROCEDURE sp1( )
14641BEGIN
14642    declare outer handler for sqlstate '02000' set @var2 = 1;
14643END//
14644delimiter ;//
14645
14646DROP PROCEDURE IF EXISTS sp1;
14647
14648delimiter //;
14649--error ER_PARSE_ERROR
14650CREATE PROCEDURE sp1( )
14651BEGIN
14652    declare outfile handler for sqlstate '02000' set @var2 = 1;
14653END//
14654delimiter ;//
14655
14656DROP PROCEDURE IF EXISTS sp1;
14657
14658delimiter //;
14659--error ER_PARSE_ERROR
14660CREATE PROCEDURE sp1( )
14661BEGIN
14662    declare precision handler for sqlstate '02000' set @var2 = 1;
14663END//
14664delimiter ;//
14665
14666DROP PROCEDURE IF EXISTS sp1;
14667
14668delimiter //;
14669--error ER_PARSE_ERROR
14670CREATE PROCEDURE sp1( )
14671BEGIN
14672    declare primary handler for sqlstate '02000' set @var2 = 1;
14673END//
14674delimiter ;//
14675
14676DROP PROCEDURE IF EXISTS sp1;
14677
14678delimiter //;
14679--error ER_PARSE_ERROR
14680CREATE PROCEDURE sp1( )
14681BEGIN
14682    declare privileges handler for sqlstate '02000' set @var2 = 1;
14683END//
14684delimiter ;//
14685
14686DROP PROCEDURE IF EXISTS sp1;
14687
14688delimiter //;
14689--error ER_PARSE_ERROR
14690CREATE PROCEDURE sp1( )
14691BEGIN
14692    declare procedure handler for sqlstate '02000' set @var2 = 1;
14693END//
14694delimiter ;//
14695
14696DROP PROCEDURE IF EXISTS sp1;
14697
14698delimiter //;
14699--error ER_PARSE_ERROR
14700CREATE PROCEDURE sp1( )
14701BEGIN
14702    declare purge handler for sqlstate '02000' set @var2 = 1;
14703END//
14704delimiter ;//
14705
14706DROP PROCEDURE IF EXISTS sp1;
14707
14708delimiter //;
14709--error ER_PARSE_ERROR
14710CREATE PROCEDURE sp1( )
14711BEGIN
14712    declare range handler for sqlstate '02000' set @var2 = 1;
14713END//
14714delimiter ;//
14715
14716DROP PROCEDURE IF EXISTS sp1;
14717
14718delimiter //;
14719--error ER_PARSE_ERROR
14720CREATE PROCEDURE sp1( )
14721BEGIN
14722    declare read handler for sqlstate '02000' set @var2 = 1;
14723END//
14724delimiter ;//
14725
14726DROP PROCEDURE IF EXISTS sp1;
14727
14728delimiter //;
14729--error ER_PARSE_ERROR
14730CREATE PROCEDURE sp1( )
14731BEGIN
14732    declare reads handler for sqlstate '02000' set @var2 = 1;
14733END//
14734delimiter ;//
14735
14736DROP PROCEDURE IF EXISTS sp1;
14737
14738delimiter //;
14739--error ER_PARSE_ERROR
14740CREATE PROCEDURE sp1( )
14741BEGIN
14742    declare read_only handler for sqlstate '02000' set @var2 = 1;
14743END//
14744delimiter ;//
14745
14746DROP PROCEDURE IF EXISTS sp1;
14747
14748delimiter //;
14749--error ER_PARSE_ERROR
14750CREATE PROCEDURE sp1( )
14751BEGIN
14752    declare read_write handler for sqlstate '02000' set @var2 = 1;
14753END//
14754delimiter ;//
14755
14756DROP PROCEDURE IF EXISTS sp1;
14757
14758delimiter //;
14759--error ER_PARSE_ERROR
14760CREATE PROCEDURE sp1( )
14761BEGIN
14762    declare real handler for sqlstate '02000' set @var2 = 1;
14763END//
14764delimiter ;//
14765
14766DROP PROCEDURE IF EXISTS sp1;
14767
14768delimiter //;
14769--error ER_PARSE_ERROR
14770CREATE PROCEDURE sp1( )
14771BEGIN
14772    declare references handler for sqlstate '02000' set @var2 = 1;
14773END//
14774delimiter ;//
14775
14776DROP PROCEDURE IF EXISTS sp1;
14777
14778delimiter //;
14779--error ER_PARSE_ERROR
14780CREATE PROCEDURE sp1( )
14781BEGIN
14782    declare regexp handler for sqlstate '02000' set @var2 = 1;
14783END//
14784delimiter ;//
14785
14786DROP PROCEDURE IF EXISTS sp1;
14787
14788delimiter //;
14789--error ER_PARSE_ERROR
14790CREATE PROCEDURE sp1( )
14791BEGIN
14792    declare release handler for sqlstate '02000' set @var2 = 1;
14793END//
14794delimiter ;//
14795
14796DROP PROCEDURE IF EXISTS sp1;
14797
14798delimiter //;
14799--error ER_PARSE_ERROR
14800CREATE PROCEDURE sp1( )
14801BEGIN
14802    declare rename handler for sqlstate '02000' set @var2 = 1;
14803END//
14804delimiter ;//
14805
14806DROP PROCEDURE IF EXISTS sp1;
14807
14808delimiter //;
14809--error ER_PARSE_ERROR
14810CREATE PROCEDURE sp1( )
14811BEGIN
14812    declare repeat handler for sqlstate '02000' set @var2 = 1;
14813END//
14814delimiter ;//
14815
14816DROP PROCEDURE IF EXISTS sp1;
14817
14818delimiter //;
14819--error ER_PARSE_ERROR
14820CREATE PROCEDURE sp1( )
14821BEGIN
14822    declare replace handler for sqlstate '02000' set @var2 = 1;
14823END//
14824delimiter ;//
14825
14826DROP PROCEDURE IF EXISTS sp1;
14827
14828delimiter //;
14829--error ER_PARSE_ERROR
14830CREATE PROCEDURE sp1( )
14831BEGIN
14832    declare require handler for sqlstate '02000' set @var2 = 1;
14833END//
14834delimiter ;//
14835
14836DROP PROCEDURE IF EXISTS sp1;
14837
14838delimiter //;
14839--error ER_PARSE_ERROR
14840CREATE PROCEDURE sp1( )
14841BEGIN
14842    declare restrict handler for sqlstate '02000' set @var2 = 1;
14843END//
14844delimiter ;//
14845
14846DROP PROCEDURE IF EXISTS sp1;
14847
14848delimiter //;
14849--error ER_PARSE_ERROR
14850CREATE PROCEDURE sp1( )
14851BEGIN
14852    declare return handler for sqlstate '02000' set @var2 = 1;
14853END//
14854delimiter ;//
14855
14856DROP PROCEDURE IF EXISTS sp1;
14857
14858delimiter //;
14859--error ER_PARSE_ERROR
14860CREATE PROCEDURE sp1( )
14861BEGIN
14862    declare revoke handler for sqlstate '02000' set @var2 = 1;
14863END//
14864delimiter ;//
14865
14866DROP PROCEDURE IF EXISTS sp1;
14867
14868delimiter //;
14869--error ER_PARSE_ERROR
14870CREATE PROCEDURE sp1( )
14871BEGIN
14872    declare right handler for sqlstate '02000' set @var2 = 1;
14873END//
14874delimiter ;//
14875
14876DROP PROCEDURE IF EXISTS sp1;
14877
14878delimiter //;
14879--error ER_PARSE_ERROR
14880CREATE PROCEDURE sp1( )
14881BEGIN
14882    declare rlike handler for sqlstate '02000' set @var2 = 1;
14883END//
14884delimiter ;//
14885
14886DROP PROCEDURE IF EXISTS sp1;
14887
14888delimiter //;
14889--error ER_PARSE_ERROR
14890CREATE PROCEDURE sp1( )
14891BEGIN
14892    declare schema handler for sqlstate '02000' set @var2 = 1;
14893END//
14894delimiter ;//
14895
14896DROP PROCEDURE IF EXISTS sp1;
14897
14898delimiter //;
14899--error ER_PARSE_ERROR
14900CREATE PROCEDURE sp1( )
14901BEGIN
14902    declare schemas handler for sqlstate '02000' set @var2 = 1;
14903END//
14904delimiter ;//
14905
14906DROP PROCEDURE IF EXISTS sp1;
14907
14908delimiter //;
14909--error ER_PARSE_ERROR
14910CREATE PROCEDURE sp1( )
14911BEGIN
14912    declare second_microsecond handler for sqlstate '02000' set @var2 = 1;
14913END//
14914delimiter ;//
14915
14916DROP PROCEDURE IF EXISTS sp1;
14917
14918delimiter //;
14919--error ER_PARSE_ERROR
14920CREATE PROCEDURE sp1( )
14921BEGIN
14922    declare select handler for sqlstate '02000' set @var2 = 1;
14923END//
14924delimiter ;//
14925
14926DROP PROCEDURE IF EXISTS sp1;
14927
14928delimiter //;
14929--error ER_PARSE_ERROR
14930CREATE PROCEDURE sp1( )
14931BEGIN
14932    declare sensitive handler for sqlstate '02000' set @var2 = 1;
14933END//
14934delimiter ;//
14935
14936DROP PROCEDURE IF EXISTS sp1;
14937
14938delimiter //;
14939--error ER_PARSE_ERROR
14940CREATE PROCEDURE sp1( )
14941BEGIN
14942    declare separator handler for sqlstate '02000' set @var2 = 1;
14943END//
14944delimiter ;//
14945
14946DROP PROCEDURE IF EXISTS sp1;
14947
14948delimiter //;
14949--error ER_PARSE_ERROR
14950CREATE PROCEDURE sp1( )
14951BEGIN
14952    declare set handler for sqlstate '02000' set @var2 = 1;
14953END//
14954delimiter ;//
14955
14956DROP PROCEDURE IF EXISTS sp1;
14957
14958delimiter //;
14959--error ER_PARSE_ERROR
14960CREATE PROCEDURE sp1( )
14961BEGIN
14962    declare show handler for sqlstate '02000' set @var2 = 1;
14963END//
14964delimiter ;//
14965
14966DROP PROCEDURE IF EXISTS sp1;
14967
14968delimiter //;
14969--error ER_PARSE_ERROR
14970CREATE PROCEDURE sp1( )
14971BEGIN
14972    declare smallint handler for sqlstate '02000' set @var2 = 1;
14973END//
14974delimiter ;//
14975
14976DROP PROCEDURE IF EXISTS sp1;
14977
14978delimiter //;
14979--error ER_PARSE_ERROR
14980CREATE PROCEDURE sp1( )
14981BEGIN
14982    declare spatial handler for sqlstate '02000' set @var2 = 1;
14983END//
14984delimiter ;//
14985
14986DROP PROCEDURE IF EXISTS sp1;
14987
14988delimiter //;
14989--error ER_PARSE_ERROR
14990CREATE PROCEDURE sp1( )
14991BEGIN
14992    declare specific handler for sqlstate '02000' set @var2 = 1;
14993END//
14994delimiter ;//
14995
14996DROP PROCEDURE IF EXISTS sp1;
14997
14998delimiter //;
14999--error ER_PARSE_ERROR
15000CREATE PROCEDURE sp1( )
15001BEGIN
15002    declare sql handler for sqlstate '02000' set @var2 = 1;
15003END//
15004delimiter ;//
15005
15006DROP PROCEDURE IF EXISTS sp1;
15007
15008delimiter //;
15009--error ER_PARSE_ERROR
15010CREATE PROCEDURE sp1( )
15011BEGIN
15012    declare sqlexception handler for sqlstate '02000' set @var2 = 1;
15013END//
15014delimiter ;//
15015
15016DROP PROCEDURE IF EXISTS sp1;
15017
15018delimiter //;
15019--error ER_PARSE_ERROR
15020CREATE PROCEDURE sp1( )
15021BEGIN
15022    declare sqlstate handler for sqlstate '02000' set @var2 = 1;
15023END//
15024delimiter ;//
15025
15026DROP PROCEDURE IF EXISTS sp1;
15027
15028delimiter //;
15029--error ER_PARSE_ERROR
15030CREATE PROCEDURE sp1( )
15031BEGIN
15032    declare sqlwarning handler for sqlstate '02000' set @var2 = 1;
15033END//
15034delimiter ;//
15035
15036DROP PROCEDURE IF EXISTS sp1;
15037
15038delimiter //;
15039--error ER_PARSE_ERROR
15040CREATE PROCEDURE sp1( )
15041BEGIN
15042    declare sql_big_result handler for sqlstate '02000' set @var2 = 1;
15043END//
15044delimiter ;//
15045
15046DROP PROCEDURE IF EXISTS sp1;
15047
15048delimiter //;
15049--error ER_PARSE_ERROR
15050CREATE PROCEDURE sp1( )
15051BEGIN
15052    declare sql_calc_found_rows handler for sqlstate '02000' set @var2 = 1;
15053END//
15054delimiter ;//
15055
15056DROP PROCEDURE IF EXISTS sp1;
15057
15058delimiter //;
15059--error ER_PARSE_ERROR
15060CREATE PROCEDURE sp1( )
15061BEGIN
15062    declare sql_small_result handler for sqlstate '02000' set @var2 = 1;
15063END//
15064delimiter ;//
15065
15066DROP PROCEDURE IF EXISTS sp1;
15067
15068delimiter //;
15069--error ER_PARSE_ERROR
15070CREATE PROCEDURE sp1( )
15071BEGIN
15072    declare ssl handler for sqlstate '02000' set @var2 = 1;
15073END//
15074delimiter ;//
15075
15076DROP PROCEDURE IF EXISTS sp1;
15077
15078delimiter //;
15079--error ER_PARSE_ERROR
15080CREATE PROCEDURE sp1( )
15081BEGIN
15082    declare starting handler for sqlstate '02000' set @var2 = 1;
15083END//
15084delimiter ;//
15085
15086DROP PROCEDURE IF EXISTS sp1;
15087
15088delimiter //;
15089--error ER_PARSE_ERROR
15090CREATE PROCEDURE sp1( )
15091BEGIN
15092    declare straight_join handler for sqlstate '02000' set @var2 = 1;
15093END//
15094delimiter ;//
15095
15096DROP PROCEDURE IF EXISTS sp1;
15097
15098delimiter //;
15099--error ER_PARSE_ERROR
15100CREATE PROCEDURE sp1( )
15101BEGIN
15102    declare table handler for sqlstate '02000' set @var2 = 1;
15103END//
15104delimiter ;//
15105
15106DROP PROCEDURE IF EXISTS sp1;
15107
15108delimiter //;
15109--error ER_PARSE_ERROR
15110CREATE PROCEDURE sp1( )
15111BEGIN
15112    declare terminated handler for sqlstate '02000' set @var2 = 1;
15113END//
15114delimiter ;//
15115
15116DROP PROCEDURE IF EXISTS sp1;
15117
15118delimiter //;
15119--error ER_PARSE_ERROR
15120CREATE PROCEDURE sp1( )
15121BEGIN
15122    declare then handler for sqlstate '02000' set @var2 = 1;
15123END//
15124delimiter ;//
15125
15126DROP PROCEDURE IF EXISTS sp1;
15127
15128delimiter //;
15129--error ER_PARSE_ERROR
15130CREATE PROCEDURE sp1( )
15131BEGIN
15132    declare tinyblob handler for sqlstate '02000' set @var2 = 1;
15133END//
15134delimiter ;//
15135
15136DROP PROCEDURE IF EXISTS sp1;
15137
15138delimiter //;
15139--error ER_PARSE_ERROR
15140CREATE PROCEDURE sp1( )
15141BEGIN
15142    declare tinyint handler for sqlstate '02000' set @var2 = 1;
15143END//
15144delimiter ;//
15145
15146DROP PROCEDURE IF EXISTS sp1;
15147
15148delimiter //;
15149--error ER_PARSE_ERROR
15150CREATE PROCEDURE sp1( )
15151BEGIN
15152    declare tinytext handler for sqlstate '02000' set @var2 = 1;
15153END//
15154delimiter ;//
15155
15156DROP PROCEDURE IF EXISTS sp1;
15157
15158delimiter //;
15159--error ER_PARSE_ERROR
15160CREATE PROCEDURE sp1( )
15161BEGIN
15162    declare to handler for sqlstate '02000' set @var2 = 1;
15163END//
15164delimiter ;//
15165
15166DROP PROCEDURE IF EXISTS sp1;
15167
15168delimiter //;
15169--error ER_PARSE_ERROR
15170CREATE PROCEDURE sp1( )
15171BEGIN
15172    declare trailing handler for sqlstate '02000' set @var2 = 1;
15173END//
15174delimiter ;//
15175
15176DROP PROCEDURE IF EXISTS sp1;
15177
15178delimiter //;
15179--error ER_PARSE_ERROR
15180CREATE PROCEDURE sp1( )
15181BEGIN
15182    declare trigger handler for sqlstate '02000' set @var2 = 1;
15183END//
15184delimiter ;//
15185
15186DROP PROCEDURE IF EXISTS sp1;
15187
15188delimiter //;
15189--error ER_PARSE_ERROR
15190CREATE PROCEDURE sp1( )
15191BEGIN
15192    declare true handler for sqlstate '02000' set @var2 = 1;
15193END//
15194delimiter ;//
15195
15196DROP PROCEDURE IF EXISTS sp1;
15197
15198delimiter //;
15199--error ER_PARSE_ERROR
15200CREATE PROCEDURE sp1( )
15201BEGIN
15202    declare undo handler for sqlstate '02000' set @var2 = 1;
15203END//
15204delimiter ;//
15205
15206DROP PROCEDURE IF EXISTS sp1;
15207
15208delimiter //;
15209--error ER_PARSE_ERROR
15210CREATE PROCEDURE sp1( )
15211BEGIN
15212    declare union handler for sqlstate '02000' set @var2 = 1;
15213END//
15214delimiter ;//
15215
15216DROP PROCEDURE IF EXISTS sp1;
15217
15218delimiter //;
15219--error ER_PARSE_ERROR
15220CREATE PROCEDURE sp1( )
15221BEGIN
15222    declare unique handler for sqlstate '02000' set @var2 = 1;
15223END//
15224delimiter ;//
15225
15226DROP PROCEDURE IF EXISTS sp1;
15227
15228delimiter //;
15229--error ER_PARSE_ERROR
15230CREATE PROCEDURE sp1( )
15231BEGIN
15232    declare unlock handler for sqlstate '02000' set @var2 = 1;
15233END//
15234delimiter ;//
15235
15236DROP PROCEDURE IF EXISTS sp1;
15237
15238delimiter //;
15239--error ER_PARSE_ERROR
15240CREATE PROCEDURE sp1( )
15241BEGIN
15242    declare unsigned handler for sqlstate '02000' set @var2 = 1;
15243END//
15244delimiter ;//
15245
15246DROP PROCEDURE IF EXISTS sp1;
15247
15248delimiter //;
15249--error ER_PARSE_ERROR
15250CREATE PROCEDURE sp1( )
15251BEGIN
15252    declare update handler for sqlstate '02000' set @var2 = 1;
15253END//
15254delimiter ;//
15255
15256DROP PROCEDURE IF EXISTS sp1;
15257
15258delimiter //;
15259--error ER_PARSE_ERROR
15260CREATE PROCEDURE sp1( )
15261BEGIN
15262    declare usage handler for sqlstate '02000' set @var2 = 1;
15263END//
15264delimiter ;//
15265
15266DROP PROCEDURE IF EXISTS sp1;
15267
15268delimiter //;
15269--error ER_PARSE_ERROR
15270CREATE PROCEDURE sp1( )
15271BEGIN
15272    declare use handler for sqlstate '02000' set @var2 = 1;
15273END//
15274delimiter ;//
15275
15276DROP PROCEDURE IF EXISTS sp1;
15277
15278delimiter //;
15279--error ER_PARSE_ERROR
15280CREATE PROCEDURE sp1( )
15281BEGIN
15282    declare using handler for sqlstate '02000' set @var2 = 1;
15283END//
15284delimiter ;//
15285
15286DROP PROCEDURE IF EXISTS sp1;
15287
15288delimiter //;
15289--error ER_PARSE_ERROR
15290CREATE PROCEDURE sp1( )
15291BEGIN
15292    declare utc_date handler for sqlstate '02000' set @var2 = 1;
15293END//
15294delimiter ;//
15295
15296DROP PROCEDURE IF EXISTS sp1;
15297
15298delimiter //;
15299--error ER_PARSE_ERROR
15300CREATE PROCEDURE sp1( )
15301BEGIN
15302    declare utc_time handler for sqlstate '02000' set @var2 = 1;
15303END//
15304delimiter ;//
15305
15306DROP PROCEDURE IF EXISTS sp1;
15307
15308delimiter //;
15309--error ER_PARSE_ERROR
15310CREATE PROCEDURE sp1( )
15311BEGIN
15312    declare utc_timestamp handler for sqlstate '02000' set @var2 = 1;
15313END//
15314delimiter ;//
15315
15316DROP PROCEDURE IF EXISTS sp1;
15317
15318delimiter //;
15319--error ER_PARSE_ERROR
15320CREATE PROCEDURE sp1( )
15321BEGIN
15322    declare values handler for sqlstate '02000' set @var2 = 1;
15323END//
15324delimiter ;//
15325
15326DROP PROCEDURE IF EXISTS sp1;
15327
15328delimiter //;
15329--error ER_PARSE_ERROR
15330CREATE PROCEDURE sp1( )
15331BEGIN
15332    declare varbinary handler for sqlstate '02000' set @var2 = 1;
15333END//
15334delimiter ;//
15335
15336DROP PROCEDURE IF EXISTS sp1;
15337
15338delimiter //;
15339--error ER_PARSE_ERROR
15340CREATE PROCEDURE sp1( )
15341BEGIN
15342    declare varchar handler for sqlstate '02000' set @var2 = 1;
15343END//
15344delimiter ;//
15345
15346DROP PROCEDURE IF EXISTS sp1;
15347
15348delimiter //;
15349--error ER_PARSE_ERROR
15350CREATE PROCEDURE sp1( )
15351BEGIN
15352    declare varcharacter handler for sqlstate '02000' set @var2 = 1;
15353END//
15354delimiter ;//
15355
15356DROP PROCEDURE IF EXISTS sp1;
15357
15358delimiter //;
15359--error ER_PARSE_ERROR
15360CREATE PROCEDURE sp1( )
15361BEGIN
15362    declare varying handler for sqlstate '02000' set @var2 = 1;
15363END//
15364delimiter ;//
15365
15366DROP PROCEDURE IF EXISTS sp1;
15367
15368delimiter //;
15369--error ER_PARSE_ERROR
15370CREATE PROCEDURE sp1( )
15371BEGIN
15372    declare when handler for sqlstate '02000' set @var2 = 1;
15373END//
15374delimiter ;//
15375
15376DROP PROCEDURE IF EXISTS sp1;
15377
15378delimiter //;
15379--error ER_PARSE_ERROR
15380CREATE PROCEDURE sp1( )
15381BEGIN
15382    declare where handler for sqlstate '02000' set @var2 = 1;
15383END//
15384delimiter ;//
15385
15386DROP PROCEDURE IF EXISTS sp1;
15387
15388delimiter //;
15389--error ER_PARSE_ERROR
15390CREATE PROCEDURE sp1( )
15391BEGIN
15392    declare while handler for sqlstate '02000' set @var2 = 1;
15393END//
15394delimiter ;//
15395
15396DROP PROCEDURE IF EXISTS sp1;
15397
15398delimiter //;
15399--error ER_PARSE_ERROR
15400CREATE PROCEDURE sp1( )
15401BEGIN
15402    declare with handler for sqlstate '02000' set @var2 = 1;
15403END//
15404delimiter ;//
15405
15406DROP PROCEDURE IF EXISTS sp1;
15407
15408delimiter //;
15409--error ER_PARSE_ERROR
15410CREATE PROCEDURE sp1( )
15411BEGIN
15412    declare write handler for sqlstate '02000' set @var2 = 1;
15413END//
15414delimiter ;//
15415
15416DROP PROCEDURE IF EXISTS sp1;
15417
15418delimiter //;
15419--error ER_PARSE_ERROR
15420CREATE PROCEDURE sp1( )
15421BEGIN
15422    declare xor handler for sqlstate '02000' set @var2 = 1;
15423END//
15424delimiter ;//
15425
15426DROP PROCEDURE IF EXISTS sp1;
15427
15428delimiter //;
15429--error ER_PARSE_ERROR
15430CREATE PROCEDURE sp1( )
15431BEGIN
15432    declare year_month handler for sqlstate '02000' set @var2 = 1;
15433END//
15434delimiter ;//
15435
15436DROP PROCEDURE IF EXISTS sp1;
15437
15438delimiter //;
15439--error ER_PARSE_ERROR
15440CREATE PROCEDURE sp1( )
15441BEGIN
15442    declare zerofill handler for sqlstate '02000' set @var2 = 1;
15443END//
15444delimiter ;//
15445
15446
15447# ==============================================================================
15448#
15449# test plan section: 4.2 - syntax checks for programming statements - 2
15450#
15451# ==============================================================================
15452
15453
15454USE db_storedproc;
15455
15456
15457# ------------------------------------------------------------------------------
15458let $message= Testcase 4.2.26:;
15459--source include/show_msg80.inc
15460
15461# testcase: ensure that the scope of every variable, cursor, condition and handler
15462#            declared for a stored procedure (with the declare statement) is properly applied.
15463
15464
15465set @v1='0';
15466set @v2='0';
15467--disable_warnings ONCE
15468DROP PROCEDURE IF EXISTS sp1;
15469
15470delimiter //;
15471CREATE PROCEDURE sp1()
15472BEGIN
15473    declare x char;
15474    declare y char;
15475    declare cond1 condition for sqlstate '42000';
15476    declare cur1 cursor for SELECT f1 from t2 limit 1;
15477    declare continue handler for cond1 set @x = 4;
15478    set @x = '1';
15479    set @y = '2';
15480    BEGIN
15481      declare x char;
15482      declare y char;
15483      declare cur1 cursor for SELECT f1 from t2 limit 2, 1;
15484      declare continue handler for sqlstate '42000' set @x = 3;
15485      open cur1;
15486      fetch cur1 into y;
15487      close cur1;
15488    CALL nonsexist();
15489      SELECT x, y, @x;
15490    END;
15491    open cur1;
15492    fetch cur1 into y;
15493    close cur1;
15494  CALL nonsexist();
15495    set @v1 = @x;
15496    set @v2 = y;
15497END//
15498delimiter ;//
15499
15500CALL sp1();
15501  SELECT @v1, @v2;
15502
15503# cleanup
15504DROP PROCEDURE sp1;
15505
15506
15507# ------------------------------------------------------------------------------
15508let $message= Testcase 4.2.28:;
15509--source include/show_msg80.inc
15510
15511# testcase: ensure that the set statement can assign a value to every local variable
15512#            declared within a stored procedures definition, as well as to every
15513#            appropriate global server variable.
15514
15515SET @x = 0;
15516SET @y = 0;
15517DROP PROCEDURE IF EXISTS sp1;
15518
15519SET @start_global_value = @@GLOBAL.sort_buffer_size;
15520delimiter //;
15521CREATE PROCEDURE sp1()
15522BEGIN
15523   DECLARE CONTINUE HANDLER FOR SQLSTATE '42000' SET @x2 = 1;
15524   SET SESSION SORT_BUFFER_SIZE = 10 * 1024 * 1024;
15525   SELECT @@sort_buffer_size;
15526   SET @x = 4;
15527   SET @y = 3;
15528   SET GLOBAL SORT_BUFFER_SIZE = 2 * 1024 * 1024;
15529   SELECT @@sort_buffer_size;
15530   SET @@sort_buffer_size = 10 * 1024 * 1024;
15531   SELECT @@sort_buffer_size;
15532END//
15533delimiter ;//
15534CALL sp1();
15535SELECT @x, @y;
15536SET @@GLOBAL.sort_buffer_size = @start_global_value;
15537
15538
15539# ------------------------------------------------------------------------------
15540let $message= Testcase 4.2.29:;
15541--source include/show_msg80.inc
15542
15543# testcase: ensure that the set statement can assign values to variables either
15544#            separately or multiple variables in a list.
15545
15546
15547DROP PROCEDURE IF EXISTS sp1;
15548
15549delimiter //;
15550CREATE PROCEDURE sp1()
15551BEGIN
15552    declare xx char default 'x';
15553    declare xy char default 'y';
15554    declare xz char default 'z';
15555    set @xx = xx, @xy = xy;
15556    set @xz = xz;
15557    SELECT @xx, @xy, @xz;
15558END//
15559delimiter ;//
15560
15561CALL sp1();
15562
15563# cleanup
15564DROP PROCEDURE sp1;
15565
15566
15567
15568# ------------------------------------------------------------------------------
15569let $message= Testcase 4.2.30:;
15570--source include/show_msg80.inc
15571
15572# testcase: ensure that the set statement may assign only those values to a variable
15573#            that are appropriate for that variables data type definition
15574
15575# integer data_type.
15576
15577  set @xx=0;
15578
15579DROP PROCEDURE IF EXISTS sp1;
15580
15581delimiter //;
15582CREATE PROCEDURE sp1()
15583BEGIN
15584    declare xx int;
15585    set xx = 'asd';
15586    set @xx = xx;
15587    SELECT @xx;
15588END//
15589delimiter ;//
15590
15591CALL sp1();
15592
15593DROP PROCEDURE IF EXISTS sp1;
15594
15595delimiter //;
15596CREATE PROCEDURE sp1()
15597BEGIN
15598    declare xx int;
15599    set xx = 5;
15600    set @xx = xx;
15601    SELECT @xx;
15602END//
15603delimiter ;//
15604
15605CALL sp1();
15606
15607# cleanup
15608DROP PROCEDURE sp1;
15609
15610
15611# ------------------------------------------------------------------------------
15612let $message= Testcase 4.2.31 - a:;
15613--source include/show_msg80.inc
15614
15615# character data_type
15616
15617  set @xx=0;
15618
15619DROP PROCEDURE IF EXISTS sp1;
15620
15621delimiter //;
15622CREATE PROCEDURE sp1()
15623BEGIN
15624    declare xx char;
15625    set xx = 'temp';
15626    set @xx = xx;
15627END//
15628delimiter ;//
15629
15630CALL sp1();
15631
15632  SELECT @xx;
15633
15634# cleanup
15635DROP PROCEDURE sp1;
15636
15637
15638# ------------------------------------------------------------------------------
15639let $message= Testcase 4.2.31 - b:;
15640--source include/show_msg80.inc
15641
15642# float data_type
15643
15644DROP PROCEDURE IF EXISTS sp1;
15645
15646delimiter //;
15647CREATE PROCEDURE sp1()
15648BEGIN
15649    declare xx float;
15650    set xx = 'asd';
15651    SELECT xx;
15652END//
15653delimiter ;//
15654
15655CALL sp1();
15656
15657DROP PROCEDURE IF EXISTS sp1;
15658
15659delimiter //;
15660CREATE PROCEDURE sp1()
15661BEGIN
15662    declare xx float;
15663    set xx = 1.6;
15664    SELECT xx;
15665END//
15666delimiter ;//
15667
15668CALL sp1();
15669
15670# cleanup
15671DROP PROCEDURE sp1;
15672
15673
15674
15675# ------------------------------------------------------------------------------
15676let $message= Testcase 4.2.31 - c:;
15677--source include/show_msg80.inc
15678
15679# datetime data_type
15680
15681DROP PROCEDURE IF EXISTS sp1;
15682
15683delimiter //;
15684CREATE PROCEDURE sp1()
15685BEGIN
15686    declare xx datetime;
15687    set xx = 'asd';
15688    SELECT xx;
15689END//
15690delimiter ;//
15691
15692CALL sp1();
15693
15694DROP PROCEDURE IF EXISTS sp1;
15695
15696delimiter //;
15697CREATE PROCEDURE sp1()
15698BEGIN
15699    declare xx datetime;
15700    set xx = '2006-06-06 01:01:01';
15701    SELECT xx;
15702END//
15703delimiter ;//
15704
15705CALL sp1();
15706
15707# cleanup
15708DROP PROCEDURE sp1;
15709
15710
15711# ------------------------------------------------------------------------------
15712let $message= Testcase 4.2.31 - d:;
15713--source include/show_msg80.inc
15714
15715# varchar data_type
15716
15717DROP PROCEDURE IF EXISTS sp1;
15718
15719delimiter //;
15720CREATE PROCEDURE sp1()
15721BEGIN
15722    declare xx varchar(20);
15723    set xx = "abcdefghijk";
15724    SELECT xx;
15725END//
15726delimiter ;//
15727
15728CALL sp1();
15729
15730# cleanup
15731DROP PROCEDURE sp1;
15732
15733
15734# ------------------------------------------------------------------------------
15735let $message= Testcase 4.2.31 - e:;
15736--source include/show_msg80.inc
15737
15738# tinyint
15739
15740DROP PROCEDURE IF EXISTS sp1;
15741
15742delimiter //;
15743CREATE PROCEDURE sp1()
15744BEGIN
15745    declare xx tinyint;
15746    set xx = 'asd';
15747    SELECT xx;
15748END//
15749delimiter ;//
15750
15751CALL sp1();
15752
15753DROP PROCEDURE IF EXISTS sp1;
15754
15755delimiter //;
15756CREATE PROCEDURE sp1()
15757BEGIN
15758    declare xx tinyint;
15759    set xx = -125;
15760    SELECT xx;
15761END//
15762delimiter ;//
15763
15764CALL sp1();
15765
15766# cleanup
15767DROP PROCEDURE sp1;
15768
15769
15770
15771# ------------------------------------------------------------------------------
15772let $message= Testcase 4.2.37:;
15773--source include/show_msg80.inc
15774
15775# testcase: ensure that the SELECT  into statement that retrieves column values
15776#            with inappropriate data types for the matching variables in its variable
15777#            list is rejected, with an appropriate error message.
15778
15779DROP PROCEDURE IF EXISTS sp1;
15780
15781delimiter //;
15782CREATE PROCEDURE sp1( )
15783BEGIN
15784    declare x integer; declare y integer;
15785    SELECT sal, f2 into x, y from t2 limit 1;
15786    set @x=x; set @y=y;
15787END//
15788delimiter ;//
15789
15790DROP PROCEDURE IF EXISTS sp1;
15791
15792delimiter //;
15793CREATE PROCEDURE sp1()
15794BEGIN
15795    declare x char ascii;
15796    SELECT f1 into x from t2 limit 1;
15797END//
15798delimiter ;//
15799
15800CALL sp1();
15801
15802DROP PROCEDURE IF EXISTS sp1;
15803
15804delimiter //;
15805CREATE PROCEDURE sp1()
15806BEGIN
15807    declare x tinytext;
15808    SELECT f1 into x from t2 limit 1;
15809END//
15810delimiter ;//
15811
15812CALL sp1();
15813
15814
15815DROP PROCEDURE IF EXISTS sp1;
15816
15817delimiter //;
15818CREATE PROCEDURE sp1()
15819BEGIN
15820    declare x text;
15821    SELECT f1 into x from t2 limit 1;
15822END//
15823delimiter ;//
15824
15825CALL sp1();
15826
15827DROP PROCEDURE IF EXISTS sp1;
15828
15829delimiter //;
15830CREATE PROCEDURE sp1()
15831BEGIN
15832    declare x mediumtext;
15833    SELECT f1 into x from t2 limit 1;
15834END//
15835delimiter ;//
15836
15837CALL sp1();
15838
15839DROP PROCEDURE IF EXISTS sp1;
15840
15841delimiter //;
15842CREATE PROCEDURE sp1()
15843BEGIN
15844    declare x longtext;
15845    SELECT f1 into x from t2 limit 1;
15846END//
15847delimiter ;//
15848
15849CALL sp1();
15850
15851DROP PROCEDURE IF EXISTS sp1;
15852
15853delimiter //;
15854CREATE PROCEDURE sp1()
15855BEGIN
15856    declare x tinyblob;
15857    SELECT f1 into x from t2 limit 1;
15858END//
15859delimiter ;//
15860
15861CALL sp1();
15862
15863DROP PROCEDURE IF EXISTS sp1;
15864
15865delimiter //;
15866CREATE PROCEDURE sp1()
15867BEGIN
15868    declare x blob;
15869    SELECT f1 into x from t2 limit 1;
15870END//
15871delimiter ;//
15872
15873CALL sp1();
15874
15875DROP PROCEDURE IF EXISTS sp1;
15876
15877delimiter //;
15878CREATE PROCEDURE sp1()
15879BEGIN
15880    declare x mediumblob;
15881    SELECT f1 into x from t2 limit 1;
15882END//
15883delimiter ;//
15884
15885CALL sp1();
15886
15887DROP PROCEDURE IF EXISTS sp1;
15888
15889delimiter //;
15890CREATE PROCEDURE sp1()
15891BEGIN
15892    declare x longblob;
15893    SELECT f1 into x from t2 limit 1;
15894END//
15895delimiter ;//
15896
15897CALL sp1();
15898
15899DROP PROCEDURE IF EXISTS sp1;
15900
15901delimiter //;
15902CREATE PROCEDURE sp1()
15903BEGIN
15904    declare x binary;
15905    SELECT f1 into x from t2 limit 1;
15906END//
15907delimiter ;//
15908
15909CALL sp1();
15910
15911--disable_warnings
15912
15913DROP PROCEDURE IF EXISTS sp1;
15914
15915delimiter //;
15916CREATE PROCEDURE sp1()
15917BEGIN
15918    declare x tinyint;
15919    SELECT f1 into x from t2 limit 1;
15920END//
15921delimiter ;//
15922
15923CALL sp1();
15924
15925DROP PROCEDURE IF EXISTS sp1;
15926
15927delimiter //;
15928CREATE PROCEDURE sp1()
15929BEGIN
15930    declare x tinyint unsigned;
15931    SELECT f1 into x from t2 limit 1;
15932END//
15933delimiter ;//
15934
15935CALL sp1();
15936
15937DROP PROCEDURE IF EXISTS sp1;
15938
15939delimiter //;
15940CREATE PROCEDURE sp1()
15941BEGIN
15942    declare x tinyint zerofill;
15943    SELECT f1 into x from t2 limit 1;
15944END//
15945delimiter ;//
15946
15947CALL sp1();
15948
15949DROP PROCEDURE IF EXISTS sp1;
15950
15951delimiter //;
15952CREATE PROCEDURE sp1()
15953BEGIN
15954    declare x tinyint unsigned zerofill;
15955    SELECT f1 into x from t2 limit 1;
15956END//
15957delimiter ;//
15958
15959CALL sp1();
15960
15961DROP PROCEDURE IF EXISTS sp1;
15962
15963delimiter //;
15964CREATE PROCEDURE sp1()
15965BEGIN
15966    declare x smallint;
15967    SELECT f1 into x from t2 limit 1;
15968END//
15969delimiter ;//
15970
15971CALL sp1();
15972
15973DROP PROCEDURE IF EXISTS sp1;
15974
15975delimiter //;
15976CREATE PROCEDURE sp1()
15977BEGIN
15978    declare x smallint unsigned;
15979    SELECT f1 into x from t2 limit 1;
15980END//
15981delimiter ;//
15982
15983CALL sp1();
15984
15985DROP PROCEDURE IF EXISTS sp1;
15986
15987delimiter //;
15988CREATE PROCEDURE sp1()
15989BEGIN
15990    declare x smallint zerofill;
15991    SELECT f1 into x from t2 limit 1;
15992END//
15993delimiter ;//
15994
15995CALL sp1();
15996
15997DROP PROCEDURE IF EXISTS sp1;
15998
15999delimiter //;
16000CREATE PROCEDURE sp1()
16001BEGIN
16002    declare x smallint unsigned zerofill;
16003    SELECT f1 into x from t2 limit 1;
16004END//
16005delimiter ;//
16006
16007CALL sp1();
16008
16009DROP PROCEDURE IF EXISTS sp1;
16010
16011delimiter //;
16012CREATE PROCEDURE sp1()
16013BEGIN
16014    declare x mediumint;
16015    SELECT f1 into x from t2 limit 1;
16016END//
16017delimiter ;//
16018
16019CALL sp1();
16020
16021DROP PROCEDURE IF EXISTS sp1;
16022
16023delimiter //;
16024CREATE PROCEDURE sp1()
16025BEGIN
16026    declare x mediumint unsigned;
16027    SELECT f1 into x from t2 limit 1;
16028END//
16029delimiter ;//
16030
16031CALL sp1();
16032
16033DROP PROCEDURE IF EXISTS sp1;
16034delimiter //;
16035CREATE PROCEDURE sp1()
16036BEGIN
16037    declare x mediumint zerofill;
16038    SELECT f1 into x from t2 limit 1;
16039END//
16040delimiter ;//
16041
16042CALL sp1();
16043
16044DROP PROCEDURE IF EXISTS sp1;
16045
16046delimiter //;
16047CREATE PROCEDURE sp1()
16048BEGIN
16049    declare x mediumint unsigned zerofill;
16050    SELECT f1 into x from t2 limit 1;
16051END//
16052delimiter ;//
16053
16054CALL sp1();
16055
16056DROP PROCEDURE IF EXISTS sp1;
16057
16058delimiter //;
16059CREATE PROCEDURE sp1()
16060BEGIN
16061    declare x int;
16062    SELECT f1 into x from t2 limit 1;
16063END//
16064delimiter ;//
16065
16066CALL sp1();
16067
16068DROP PROCEDURE IF EXISTS sp1;
16069
16070delimiter //;
16071CREATE PROCEDURE sp1()
16072BEGIN
16073    declare x int unsigned;
16074    SELECT f1 into x from t2 limit 1;
16075END//
16076delimiter ;//
16077
16078CALL sp1();
16079
16080DROP PROCEDURE IF EXISTS sp1;
16081
16082delimiter //;
16083CREATE PROCEDURE sp1()
16084BEGIN
16085    declare x int zerofill;
16086    SELECT f1 into x from t2 limit 1;
16087END//
16088delimiter ;//
16089
16090CALL sp1();
16091
16092DROP PROCEDURE IF EXISTS sp1;
16093
16094delimiter //;
16095CREATE PROCEDURE sp1()
16096BEGIN
16097    declare x int unsigned zerofill;
16098    SELECT f1 into x from t2 limit 1;
16099END//
16100delimiter ;//
16101
16102CALL sp1();
16103
16104DROP PROCEDURE IF EXISTS sp1;
16105
16106delimiter //;
16107CREATE PROCEDURE sp1()
16108BEGIN
16109    declare x bigint;
16110    SELECT f1 into x from t2 limit 1;
16111END//
16112delimiter ;//
16113
16114CALL sp1();
16115
16116DROP PROCEDURE IF EXISTS sp1;
16117
16118delimiter //;
16119CREATE PROCEDURE sp1()
16120BEGIN
16121    declare x bigint unsigned;
16122    SELECT f1 into x from t2 limit 1;
16123END//
16124delimiter ;//
16125
16126CALL sp1();
16127
16128DROP PROCEDURE IF EXISTS sp1;
16129
16130delimiter //;
16131CREATE PROCEDURE sp1()
16132BEGIN
16133    declare x bigint zerofill;
16134    SELECT f1 into x from t2 limit 1;
16135END//
16136delimiter ;//
16137
16138CALL sp1();
16139
16140DROP PROCEDURE IF EXISTS sp1;
16141
16142delimiter //;
16143CREATE PROCEDURE sp1()
16144BEGIN
16145    declare x bigint unsigned zerofill;
16146    SELECT f1 into x from t2 limit 1;
16147END//
16148delimiter ;//
16149
16150CALL sp1();
16151
16152DROP PROCEDURE IF EXISTS sp1;
16153
16154delimiter //;
16155CREATE PROCEDURE sp1()
16156BEGIN
16157    declare x decimal;
16158    SELECT f1 into x from t2 limit 1;
16159END//
16160delimiter ;//
16161
16162CALL sp1();
16163
16164DROP PROCEDURE IF EXISTS sp1;
16165
16166delimiter //;
16167CREATE PROCEDURE sp1()
16168BEGIN
16169    declare x decimal unsigned;
16170    SELECT f1 into x from t2 limit 1;
16171END//
16172delimiter ;//
16173
16174CALL sp1();
16175
16176DROP PROCEDURE IF EXISTS sp1;
16177
16178delimiter //;
16179CREATE PROCEDURE sp1()
16180BEGIN
16181    declare x decimal zerofill;
16182    SELECT f1 into x from t2 limit 1;
16183END//
16184delimiter ;//
16185
16186CALL sp1();
16187
16188DROP PROCEDURE IF EXISTS sp1;
16189
16190delimiter //;
16191CREATE PROCEDURE sp1()
16192BEGIN
16193    declare x decimal unsigned zerofill;
16194    SELECT f1 into x from t2 limit 1;
16195END//
16196delimiter ;//
16197
16198CALL sp1();
16199
16200DROP PROCEDURE IF EXISTS sp1;
16201
16202delimiter //;
16203CREATE PROCEDURE sp1()
16204BEGIN
16205    declare x numeric;
16206    SELECT f1 into x from t2 limit 1;
16207END//
16208delimiter ;//
16209
16210CALL sp1();
16211
16212DROP PROCEDURE IF EXISTS sp1;
16213
16214delimiter //;
16215CREATE PROCEDURE sp1()
16216BEGIN
16217    declare x numeric unsigned;
16218    SELECT f1 into x from t2 limit 1;
16219END//
16220delimiter ;//
16221
16222CALL sp1();
16223
16224DROP PROCEDURE IF EXISTS sp1;
16225
16226delimiter //;
16227CREATE PROCEDURE sp1()
16228BEGIN
16229    declare x numeric zerofill;
16230    SELECT f1 into x from t2 limit 1;
16231END//
16232delimiter ;//
16233
16234CALL sp1();
16235
16236DROP PROCEDURE IF EXISTS sp1;
16237
16238delimiter //;
16239CREATE PROCEDURE sp1()
16240BEGIN
16241    declare x numeric unsigned zerofill;
16242    SELECT f1 into x from t2 limit 1;
16243END//
16244delimiter ;//
16245
16246CALL sp1();
16247
16248DROP PROCEDURE IF EXISTS sp1;
16249
16250delimiter //;
16251CREATE PROCEDURE sp1()
16252BEGIN
16253    declare x real;
16254    SELECT f1 into x from t2 limit 1;
16255END//
16256delimiter ;//
16257
16258CALL sp1();
16259
16260DROP PROCEDURE IF EXISTS sp1;
16261
16262delimiter //;
16263CREATE PROCEDURE sp1()
16264BEGIN
16265    declare x real unsigned;
16266    SELECT f1 into x from t2 limit 1;
16267END//
16268delimiter ;//
16269
16270CALL sp1();
16271
16272DROP PROCEDURE IF EXISTS sp1;
16273
16274delimiter //;
16275CREATE PROCEDURE sp1()
16276BEGIN
16277    declare x real zerofill;
16278    SELECT f1 into x from t2 limit 1;
16279END//
16280delimiter ;//
16281
16282CALL sp1();
16283
16284DROP PROCEDURE IF EXISTS sp1;
16285
16286delimiter //;
16287CREATE PROCEDURE sp1()
16288BEGIN
16289    declare x real unsigned zerofill;
16290    SELECT f1 into x from t2 limit 1;
16291END//
16292delimiter ;//
16293
16294CALL sp1();
16295
16296DROP PROCEDURE IF EXISTS sp1;
16297
16298delimiter //;
16299CREATE PROCEDURE sp1()
16300BEGIN
16301    declare x float;
16302    SELECT f1 into x from t2 limit 1;
16303END//
16304delimiter ;//
16305
16306CALL sp1();
16307
16308DROP PROCEDURE IF EXISTS sp1;
16309
16310delimiter //;
16311CREATE PROCEDURE sp1()
16312BEGIN
16313    declare x float unsigned;
16314    SELECT f1 into x from t2 limit 1;
16315END//
16316delimiter ;//
16317
16318CALL sp1();
16319
16320DROP PROCEDURE IF EXISTS sp1;
16321
16322delimiter //;
16323CREATE PROCEDURE sp1()
16324BEGIN
16325    declare x float zerofill;
16326    SELECT f1 into x from t2 limit 1;
16327END//
16328delimiter ;//
16329
16330CALL sp1();
16331
16332DROP PROCEDURE IF EXISTS sp1;
16333
16334delimiter //;
16335CREATE PROCEDURE sp1()
16336BEGIN
16337    declare x float unsigned zerofill;
16338    SELECT f1 into x from t2 limit 1;
16339END//
16340delimiter ;//
16341
16342CALL sp1();
16343
16344DROP PROCEDURE IF EXISTS sp1;
16345
16346delimiter //;
16347CREATE PROCEDURE sp1()
16348BEGIN
16349    declare x date;
16350    SELECT f1 into x from t2 limit 1;
16351END//
16352delimiter ;//
16353
16354CALL sp1();
16355
16356DROP PROCEDURE IF EXISTS sp1;
16357
16358delimiter //;
16359CREATE PROCEDURE sp1()
16360BEGIN
16361    declare x time;
16362    SELECT f1 into x from t2 limit 1;
16363END//
16364delimiter ;//
16365
16366CALL sp1();
16367
16368DROP PROCEDURE IF EXISTS sp1;
16369
16370delimiter //;
16371CREATE PROCEDURE sp1()
16372BEGIN
16373    declare x datetime;
16374    SELECT f1 into x from t2 limit 1;
16375END//
16376delimiter ;//
16377
16378CALL sp1();
16379
16380DROP PROCEDURE IF EXISTS sp1;
16381
16382delimiter //;
16383CREATE PROCEDURE sp1()
16384BEGIN
16385    declare x timestamp;
16386    SELECT f1 into x from t2 limit 1;
16387END//
16388delimiter ;//
16389
16390CALL sp1();
16391
16392DROP PROCEDURE IF EXISTS sp1;
16393
16394delimiter //;
16395CREATE PROCEDURE sp1()
16396BEGIN
16397    declare x year;
16398    SELECT f1 into x from t2 limit 1;
16399END//
16400delimiter ;//
16401
16402CALL sp1();
16403
16404DROP PROCEDURE IF EXISTS sp1;
16405
16406delimiter //;
16407CREATE PROCEDURE sp1()
16408BEGIN
16409    declare x year(3);
16410    SELECT f1 into x from t2 limit 1;
16411END//
16412delimiter ;//
16413
16414CALL sp1();
16415
16416DROP PROCEDURE IF EXISTS sp1;
16417
16418delimiter //;
16419CREATE PROCEDURE sp1()
16420BEGIN
16421    declare x year(4);
16422    SELECT f1 into x from t2 limit 1;
16423END//
16424delimiter ;//
16425
16426CALL sp1();
16427
16428DROP PROCEDURE IF EXISTS sp1;
16429
16430delimiter //;
16431CREATE PROCEDURE sp1()
16432BEGIN
16433    declare x enum("1enum", "2enum");
16434    SELECT f1 into x from t2 limit 1;
16435END//
16436delimiter ;//
16437
16438CALL sp1();
16439
16440DROP PROCEDURE IF EXISTS sp1;
16441
16442delimiter //;
16443CREATE PROCEDURE sp1()
16444BEGIN
16445    declare x set("1set", "2set");
16446    SELECT f1 into x from t2 limit 1;
16447END//
16448delimiter ;//
16449
16450CALL sp1();
16451
16452# cleanup
16453DROP PROCEDURE sp1;
16454--enable_warnings
16455
16456# ------------------------------------------------------------------------------
16457let $message= Testcase 4.2.38:;
16458--source include/show_msg80.inc
16459
16460# testcase: ensure that the declare condition for statement can declare a properly
16461#            named condition for every possible sqlstate and mysql-specific error code.
16462
16463DROP PROCEDURE IF EXISTS sp1;
16464
16465delimiter //;
16466CREATE PROCEDURE sp1()
16467BEGIN
16468    declare notable condition for sqlstate '42S02';
16469    declare continue handler for notable set @x2=1;
16470    set @x = 1;
16471    insert into t2(f1) values (1);
16472    set @x = 2;
16473    insert into t2(f1) values (1);
16474    set @x = 3;
16475END//
16476delimiter ;//
16477
16478CALL sp1();
16479
16480# cleanup
16481DROP PROCEDURE sp1;
16482
16483
16484
16485# ------------------------------------------------------------------------------
16486let $message= Testcase 4.2.39:;
16487--source include/show_msg80.inc
16488
16489# testcase: ensure that no two conditions declared with the same scope may have the
16490#            same condition name (same condition name in same scope)
16491
16492DROP PROCEDURE IF EXISTS sp1;
16493
16494delimiter //;
16495--error ER_SP_DUP_COND
16496CREATE PROCEDURE sp1()
16497BEGIN
16498    declare cond1 condition for sqlstate '42000';
16499    declare cond1 condition for sqlstate '23000';
16500    declare continue handler for cond1 set @var2 = 1;
16501    insert into tnull values(1);
16502END//
16503delimiter ;//
16504
16505
16506# ------------------------------------------------------------------------------
16507let $message= Testcase 4.2.41:;
16508--source include/show_msg80.inc
16509
16510# testcase: ensure that every sqlstate value declared with a declare  condition for
16511#            statement is a character string that is 5 character.
16512
16513DROP PROCEDURE IF EXISTS sp1;
16514
16515delimiter //;
16516--error ER_SP_BAD_SQLSTATE
16517CREATE PROCEDURE sp1()
16518BEGIN
16519    declare cond1 condition for sqlstate '1';
16520    declare continue handler for cond1 set @var2 = 1;
16521    insert into tnull values( 1);
16522END//
16523delimiter ;//
16524
16525--disable_warnings ONCE
16526DROP PROCEDURE IF EXISTS sp1;
16527
16528delimiter //;
16529--error ER_SP_BAD_SQLSTATE
16530CREATE PROCEDURE sp1()
16531BEGIN
16532    declare cond1 condition for sqlstate '12';
16533    declare continue handler for cond1 set @var2 = 1;
16534    insert into tnull values( 1);
16535END//
16536delimiter ;//
16537
16538--disable_warnings ONCE
16539DROP PROCEDURE IF EXISTS sp1;
16540
16541delimiter //;
16542--error ER_SP_BAD_SQLSTATE
16543CREATE PROCEDURE sp1()
16544BEGIN
16545    declare cond1 condition for sqlstate '123';
16546    declare continue handler for cond1 set @var2 = 1;
16547    insert into tnull values( 1);
16548END//
16549delimiter ;//
16550
16551--disable_warnings ONCE
16552DROP PROCEDURE IF EXISTS sp1;
16553
16554delimiter //;
16555--error ER_SP_BAD_SQLSTATE
16556CREATE PROCEDURE sp1()
16557BEGIN
16558    declare cond1 condition for sqlstate '1234';
16559    declare continue handler for cond1 set @var2 = 1;
16560    insert into tnull values( 1);
16561END//
16562delimiter ;//
16563
16564--disable_warnings ONCE
16565DROP PROCEDURE IF EXISTS sp1;
16566
16567delimiter //;
16568--error ER_SP_BAD_SQLSTATE
16569CREATE PROCEDURE sp1()
16570BEGIN
16571    declare cond1 condition for sqlstate '123456';
16572    declare continue handler for cond1 set @var2 = 1;
16573    insert into tnull values( 1);
16574END//
16575delimiter ;//
16576
16577
16578# ------------------------------------------------------------------------------
16579let $message= Testcase 4.2.42:;
16580--source include/show_msg80.inc
16581
16582# testcase: ensure that the declare  condition for statement cannot declare a
16583#            condition for an invalid sqlstate.
16584
16585
16586--disable_warnings ONCE
16587DROP PROCEDURE IF EXISTS sp1;
16588
16589delimiter //;
16590--error ER_SP_BAD_SQLSTATE
16591CREATE PROCEDURE sp1()
16592BEGIN
16593    declare cond1 condition for sqlstate 'abcdefghi';
16594    declare continue handler for cond1 set @var2 = 1;
16595    insert into tnull values( 1);
16596END//
16597delimiter ;//
16598
16599--disable_warnings ONCE
16600DROP PROCEDURE IF EXISTS sp1;
16601
16602delimiter //;
16603--error ER_SP_BAD_SQLSTATE
16604CREATE PROCEDURE sp1()
16605BEGIN
16606    declare cond1 condition for sqlstate '42000test';
16607    declare continue handler for cond1 set @var2 = 1;
16608    insert into tnull values( 1);
16609END//
16610delimiter ;//
16611
16612--disable_warnings ONCE
16613DROP PROCEDURE IF EXISTS sp1;
16614
16615delimiter //;
16616--error ER_SP_BAD_SQLSTATE
16617CREATE PROCEDURE sp1()
16618BEGIN
16619    declare cond1 condition for sqlstate '00000@#$%^&';
16620    declare continue handler for cond1 set @var2 = 1;
16621    insert into tnull values( 1);
16622END//
16623delimiter ;//
16624
16625--disable_warnings ONCE
16626DROP PROCEDURE IF EXISTS sp1;
16627
16628delimiter //;
16629--error ER_SP_BAD_SQLSTATE
16630CREATE PROCEDURE sp1()
16631BEGIN
16632    declare cond1 condition for sqlstate '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
16633    declare continue handler for cond1 set @var2 = 1;
16634    insert into tnull values( 1);
16635END//
16636delimiter ;//
16637
16638--disable_warnings ONCE
16639DROP PROCEDURE IF EXISTS sp1;
16640
16641delimiter //;
16642--error ER_SP_BAD_SQLSTATE
16643CREATE PROCEDURE sp1()
16644BEGIN
16645    declare cond1 condition for sqlstate 'null';
16646    declare continue handler for cond1 set @var2 = 1;
16647    insert into tnull values( 1);
16648END//
16649delimiter ;//
16650
16651--disable_warnings ONCE
16652DROP PROCEDURE IF EXISTS sp1;
16653
16654delimiter //;
16655--error ER_SP_BAD_SQLSTATE
16656CREATE PROCEDURE sp1()
16657BEGIN
16658    declare cond1 condition for sqlstate ' ';
16659    declare continue handler for cond1 set @var2 = 1;
16660    insert into tnull values( 1);
16661END//
16662delimiter ;//
16663
16664--disable_warnings ONCE
16665DROP PROCEDURE IF EXISTS sp1;
16666
16667delimiter //;
16668--error ER_PARSE_ERROR
16669CREATE PROCEDURE sp1()
16670BEGIN
16671    declare cond1 condition for sqlstate 1234567890;
16672    declare continue handler for cond1 set @var2 = 1;
16673    insert into tnull values( 1);
16674END//
16675delimiter ;//
16676
16677--disable_warnings ONCE
16678DROP PROCEDURE IF EXISTS sp1;
16679
16680delimiter //;
16681--error ER_SP_BAD_SQLSTATE
16682CREATE PROCEDURE sp1()
16683BEGIN
16684    declare cond1 condition for sqlstate '2005-03-03';
16685    declare continue handler for cond1 set @var2 = 1;
16686    insert into tnull values( 1);
16687END//
16688delimiter ;//
16689
16690
16691# ------------------------------------------------------------------------------
16692let $message= Testcase 4.2.43:;
16693--source include/show_msg80.inc
16694
16695# testcase: ensure that the declare  condition for statement cannot declare a
16696#            condition for the successful completion sqlstate: 00000.
16697
16698--disable_warnings ONCE
16699DROP PROCEDURE IF EXISTS sp1;
16700
16701--echo expect failure, SQLSTATE 00000 is not an acceptable value
16702--echo for an SP's handler
16703delimiter //;
16704--ERROR ER_SP_BAD_SQLSTATE
16705CREATE PROCEDURE sp1()
16706BEGIN
16707    declare cond1 condition for sqlstate '00000';
16708    declare continue handler for cond1 set @var2 = 1;
16709    set @x=1;
16710    SELECT @var2;
16711END//
16712delimiter ;//
16713
16714--echo ensure SP doesn't exist
16715--ERROR ER_SP_DOES_NOT_EXIST
16716CALL sp1();
16717
16718# cleanup
16719--disable_warnings ONCE
16720DROP PROCEDURE IF EXISTS sp1;
16721
16722# ------------------------------------------------------------------------------
16723let $message= Testcase 4.2.45:;
16724--source include/show_msg80.inc
16725
16726# testcase: ensure that within the same scope, no two handlers may be declared for the same condition.
16727
16728
16729--disable_warnings ONCE
16730DROP PROCEDURE IF EXISTS sp1;
16731
16732delimiter //;
16733--error ER_SP_DUP_HANDLER
16734CREATE PROCEDURE handler1 ()
16735BEGIN
16736      declare continue handler for sqlstate '23000' set @varr1 = 5;
16737        declare continue handler for sqlstate '23000' set @varr3 = 7;
16738END//
16739delimiter ;//
16740
16741DROP PROCEDURE IF EXISTS handler1;
16742
16743delimiter //;
16744--error ER_SP_DUP_HANDLER
16745CREATE PROCEDURE handler1 ()
16746BEGIN
16747      declare mycondition condition for sqlstate '23000';
16748    declare continue handler for mycondition set @varr3 = 7;
16749        declare continue handler for sqlstate '23000' set @varr3 = 7;
16750END//
16751delimiter ;//
16752
16753
16754# ------------------------------------------------------------------------------
16755let $message= Testcase 4.2.46:;
16756--source include/show_msg80.inc
16757
16758# testcase: ensure that every sqlstate value declared with a declare  handler for
16759#            statement is a character string that is 5 characters long.
16760
16761--disable_warnings ONCE
16762DROP PROCEDURE IF EXISTS sp1;
16763
16764delimiter //;
16765--error ER_SP_BAD_SQLSTATE
16766CREATE PROCEDURE sp1()
16767BEGIN
16768    declare continue handler for sqlstate '1' set @var2 = 1;
16769END//
16770delimiter ;//
16771
16772--disable_warnings ONCE
16773DROP PROCEDURE IF EXISTS sp1;
16774
16775delimiter //;
16776--error ER_SP_BAD_SQLSTATE
16777CREATE PROCEDURE sp1()
16778BEGIN
16779    declare continue handler for sqlstate '12' set @var2 = 1;
16780END//
16781delimiter ;//
16782
16783--disable_warnings ONCE
16784DROP PROCEDURE IF EXISTS sp1;
16785
16786delimiter //;
16787--error ER_SP_BAD_SQLSTATE
16788CREATE PROCEDURE sp1()
16789BEGIN
16790    declare continue handler for sqlstate '123' set @var2 = 1;
16791END//
16792delimiter ;//
16793
16794--disable_warnings ONCE
16795DROP PROCEDURE IF EXISTS sp1;
16796
16797delimiter //;
16798--error ER_SP_BAD_SQLSTATE
16799CREATE PROCEDURE sp1()
16800BEGIN
16801    declare continue handler for sqlstate '1234' set @var2 = 1;
16802END//
16803delimiter ;//
16804
16805--disable_warnings ONCE
16806DROP PROCEDURE IF EXISTS sp1;
16807
16808delimiter //;
16809--error ER_SP_BAD_SQLSTATE
16810CREATE PROCEDURE sp1()
16811BEGIN
16812    declare continue handler for sqlstate '123456' set @var2 = 1;
16813END//
16814delimiter ;//
16815
16816
16817# ------------------------------------------------------------------------------
16818let $message= Testcase 4.2.47:;
16819--source include/show_msg80.inc
16820
16821# testcase: ensure that the declare  handler for statement cannot declare a condition
16822#            for an invalid sqlstate.
16823
16824--disable_warnings ONCE
16825DROP PROCEDURE IF EXISTS sp1;
16826
16827delimiter //;
16828--error ER_SP_BAD_SQLSTATE
16829CREATE PROCEDURE sp1()
16830BEGIN
16831    declare continue handler for sqlstate '42s0200test'  set @var2 = 1;
16832    insert into tnull values( 1);
16833          SELECT @var2;
16834END//
16835delimiter ;//
16836
16837# cleanup
16838#drop table IF EXISTS tnull;
16839
16840
16841# ------------------------------------------------------------------------------
16842let $message= Testcase 4.2.48:;
16843--source include/show_msg80.inc
16844
16845# testcase: ensure that the declare  handler for statement cannot declare a condition
16846#            for the successful completion sqlstate:  00000.
16847
16848--disable_warnings ONCE
16849DROP PROCEDURE IF EXISTS sp1;
16850
16851--echo This creation should fail, SQLSTATE 00000 is unacceptable
16852--ERROR ER_SP_BAD_SQLSTATE
16853delimiter //;
16854CREATE PROCEDURE sp1()
16855BEGIN
16856    declare continue handler for sqlstate '00000'  set @var2 = 1;
16857    set @x=1;
16858          SELECT @var2;
16859END//
16860delimiter ;//
16861
16862--echo Verify SP wasn't created
16863--ERROR ER_SP_DOES_NOT_EXIST
16864CALL sp1();
16865
16866# cleanup
16867--disable_warnings ONCE
16868DROP PROCEDURE IF EXISTSsp1;
16869
16870
16871# ------------------------------------------------------------------------------
16872let $message= Testcase 4.2.52:;
16873--source include/show_msg80.inc
16874
16875# testcase: ensure that no two cursors in a stored procedure can have the same name.
16876
16877--disable_warnings ONCE
16878DROP PROCEDURE IF EXISTS sp1;
16879
16880delimiter //;
16881--error ER_SP_DUP_CURS
16882CREATE PROCEDURE sp1( )
16883BEGIN
16884    declare done int default 0;
16885    declare count integer default 20;
16886    declare newf1 char(20);
16887    declare newf2 char(20);
16888    declare newf3 char(20);
16889    declare newf4 integer;
16890    declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
16891    declare cur1 cursor for SELECT f1, f2 from t2;
16892    declare continue handler for sqlstate '02000' set done = 1;
16893    BEGIN
16894      open cur1;
16895      set count = count - 1;
16896      while count > 0 do
16897        fetch cur1 into newf1, newlf1, newf3, newsal;
16898        set count = count - 1;
16899      END while;
16900      close cur1;
16901    END;
16902END//
16903delimiter ;//
16904
16905
16906# ------------------------------------------------------------------------------
16907let $message= Testcase 4.2.53:;
16908--source include/show_msg80.inc
16909
16910# testcase: ensure that a cursor declaration may not include a SELECT  into statement.
16911
16912--disable_warnings ONCE
16913DROP PROCEDURE IF EXISTS sp1;
16914
16915delimiter //;
16916--error ER_SP_BAD_CURSOR_SELECT
16917CREATE PROCEDURE sp1( )
16918BEGIN
16919    declare done int default 0;
16920    declare count integer default 20;
16921    declare newf1 char(20);
16922    declare newf2 char(20);
16923    declare newf3 char(20);
16924    declare newf4 integer;
16925    declare cur1 cursor for SELECT f1, lf1, f3, f4 into @w, @x, @y, @z from t2;
16926    declare continue handler for sqlstate '02000' set done = 1;
16927    BEGIN
16928      open cur1;
16929      set count = count - 1;
16930      while count > 0 do
16931        fetch cur1 into newf1, newlf1, newf3, newsal;
16932        set count = count - 1;
16933      END while;
16934      close cur1;
16935      END;
16936END//
16937delimiter ;//
16938
16939
16940# ------------------------------------------------------------------------------
16941let $message= Testcase 4.2.54:;
16942--source include/show_msg80.inc
16943
16944# testcase: ensure that a cursor declaration that includes an order by
16945#            claUSE may not be an updateable cursor.
16946
16947#FIXME: testcase empty / missing
16948
16949# ------------------------------------------------------------------------------
16950let $message= Testcase 4.2.55:;
16951--source include/show_msg80.inc
16952
16953# testcase: ensure that open <cursor name> fails unless a cursor with
16954#            the same name has already been declared.
16955
16956--disable_warnings ONCE
16957DROP PROCEDURE IF EXISTS sp1;
16958
16959delimiter //;
16960--error ER_SP_CURSOR_MISMATCH
16961CREATE PROCEDURE sp1( )
16962BEGIN
16963    declare done int default 0;
16964    declare count integer default 20;
16965    declare newf1 char(20);
16966    declare newf2 char(20);
16967    declare newf3 char(20);
16968    declare newf4 integer;
16969    declare continue handler for sqlstate '02000' set done = 1;
16970    BEGIN
16971      open cur1;
16972      set count = count - 1;
16973      while count > 0 do
16974        fetch cur1 into newf1, newf2, newf4, newf3;
16975        set count = count - 1;
16976      END while;
16977      close cur1;
16978    END;
16979END//
16980delimiter ;//
16981
16982--disable_warnings ONCE
16983DROP PROCEDURE IF EXISTS sp1;
16984
16985delimiter //;
16986CREATE PROCEDURE sp1( )
16987BEGIN
16988    declare done int default 0;
16989    declare count integer default 0;
16990    declare newf1 char(20);
16991    declare newf2 char(20);
16992    declare newf3 char(20);
16993    declare newf4 integer;
16994    declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
16995    declare continue handler for sqlstate '02000' set done = 1;
16996    BEGIN
16997      open cur1;
16998      BEGIN
16999        open cur1;
17000        set count = count - 1;
17001        while count > 0 do
17002          fetch cur1 into newf1, newf2, newf3, newf4;
17003          set count = count - 1;
17004        END while;
17005      END;
17006      close cur1;
17007    END;
17008END//
17009delimiter ;//
17010
17011--error ER_SP_CURSOR_ALREADY_OPEN
17012CALL sp1();
17013
17014
17015# ------------------------------------------------------------------------------
17016let $message= Testcase 4.2.56:;
17017--source include/show_msg80.inc
17018
17019# testcase: ensure that open <cursor name> fails if the same cursor is currently already open.
17020
17021DROP PROCEDURE IF EXISTS sp1;
17022
17023delimiter //;
17024CREATE PROCEDURE sp1( )
17025BEGIN
17026    declare done int default 0;
17027    declare count integer default 20;
17028    declare newf1 char(20);
17029    declare newf2 char(20);
17030    declare newf3 char(20);
17031    declare newf4 integer;
17032    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
17033    declare continue handler for sqlstate '02000' set done = 1;
17034    BEGIN
17035      open cur1;
17036      open cur1;
17037      set count = count - 1;
17038      while count > 0 do
17039        fetch cur1 into newf1, newf2, newf4, newf3;
17040        set count = count - 1;
17041      END while;
17042      close cur1;
17043    END;
17044END//
17045delimiter ;//
17046
17047--error ER_SP_CURSOR_ALREADY_OPEN
17048CALL sp1();
17049
17050# cleanup
17051DROP PROCEDURE sp1;
17052
17053
17054
17055# ------------------------------------------------------------------------------
17056let $message= Testcase 4.2.57:;
17057--source include/show_msg80.inc
17058
17059# testcase: ensure that fetch <cursor name> fails unless a cursor with the same name is already open.
17060
17061DROP PROCEDURE IF EXISTS sp1;
17062
17063delimiter //;
17064CREATE PROCEDURE sp1( )
17065BEGIN
17066    declare done int default 0;
17067    declare count integer default 20;
17068    declare newf1 char(20);
17069    declare newf2 char(20);
17070    declare newf3 char(20);
17071    declare newf4 integer;
17072    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2;
17073    declare cur2 cursor for SELECT f1, f2 from t2;
17074    declare continue handler for sqlstate '02000' set done = 1;
17075    BEGIN
17076      open cur2;
17077      set count = count - 1;
17078      while count > 0 do
17079        fetch cur1 into newf1, newf2, newf4, newf3;
17080        set count = count - 1;
17081      END while;
17082      close cur1;
17083    END;
17084END//
17085delimiter ;//
17086
17087--error ER_SP_CURSOR_NOT_OPEN
17088CALL sp1();
17089
17090# cleanup
17091DROP PROCEDURE sp1;
17092
17093
17094
17095
17096
17097
17098# ------------------------------------------------------------------------------
17099let $message= Testcase 4.2.59:;
17100--source include/show_msg80.inc
17101
17102# testcase: ensure that fetch <cursor name> fails with an appropriate error message
17103#            if it is executed before the cursor has been opened.
17104
17105
17106DROP PROCEDURE IF EXISTS sp1;
17107
17108delimiter //;
17109CREATE PROCEDURE sp1( )
17110BEGIN
17111    declare done int default 0;
17112    declare count integer default 20;
17113    declare newf1 char(20);
17114    declare newf2 char(20);
17115    declare newf3 char(20);
17116    declare newf4 integer;
17117    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17118    declare continue handler for sqlstate '02000' set done = 1;
17119    BEGIN
17120      set count = count - 1;
17121      while count > 0 do
17122        fetch cur1 into newf1, newf2, newf4, newf3;
17123        set count = count - 1;
17124      END while;
17125      open cur1;
17126      close cur1;
17127    END;
17128END//
17129delimiter ;//
17130
17131--error ER_SP_CURSOR_NOT_OPEN
17132CALL sp1();
17133
17134DROP PROCEDURE IF EXISTS sp1;
17135
17136delimiter //;
17137CREATE PROCEDURE sp1( )
17138BEGIN
17139    declare done int default 0;
17140    declare count integer default 10;
17141    declare newf1 char(20);
17142    declare newf2 char(20);
17143    declare newf3 char(20);
17144    declare newf4 integer;
17145    declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17146    declare continue handler for sqlstate '02000' set done = 1;
17147    open cur1;
17148    BEGIN
17149      declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17150      set count = count - 1;
17151      while count > 0 do
17152        fetch cur1 into newf1, newf2, newf3, newf4;
17153        set count = count - 1;
17154      END while;
17155      open cur1;
17156      close cur1;
17157    END;
17158    close cur1;
17159END//
17160delimiter ;//
17161
17162--error ER_SP_CURSOR_NOT_OPEN
17163CALL sp1();
17164
17165# cleanup
17166DROP PROCEDURE sp1;
17167
17168
17169# ------------------------------------------------------------------------------
17170let $message= Testcase 4.2.60:;
17171--source include/show_msg80.inc
17172
17173# testcase: ensure that fetch <cursor name> fails with an appropriate error message
17174#            if it is executed after the cursor has been closed.
17175
17176DROP PROCEDURE IF EXISTS sp1;
17177
17178delimiter //;
17179CREATE PROCEDURE sp1( )
17180BEGIN
17181    declare done int default 0;
17182    declare count integer default 20;
17183    declare newf1 char(20);
17184    declare newf2 char(20);
17185    declare newf3 char(20);
17186    declare newf4 integer;
17187    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17188    declare continue handler for sqlstate '02000' set done = 1;
17189    BEGIN
17190      open cur1;
17191      close cur1;
17192      set count = count - 1;
17193      while count > 0 do
17194          fetch cur1 into newf1, newf2, newf4, newf3;
17195          set count = count - 1;
17196      END while;
17197    END;
17198END//
17199delimiter ;//
17200
17201--error ER_SP_CURSOR_NOT_OPEN
17202CALL sp1();
17203
17204DROP PROCEDURE IF EXISTS sp1;
17205
17206delimiter //;
17207CREATE PROCEDURE sp1( )
17208BEGIN
17209    declare done int default 0;
17210    declare count integer default 20;
17211    declare newf1 char(20);
17212    declare newf2 char(20);
17213    declare newf3 char(20);
17214    declare newf4 integer;
17215    declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17216    declare continue handler for sqlstate '02000' set done = 1;
17217    open cur1;
17218    close cur1;
17219    BEGIN
17220      declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17221      open cur1;
17222      END;
17223    fetch cur1 into newf1, newf2, newf3, newf4;
17224END//
17225delimiter ;//
17226
17227--error ER_SP_CURSOR_NOT_OPEN
17228CALL sp1();
17229
17230# cleanup
17231DROP PROCEDURE sp1;
17232
17233
17234
17235
17236# ------------------------------------------------------------------------------
17237let $message= Testcase 4.2.62:;
17238--source include/show_msg80.inc
17239
17240# testcase: ensure that fetch <cursor name> fails with an appropriate error message
17241#            if the data type of the column values being fetched are not appropriate
17242#            for the matching fetch variables to which the data is being assigned.
17243
17244DROP PROCEDURE IF EXISTS sp1;
17245
17246delimiter //;
17247CREATE PROCEDURE sp1( )
17248BEGIN
17249    declare done int default 0;
17250    declare count integer default 20;
17251    declare newf2 char(20);
17252    declare newf1 int1;
17253    declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10;
17254    declare continue handler for sqlstate '02000' set done = 1;
17255    BEGIN
17256      open cur1;
17257      set count = count - 1;
17258      while count > 0 do
17259        fetch cur1 into newf1, newf2;
17260        set @x = newf1;
17261        set @y = newf2;
17262        SELECT @x, @y;
17263        set count = count - 1;
17264          END while;
17265      close cur1;
17266    END;
17267END//
17268delimiter ;//
17269
17270#This test seems to make no sense, as always NULL may be set.
17271#--error ER_SP_CURSOR_NOT_OPEN
17272CALL sp1();
17273
17274# cleanup
17275DROP PROCEDURE sp1;
17276
17277
17278
17279# ------------------------------------------------------------------------------
17280let $message= Testcase 4.2.63:;
17281--source include/show_msg80.inc
17282
17283# testcase: ensure that close <cursor name> fails unless a cursor with the same name is already open.
17284
17285DROP PROCEDURE IF EXISTS sp1;
17286
17287delimiter //;
17288CREATE PROCEDURE sp1()
17289BEGIN
17290    declare done int default 0;
17291    declare count integer default 20;
17292    declare newf1 char(20);
17293    declare newf2 char(20);
17294    declare newf3 char(20);
17295    declare newf4 integer;
17296    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17297    declare continue handler for sqlstate '02000' set done = 1;
17298    BEGIN
17299      close cur1;
17300      open cur1;
17301      set count = count - 1;
17302      while count > 0 do
17303        fetch cur1 into newf1, newf2, newf4, newf3;
17304        set count = count - 1;
17305      END while;
17306      close cur1;
17307    END;
17308END//
17309delimiter ;//
17310
17311--error ER_SP_CURSOR_NOT_OPEN
17312CALL sp1();
17313
17314DROP PROCEDURE IF EXISTS sp1;
17315
17316delimiter //;
17317CREATE PROCEDURE sp1( )
17318BEGIN
17319    declare done int default 0;
17320    declare count integer default 0;
17321    declare newf1 char(20);
17322    declare newf2 char(20);
17323    declare newf3 char(20);
17324    declare newf4 integer;
17325    declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17326    declare continue handler for sqlstate '02000' set done = 1;
17327    BEGIN
17328      declare cur1 cursor for SELECT f1, f2, f3, f4 from t2;
17329      open cur1;
17330    END;
17331    close cur1;
17332END//
17333delimiter ;//
17334
17335--error ER_SP_CURSOR_NOT_OPEN
17336CALL sp1();
17337
17338# cleanup
17339DROP PROCEDURE sp1;
17340
17341
17342
17343# ------------------------------------------------------------------------------
17344let $message= Testcase 4.2.64:;
17345--source include/show_msg80.inc
17346
17347# testcase: ensure that all cursors are closed when a transaction terminates with a commit statement.
17348
17349DROP PROCEDURE IF EXISTS sp1;
17350
17351delimiter //;
17352CREATE PROCEDURE sp1( )
17353      BEGIN
17354    declare done int default 0;
17355    declare count integer default 20;
17356    declare newf1 char(20);
17357    declare newf2 char(20);
17358    declare newf3 char(20);
17359    declare newf4 integer;
17360    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17361    BEGIN
17362      open cur1;
17363      start transaction;
17364      fetch cur1 into newf1, newf2, newf4, newf3;
17365      commit;
17366      fetch cur1 into newf1, newf2, newf4, newf3;
17367    END;
17368END//
17369delimiter ;//
17370
17371--error ER_SP_FETCH_NO_DATA
17372CALL sp1();
17373
17374# cleanup
17375DROP PROCEDURE sp1;
17376
17377
17378
17379# ------------------------------------------------------------------------------
17380let $message= Testcase 4.2.65:;
17381--source include/show_msg80.inc
17382
17383# testcase: ensure that all cursors are closed when a transaction terminates with a rollback statement.
17384
17385
17386DROP PROCEDURE IF EXISTS sp1;
17387
17388delimiter //;
17389CREATE PROCEDURE sp1( )
17390BEGIN
17391    declare done int default 0;
17392    declare count integer default 20;
17393    declare newf1 char(20);
17394    declare newf2 char(20);
17395    declare newf3 char(20);
17396    declare newf4 integer;
17397    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17398    BEGIN
17399      open cur1;
17400      fetch cur1 into newf1, newf2, newf4, newf3;
17401      rollback;
17402      fetch cur1 into newf1, newf2, newf4, newf3;
17403      commit;
17404    END;
17405END//
17406delimiter ;//
17407
17408--error ER_SP_FETCH_NO_DATA
17409CALL sp1();
17410
17411# cleanup
17412DROP PROCEDURE sp1;
17413
17414
17415# ------------------------------------------------------------------------------
17416let $message= Testcase 4.2.66:;
17417--source include/show_msg80.inc
17418
17419# testcase: ensure that the result set of the cursor that has been closed is not
17420#            longer available to the fetch statement.
17421
17422
17423DROP PROCEDURE IF EXISTS sp1;
17424
17425delimiter //;
17426CREATE PROCEDURE sp1( )
17427BEGIN
17428    declare done int default 0;
17429    declare count integer default 20;
17430    declare newf1 char(20);
17431    declare newf2 char(20);
17432    declare newf3 char(20);
17433    declare newf4 integer;
17434    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17435    declare continue handler for sqlstate '02000' set done = 1;
17436    BEGIN
17437      open cur1;
17438      set count = count - 1;
17439      while count > 0 do
17440        fetch cur1 into newf1, newf2, newf4, newf3;
17441        set count = count - 1;
17442      END while;
17443      close cur1;
17444      fetch cur1 into newf1, newf2, newf4, newf3;
17445    END;
17446END//
17447delimiter ;//
17448
17449--error ER_SP_CURSOR_NOT_OPEN
17450CALL sp1();
17451
17452# cleanup
17453DROP PROCEDURE sp1;
17454
17455
17456
17457# ------------------------------------------------------------------------------
17458let $message= Testcase 4.2.67:;
17459--source include/show_msg80.inc
17460
17461# testcase: ensure that cursor declared within a compound statement is closed when
17462#            that compound statement ends (without cursor close statement)
17463
17464
17465DROP PROCEDURE IF EXISTS sp1;
17466
17467delimiter //;
17468CREATE PROCEDURE sp1( )
17469BEGIN
17470    declare done int default 0;
17471    declare count integer default 20;
17472    declare newf1 char(20);
17473    declare newf2 char(20);
17474    declare newf3 char(20);
17475    declare newf4 integer;
17476    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10;
17477    declare continue handler for sqlstate '02000' set done = 1;
17478    BEGIN
17479      open cur1;
17480#      set count = count - 1;
17481#      while count > 0 do
17482        fetch cur1 into newf1, newf2, newf4, newf3;
17483#        set count = count - 1;
17484#      END while;
17485    END;
17486    fetch cur1 into newf1, newf2, newf4, newf3;
17487END//
17488delimiter ;//
17489
17490#--error ER_SP_FETCH_NO_DATA
17491CALL sp1();
17492
17493# cleanup
17494DROP PROCEDURE sp1;
17495
17496
17497
17498
17499
17500
17501# ------------------------------------------------------------------------------
17502let $message= Testcase 4.2.70:;
17503--source include/show_msg80.inc
17504
17505# testcase: ensure that multiple cursors, nested within multiple compound statements
17506#            within a stored procedure always act correctly and return the expected result.
17507
17508  create table temp1( f1 char(20), f2 char(20), f3 int, f4 char(20) );
17509  create table temp2( f1 char(20), f2 char(20), f3 int, f4 char(20) );
17510
17511DROP PROCEDURE IF EXISTS sp1;
17512
17513delimiter //;
17514CREATE PROCEDURE sp1( )
17515BEGIN
17516    declare done int default 0;
17517    declare count integer default 20;
17518    declare newf1 char(20);
17519    declare newf2 char(20);
17520    declare newf3 char(20);
17521    declare newf4 integer;
17522    declare newf21 char(20);
17523    declare newf22 char(20);
17524    declare newf23 char(20);
17525    declare newf24 integer;
17526    declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 7, 1;
17527    declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 15, 1;
17528    declare continue handler for sqlstate '02000' set done = 1;
17529    open cur1;
17530    BEGIN
17531      set count = 10;
17532      BEGIN
17533        open cur2;
17534        while count > 0 do
17535          fetch cur1 into newf1, newf2, newf4, newf3;
17536          set count = count - 1;
17537        END while;
17538      END;
17539      insert into temp1 values(newf1, newf2, newf4, newf3);
17540      close cur1;
17541    END;
17542    BEGIN
17543      set count = 10;
17544      while count > 0 do
17545        fetch cur2 into newf21, newf22, newf24, newf23;
17546        set count = count - 1;
17547      END while;
17548    END;
17549    insert into temp2 values(newf21, newf22, newf24, newf23);
17550    close cur2;
17551END//
17552delimiter ;//
17553
17554CALL sp1();
17555
17556SELECT count(*) from temp1;
17557SELECT * from temp2;
17558
17559# cleanup
17560DROP PROCEDURE sp1;
17561drop table temp1;
17562drop table temp2;
17563
17564
17565# ==============================================================================
17566let $message= Section 3.1.3 - Syntax checks for the stored procedure-specific flow control statements
17567              .               IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:;
17568--source include/show_msg80.inc
17569
17570USE db_storedproc;
17571
17572# ------------------------------------------------------------------------------
17573let $message= Testcase 4.3.1:;
17574--source include/show_msg80.inc
17575
17576# testcase : ensure that all clauses that should be supported are supported
17577
17578--disable_warnings
17579DROP PROCEDURE IF EXISTS sp1;
17580DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
17581--enable_warnings
17582
17583#FIXME: change back to $engine_type for INNODB and MYISAM, but MEMORY doesn't support this
17584--replace_result $engine_type <engine_to_be_tested>
17585eval
17586CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
17587   middleinitial CHAR, lastname VARCHAR(50),
17588   age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
17589ENGINE=$engine_type;
17590
17591INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
17592VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
17593
17594delimiter //;
17595CREATE PROCEDURE sp1(a INT)
17596BEGIN
17597   DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
17598   DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
17599   DECLARE itisjustamediumsizeintintegervariablename INTEGER;
17600   SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
17601   SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
17602      = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
17603   SET itisjustamediumsizeintintegervariablename = 5;
17604   SET @comment='a';
17605   label1: LOOP
17606      IF a > 100 THEN
17607         SET @comment = 'value of a is greater than 100';
17608      ELSEIF a < 100 THEN
17609         IF a < 50 THEN
17610            SET @comment = 'value of a is less than 50';
17611         ELSEIF a < 25 THEN
17612            SET @comment = 'value of a is less than 25';
17613         ELSE
17614            SET @comment = 'value of a is greater than 50 and less than 100';
17615         END IF;
17616      ELSE
17617         SET @comment = 'value of a is 100';
17618      END IF;
17619
17620      IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
17621      END IF;
17622      INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
17623      VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
17624             CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
17625             '  ', a), a, @comment);
17626      SET itisjustamediumsizeintintegervariablename
17627         = itisjustamediumsizeintintegervariablename - 1;
17628      ITERATE label1;
17629   END LOOP label1;
17630END//
17631delimiter ;//
17632
17633CALL sp1(101);
17634
17635CALL sp1(100);
17636
17637CALL sp1(75);
17638
17639CALL sp1(40);
17640
17641CALL sp1(20);
17642
17643CALL sp1(-1);
17644
17645SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742
17646 ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569;
17647
17648# cleanup
17649drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
17650DROP PROCEDURE sp1;
17651
17652
17653# ------------------------------------------------------------------------------
17654let $message= Testcase 4.3.2:;
17655--source include/show_msg80.inc
17656
17657# testcase: ensure that all clauses that should be supported are supported (case, while, repeat)
17658
17659--disable_warnings ONCE
17660DROP PROCEDURE IF EXISTS sp2;
17661
17662delimiter //;
17663CREATE PROCEDURE sp2( action char(20) )
17664BEGIN
17665   declare v1 char(20);
17666   declare v2 char(20);
17667   declare count integer;
17668   set v1 = 'f1';
17669   set v2 = 'address';
17670   set count = 1;
17671   case when action = 'delete'  then
17672      insert into t3 values(v1, v2, count);
17673      delete from t3 where f1=v1;
17674   when action = 'insert' then
17675      repeat
17676         insert into t3 values(v1, v2, count);
17677         set count = count + 1;
17678      until count > 5
17679      END repeat;
17680      set count = 1;
17681      label1: repeat
17682        insert into t3 values(v1, v2, count);
17683      if count > 5 then leave label1;
17684            END if;
17685              set count = count + 1;
17686      until count > 5
17687      END repeat;
17688                set count = 1;
17689      while count < 5 do
17690        insert into t3 values(v1, v2, count);
17691        set count = count + 1;
17692      END while;
17693      set count = 1;
17694      label1: while count < 5 do
17695        insert into t3 values(v1, v2, count);
17696        if count > 5 then leave label1;
17697                END if;
17698        set count = count + 1;
17699      END while;
17700  else
17701      set @dummystring = 'temp value';
17702  END case;
17703END//
17704delimiter ;//
17705
17706CALL sp2( 'insert' );
17707--sorted_result
17708SELECT * from t3 where f3 <=5 && f3 >= 0;
17709
17710SELECT count(*) from t3;
17711CALL sp2( 'delete' );
17712SELECT count(*) from t3;
17713
17714CALL sp2 ('test');
17715SELECT @dummystring;
17716
17717# cleanup
17718DROP PROCEDURE sp2;
17719
17720
17721# ------------------------------------------------------------------------------
17722let $message= Testcase 4.1.2:
17723              ---------------
17724Ensure that all sub-clauses that should not be supported are disallowed with
17725an appropriate error message. (case);
17726--source include/show_msg80.inc
17727
17728
17729--disable_warnings
17730drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
17731DROP PROCEDURE IF EXISTS sp3;
17732--enable_warnings
17733
17734create table res_t3_itisalongname_1381742_itsaverylongname_1381742 (name char, address varchar(50), age_averylongfieldname_averylongname_1234569 smallint);
17735
17736delimiter //;
17737--error ER_PARSE_ERROR
17738CREATE PROCEDURE sp3( action char(20) )
17739BEGIN
17740label1: case
17741  when action = 'delete'  then
17742  delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17743else
17744      set @dummystring = 'temp value';
17745      iterate label1;
17746END case label1;
17747END//
17748delimiter ;//
17749
17750--disable_warnings ONCE
17751DROP PROCEDURE IF EXISTS sp3;
17752
17753delimiter //;
17754--error ER_PARSE_ERROR
17755CREATE PROCEDURE sp3( action char(20) )
17756BEGIN
17757label1: BEGIN
17758  case
17759  action = 'delete'  then
17760  delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17761  else
17762      set @dummystring = 'temp value';
17763      iterate label1;
17764  END case;
17765  END label1;
17766END//
17767delimiter ;//
17768
17769--disable_warnings ONCE
17770DROP PROCEDURE IF EXISTS sp3;
17771
17772delimiter //;
17773--error ER_PARSE_ERROR
17774CREATE PROCEDURE sp3( action char(20) )
17775BEGIN
17776case
17777  when action = 'delete'  then
17778    delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17779  then action = 'truncate'  when
17780  truncate from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17781  else
17782      set @dummystring = 'temp value';
17783      iterate label1;
17784  END case;
17785END//
17786delimiter ;//
17787
17788--disable_warnings ONCE
17789DROP PROCEDURE IF EXISTS sp3;
17790
17791delimiter //;
17792--error ER_PARSE_ERROR
17793CREATE PROCEDURE sp3( action char(20) )
17794BEGIN
17795declare v1 char(20);
17796declare v2 char(20);
17797declare count integer;
17798set v1 = 'f1';
17799set v2= 'address';
17800set count = 1;
17801case action
17802  when 'delete'  then
17803  when 'delete'  then
17804    delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17805  END case;
17806END//
17807delimiter ;//
17808
17809--disable_warnings ONCE
17810DROP PROCEDURE IF EXISTS sp3;
17811
17812
17813delimiter //;
17814CREATE PROCEDURE sp3( action char(20) )
17815BEGIN
17816   declare count int default 1;
17817   declare done int default 0;
17818   declare continue handler for sqlstate 'HY000' set done=1;
17819   label1: loop
17820      case
17821         when action = 'delete'  then
17822            label3:BEGIN
17823               delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
17824            END label3;
17825         when action = 'insert' then
17826            label2: while count < 10 do
17827            BEGIN
17828               insert into res_t3_itisalongname_1381742_itsaverylongname_1381742
17829                  values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count);
17830               set count = count + 1;
17831               if count= 10 then
17832                  set done=1;
17833               END if;
17834            END;
17835            END while label2;
17836         else
17837            set @dummystring = 'temp value';
17838            iterate label1;
17839      END case;
17840      if done=1 then
17841         leave label1;
17842      END if;
17843   END loop label1;
17844   SELECT count, done;
17845END//
17846delimiter ;//
17847
17848CALL sp3('insert');
17849
17850# cleanup
17851DROP PROCEDURE sp3;
17852drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
17853
17854
17855# ------------------------------------------------------------------------------
17856let $message= Testcase 4.3.4:;
17857--source include/show_msg80.inc
17858
17859# testcase: ensure that all supported sub-clauses are supported only in the correct order (if)
17860
17861--disable_warnings ONCE
17862DROP PROCEDURE IF EXISTS sp4;
17863
17864delimiter //;
17865--error ER_PARSE_ERROR
17866CREATE PROCEDURE sp4()
17867BEGIN
17868declare count int;
17869  set count = 1;
17870  label1: loop
17871    if count > 10 then leave label1;
17872    else
17873      set count = count + 1;
17874    elseif count > 20 then
17875      leave label1;
17876    END if;
17877    iterate label1;
17878  END loop label1;
17879END//
17880delimiter ;//
17881
17882--disable_warnings ONCE
17883DROP PROCEDURE IF EXISTS sp4;
17884
17885delimiter //;
17886--error ER_PARSE_ERROR
17887CREATE PROCEDURE sp4()
17888BEGIN
17889declare count int;
17890  set count = 1;
17891  label1: loop
17892    else
17893      set count = count + 1;
17894    if count > 20 then
17895      leave label1;
17896    END if;
17897    iterate label1;
17898  END loop label1;
17899END//
17900delimiter ;//
17901
17902--disable_warnings ONCE
17903DROP PROCEDURE IF EXISTS sp4;
17904
17905delimiter //;
17906--error ER_PARSE_ERROR
17907CREATE PROCEDURE sp4()
17908BEGIN
17909declare count int;
17910  set count = 1;
17911  label1: loop
17912    elseif count > 20 then
17913      leave label1;
17914    else
17915      set count=count+1;
17916    END if;
17917    iterate label1;
17918  END loop label1;
17919END//
17920delimiter ;//
17921
17922--disable_warnings ONCE
17923DROP PROCEDURE IF EXISTS sp4;
17924
17925delimiter //;
17926--error ER_PARSE_ERROR
17927CREATE PROCEDURE sp4()
17928BEGIN
17929declare count int;
17930  set count = 1;
17931  label1: loop
17932    END if;
17933    if count > 20 then
17934      leave label1;
17935    else
17936      set count=count+1;
17937    iterate label1;
17938  END loop label1;
17939END//
17940delimiter ;//
17941
17942--disable_warnings ONCE
17943DROP PROCEDURE IF EXISTS sp4;
17944
17945delimiter //;
17946--error ER_PARSE_ERROR
17947CREATE PROCEDURE sp4()
17948BEGIN
17949  declare i int default 10;
17950  if i > 20 then
17951    set i=25;
17952  END if
17953  declare count int;
17954  set count = 1;
17955  label1: loop
17956    if count > 20 then
17957      leave label1;
17958    else
17959      set count=count+1;
17960    iterate label1;
17961  END loop label1;
17962END//
17963delimiter ;//
17964
17965--disable_warnings ONCE
17966DROP PROCEDURE IF EXISTS sp4;
17967
17968delimiter //;
17969CREATE PROCEDURE sp4()
17970BEGIN
17971  declare idummy int default 10;
17972  declare count int;
17973  set count = 1;
17974  label1: loop
17975  BEGIN
17976    if count < 20 then
17977      BEGIN
17978        declare idummy2 int default 10;
17979        set count=count+1;
17980      END;
17981    else
17982      BEGIN
17983        SELECT idummy2;
17984        leave label1;
17985      END;
17986    END if;
17987    iterate label1;
17988  END;
17989  END loop label1;
17990END//
17991delimiter ;//
17992
17993--error ER_BAD_FIELD_ERROR
17994CALL sp4();
17995
17996# cleanup
17997DROP PROCEDURE sp4;
17998
17999
18000# ------------------------------------------------------------------------------
18001let $message= Testcase 4.3.5:;
18002--source include/show_msg80.inc
18003
18004#test case: ensure that all supported sub-clauses are supported only in the correct order (case)
18005
18006--disable_warnings ONCE
18007DROP PROCEDURE IF EXISTS sp5;
18008
18009delimiter //;
18010--error ER_PARSE_ERROR
18011CREATE PROCEDURE sp5()
18012BEGIN
18013  declare count integer default 1;
18014  set count = 1;
18015  case
18016  else
18017    set count = 10;
18018  when count  = 1 then
18019    set count =  count + 1;
18020  END case;
18021END//
18022delimiter ;//
18023
18024--disable_warnings ONCE
18025DROP PROCEDURE IF EXISTS sp5;
18026
18027delimiter //;
18028--error ER_PARSE_ERROR
18029CREATE PROCEDURE sp5(count int)
18030BEGIN
18031  when case count = 1 then
18032    set count = 10;
18033  when count  = 2 then
18034    set count =  count + 1;
18035  END case;
18036END//
18037delimiter ;//
18038
18039--disable_warnings ONCE
18040DROP PROCEDURE IF EXISTS sp5;
18041
18042delimiter //;
18043--error ER_PARSE_ERROR
18044CREATE PROCEDURE sp5(count int)
18045BEGIN
18046  END case;
18047  when count = 1 then
18048    set count = 10;
18049  when count  = 2 then
18050    set count =  count + 1;
18051  END case;
18052END//
18053delimiter ;//
18054
18055--disable_warnings ONCE
18056DROP PROCEDURE IF EXISTS sp5;
18057
18058delimiter //;
18059--error ER_PARSE_ERROR
18060CREATE PROCEDURE sp5(count int)
18061BEGIN
18062  when count = 1 then
18063    set count = 10;
18064  case when count  = 2 then
18065    set count =  count + 1;
18066  END case;
18067END//
18068delimiter ;//
18069
18070
18071# ------------------------------------------------------------------------------
18072let $message= Testcase 4.3.6:
18073              ---------------
18074Ensure that all supported sub-clauses are supported only in the correct order (repeat).;
18075--source include/show_msg80.inc
18076
18077--disable_warnings ONCE
18078DROP PROCEDURE IF EXISTS sp6;
18079
18080delimiter //;
18081--error ER_PARSE_ERROR
18082CREATE PROCEDURE sp6()
18083BEGIN
18084  declare count1 integer default 1;
18085  label1: repeat
18086    set count1 = count1 + 1;
18087    if count1 > 5 then leave label1; END if;
18088  END repeat;
18089  until count1 > 5
18090END//
18091delimiter ;//
18092
18093--disable_warnings ONCE
18094DROP PROCEDURE IF EXISTS sp6;
18095
18096delimiter //;
18097--error ER_PARSE_ERROR
18098CREATE PROCEDURE sp6()
18099BEGIN
18100  declare count1 integer default 1;
18101  label1:   until count1 > 5
18102  repeat
18103    set count1 = count1 + 1;
18104    if count1 > 5 then leave label1; END if;
18105  END repeat;
18106END//
18107delimiter ;//
18108
18109--disable_warnings ONCE
18110DROP PROCEDURE IF EXISTS sp6;
18111
18112delimiter //;
18113--error ER_PARSE_ERROR
18114CREATE PROCEDURE sp6()
18115BEGIN
18116  declare count1 integer default 1;
18117  label1: END repeat
18118    set count1 = count1 + 1;
18119    if count1 > 5 then leave label1; END if;
18120  until count1 > 5
18121  repeat;
18122END//
18123delimiter ;//
18124
18125--disable_warnings ONCE
18126DROP PROCEDURE IF EXISTS sp6;
18127
18128delimiter //;
18129--error ER_PARSE_ERROR
18130CREATE PROCEDURE sp6()
18131BEGIN
18132  declare count1 integer default 1;
18133  label1: repeat
18134    set count1 = count1 + 1;
18135    if count1 > 5 then leave label1; END if;
18136  END repeat;
18137END//
18138delimiter ;//
18139
18140--disable_warnings ONCE
18141DROP PROCEDURE IF EXISTS sp6;
18142
18143delimiter //;
18144--error ER_PARSE_ERROR
18145CREATE PROCEDURE sp6()
18146BEGIN
18147  declare count1 integer default 1;
18148  label1: repeat
18149    set count1 = count1 + 1;
18150    if count1 > 5 then leave label1; END if;
18151  until count1 > 10;
18152  SELECT count1;
18153  END repeat;
18154END//
18155delimiter ;//
18156
18157--disable_warnings ONCE
18158DROP PROCEDURE IF EXISTS sp6;
18159
18160delimiter //;
18161CREATE PROCEDURE sp6()
18162BEGIN
18163  declare count1 integer default 1;
18164  label1: repeat
18165    set count1 = count1-1;
18166  until count1 < 0
18167  END repeat label1;
18168  SELECT count1;
18169END//
18170delimiter ;//
18171
18172CALL sp6();
18173
18174# cleanup
18175DROP PROCEDURE sp6;
18176
18177
18178# ------------------------------------------------------------------------------
18179let $message= Testcase 4.3.7:;
18180--source include/show_msg80.inc
18181
18182# testcase: ensure that an appropriate error message is returned if a
18183#        sub claUSE is out-of-order in a stored procedure definition (loop, if, iterate, leave).
18184
18185--disable_warnings ONCE
18186DROP PROCEDURE IF EXISTS sp7;
18187
18188delimiter //;
18189--error ER_PARSE_ERROR
18190CREATE PROCEDURE sp7()
18191BEGIN
18192  label1: loop
18193    set @dummystring = 'temp value';
18194    if count > 10 then leave label1;
18195    END if;
18196    label1 iterate;
18197  END label1 loop;
18198END//
18199delimiter ;//
18200
18201--disable_warnings ONCE
18202DROP PROCEDURE IF EXISTS sp7;
18203
18204delimiter //;
18205--error ER_PARSE_ERROR
18206CREATE PROCEDURE sp7()
18207BEGIN
18208  label1: END loop;
18209    set @dummystring = 'temp value';
18210    if count > 10 then leave label1;
18211    END if;
18212    iterate label1;
18213  loop;
18214END//
18215delimiter ;//
18216
18217--disable_warnings ONCE
18218DROP PROCEDURE IF EXISTS sp7;
18219
18220delimiter //;
18221--error ER_PARSE_ERROR
18222CREATE PROCEDURE sp7()
18223BEGIN
18224  label1: iterate label1;
18225  loop
18226    set @dummystring = 'temp value';
18227    if count > 10 then leave label1;
18228    END if;
18229
18230  END loop label1;
18231END//
18232delimiter ;//
18233
18234
18235# ------------------------------------------------------------------------------
18236let $message= Testcase 4.3.8:;
18237--source include/show_msg80.inc
18238
18239# testcase: ensure that an appropriate error message is returned if a sub claUSE is
18240#        out-of-order in a stored procedure definition. (while)
18241
18242--disable_warnings ONCE
18243DROP PROCEDURE IF EXISTS sp8;
18244
18245delimiter //;
18246--error ER_PARSE_ERROR
18247CREATE PROCEDURE sp8()
18248BEGIN
18249  declare v1 int default 5;
18250  do while v1 > 0
18251    set v1 = v1 - 1;
18252    END while;
18253END//
18254delimiter ;//
18255
18256--disable_warnings ONCE
18257DROP PROCEDURE IF EXISTS sp8;
18258
18259delimiter //;
18260--error ER_PARSE_ERROR
18261CREATE PROCEDURE sp8()
18262BEGIN
18263  declare v1 int default 5;
18264  do v1 > 0 while
18265    set v1 = v1 - 1;
18266  END while;
18267END//
18268delimiter ;//
18269
18270--disable_warnings ONCE
18271DROP PROCEDURE IF EXISTS sp8;
18272
18273delimiter //;
18274--error ER_PARSE_ERROR
18275CREATE PROCEDURE sp8()
18276BEGIN
18277  declare v1 int default 5;
18278  END while;
18279    set v1 = v1 - 1;
18280  while v1 > 0 do;
18281END//
18282delimiter ;//
18283
18284# ------------------------------------------------------------------------------
18285let $message= Testcase 4.3.12:;
18286--source include/show_msg80.inc
18287
18288# testcase : ensure that the labels enclosing each loop statement must match
18289
18290--disable_warnings
18291drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
18292DROP PROCEDURE IF EXISTS sp12;
18293--enable_warnings
18294
18295create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
18296
18297delimiter //;
18298--error ER_SP_LABEL_MISMATCH
18299CREATE PROCEDURE sp12( )
18300BEGIN
18301  declare count1 integer default 1;
18302  declare count2 int;
18303  label1: loop
18304    if count1 > 2 then leave label1;
18305    END if;
18306    insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18307    label2: loop
18308      if count2 > 2 then leave label2;
18309      END if;
18310      set count2 = count2 + 1;
18311    END loop label1;
18312    set count1 = count1 + 1;
18313    iterate label1;
18314  END loop label2;
18315END//
18316delimiter ;//
18317
18318# cleanup
18319drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
18320
18321
18322
18323# ------------------------------------------------------------------------------
18324let $message= Testcase 4.3.13:;
18325--source include/show_msg80.inc
18326
18327# ensure that it is possible to put a beginning label at the start of a loop statement
18328#         without also requiring an ending label at the END of the same statement
18329
18330--disable_warnings
18331drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
18332DROP PROCEDURE IF EXISTS sp13;
18333--enable_warnings
18334
18335create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
18336
18337delimiter //;
18338CREATE PROCEDURE sp13( )
18339BEGIN
18340  declare count1 integer default 1;
18341  lable1: loop
18342    if count1 > 2 then leave lable1;
18343    END if;
18344    insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18345    set count1 = count1 + 1;
18346    iterate lable1;
18347  END loop;
18348END//
18349delimiter ;//
18350
18351CALL sp13();
18352SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18353
18354# cleanup
18355DROP PROCEDURE sp13;
18356drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
18357
18358
18359# ------------------------------------------------------------------------------
18360let $message= Testcase 4.3.14:;
18361--source include/show_msg80.inc
18362
18363# testcase: ensure that it is not possible to put an ending label at the END of a loop statement
18364#            without also requiring a matching beginning label at the start of the same statement.
18365
18366--disable_warnings
18367drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
18368DROP PROCEDURE IF EXISTS sp14;
18369--enable_warnings
18370
18371create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
18372
18373delimiter //;
18374--error ER_SP_LILABEL_MISMATCH
18375CREATE PROCEDURE sp14( )
18376BEGIN
18377    declare count1 integer default 1;
18378    loop
18379      if count1 > 2 then leave lable1;
18380      END if;
18381      insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18382      set count1 = count1 + 1;
18383      iterate lable1;
18384    END loop label1;
18385END//
18386delimiter ;//
18387
18388# cleanup
18389drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
18390
18391
18392# ------------------------------------------------------------------------------
18393let $message= Testcase 4.3.15:;
18394--source include/show_msg80.inc
18395
18396# ensure that every beginning label must END with a colon (:)
18397
18398--disable_warnings
18399drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
18400DROP PROCEDURE IF EXISTS sp15;
18401--enable_warnings
18402
18403create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint);
18404
18405delimiter //;
18406--error ER_PARSE_ERROR
18407CREATE PROCEDURE sp15( )
18408BEGIN
18409    declare count1 integer default 1;
18410    label1 loop
18411      if count1 > 2 then leave lable1;
18412      END if;
18413      insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18414      set count1 = count1 + 1;
18415      iterate lable1;
18416    END loop label1;
18417END//
18418delimiter ;//
18419
18420
18421# ------------------------------------------------------------------------------
18422let $message= Testcase 4.3.16:
18423              ----------------
18424Ensure that every beginning label with the same scope must be unique.;
18425--source include/show_msg80.inc
18426
18427--disable_warnings ONCE
18428DROP PROCEDURE IF EXISTS sp16;
18429
18430delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18431
18432delimiter //;
18433--error ER_SP_LABEL_REDEFINE
18434CREATE PROCEDURE sp16( )
18435BEGIN
18436    declare count1 integer default 1;
18437    declare count2 integer default 1;
18438    label1: repeat
18439      set count1 = count1 + 1;
18440      set count2 = 1;
18441      label1: repeat
18442        set count2 = count2 + 1;
18443        insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( xyz , pqr, count1);
18444        until count2 > 3
18445      END repeat label1;
18446      until count1 > 3
18447    END repeat label1;
18448END//
18449delimiter ;//
18450
18451--disable_warnings ONCE
18452DROP PROCEDURE IF EXISTS sp16;
18453
18454delimiter //;
18455--error ER_SP_LABEL_REDEFINE
18456CREATE PROCEDURE sp16( )
18457BEGIN
18458  declare count1 integer default 1;
18459  declare count2 integer default 1;
18460  declare count3 integer default 1;
18461  label1: repeat
18462    set count1 = count1 + 1;
18463    label1: repeat
18464      set count2 = count2 + 1;
18465      SELECT count2;
18466      until count2 > 3
18467    END repeat label1;
18468    SELECT count1;
18469  until count1 > 3
18470  END repeat label1;
18471  label1: repeat
18472    set count3 = count3 + 1;
18473    SELECT count3;
18474  until count3 > 3
18475  END repeat label1;
18476END//
18477delimiter ;//
18478
18479
18480# ------------------------------------------------------------------------------
18481let $message= Testcase 4.3.17:;
18482--source include/show_msg80.inc
18483
18484# testcase: ensure that the repeat statement acts correctly for all variants,
18485#            including cases where statements are nested.
18486
18487
18488
18489# ------------------------------------------------------------------------------
18490let $message= Testcase 4.3.18:;
18491--source include/show_msg80.inc
18492
18493# testcase : ensure that the labels enclosing each repeat statement must match.
18494
18495--disable_warnings ONCE
18496DROP PROCEDURE IF EXISTS sp18;
18497
18498delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18499
18500delimiter //;
18501--error ER_SP_LABEL_MISMATCH
18502CREATE PROCEDURE sp18( )
18503BEGIN
18504    declare count1 integer default 1;
18505    label1: repeat
18506      set count1 = count1 + 1;
18507      insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18508      until count1 < 3
18509    END repeat label2;
18510END//
18511delimiter ;//
18512
18513
18514# ------------------------------------------------------------------------------
18515let $message= Testcase 4.3.19:;
18516--source include/show_msg80.inc
18517
18518# testcase: ensure that it is possible to put a beginning label at the start of
18519#            a repeat statement without also requiring an ending label at the
18520#            END of the same statement.
18521
18522delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18523
18524--disable_warnings ONCE
18525DROP PROCEDURE IF EXISTS sp19;
18526
18527delimiter //;
18528CREATE PROCEDURE sp19( )
18529BEGIN
18530    declare count1 integer default 1;
18531    label1: repeat
18532      set count1 = count1 + 1;
18533      insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18534      until count1 < 3
18535    END repeat;
18536END//
18537delimiter ;//
18538
18539CALL sp19();
18540SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18541
18542# cleanup
18543DROP PROCEDURE sp19;
18544
18545
18546# ------------------------------------------------------------------------------
18547let $message= Testcase 4.3.20:;
18548--source include/show_msg80.inc
18549
18550# testcase: ensure that it is not possible to put an ending label at the END of a
18551#            repeat statement without also requiring a matching beginning label
18552#            at the start of the same statement.
18553
18554delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18555
18556--disable_warnings ONCE
18557DROP PROCEDURE IF EXISTS sp20;
18558
18559delimiter //;
18560--error ER_PARSE_ERROR
18561CREATE PROCEDURE sp20( )
18562BEGIN
18563    declare count1 integer default 1;
18564    repeat
18565      set count1 = count1 + 1;
18566      insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18567      until count1 < 3
18568    END repeat label1;
18569END//
18570delimiter ;//
18571
18572
18573# ------------------------------------------------------------------------------
18574let $message= Testcase 4.3.21:;
18575--source include/show_msg80.inc
18576
18577# ensure that the while statement acts correctly for all variants,
18578#         including cases where statements are nested
18579
18580
18581
18582# ------------------------------------------------------------------------------
18583let $message= Testcase 4.3.22:;
18584--source include/show_msg80.inc
18585
18586# testcase: ensure that the labels enclosing each while statement must match.
18587
18588delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18589
18590--disable_warnings ONCE
18591DROP PROCEDURE IF EXISTS sp22;
18592
18593delimiter //;
18594--error ER_SP_LABEL_MISMATCH
18595CREATE PROCEDURE sp22( )
18596BEGIN
18597    declare count1 integer default 1;
18598    declare count2 integer default 1;
18599    while count1 < 3 do
18600      set count1 = count1 + 1;
18601      set count2 = 1;
18602      label1: while count2 < 3 do
18603        set count2 = count2 + 1;
18604        insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18605      END while label2;
18606    END while;
18607END//
18608delimiter ;//
18609
18610
18611# ------------------------------------------------------------------------------
18612let $message= Testcase 4.3.23:;
18613--source include/show_msg80.inc
18614
18615# testcase: ensure that it is not possible to put an ending label at the END of
18616#            a while statement without also requiring a matching beginning label
18617#            at the start of the same statement.
18618
18619delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18620
18621--disable_warnings ONCE
18622DROP PROCEDURE IF EXISTS sp23;
18623
18624delimiter //;
18625--error ER_PARSE_ERROR
18626CREATE PROCEDURE sp23( )
18627BEGIN
18628    declare count1 integer default 1;
18629    declare count2 integer default 1;
18630    while count1 < 3 do
18631      set count1 = count1 + 1;
18632      set count2 = 1;
18633      while count2 < 3 do
18634        set count2 = count2 + 1;
18635        insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18636      END while label1;
18637    END while;
18638END//
18639delimiter ;//
18640
18641
18642
18643
18644# ------------------------------------------------------------------------------
18645let $message= Testcase 4.3.25:;
18646--source include/show_msg80.inc
18647
18648# testcase: ensure that it is possible to put a beginning label at the start of a
18649#            while statement without also requiring an ending label at the END of the same statement.
18650
18651delete from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18652--disable_warnings ONCE
18653DROP PROCEDURE IF EXISTS sp25;
18654
18655delimiter //;
18656CREATE PROCEDURE sp25( )
18657BEGIN
18658    declare count1 integer default 1;
18659    declare count2 integer default 1;
18660    while count1 < 3 do
18661      set count1 = count1 + 1;
18662      set count2 = 1;
18663      label1: while count2 < 3 do
18664        set count2 = count2 + 1;
18665        insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values( 'xyz' , 'pqr', count1);
18666      END while;
18667    END while;
18668END//
18669delimiter ;//
18670
18671CALL sp25 ();
18672SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742;
18673
18674# cleanup
18675DROP PROCEDURE sp25;
18676drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
18677
18678
18679# ==============================================================================
18680let $message= Section 3.1.4 - Checks for the global nature of stored procedures:;
18681--source include/show_msg80.inc
18682
18683USE db_storedproc;
18684
18685# ------------------------------------------------------------------------------
18686let $message= Testcase 4.4.1:;
18687--source include/show_msg80.inc
18688
18689# testcase: ensure that, regardless of the database in which it was created,
18690#            a stored procedure can be called (for a procedure) from any #database
18691
18692--disable_warnings
18693DROP PROCEDURE IF EXISTS sp1;
18694DROP DATABASE IF EXISTS d40401;
18695--enable_warnings
18696
18697delimiter //;
18698CREATE PROCEDURE sp1 ( n char(20) )
18699BEGIN
18700    SELECT n;
18701END//
18702delimiter ;//
18703
18704  CREATE DATABASE d40401;
18705  USE d40401;
18706
18707CALL db_storedproc.sp1('abcd');
18708
18709  USE db_storedproc;
18710
18711# cleanup
18712DROP PROCEDURE sp1;
18713DROP DATABASE d40401;
18714
18715
18716# ------------------------------------------------------------------------------
18717let $message= Testcase 4.4.2:;
18718--source include/show_msg80.inc
18719
18720# testcase: ensure that, regardless of the database in which it was created,
18721#      a stored procedure can be executed (for a function) from any database.
18722
18723--disable_warnings
18724DROP FUNCTION IF EXISTS fn1;
18725DROP FUNCTION IF EXISTS fn11;
18726DROP DATABASE IF EXISTS d40402;
18727--enable_warnings
18728
18729delimiter //;
18730CREATE FUNCTION fn1(n int) returns int
18731  BEGIN
18732  declare a int;
18733  set a = 9 * n;
18734  return a;
18735END//
18736delimiter ;//
18737
18738  CREATE DATABASE d40402;
18739  USE d40402;
18740
18741
18742    SELECT db_storedproc.fn1(100);
18743
18744    SELECT db_storedproc.fn1(1000);
18745
18746delimiter //;
18747CREATE FUNCTION db_storedproc.fn11(n int) returns int
18748BEGIN
18749    declare a int;
18750    set a = 9 * n;
18751    return a;
18752END//
18753delimiter ;//
18754
18755  SELECT db_storedproc.fn11(100);
18756
18757  SELECT db_storedproc.fn11(1000);
18758
18759  USE db_storedproc;
18760
18761# cleanup
18762DROP FUNCTION fn1;
18763DROP FUNCTION fn11;
18764DROP DATABASE d40402;
18765
18766
18767
18768
18769# ------------------------------------------------------------------------------
18770let $message= Testcase 4.4.3:;
18771--source include/show_msg80.inc
18772
18773# testcase: ensure that the USE of a stored procedure from a database other than the database in
18774#      which it was created does not permanently change the database in use.
18775
18776--disable_warnings
18777DROP DATABASE IF EXISTS d1;
18778DROP DATABASE IF EXISTS d2;
18779--enable_warnings
18780
18781  CREATE DATABASE d1;
18782  CREATE DATABASE d2;
18783
18784  USE d1;
18785
18786  create table res_t41(a char(5), b char(10));
18787  insert into res_t41 values('abcde', 'a!@#$%^&*(');
18788
18789  USE d2;
18790
18791  create table res_t42(a char(5), b char(10));
18792
18793  USE d1;
18794
18795delimiter //;
18796CREATE PROCEDURE sp2(n char (20))
18797BEGIN
18798         SELECT res_t41.a, res_t41.b into @a, @b from res_t41 where res_t41.b = n;
18799         insert into d2.res_t42 values (@a, @b);
18800END//
18801delimiter ;//
18802
18803  USE d2;
18804
18805CALL d1.sp2('a!@#$%^&*(');
18806
18807  show warnings;
18808
18809  SELECT * from d1.res_t41;
18810  SELECT * from res_t42;
18811
18812# cleanup
18813  USE db_storedproc;
18814DROP DATABASE d1;
18815DROP DATABASE d2;
18816
18817
18818# ------------------------------------------------------------------------------
18819let $message= Testcase 4.4.4:;
18820--source include/show_msg80.inc
18821
18822# testcase : ensure that the mysql-specific USE <database name> statement is disallowed
18823#       in a stored procedure.
18824
18825--disable_warnings ONCE
18826DROP DATABASE IF EXISTS d1;
18827
18828  CREATE DATABASE d1;
18829
18830  USE d1;
18831
18832delimiter //;
18833--error ER_SP_BADSTATEMENT
18834CREATE PROCEDURE sp3()
18835BEGIN
18836    USE d1;
18837END//
18838delimiter ;//
18839
18840# cleanup
18841  USE db_storedproc;
18842DROP DATABASE d1;
18843
18844
18845
18846# ------------------------------------------------------------------------------
18847let $message= Testcase 4.4.5:;
18848--source include/show_msg80.inc
18849
18850# testcase: ensure that when a database is dropped, all stored procedures #created within
18851#            that database are also cleanly dropped.
18852
18853--disable_warnings ONCE
18854DROP DATABASE IF EXISTS d1;
18855
18856  CREATE DATABASE d1;
18857
18858  USE d1;
18859  create table t43(a char(5), b char(10));
18860  insert into t43 values('abcde', 'a!@#$%^&*(');
18861
18862CREATE PROCEDURE d1.sp4()
18863   SELECT * from d1.t43;
18864
18865--replace_column 13 modified 14 created
18866  SELECT * from mysql.proc where specific_name = 'sp4';
18867
18868  USE db_storedproc;
18869DROP DATABASE d1;
18870  CREATE DATABASE d1;
18871
18872  USE d1;
18873  create table t44(a char(5), b char(10));
18874
18875--replace_column 13 modified 14 created
18876  SELECT * from mysql.proc where specific_name = 'sp4';
18877
18878# cleanup
18879  USE db_storedproc;
18880DROP DATABASE d1;
18881
18882
18883# ------------------------------------------------------------------------------
18884let $message= Testcase 4.4.6:;
18885--source include/show_msg80.inc
18886
18887# testcase: ensure that a stored procedure created without a qualifying #database name belongs
18888#            to the database in USE at creation time.
18889
18890
18891  USE db_storedproc;
18892
18893--disable_warnings ONCE
18894DROP PROCEDURE IF EXISTS sp5;
18895
18896CREATE PROCEDURE sp5()
18897  SELECT * from db_storedproc.t4 limit 0, 10;
18898
18899  SELECT db from mysql.proc where specific_name = 'sp5';
18900
18901# cleanup
18902DROP PROCEDURE sp5;
18903
18904
18905# ------------------------------------------------------------------------------
18906let $message= Testcase 4.4.7:;
18907--source include/show_msg80.inc
18908
18909# testcase: ensure that a stored procedure created with a qualifying database
18910#        name belongs to the database specified.
18911
18912  USE db_storedproc;
18913
18914--disable_warnings
18915drop table IF EXISTS t46;
18916DROP PROCEDURE IF EXISTS sp6;
18917--enable_warnings
18918
18919  create table t46(f1 char(20), f2 char(20));
18920  insert into t46 values ('abcd', 'wxyz');
18921
18922CREATE PROCEDURE db_storedproc.sp6()
18923  SELECT * from db_storedproc.t4 limit 0, 10;
18924
18925  SELECT db from mysql.proc where specific_name = 'sp6';
18926
18927# cleanup
18928drop table t46;
18929DROP PROCEDURE sp6;
18930
18931
18932# ------------------------------------------------------------------------------
18933let $message= Testcase 4.4.8:;
18934--source include/show_msg80.inc
18935
18936# testcase : ensure that, regardless of the database in which it was created,
18937#       a procedure can be altered from any database.
18938
18939--disable_warnings
18940DROP DATABASE IF EXISTS d1;
18941DROP DATABASE IF EXISTS d2;
18942--enable_warnings
18943
18944  CREATE DATABASE d1;
18945  CREATE DATABASE d2;
18946
18947  USE d1;
18948
18949CREATE PROCEDURE sp8 ( n char(20) ) sql security DEFINER comment 'initial'
18950  SELECT * from t1 where t1.f1 = n;
18951
18952  USE d2;
18953  alter procedure d1.sp8 sql security DEFINER comment 'updated';
18954--replace_column 13 modified 14 created
18955  SELECT * from mysql.proc where specific_name='sp8' and db='d1';
18956
18957
18958# ------------------------------------------------------------------------------
18959let $message= Testcase 4.4.9:;
18960--source include/show_msg80.inc
18961
18962# testcase :ensure that, regardless of the database in which it was created,
18963#      a stored procedure can be executed (for a function) from any database.
18964
18965  USE d1;
18966
18967--disable_warnings
18968DROP FUNCTION IF EXISTS fn1;
18969DROP FUNCTION IF EXISTS fn11;
18970--enable_warnings
18971
18972delimiter //;
18973CREATE FUNCTION d1.fn2(n int) returns int sql security invoker comment 'initial'
18974BEGIN
18975    declare a int;
18976    set a = 0.9 * n;
18977    return a;
18978END//
18979delimiter ;//
18980
18981  USE d2;
18982  alter function d1.fn2 sql security DEFINER comment 'updated';
18983--replace_column 13 modified 14 created
18984  SELECT * from mysql.proc where specific_name='fn2' and db='d1';
18985
18986
18987# ------------------------------------------------------------------------------
18988let $message= Testcase 4.4.10:;
18989--source include/show_msg80.inc
18990
18991# testcase: ensure that, regardless of the database in which it was created,
18992#      a procedure can be dropped from any database.
18993
18994
18995  USE d1;
18996
18997CREATE PROCEDURE sp9 ( n char(20) )
18998  SELECT * from t1 where t1.f1 = n;
18999
19000  USE d2;
19001DROP PROCEDURE d1.sp9; --replace_column 13 modified 14 created
19002  SELECT * from mysql.proc where specific_name='sp9' and db='d1';
19003
19004
19005# ------------------------------------------------------------------------------
19006let $message= Testcase 4.4.11:;
19007--source include/show_msg80.inc
19008
19009# testcase: ensure that, regardless of the database in which it was created,
19010#      a function can be dropped from any database.
19011
19012
19013  USE d1;
19014
19015delimiter //;
19016CREATE FUNCTION d1.fn3(n int) returns int
19017BEGIN
19018    declare a int;
19019    set a = 0.9 * n;
19020    return a;
19021END//
19022delimiter ;//
19023
19024  USE d2;
19025DROP FUNCTION d1.fn3;
19026--replace_column 13 modified 14 created
19027  SELECT * from mysql.proc where specific_name='fn3' and db='d1';
19028
19029# cleanup
19030
19031  USE db_storedproc;
19032DROP DATABASE d1;
19033DROP DATABASE d2;
19034
19035
19036# ==============================================================================
19037# test plan section: 4.5 -
19038# ==============================================================================
19039let $message= Section 3.1.5 - Parameter use checks:
19040Functions with all data types;
19041--source include/show_msg80.inc
19042
19043#FIXME hpux11
19044let $plus_20=   1.00e+20;
19045let $plus_24=   1.00e+24;
19046let $plus_30=   1.00e+30;
19047let $plus_36=   1.00e+36;
19048let $plus_40=   1.00e+40;
19049let $minus_30= -1.00e+30;
19050let $minus_36= -1.00e+36;
19051let $minus_40= -1.00e+40;
19052
19053let $callvar01m= -1.00e+20;
19054let $callvar01p=  1.00e+20;
19055let $callvar02=  -9.22e+18;
19056let $callvar03=  -9.22e+18;
19057
19058let $procvar01_m30= -1.00e+30;
19059let $procvar01_m36= -1.00e+36;
19060let $procvar01_m40= -1.00e+40;
19061let $procvar01_20=  1.00e+20;
19062let $procvar01_24=  1.00e+24;
19063let $procvar01_30=  1.00e+30;
19064let $procvar01_36=  1.00e+36;
19065let $procvar01_40=  1.00e+40;
19066
19067#################123456789-123456789-123456789-123456789-
19068let $plus_20=   100000000000000000000;
19069let $plus_24=   1000000000000000000000000;
19070let $plus_30=   1000000000000000000000000000000;
19071let $plus_36=   1000000000000000000000000000000000000;
19072let $plus_40=   10000000000000000000000000000000000000000;
19073let $minus_30= -1000000000000000000000000000000;
19074let $minus_36= -1000000000000000000000000000000000000;
19075let $minus_40= -10000000000000000000000000000000000000000;
19076
19077let $procvar_m00=   -1.00e+22;
19078let $procvar_00=     1.00e+22;
19079let $procvar01_m30= $procvar_m00;
19080let $procvar01_m36= $procvar_m00;
19081let $procvar01_m40= $procvar_m00;
19082let $procvar01_20=  $procvar_00;
19083let $procvar01_24=  $procvar_00;
19084let $procvar01_30=  $procvar_00;
19085let $procvar01_36=  $procvar_00;
19086let $procvar01_40=  $procvar_00;
19087let $procvar03= -9.22e+18;
19088let $procvar05= -9.22e+18;
19089let $procvar07= -9.22e+18;
19090
19091
19092--disable_warnings ONCE
19093DROP DATABASE IF EXISTS d1;
19094
19095CREATE DATABASE d1;
19096USE d1;
19097
19098--disable_warnings ONCE
19099DROP FUNCTION IF EXISTS fn1;
19100
19101delimiter //;
19102CREATE FUNCTION fn1( f1 bigint) returns bigint
19103BEGIN
19104   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19105  return f1;
19106END//
19107delimiter ;//
19108
19109SELECT fn1(-9.22e+18);
19110
19111
19112--disable_warnings ONCE
19113DROP FUNCTION IF EXISTS fn2;
19114
19115delimiter //;
19116CREATE FUNCTION fn2( f1 bigint unsigned) returns bigint unsigned
19117BEGIN
19118   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19119  return f1;
19120END//
19121delimiter ;//
19122
19123SELECT fn2(1.84e+19);
19124
19125
19126--disable_warnings ONCE
19127DROP FUNCTION IF EXISTS fn3;
19128
19129delimiter //;
19130CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill
19131BEGIN
19132   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19133  return f1;
19134END//
19135delimiter ;//
19136
19137--disable_ps_protocol ONCE
19138SELECT fn3(1.84e+17);
19139
19140--disable_warnings ONCE
19141DROP FUNCTION IF EXISTS fn4;
19142
19143delimiter //;
19144CREATE FUNCTION fn4( f1 bigint zerofill) returns bigint zerofill
19145BEGIN
19146   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19147  return f1;
19148END//
19149delimiter ;//
19150
19151--disable_ps_protocol ONCE
19152SELECT fn4(-9.22e+15);
19153
19154--disable_warnings ONCE
19155DROP FUNCTION IF EXISTS fn5;
19156
19157delimiter //;
19158CREATE FUNCTION fn5( f1 decimal) returns decimal
19159BEGIN
19160   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19161  return f1;
19162END//
19163delimiter ;//
19164
19165SELECT fn5(-1.00e+09);
19166
19167
19168--disable_warnings ONCE
19169DROP FUNCTION IF EXISTS fn6;
19170
19171delimiter //;
19172CREATE FUNCTION fn6( f1 decimal (0)) returns decimal (0)
19173BEGIN
19174   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19175  return f1;
19176END//
19177delimiter ;//
19178
19179SELECT fn6(-1.00e+09);
19180
19181
19182--disable_warnings ONCE
19183DROP FUNCTION IF EXISTS fn7;
19184
19185delimiter //;
19186CREATE FUNCTION fn7( f1 decimal (0) unsigned) returns decimal (0) unsigned
19187BEGIN
19188   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19189  return f1;
19190END//
19191delimiter ;//
19192
19193SELECT fn7(99999999999);
19194
19195
19196--disable_warnings ONCE
19197DROP FUNCTION IF EXISTS fn8;
19198
19199delimiter //;
19200CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill
19201BEGIN
19202   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19203  return f1;
19204END//
19205delimiter ;//
19206
19207SELECT fn8(999999999);
19208
19209--disable_warnings ONCE
19210DROP FUNCTION IF EXISTS fn9;
19211
19212delimiter //;
19213CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill
19214BEGIN
19215   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19216  return f1;
19217END//
19218delimiter ;//
19219
19220SELECT fn9(-1.00e+09);
19221
19222
19223--disable_warnings ONCE
19224DROP FUNCTION IF EXISTS fn10;
19225
19226delimiter //;
19227CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0)
19228BEGIN
19229   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19230  return f1;
19231END//
19232delimiter ;//
19233
19234SELECT fn10(-1.00e+09);
19235
19236
19237--disable_warnings ONCE
19238DROP FUNCTION IF EXISTS fn11;
19239
19240delimiter //;
19241CREATE FUNCTION fn11( f1 decimal (0, 0) unsigned) returns decimal (0, 0) unsigned
19242BEGIN
19243   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19244  return f1;
19245END//
19246delimiter ;//
19247
19248SELECT fn11(99999999999);
19249
19250
19251--disable_warnings ONCE
19252DROP FUNCTION IF EXISTS fn12;
19253
19254delimiter //;
19255CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill
19256BEGIN
19257   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19258  return f1;
19259END//
19260delimiter ;//
19261
19262SELECT fn12(999999999);
19263
19264--disable_warnings ONCE
19265DROP FUNCTION IF EXISTS fn13;
19266
19267delimiter //;
19268CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill
19269BEGIN
19270   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19271  return f1;
19272END//
19273delimiter ;//
19274
19275SELECT fn13(-1.00e+09);
19276
19277
19278--disable_warnings ONCE
19279DROP FUNCTION IF EXISTS fn14;
19280
19281delimiter //;
19282CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30)
19283BEGIN
19284   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19285  return f1;
19286END//
19287delimiter ;//
19288
19289SELECT fn14(-1.00e+21);
19290
19291
19292--disable_warnings ONCE
19293DROP FUNCTION IF EXISTS fn15;
19294
19295delimiter //;
19296CREATE FUNCTION fn15( f1 decimal (63, 30) unsigned) returns decimal (63, 30) unsigned
19297BEGIN
19298   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19299  return f1;
19300END//
19301delimiter ;//
19302
19303SELECT fn15(1.00e+16);
19304
19305
19306--disable_warnings ONCE
19307DROP FUNCTION IF EXISTS fn16;
19308
19309delimiter //;
19310CREATE FUNCTION fn16( f1 decimal (63, 30) unsigned zerofill) returns decimal (63, 30) unsigned zerofill
19311BEGIN
19312   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19313  return f1;
19314END//
19315delimiter ;//
19316
19317SELECT fn16(1.00e+16);
19318
19319
19320--disable_warnings ONCE
19321DROP FUNCTION IF EXISTS fn17;
19322
19323delimiter //;
19324CREATE FUNCTION fn17( f1 decimal (63, 30) zerofill) returns decimal (63, 30) zerofill
19325BEGIN
19326   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19327  return f1;
19328END//
19329delimiter ;//
19330
19331SELECT fn17(-1.00e+21);
19332
19333
19334--disable_warnings ONCE
19335DROP FUNCTION IF EXISTS fn18_d;
19336
19337delimiter //;
19338CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64)
19339BEGIN
19340   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19341  return f1;
19342END//
19343delimiter ;//
19344
19345#FIXME hpux11
19346eval SELECT fn18_d( $minus_30 );
19347
19348
19349--disable_warnings ONCE
19350DROP FUNCTION IF EXISTS fn19_du;
19351
19352delimiter //;
19353CREATE FUNCTION fn19_du( f1 decimal (64) unsigned) returns decimal (64) unsigned
19354BEGIN
19355   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19356  return f1;
19357END//
19358delimiter ;//
19359
19360eval SELECT fn19_du( $plus_20 );
19361
19362--disable_warnings ONCE
19363DROP FUNCTION IF EXISTS fn20_duz;
19364
19365delimiter //;
19366CREATE FUNCTION fn20_duz( f1 decimal (64) unsigned zerofill) returns decimal (64) unsigned zerofill
19367BEGIN
19368   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19369  return f1;
19370END//
19371delimiter ;//
19372
19373eval SELECT fn20_duz( $plus_24 );
19374
19375--disable_warnings ONCE
19376DROP FUNCTION IF EXISTS fn21_d_z;
19377
19378delimiter //;
19379CREATE FUNCTION fn21_d_z( f1 decimal (64) zerofill) returns decimal (64) zerofill
19380BEGIN
19381   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19382  return f1;
19383END//
19384delimiter ;//
19385
19386SELECT fn21_d_z(1.00e+00);
19387
19388--disable_warnings ONCE
19389DROP FUNCTION IF EXISTS fn22;
19390
19391delimiter //;
19392CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned
19393BEGIN
19394   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19395  return f1;
19396END//
19397delimiter ;//
19398
19399SELECT fn22(1.00e+00);
19400
19401
19402--disable_warnings ONCE
19403DROP FUNCTION IF EXISTS fn23;
19404
19405delimiter //;
19406CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill
19407BEGIN
19408   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19409  return f1;
19410END//
19411delimiter ;//
19412
19413SELECT fn23(1.00e+00);
19414
19415--disable_warnings ONCE
19416DROP FUNCTION IF EXISTS fn24;
19417
19418delimiter //;
19419CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill
19420BEGIN
19421   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19422  return f1;
19423END//
19424delimiter ;//
19425
19426SELECT fn24(-1.00e+09);
19427
19428
19429--disable_warnings ONCE
19430DROP FUNCTION IF EXISTS fn25;
19431
19432delimiter //;
19433CREATE FUNCTION fn25( f1 double) returns double
19434BEGIN
19435   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19436  return f1;
19437END//
19438delimiter ;//
19439
19440SELECT fn25(1.00e+00);
19441
19442
19443--disable_warnings ONCE
19444DROP FUNCTION IF EXISTS fn26;
19445
19446delimiter //;
19447CREATE FUNCTION fn26( f1 double unsigned) returns double unsigned
19448BEGIN
19449   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19450  return f1;
19451END//
19452delimiter ;//
19453
19454SELECT fn26(1.00e+00);
19455
19456--disable_warnings ONCE
19457DROP FUNCTION IF EXISTS fn27;
19458
19459delimiter //;
19460CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill
19461BEGIN
19462   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19463  return f1;
19464END//
19465delimiter ;//
19466
19467--disable_ps_protocol ONCE
19468SELECT fn27(1.00e+00);
19469
19470
19471--disable_warnings ONCE
19472DROP FUNCTION IF EXISTS fn28;
19473
19474delimiter //;
19475CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill
19476BEGIN
19477   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19478  return f1;
19479END//
19480delimiter ;//
19481
19482--disable_ps_protocol ONCE
19483SELECT fn28(1.00e+00);
19484
19485
19486--disable_warnings ONCE
19487DROP FUNCTION IF EXISTS fn29;
19488
19489
19490delimiter //;
19491CREATE FUNCTION fn29( f1 float) returns float
19492BEGIN
19493   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19494  return f1;
19495END//
19496delimiter ;//
19497
19498SELECT fn29(1.00e+00);
19499
19500
19501--disable_warnings ONCE
19502DROP FUNCTION IF EXISTS fn30;
19503
19504delimiter //;
19505CREATE FUNCTION fn30( f1 float unsigned) returns float unsigned
19506BEGIN
19507   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19508  return f1;
19509END//
19510delimiter ;//
19511
19512SELECT fn30(1.00e+00);
19513
19514
19515--disable_warnings ONCE
19516DROP FUNCTION IF EXISTS fn31;
19517
19518delimiter //;
19519CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill
19520BEGIN
19521   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19522  return f1;
19523END//
19524delimiter ;//
19525
19526--disable_ps_protocol ONCE
19527SELECT fn31(1.00e+00);
19528
19529
19530--disable_warnings ONCE
19531DROP FUNCTION IF EXISTS fn32;
19532
19533delimiter //;
19534CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill
19535BEGIN
19536   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19537  return f1;
19538END//
19539delimiter ;//
19540
19541--disable_ps_protocol ONCE
19542SELECT fn32(1.00e+00);
19543
19544
19545--disable_warnings ONCE
19546DROP FUNCTION IF EXISTS fn33;
19547
19548delimiter //;
19549CREATE FUNCTION fn33( f1 float(0)) returns float(0)
19550BEGIN
19551   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19552  return f1;
19553END//
19554delimiter ;//
19555
19556SELECT fn33(1.00e+00);
19557
19558
19559--disable_warnings ONCE
19560DROP FUNCTION IF EXISTS fn34;
19561
19562delimiter //;
19563CREATE FUNCTION fn34( f1 float(0) unsigned) returns float(0) unsigned
19564BEGIN
19565   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19566  return f1;
19567END//
19568delimiter ;//
19569
19570SELECT fn34(1.00e+00);
19571
19572
19573--disable_warnings ONCE
19574DROP FUNCTION IF EXISTS fn35;
19575
19576delimiter //;
19577CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill
19578BEGIN
19579   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19580  return f1;
19581END//
19582delimiter ;//
19583
19584--disable_ps_protocol ONCE
19585SELECT fn35(1.00e+00);
19586
19587
19588--disable_warnings ONCE
19589DROP FUNCTION IF EXISTS fn36;
19590
19591delimiter //;
19592CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill
19593BEGIN
19594   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19595  return f1;
19596END//
19597delimiter ;//
19598
19599--disable_ps_protocol ONCE
19600SELECT fn36(1.00e+00);
19601
19602
19603--disable_warnings ONCE
19604DROP FUNCTION IF EXISTS fn37;
19605
19606delimiter //;
19607CREATE FUNCTION fn37( f1 float(23)) returns float(23)
19608BEGIN
19609   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19610  return f1;
19611END//
19612delimiter ;//
19613
19614SELECT fn37(1.00e+00);
19615
19616
19617--disable_warnings ONCE
19618DROP FUNCTION IF EXISTS fn38;
19619
19620delimiter //;
19621CREATE FUNCTION fn38( f1 float(23) unsigned) returns float(23) unsigned
19622BEGIN
19623   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19624  return f1;
19625END//
19626delimiter ;//
19627
19628SELECT fn38(1.00e+00);
19629
19630
19631--disable_warnings ONCE
19632DROP FUNCTION IF EXISTS fn39;
19633
19634delimiter //;
19635CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill
19636BEGIN
19637   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19638  return f1;
19639END//
19640delimiter ;//
19641
19642--disable_ps_protocol ONCE
19643SELECT fn39(1.00e+00);
19644
19645
19646--disable_warnings ONCE
19647DROP FUNCTION IF EXISTS fn40;
19648
19649delimiter //;
19650CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill
19651BEGIN
19652   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19653  return f1;
19654END//
19655delimiter ;//
19656
19657--disable_ps_protocol ONCE
19658SELECT fn40(1.00e+00);
19659
19660
19661--disable_warnings ONCE
19662DROP FUNCTION IF EXISTS fn41;
19663
19664delimiter //;
19665CREATE FUNCTION fn41( f1 float(24)) returns float(24)
19666BEGIN
19667   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19668  return f1;
19669END//
19670delimiter ;//
19671
19672SELECT fn41(1.00e+00);
19673
19674
19675--disable_warnings ONCE
19676DROP FUNCTION IF EXISTS fn42;
19677
19678delimiter //;
19679CREATE FUNCTION fn42( f1 float(24) unsigned) returns float(24) unsigned
19680BEGIN
19681   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19682  return f1;
19683END//
19684delimiter ;//
19685
19686SELECT fn42(1.00e+00);
19687
19688--disable_warnings ONCE
19689DROP FUNCTION IF EXISTS fn43;
19690
19691delimiter //;
19692CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill
19693BEGIN
19694   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19695  return f1;
19696END//
19697delimiter ;//
19698
19699--disable_ps_protocol ONCE
19700SELECT fn43(1.00e+00);
19701
19702
19703--disable_warnings ONCE
19704DROP FUNCTION IF EXISTS fn44;
19705
19706delimiter //;
19707CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill
19708BEGIN
19709   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19710  return f1;
19711END//
19712delimiter ;//
19713
19714--disable_ps_protocol ONCE
19715SELECT fn44(1.00e+00);
19716
19717
19718--disable_warnings ONCE
19719DROP FUNCTION IF EXISTS fn45;
19720
19721delimiter //;
19722CREATE FUNCTION fn45( f1 float(53)) returns float(53)
19723BEGIN
19724   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19725  return f1;
19726END//
19727delimiter ;//
19728
19729SELECT fn45(1.00e+00);
19730
19731
19732--disable_warnings ONCE
19733DROP FUNCTION IF EXISTS fn46;
19734
19735delimiter //;
19736CREATE FUNCTION fn46( f1 float(53) unsigned) returns float(53) unsigned
19737BEGIN
19738   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19739  return f1;
19740END//
19741delimiter ;//
19742
19743SELECT fn46(1.00e+00);
19744
19745--disable_warnings ONCE
19746DROP FUNCTION IF EXISTS fn47;
19747
19748delimiter //;
19749CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill
19750BEGIN
19751   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19752  return f1;
19753END//
19754delimiter ;//
19755
19756--disable_ps_protocol ONCE
19757SELECT fn47(1.00e+00);
19758
19759
19760--disable_warnings ONCE
19761DROP FUNCTION IF EXISTS fn48;
19762
19763delimiter //;
19764CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill
19765BEGIN
19766   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19767  return f1;
19768END//
19769delimiter ;//
19770
19771--disable_ps_protocol ONCE
19772SELECT fn48(1.00e+00);
19773
19774
19775--disable_warnings ONCE
19776DROP FUNCTION IF EXISTS fn49;
19777
19778delimiter //;
19779CREATE FUNCTION fn49( f1 int) returns int
19780BEGIN
19781   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19782  return f1;
19783END//
19784delimiter ;//
19785
19786SELECT fn49(-2.15e+09);
19787
19788
19789--disable_warnings ONCE
19790DROP FUNCTION IF EXISTS fn50;
19791
19792delimiter //;
19793CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned
19794BEGIN
19795   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19796  return f1;
19797END//
19798delimiter ;//
19799
19800SELECT fn50(4.29e+09);
19801
19802
19803--disable_warnings ONCE
19804DROP FUNCTION IF EXISTS fn51;
19805
19806delimiter //;
19807CREATE FUNCTION fn51( f1 int unsigned zerofill) returns int unsigned zerofill
19808BEGIN
19809   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19810  return f1;
19811END//
19812delimiter ;//
19813
19814SELECT fn51(4.29e+09);
19815
19816
19817--disable_warnings ONCE
19818DROP FUNCTION IF EXISTS fn52;
19819
19820delimiter //;
19821CREATE FUNCTION fn52( f1 int zerofill) returns int zerofill
19822BEGIN
19823   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19824  return f1;
19825END//
19826delimiter ;//
19827
19828--disable_ps_protocol ONCE
19829SELECT fn52(2.15e+08);
19830
19831--disable_warnings ONCE
19832DROP FUNCTION IF EXISTS fn53;
19833
19834delimiter //;
19835CREATE FUNCTION fn53( f1 mediumint) returns mediumint
19836BEGIN
19837   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19838  return f1;
19839END//
19840delimiter ;//
19841
19842SELECT fn53(-8388600);
19843
19844--disable_warnings ONCE
19845DROP FUNCTION IF EXISTS fn54;
19846
19847delimiter //;
19848CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned
19849BEGIN
19850   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19851  return f1;
19852END//
19853delimiter ;//
19854
19855SELECT fn54(16777201);
19856
19857
19858--disable_warnings ONCE
19859DROP FUNCTION IF EXISTS fn55;
19860
19861delimiter //;
19862CREATE FUNCTION fn55( f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill
19863BEGIN
19864   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19865  return f1;
19866END//
19867delimiter ;//
19868
19869SELECT fn55(16777210);
19870
19871
19872--disable_warnings ONCE
19873DROP FUNCTION IF EXISTS fn56;
19874
19875delimiter //;
19876CREATE FUNCTION fn56( f1 mediumint zerofill) returns mediumint zerofill
19877BEGIN
19878   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19879  return f1;
19880END//
19881delimiter ;//
19882
19883SELECT fn56(-8388601);
19884
19885--disable_warnings ONCE
19886DROP FUNCTION IF EXISTS fn57;
19887
19888delimiter //;
19889CREATE FUNCTION fn57( f1 numeric) returns numeric
19890BEGIN
19891   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19892  return f1;
19893END//
19894delimiter ;//
19895
19896SELECT fn57(-999999999);
19897
19898
19899--disable_warnings ONCE
19900DROP FUNCTION IF EXISTS fn58;
19901
19902delimiter //;
19903CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0)
19904BEGIN
19905   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19906  return f1;
19907END//
19908delimiter ;//
19909
19910SELECT fn58(-999999999);
19911
19912
19913--disable_warnings ONCE
19914DROP FUNCTION IF EXISTS fn59;
19915
19916delimiter //;
19917CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned
19918BEGIN
19919   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19920  return f1;
19921END//
19922delimiter ;//
19923
19924SELECT fn59(9999999999);
19925
19926--disable_warnings ONCE
19927DROP FUNCTION IF EXISTS fn60;
19928
19929delimiter //;
19930CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill
19931BEGIN
19932   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19933  return f1;
19934END//
19935delimiter ;//
19936
19937SELECT fn60(99999999);
19938
19939
19940--disable_warnings ONCE
19941DROP FUNCTION IF EXISTS fn61;
19942
19943delimiter //;
19944CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill
19945BEGIN
19946   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19947  return f1;
19948END//
19949delimiter ;//
19950
19951SELECT fn61(-99999999);
19952
19953
19954--disable_warnings ONCE
19955DROP FUNCTION IF EXISTS fn62;
19956
19957delimiter //;
19958CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0)
19959BEGIN
19960   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19961  return f1;
19962END//
19963delimiter ;//
19964
19965SELECT fn62(-999999999);
19966
19967
19968--disable_warnings ONCE
19969DROP FUNCTION IF EXISTS fn63;
19970
19971delimiter //;
19972CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned
19973BEGIN
19974   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19975  return f1;
19976END//
19977delimiter ;//
19978
19979SELECT fn63(9999999999);
19980
19981
19982--disable_warnings ONCE
19983DROP FUNCTION IF EXISTS fn64;
19984
19985delimiter //;
19986CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill
19987BEGIN
19988   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
19989  return f1;
19990END//
19991delimiter ;//
19992
19993SELECT fn64(99999999);
19994
19995
19996--disable_warnings ONCE
19997DROP FUNCTION IF EXISTS fn65;
19998
19999delimiter //;
20000CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill
20001BEGIN
20002   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20003  return f1;
20004END//
20005delimiter ;//
20006
20007SELECT fn65(-99999999);
20008
20009
20010--disable_warnings ONCE
20011DROP FUNCTION IF EXISTS fn66;
20012
20013delimiter //;
20014CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30)
20015BEGIN
20016   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20017  return f1;
20018END//
20019delimiter ;//
20020
20021SELECT fn66(-1e+36);
20022
20023
20024--disable_warnings ONCE
20025DROP FUNCTION IF EXISTS fn67;
20026
20027delimiter //;
20028CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned
20029BEGIN
20030   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20031  return f1;
20032END//
20033delimiter ;//
20034
20035SELECT fn67(1e+36);
20036
20037
20038--disable_warnings ONCE
20039DROP FUNCTION IF EXISTS fn68;
20040
20041delimiter //;
20042CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill
20043BEGIN
20044   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20045  return f1;
20046END//
20047delimiter ;//
20048
20049SELECT fn68(1e+36);
20050
20051
20052--disable_warnings ONCE
20053DROP FUNCTION IF EXISTS fn69;
20054
20055delimiter //;
20056CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill
20057BEGIN
20058   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20059  return f1;
20060END//
20061delimiter ;//
20062
20063SELECT fn69(-1e+36);
20064
20065
20066--disable_warnings ONCE
20067DROP FUNCTION IF EXISTS fn70_n;
20068
20069delimiter //;
20070CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64)
20071BEGIN
20072   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20073  return f1;
20074END//
20075delimiter ;//
20076
20077#FIXME hpux11
20078#SELECT fn70_n(-1e+40);
20079eval SELECT fn70_n( $minus_30 );
20080eval SELECT fn70_n( $minus_40 );
20081
20082
20083--disable_warnings ONCE
20084DROP FUNCTION IF EXISTS fn71_nu;
20085
20086delimiter //;
20087CREATE FUNCTION fn71_nu( f1 numeric (64) unsigned) returns numeric (64) unsigned
20088BEGIN
20089   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20090  return f1;
20091END//
20092delimiter ;//
20093
20094#FIXME hpux11
20095#SELECT fn71_nu(1.00e+40);
20096eval SELECT fn71_nu( $plus_40 );
20097
20098
20099--disable_warnings ONCE
20100DROP FUNCTION IF EXISTS fn72_nuz;
20101
20102delimiter //;
20103CREATE FUNCTION fn72_nuz( f1 numeric (64) unsigned zerofill) returns numeric (64) unsigned zerofill
20104BEGIN
20105   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20106  return f1;
20107END//
20108delimiter ;//
20109
20110#FIXME hpux11
20111#SELECT fn72_nuz(1.00e+40);
20112eval SELECT fn72_nuz( $plus_40 );
20113
20114
20115--disable_warnings ONCE
20116DROP FUNCTION IF EXISTS fn73_n_z;
20117
20118delimiter //;
20119CREATE FUNCTION fn73_n_z( f1 numeric (64) zerofill) returns numeric (64) zerofill
20120BEGIN
20121   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20122  return f1;
20123END//
20124delimiter ;//
20125
20126#FIXME hpux11
20127#SELECT fn73_n_z(1.00e+40);
20128eval SELECT fn73_n_z( $plus_40 );
20129
20130--disable_warnings ONCE
20131DROP FUNCTION IF EXISTS fn74;
20132
20133delimiter //;
20134CREATE FUNCTION fn74( f1 numeric unsigned) returns numeric unsigned
20135BEGIN
20136   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20137  return f1;
20138END//
20139delimiter ;//
20140
20141SELECT fn74(999999999);
20142
20143
20144--disable_warnings ONCE
20145DROP FUNCTION IF EXISTS fn75;
20146
20147delimiter //;
20148CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill
20149BEGIN
20150   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20151  return f1;
20152END//
20153delimiter ;//
20154
20155SELECT fn75(999999999);
20156
20157
20158--disable_warnings ONCE
20159DROP FUNCTION IF EXISTS fn76;
20160
20161delimiter //;
20162CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill
20163BEGIN
20164   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20165  return f1;
20166END//
20167delimiter ;//
20168
20169SELECT fn76(-999999999);
20170
20171
20172--disable_warnings ONCE
20173DROP FUNCTION IF EXISTS fn77;
20174
20175delimiter //;
20176CREATE FUNCTION fn77( f1 real) returns real
20177BEGIN
20178   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20179  return f1;
20180END//
20181delimiter ;//
20182
20183SELECT fn77(1.1);
20184
20185
20186--disable_warnings ONCE
20187DROP FUNCTION IF EXISTS fn78;
20188
20189delimiter //;
20190CREATE FUNCTION fn78( f1 real unsigned) returns real unsigned
20191BEGIN
20192   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20193  return f1;
20194END//
20195delimiter ;//
20196
20197SELECT fn78(1.1);
20198
20199
20200--disable_warnings ONCE
20201DROP FUNCTION IF EXISTS fn79;
20202
20203delimiter //;
20204CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill
20205BEGIN
20206   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20207  return f1;
20208END//
20209delimiter ;//
20210
20211--disable_ps_protocol ONCE
20212SELECT fn79(1.1);
20213
20214
20215--disable_warnings ONCE
20216DROP FUNCTION IF EXISTS fn80;
20217
20218delimiter //;
20219CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill
20220BEGIN
20221   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20222  return f1;
20223END//
20224delimiter ;//
20225
20226--disable_ps_protocol ONCE
20227SELECT fn80(1.1);
20228
20229
20230--disable_warnings ONCE
20231DROP FUNCTION IF EXISTS fn81;
20232
20233delimiter //;
20234CREATE FUNCTION fn81( f1 smallint) returns smallint
20235BEGIN
20236   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20237  return f1;
20238END//
20239delimiter ;//
20240
20241SELECT fn81(-32701);
20242
20243
20244--disable_warnings ONCE
20245DROP FUNCTION IF EXISTS fn82;
20246
20247delimiter //;
20248CREATE FUNCTION fn82( f1 smallint unsigned) returns smallint unsigned
20249BEGIN
20250   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20251  return f1;
20252END//
20253delimiter ;//
20254
20255SELECT fn82(65531);
20256
20257
20258--disable_warnings ONCE
20259DROP FUNCTION IF EXISTS fn83;
20260
20261delimiter //;
20262CREATE FUNCTION fn83( f1 smallint unsigned zerofill) returns smallint unsigned zerofill
20263BEGIN
20264   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20265  return f1;
20266END//
20267delimiter ;//
20268
20269SELECT fn83(65531);
20270
20271
20272--disable_warnings ONCE
20273DROP FUNCTION IF EXISTS fn84;
20274
20275delimiter //;
20276CREATE FUNCTION fn84( f1 smallint zerofill) returns smallint zerofill
20277BEGIN
20278   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20279  return f1;
20280END//
20281delimiter ;//
20282
20283SELECT fn84(-32601);
20284
20285--disable_warnings ONCE
20286DROP FUNCTION IF EXISTS fn85;
20287
20288delimiter //;
20289CREATE FUNCTION fn85( f1 tinyint) returns tinyint
20290BEGIN
20291   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20292  return f1;
20293END//
20294delimiter ;//
20295
20296SELECT fn85(-115);
20297
20298
20299--disable_warnings ONCE
20300DROP FUNCTION IF EXISTS fn86;
20301
20302delimiter //;
20303CREATE FUNCTION fn86( f1 tinyint unsigned) returns tinyint unsigned
20304BEGIN
20305   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20306  return f1;
20307END//
20308delimiter ;//
20309
20310SELECT fn86(251);
20311
20312
20313--disable_warnings ONCE
20314DROP FUNCTION IF EXISTS fn87;
20315
20316delimiter //;
20317CREATE FUNCTION fn87( f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill
20318BEGIN
20319   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20320  return f1;
20321END//
20322delimiter ;//
20323
20324SELECT fn87(201);
20325
20326
20327--disable_warnings ONCE
20328DROP FUNCTION IF EXISTS fn88;
20329
20330delimiter //;
20331CREATE FUNCTION fn88( f1 tinyint zerofill) returns tinyint zerofill
20332BEGIN
20333   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20334  return f1;
20335END//
20336delimiter ;//
20337
20338SELECT fn88(-101);
20339
20340--disable_warnings ONCE
20341DROP FUNCTION IF EXISTS fn89;
20342
20343delimiter //;
20344CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum')
20345BEGIN
20346 IF f1 = '1enum' THEN
20347   SET f1 = '2enum';
20348  ELSE
20349   SET f1 = '1enum';
20350 END IF;
20351 RETURN f1;
20352END//
20353delimiter ;//
20354
20355SELECT fn89( '1enum');
20356
20357--disable_warnings ONCE
20358DROP FUNCTION IF EXISTS fn90;
20359
20360delimiter //;
20361CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set')
20362BEGIN
20363   IF f1 = '1set' THEN
20364      SET f1 = '2set';
20365   ELSE
20366      SET f1 = '1set';
20367   END IF;
20368   RETURN f1;
20369END//
20370delimiter ;//
20371
20372SELECT fn90( '1set');
20373
20374--disable_warnings ONCE
20375DROP FUNCTION IF EXISTS fn91;
20376
20377delimiter //;
20378CREATE FUNCTION fn91( f1 date) returns date
20379BEGIN
20380  set f1 = adddate(f1, interval 31 day);
20381  return f1;
20382END//
20383delimiter ;//
20384
20385SELECT fn91('1997-12-31');
20386
20387--disable_warnings ONCE
20388DROP FUNCTION IF EXISTS fn92;
20389
20390
20391delimiter //;
20392CREATE FUNCTION fn92( f1 time) returns time
20393BEGIN
20394  set f1 = addtime(f1, '02:00:00.999998');
20395  return f1;
20396END//
20397delimiter ;//
20398
20399SELECT fn92( '23:59:59.999999');
20400
20401
20402--disable_warnings ONCE
20403DROP FUNCTION IF EXISTS fn93;
20404
20405
20406delimiter //;
20407CREATE FUNCTION fn93( f1 datetime) returns datetime
20408BEGIN
20409  set f1 = addtime(f1, '1 1:1:1.000002');
20410  return f1;
20411END//
20412delimiter ;//
20413
20414SELECT fn93('1997-12-31 23:59:59.999999');
20415
20416--disable_warnings ONCE
20417DROP FUNCTION IF EXISTS fn94;
20418
20419
20420delimiter //;
20421CREATE FUNCTION fn94( f1 char) returns char
20422BEGIN
20423  set f1 = concat('a', f1);
20424  return f1;
20425END//
20426delimiter ;//
20427
20428SELECT fn94( 'h');
20429
20430--disable_warnings ONCE
20431DROP FUNCTION IF EXISTS fn95;
20432
20433
20434delimiter //;
20435CREATE FUNCTION fn95( f1 char ascii) returns char ascii
20436BEGIN
20437  set f1 = concat('a', f1);
20438  return f1;
20439END//
20440delimiter ;//
20441
20442SELECT fn95('h');
20443
20444
20445--disable_warnings ONCE
20446DROP FUNCTION IF EXISTS fn96;
20447
20448delimiter //;
20449CREATE FUNCTION fn96( f1 binary) returns binary(2)
20450BEGIN
20451  set f1 = concat('a', f1);
20452  return f1;
20453END//
20454delimiter ;//
20455
20456SELECT fn96( 'h');
20457
20458
20459--disable_warnings ONCE
20460DROP FUNCTION IF EXISTS fn97;
20461
20462delimiter //;
20463CREATE FUNCTION fn97( f1 longtext) returns longtext
20464BEGIN
20465  set f1 = concat('hello', f1);
20466  return f1;
20467END//
20468delimiter ;//
20469
20470SELECT fn97( 'world');
20471
20472--disable_warnings ONCE
20473DROP FUNCTION IF EXISTS fn98;
20474
20475delimiter //;
20476CREATE FUNCTION fn98( f1 mediumtext) returns mediumtext
20477BEGIN
20478  set f1 = concat('hello', f1);
20479  return f1;
20480END//
20481delimiter ;//
20482
20483SELECT fn98( 'world');
20484
20485--disable_warnings ONCE
20486DROP FUNCTION IF EXISTS fn99;
20487
20488delimiter //;
20489CREATE FUNCTION fn99( f1 text) returns text
20490BEGIN
20491  set f1 = concat('hello', f1);
20492  return f1;
20493END//
20494delimiter ;//
20495
20496SELECT fn99( 'world');
20497
20498--disable_warnings ONCE
20499DROP FUNCTION IF EXISTS fn100;
20500
20501delimiter //;
20502CREATE FUNCTION fn100( f1 tinytext) returns tinytext
20503BEGIN
20504  set f1 = concat('hello', f1);
20505  return f1;
20506END//
20507delimiter ;//
20508
20509SELECT fn100( 'world');
20510
20511--disable_warnings ONCE
20512DROP FUNCTION IF EXISTS fn101;
20513
20514delimiter //;
20515CREATE FUNCTION fn101( f1 year) returns year
20516BEGIN
20517  set f1 = f1 + 10;
20518  return f1;
20519END//
20520delimiter ;//
20521
20522SELECT fn101(51);
20523
20524
20525--disable_warnings ONCE
20526DROP FUNCTION IF EXISTS fn102;
20527
20528delimiter //;
20529CREATE FUNCTION fn102( f1 year(4)) returns year(4)
20530BEGIN
20531  set f1 = f1 + 51;
20532  return f1;
20533END//
20534delimiter ;//
20535
20536SELECT fn102(1982);
20537
20538
20539--disable_warnings ONCE
20540DROP FUNCTION IF EXISTS fn103;
20541
20542delimiter //;
20543CREATE FUNCTION fn103( f1 geometrycollection) returns geometrycollection
20544BEGIN
20545  set f1 = f1;
20546  return f1;
20547END//
20548delimiter ;//
20549
20550SELECT fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
20551
20552
20553--disable_warnings ONCE
20554DROP FUNCTION IF EXISTS fn104;
20555
20556delimiter //;
20557CREATE FUNCTION fn104( f1 linestring) returns linestring
20558BEGIN
20559  set f1 = f1;
20560  return f1;
20561END//
20562delimiter ;//
20563
20564SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
20565
20566
20567--disable_warnings ONCE
20568DROP FUNCTION IF EXISTS fn105;
20569
20570delimiter //;
20571CREATE FUNCTION fn105( f1 point) returns point
20572BEGIN
20573  set f1 = f1;
20574  return f1;
20575END//
20576delimiter ;//
20577
20578SELECT fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
20579
20580
20581--disable_warnings ONCE
20582DROP FUNCTION IF EXISTS fn106;
20583
20584delimiter //;
20585CREATE FUNCTION fn106( f1 polygon) returns polygon
20586BEGIN
20587  set f1 = f1;
20588  return f1;
20589END//
20590delimiter ;//
20591
20592SELECT fn106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
20593
20594
20595--disable_warnings ONCE
20596DROP FUNCTION IF EXISTS fn107;
20597
20598delimiter //;
20599CREATE FUNCTION fn107( f1 timestamp) returns timestamp
20600BEGIN
20601  set f1 = now();
20602  return f1;
20603END//
20604delimiter ;//
20605
20606--replace_column 1 returned
20607SELECT fn107(20050510080451);
20608
20609USE db_storedproc;
20610DROP DATABASE d1;
20611
20612
20613# ==============================================================================
20614# test plan section: 4.5 - stored procs with in, out parameters using all datatypes
20615# ==============================================================================
20616
20617--disable_warnings ONCE
20618DROP DATABASE IF EXISTS db1;
20619
20620CREATE DATABASE db1;
20621USE db1;
20622
20623--disable_warnings ONCE
20624DROP PROCEDURE IF EXISTS sp1;
20625
20626delimiter //;
20627CREATE PROCEDURE sp1( f1 bigint)
20628BEGIN
20629   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20630  SELECT f1;
20631END//
20632delimiter ;//
20633
20634CALL sp1(-9.22e+18);
20635
20636
20637--disable_warnings ONCE
20638DROP PROCEDURE IF EXISTS sp2;
20639
20640delimiter //;
20641CREATE PROCEDURE sp2( f1 bigint unsigned)
20642BEGIN
20643   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20644  SELECT f1;
20645END//
20646delimiter ;//
20647
20648CALL sp2(1.84e+19);
20649
20650
20651--disable_warnings ONCE
20652DROP PROCEDURE IF EXISTS sp3;
20653
20654delimiter //;
20655CREATE PROCEDURE sp3( f1 bigint unsigned zerofill)
20656BEGIN
20657   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20658  SELECT f1;
20659END//
20660delimiter ;//
20661
20662CALL sp3(1.84e+17);
20663
20664
20665--disable_warnings ONCE
20666DROP PROCEDURE IF EXISTS sp4;
20667
20668delimiter //;
20669CREATE PROCEDURE sp4( f1 bigint zerofill)
20670BEGIN
20671   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20672  SELECT f1;
20673END//
20674delimiter ;//
20675
20676CALL sp4(-9.22e+15);
20677
20678
20679--disable_warnings ONCE
20680DROP PROCEDURE IF EXISTS sp5;
20681
20682delimiter //;
20683CREATE PROCEDURE sp5( f1 decimal)
20684BEGIN
20685   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20686  SELECT f1;
20687END//
20688delimiter ;//
20689
20690CALL sp5(-1.00e+09);
20691
20692
20693--disable_warnings ONCE
20694DROP PROCEDURE IF EXISTS sp6;
20695
20696delimiter //;
20697CREATE PROCEDURE sp6( f1 decimal (0))
20698BEGIN
20699   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20700  SELECT f1;
20701END//
20702delimiter ;//
20703
20704CALL sp6(-1.00e+09);
20705
20706--disable_warnings ONCE
20707DROP PROCEDURE IF EXISTS sp7;
20708
20709delimiter //;
20710CREATE PROCEDURE sp7( f1 decimal (0) unsigned)
20711BEGIN
20712   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20713  SELECT f1;
20714END//
20715delimiter ;//
20716
20717CALL sp7(99999999999);
20718
20719--disable_warnings ONCE
20720DROP PROCEDURE IF EXISTS sp8;
20721
20722delimiter //;
20723CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill)
20724BEGIN
20725   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20726  SELECT f1;
20727END//
20728delimiter ;//
20729
20730CALL sp8(999999999);
20731
20732
20733--disable_warnings ONCE
20734DROP PROCEDURE IF EXISTS sp9;
20735
20736delimiter //;
20737CREATE PROCEDURE sp9( f1 decimal (0) zerofill)
20738BEGIN
20739   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20740  SELECT f1;
20741END//
20742delimiter ;//
20743
20744CALL sp9(-1.00e+09);
20745
20746--disable_warnings ONCE
20747DROP PROCEDURE IF EXISTS sp10;
20748
20749delimiter //;
20750CREATE PROCEDURE sp10( f1 decimal (0, 0))
20751BEGIN
20752   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20753  SELECT f1;
20754END//
20755delimiter ;//
20756
20757CALL sp10(-1.00e+09);
20758
20759--disable_warnings ONCE
20760DROP PROCEDURE IF EXISTS sp11;
20761
20762delimiter //;
20763CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned)
20764BEGIN
20765   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20766  SELECT f1;
20767END//
20768delimiter ;//
20769
20770CALL sp11(99999999999);
20771
20772--disable_warnings ONCE
20773DROP PROCEDURE IF EXISTS sp12;
20774
20775delimiter //;
20776CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill)
20777BEGIN
20778   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20779  SELECT f1;
20780END//
20781delimiter ;//
20782
20783CALL sp12(999999999);
20784
20785--disable_warnings ONCE
20786DROP PROCEDURE IF EXISTS sp13;
20787
20788delimiter //;
20789CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill)
20790BEGIN
20791   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20792  SELECT f1;
20793END//
20794delimiter ;//
20795
20796CALL sp13(-1.00e+09);
20797
20798--disable_warnings ONCE
20799DROP PROCEDURE IF EXISTS sp14;
20800
20801delimiter //;
20802CREATE PROCEDURE sp14( f1 decimal (63, 30))
20803BEGIN
20804   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20805  SELECT f1;
20806END//
20807delimiter ;//
20808
20809CALL sp14(-1.00e+21);
20810
20811
20812--disable_warnings ONCE
20813DROP PROCEDURE IF EXISTS sp15;
20814
20815delimiter //;
20816CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned)
20817BEGIN
20818   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20819  SELECT f1;
20820END//
20821delimiter ;//
20822
20823CALL sp15(1.00e+16);
20824
20825
20826--disable_warnings ONCE
20827DROP PROCEDURE IF EXISTS sp16;
20828
20829delimiter //;
20830CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill)
20831BEGIN
20832   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20833  SELECT f1;
20834END//
20835delimiter ;//
20836
20837CALL sp16(1.00e+16);
20838
20839
20840--disable_warnings ONCE
20841DROP PROCEDURE IF EXISTS sp17;
20842
20843delimiter //;
20844CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill)
20845BEGIN
20846   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20847  SELECT f1;
20848END//
20849delimiter ;//
20850
20851CALL sp17(-1.00e+21);
20852
20853--disable_warnings ONCE
20854DROP PROCEDURE IF EXISTS sp18_d;
20855
20856delimiter //;
20857CREATE PROCEDURE sp18_d( f1 decimal (64))
20858BEGIN
20859   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20860  SELECT f1;
20861END//
20862delimiter ;//
20863
20864CALL sp18_d(-1.00e+30);
20865eval CALL sp18_d( $minus_30 );
20866
20867--disable_warnings ONCE
20868DROP PROCEDURE IF EXISTS sp19_du;
20869
20870delimiter //;
20871CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned)
20872BEGIN
20873   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20874  SELECT f1;
20875END//
20876delimiter ;//
20877
20878CALL sp19_du(1.00e+20);
20879eval CALL sp19_du( $plus_20 );
20880CALL sp19_du(1.00e+24);
20881eval CALL sp19_du( $plus_24 );
20882
20883--disable_warnings ONCE
20884DROP PROCEDURE IF EXISTS sp20_duz;
20885
20886delimiter //;
20887CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill)
20888BEGIN
20889   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20890  SELECT f1;
20891END//
20892delimiter ;//
20893
20894CALL sp20_duz(1.00e+20);
20895eval CALL sp20_duz( $plus_20 );
20896CALL sp20_duz(1.00e+24);
20897eval CALL sp20_duz( $plus_24 );
20898
20899--disable_warnings ONCE
20900DROP PROCEDURE IF EXISTS sp21;
20901
20902delimiter //;
20903CREATE PROCEDURE sp21( f1 decimal (64) zerofill)
20904BEGIN
20905   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20906  SELECT f1;
20907END//
20908delimiter ;//
20909
20910CALL sp21(1.00e+00);
20911
20912--disable_warnings ONCE
20913DROP PROCEDURE IF EXISTS sp22;
20914
20915delimiter //;
20916CREATE PROCEDURE sp22( f1 decimal unsigned)
20917BEGIN
20918   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20919  SELECT f1;
20920END//
20921delimiter ;//
20922
20923CALL sp22(1.00e+00);
20924
20925--disable_warnings ONCE
20926DROP PROCEDURE IF EXISTS sp23;
20927
20928delimiter //;
20929CREATE PROCEDURE sp23( f1 decimal unsigned zerofill)
20930BEGIN
20931   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20932  SELECT f1;
20933END//
20934delimiter ;//
20935
20936CALL sp23(1.00e+00);
20937
20938--disable_warnings ONCE
20939DROP PROCEDURE IF EXISTS sp24;
20940
20941delimiter //;
20942CREATE PROCEDURE sp24( f1 decimal zerofill)
20943BEGIN
20944   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20945  SELECT f1;
20946END//
20947delimiter ;//
20948
20949CALL sp24(-1.00e+09);
20950
20951--disable_warnings ONCE
20952DROP PROCEDURE IF EXISTS sp25;
20953
20954delimiter //;
20955CREATE PROCEDURE sp25( f1 double)
20956BEGIN
20957   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20958  SELECT f1;
20959END//
20960delimiter ;//
20961
20962CALL sp25(1.00e+00);
20963
20964--disable_warnings ONCE
20965DROP PROCEDURE IF EXISTS sp26;
20966
20967delimiter //;
20968CREATE PROCEDURE sp26( f1 double unsigned)
20969BEGIN
20970   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20971  SELECT f1;
20972END//
20973delimiter ;//
20974
20975CALL sp26(1.00e+00);
20976
20977--disable_warnings ONCE
20978DROP PROCEDURE IF EXISTS sp27;
20979
20980delimiter //;
20981CREATE PROCEDURE sp27( f1 double unsigned zerofill)
20982BEGIN
20983   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20984  SELECT f1;
20985END//
20986delimiter ;//
20987
20988CALL sp27(1.00e+00);
20989
20990--disable_warnings ONCE
20991DROP PROCEDURE IF EXISTS sp28;
20992
20993delimiter //;
20994CREATE PROCEDURE sp28( f1 double zerofill)
20995BEGIN
20996   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
20997  SELECT f1;
20998END//
20999delimiter ;//
21000
21001CALL sp28(1.00e+00);
21002
21003--disable_warnings ONCE
21004DROP PROCEDURE IF EXISTS sp29;
21005
21006delimiter //;
21007CREATE PROCEDURE sp29( f1 float)
21008BEGIN
21009   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21010  SELECT f1;
21011END//
21012delimiter ;//
21013
21014CALL sp29(1.00e+00);
21015
21016--disable_warnings ONCE
21017DROP PROCEDURE IF EXISTS sp30;
21018
21019delimiter //;
21020CREATE PROCEDURE sp30( f1 float unsigned)
21021BEGIN
21022   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21023  SELECT f1;
21024END//
21025delimiter ;//
21026
21027CALL sp30(1.00e+00);
21028
21029--disable_warnings ONCE
21030DROP PROCEDURE IF EXISTS sp31;
21031
21032delimiter //;
21033CREATE PROCEDURE sp31( f1 float unsigned zerofill)
21034BEGIN
21035   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21036  SELECT f1;
21037END//
21038delimiter ;//
21039
21040CALL sp31(1.00e+00);
21041
21042--disable_warnings ONCE
21043DROP PROCEDURE IF EXISTS sp32;
21044
21045delimiter //;
21046CREATE PROCEDURE sp32( f1 float zerofill)
21047BEGIN
21048   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21049  SELECT f1;
21050END//
21051delimiter ;//
21052
21053CALL sp32(1.00e+00);
21054
21055--disable_warnings ONCE
21056DROP PROCEDURE IF EXISTS sp33;
21057
21058delimiter //;
21059CREATE PROCEDURE sp33( f1 float(0))
21060BEGIN
21061   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21062  SELECT f1;
21063END//
21064delimiter ;//
21065
21066CALL sp33(1.00e+00);
21067
21068--disable_warnings ONCE
21069DROP PROCEDURE IF EXISTS sp34;
21070
21071delimiter //;
21072CREATE PROCEDURE sp34( f1 float(0) unsigned)
21073BEGIN
21074   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21075  SELECT f1;
21076END//
21077delimiter ;//
21078
21079CALL sp34(1.00e+00);
21080
21081--disable_warnings ONCE
21082DROP PROCEDURE IF EXISTS sp35;
21083
21084delimiter //;
21085CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill)
21086BEGIN
21087   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21088  SELECT f1;
21089END//
21090delimiter ;//
21091
21092CALL sp35(1.00e+00);
21093
21094--disable_warnings ONCE
21095DROP PROCEDURE IF EXISTS sp36;
21096
21097delimiter //;
21098CREATE PROCEDURE sp36( f1 float(0) zerofill)
21099BEGIN
21100   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21101  SELECT f1;
21102END//
21103delimiter ;//
21104
21105CALL sp36(1.00e+00);
21106
21107--disable_warnings ONCE
21108DROP PROCEDURE IF EXISTS sp37;
21109
21110delimiter //;
21111CREATE PROCEDURE sp37( f1 float(23))
21112BEGIN
21113   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21114  SELECT f1;
21115END//
21116delimiter ;//
21117
21118CALL sp37(1.00e+00);
21119
21120--disable_warnings ONCE
21121DROP PROCEDURE IF EXISTS sp38;
21122
21123delimiter //;
21124CREATE PROCEDURE sp38( f1 float(23) unsigned)
21125BEGIN
21126   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21127  SELECT f1;
21128END//
21129delimiter ;//
21130
21131CALL sp38(1.00e+00);
21132
21133--disable_warnings ONCE
21134DROP PROCEDURE IF EXISTS sp39;
21135
21136delimiter //;
21137CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill)
21138BEGIN
21139   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21140  SELECT f1;
21141END//
21142delimiter ;//
21143
21144CALL sp39(1.00e+00);
21145
21146--disable_warnings ONCE
21147DROP PROCEDURE IF EXISTS sp40;
21148
21149delimiter //;
21150CREATE PROCEDURE sp40( f1 float(23) zerofill)
21151BEGIN
21152   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21153  SELECT f1;
21154END//
21155delimiter ;//
21156
21157CALL sp40(1.00e+00);
21158
21159--disable_warnings ONCE
21160DROP PROCEDURE IF EXISTS sp41;
21161
21162delimiter //;
21163CREATE PROCEDURE sp41( f1 float(24))
21164BEGIN
21165   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21166  SELECT f1;
21167END//
21168delimiter ;//
21169
21170CALL sp41(1.00e+00);
21171
21172--disable_warnings ONCE
21173DROP PROCEDURE IF EXISTS sp42;
21174
21175delimiter //;
21176CREATE PROCEDURE sp42( f1 float(24) unsigned)
21177BEGIN
21178   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21179  SELECT f1;
21180END//
21181delimiter ;//
21182
21183CALL sp42(1.00e+00);
21184
21185--disable_warnings ONCE
21186DROP PROCEDURE IF EXISTS sp43;
21187
21188delimiter //;
21189CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill)
21190BEGIN
21191   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21192  SELECT f1;
21193END//
21194delimiter ;//
21195
21196CALL sp43(1.00e+00);
21197
21198--disable_warnings ONCE
21199DROP PROCEDURE IF EXISTS sp44;
21200
21201delimiter //;
21202CREATE PROCEDURE sp44( f1 float(24) zerofill)
21203BEGIN
21204   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21205  SELECT f1;
21206END//
21207delimiter ;//
21208
21209CALL sp44(1.00e+00);
21210
21211--disable_warnings ONCE
21212DROP PROCEDURE IF EXISTS sp45;
21213
21214delimiter //;
21215CREATE PROCEDURE sp45( f1 float(53))
21216BEGIN
21217   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21218  SELECT f1;
21219END//
21220delimiter ;//
21221
21222CALL sp45(1.00e+00);
21223
21224--disable_warnings ONCE
21225DROP PROCEDURE IF EXISTS sp46;
21226
21227delimiter //;
21228CREATE PROCEDURE sp46( f1 float(53) unsigned)
21229BEGIN
21230   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21231  SELECT f1;
21232END//
21233delimiter ;//
21234
21235CALL sp46(1.00e+00);
21236
21237--disable_warnings ONCE
21238DROP PROCEDURE IF EXISTS sp47;
21239
21240delimiter //;
21241CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill)
21242BEGIN
21243   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21244  SELECT f1;
21245END//
21246delimiter ;//
21247
21248CALL sp47(1.00e+00);
21249
21250--disable_warnings ONCE
21251DROP PROCEDURE IF EXISTS sp48;
21252
21253delimiter //;
21254CREATE PROCEDURE sp48( f1 float(53) zerofill)
21255BEGIN
21256   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21257  SELECT f1;
21258END//
21259delimiter ;//
21260
21261CALL sp48(1.00e+00);
21262
21263--disable_warnings ONCE
21264DROP PROCEDURE IF EXISTS sp49;
21265
21266delimiter //;
21267CREATE PROCEDURE sp49( f1 int)
21268BEGIN
21269   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21270  SELECT f1;
21271END//
21272delimiter ;//
21273
21274CALL sp49(-2.15e+09);
21275
21276--disable_warnings ONCE
21277DROP PROCEDURE IF EXISTS sp50;
21278
21279delimiter //;
21280CREATE PROCEDURE sp50( f1 int unsigned)
21281BEGIN
21282   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21283  SELECT f1;
21284END//
21285delimiter ;//
21286
21287CALL sp50(4.29e+09);
21288
21289--disable_warnings ONCE
21290DROP PROCEDURE IF EXISTS sp51;
21291
21292delimiter //;
21293CREATE PROCEDURE sp51( f1 int unsigned zerofill)
21294BEGIN
21295   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21296  SELECT f1;
21297END//
21298delimiter ;//
21299
21300CALL sp51(4.29e+09);
21301
21302--disable_warnings ONCE
21303DROP PROCEDURE IF EXISTS sp52;
21304
21305delimiter //;
21306CREATE PROCEDURE sp52( f1 int zerofill)
21307BEGIN
21308   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21309  SELECT f1;
21310END//
21311delimiter ;//
21312
21313CALL sp52(2.15e+08);
21314
21315--disable_warnings ONCE
21316DROP PROCEDURE IF EXISTS sp53;
21317
21318delimiter //;
21319CREATE PROCEDURE sp53( f1 mediumint)
21320BEGIN
21321   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21322  SELECT f1;
21323END//
21324delimiter ;//
21325
21326CALL sp53(-8388600);
21327
21328--disable_warnings ONCE
21329DROP PROCEDURE IF EXISTS sp54;
21330
21331delimiter //;
21332CREATE PROCEDURE sp54( f1 mediumint unsigned)
21333BEGIN
21334   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21335  SELECT f1;
21336END//
21337delimiter ;//
21338
21339CALL sp54(16777201);
21340
21341--disable_warnings ONCE
21342DROP PROCEDURE IF EXISTS sp55;
21343
21344delimiter //;
21345CREATE PROCEDURE sp55( f1 mediumint unsigned zerofill)
21346BEGIN
21347   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21348  SELECT f1;
21349END//
21350delimiter ;//
21351
21352CALL sp55(16777210);
21353
21354--disable_warnings ONCE
21355DROP PROCEDURE IF EXISTS sp56;
21356
21357delimiter //;
21358CREATE PROCEDURE sp56( f1 mediumint zerofill)
21359BEGIN
21360   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21361  SELECT f1;
21362END//
21363delimiter ;//
21364
21365CALL sp56(-8388601);
21366
21367--disable_warnings ONCE
21368DROP PROCEDURE IF EXISTS sp57;
21369
21370delimiter //;
21371CREATE PROCEDURE sp57( f1 numeric)
21372BEGIN
21373   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21374  SELECT f1;
21375END//
21376delimiter ;//
21377
21378CALL sp57(-999999999);
21379
21380--disable_warnings ONCE
21381DROP PROCEDURE IF EXISTS sp58;
21382
21383delimiter //;
21384CREATE PROCEDURE sp58( f1 numeric (0))
21385BEGIN
21386   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21387  SELECT f1;
21388END//
21389delimiter ;//
21390
21391CALL sp58(-999999999);
21392
21393--disable_warnings ONCE
21394DROP PROCEDURE IF EXISTS sp59;
21395
21396delimiter //;
21397CREATE PROCEDURE sp59( f1 numeric (0) unsigned)
21398BEGIN
21399   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21400  SELECT f1;
21401END//
21402delimiter ;//
21403
21404CALL sp59(9999999999);
21405
21406--disable_warnings ONCE
21407DROP PROCEDURE IF EXISTS sp60;
21408
21409delimiter //;
21410CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill)
21411BEGIN
21412   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21413  SELECT f1;
21414END//
21415delimiter ;//
21416
21417CALL sp60(99999999);
21418
21419--disable_warnings ONCE
21420DROP PROCEDURE IF EXISTS sp61;
21421
21422delimiter //;
21423CREATE PROCEDURE sp61( f1 numeric (0) zerofill)
21424BEGIN
21425   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21426  SELECT f1;
21427END//
21428delimiter ;//
21429
21430CALL sp61(-99999999);
21431
21432--disable_warnings ONCE
21433DROP PROCEDURE IF EXISTS sp62;
21434
21435delimiter //;
21436CREATE PROCEDURE sp62( f1 numeric (0, 0))
21437BEGIN
21438   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21439  SELECT f1;
21440END//
21441delimiter ;//
21442
21443CALL sp62(-999999999);
21444
21445--disable_warnings ONCE
21446DROP PROCEDURE IF EXISTS sp63;
21447
21448delimiter //;
21449CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned)
21450BEGIN
21451   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21452  SELECT f1;
21453END//
21454delimiter ;//
21455
21456CALL sp63(9999999999);
21457
21458
21459--disable_warnings ONCE
21460DROP PROCEDURE IF EXISTS sp64;
21461
21462delimiter //;
21463CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill)
21464BEGIN
21465   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21466  SELECT f1;
21467END//
21468delimiter ;//
21469
21470CALL sp64(99999999);
21471
21472
21473--disable_warnings ONCE
21474DROP PROCEDURE IF EXISTS sp65;
21475
21476delimiter //;
21477CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill)
21478BEGIN
21479   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21480  SELECT f1;
21481END//
21482delimiter ;//
21483
21484CALL sp65(-99999999);
21485
21486
21487--disable_warnings ONCE
21488DROP PROCEDURE IF EXISTS sp66_n;
21489
21490delimiter //;
21491CREATE PROCEDURE sp66_n( f1 numeric (63, 30))
21492BEGIN
21493   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21494  SELECT f1;
21495END//
21496delimiter ;//
21497
21498CALL sp66_n(-1e+36);
21499eval CALL sp66_n( $minus_36 );
21500
21501--disable_warnings ONCE
21502DROP PROCEDURE IF EXISTS sp67_nu;
21503
21504delimiter //;
21505CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned)
21506BEGIN
21507   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21508  SELECT f1;
21509END//
21510delimiter ;//
21511
21512CALL sp67_nu(1e+36);
21513eval CALL sp67_nu( $plus_36 );
21514
21515
21516--disable_warnings ONCE
21517DROP PROCEDURE IF EXISTS sp68_nuz;
21518
21519delimiter //;
21520CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill)
21521BEGIN
21522   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21523  SELECT f1;
21524END//
21525delimiter ;//
21526
21527CALL sp68_nuz(1e+36);
21528eval CALL sp68_nuz( $plus_36 );
21529
21530
21531--disable_warnings ONCE
21532DROP PROCEDURE IF EXISTS sp69_n_z;
21533
21534delimiter //;
21535CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill)
21536BEGIN
21537   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21538  SELECT f1;
21539END//
21540delimiter ;//
21541
21542CALL sp69_n_z(-1e+36);
21543eval CALL sp69_n_z( $minus_36 );
21544
21545
21546--disable_warnings ONCE
21547DROP PROCEDURE IF EXISTS sp70_n;
21548
21549delimiter //;
21550CREATE PROCEDURE sp70_n( f1 numeric (64))
21551BEGIN
21552   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21553  SELECT f1;
21554END//
21555delimiter ;//
21556
21557--disable_warnings ONCE
21558CALL sp70_n(-1e+40);
21559eval CALL sp70_n( $minus_40 );
21560
21561
21562--disable_warnings ONCE
21563DROP PROCEDURE IF EXISTS sp71_nu;
21564
21565delimiter //;
21566CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned)
21567BEGIN
21568   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21569  SELECT f1;
21570END//
21571delimiter ;//
21572
21573--disable_warnings ONCE
21574CALL sp71_nu(1.00e+40);
21575eval CALL sp71_nu( $plus_40 );
21576
21577
21578--disable_warnings ONCE
21579DROP PROCEDURE IF EXISTS sp72_nuz;
21580
21581delimiter //;
21582CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill)
21583BEGIN
21584   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21585  SELECT f1;
21586END//
21587delimiter ;//
21588
21589--disable_warnings ONCE
21590CALL sp72_nuz(1.00e+40);
21591eval CALL sp72_nuz( $plus_40 );
21592
21593
21594--disable_warnings ONCE
21595DROP PROCEDURE IF EXISTS sp73_n_z;
21596
21597delimiter //;
21598CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill)
21599BEGIN
21600   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21601  SELECT f1;
21602END//
21603delimiter ;//
21604
21605--disable_warnings ONCE
21606CALL sp73_n_z(1.00e+40);
21607eval CALL sp73_n_z( $plus_40 );
21608
21609
21610--disable_warnings ONCE
21611DROP PROCEDURE IF EXISTS sp74;
21612
21613delimiter //;
21614CREATE PROCEDURE sp74( f1 numeric unsigned)
21615BEGIN
21616   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21617  SELECT f1;
21618END//
21619delimiter ;//
21620
21621CALL sp74(999999999);
21622
21623--disable_warnings ONCE
21624DROP PROCEDURE IF EXISTS sp75;
21625
21626delimiter //;
21627CREATE PROCEDURE sp75( f1 numeric unsigned zerofill)
21628BEGIN
21629   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21630  SELECT f1;
21631END//
21632delimiter ;//
21633
21634CALL sp75(999999999);
21635
21636--disable_warnings ONCE
21637DROP PROCEDURE IF EXISTS sp76;
21638
21639delimiter //;
21640CREATE PROCEDURE sp76( f1 numeric zerofill)
21641BEGIN
21642   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21643  SELECT f1;
21644END//
21645delimiter ;//
21646
21647CALL sp76(-999999999);
21648
21649--disable_warnings ONCE
21650DROP PROCEDURE IF EXISTS sp77;
21651
21652delimiter //;
21653CREATE PROCEDURE sp77( f1 real)
21654BEGIN
21655   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21656  SELECT f1;
21657END//
21658delimiter ;//
21659
21660CALL sp77(1.1);
21661
21662--disable_warnings ONCE
21663DROP PROCEDURE IF EXISTS sp78;
21664
21665delimiter //;
21666CREATE PROCEDURE sp78( f1 real unsigned)
21667BEGIN
21668   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21669  SELECT f1;
21670END//
21671delimiter ;//
21672
21673CALL sp78(1.1);
21674
21675--disable_warnings ONCE
21676DROP PROCEDURE IF EXISTS sp79;
21677
21678delimiter //;
21679CREATE PROCEDURE sp79( f1 real unsigned zerofill)
21680BEGIN
21681   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21682  SELECT f1;
21683END//
21684delimiter ;//
21685
21686CALL sp79(1.1);
21687
21688--disable_warnings ONCE
21689DROP PROCEDURE IF EXISTS sp80;
21690
21691delimiter //;
21692CREATE PROCEDURE sp80( f1 real zerofill)
21693BEGIN
21694   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21695  SELECT f1;
21696END//
21697delimiter ;//
21698
21699CALL sp80(1.1);
21700
21701--disable_warnings ONCE
21702DROP PROCEDURE IF EXISTS sp81;
21703
21704delimiter //;
21705CREATE PROCEDURE sp81( f1 smallint)
21706BEGIN
21707   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21708  SELECT f1;
21709END//
21710delimiter ;//
21711
21712CALL sp81(-32701);
21713
21714--disable_warnings ONCE
21715DROP PROCEDURE IF EXISTS sp82;
21716
21717delimiter //;
21718CREATE PROCEDURE sp82( f1 smallint unsigned)
21719BEGIN
21720   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21721  SELECT f1;
21722END//
21723delimiter ;//
21724
21725CALL sp82(65531);
21726
21727--disable_warnings ONCE
21728DROP PROCEDURE IF EXISTS sp83;
21729
21730delimiter //;
21731CREATE PROCEDURE sp83( f1 smallint unsigned zerofill)
21732BEGIN
21733   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21734  SELECT f1;
21735END//
21736delimiter ;//
21737
21738CALL sp83(65531);
21739
21740--disable_warnings ONCE
21741DROP PROCEDURE IF EXISTS sp84;
21742
21743delimiter //;
21744CREATE PROCEDURE sp84( f1 smallint zerofill)
21745BEGIN
21746   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21747  SELECT f1;
21748END//
21749delimiter ;//
21750
21751CALL sp84(-32601);
21752
21753--disable_warnings ONCE
21754DROP PROCEDURE IF EXISTS sp85;
21755
21756delimiter //;
21757CREATE PROCEDURE sp85( f1 tinyint)
21758BEGIN
21759   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21760  SELECT f1;
21761END//
21762delimiter ;//
21763
21764CALL sp85(-115);
21765
21766--disable_warnings ONCE
21767DROP PROCEDURE IF EXISTS sp86;
21768
21769delimiter //;
21770CREATE PROCEDURE sp86( f1 tinyint unsigned)
21771BEGIN
21772   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21773  SELECT f1;
21774END//
21775delimiter ;//
21776
21777CALL sp86(251);
21778
21779--disable_warnings ONCE
21780DROP PROCEDURE IF EXISTS sp87;
21781
21782delimiter //;
21783CREATE PROCEDURE sp87( f1 tinyint unsigned zerofill)
21784BEGIN
21785   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21786  SELECT f1;
21787END//
21788delimiter ;//
21789
21790CALL sp87(201);
21791
21792--disable_warnings ONCE
21793DROP PROCEDURE IF EXISTS sp88;
21794
21795delimiter //;
21796CREATE PROCEDURE sp88( f1 tinyint zerofill)
21797BEGIN
21798   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
21799  SELECT f1;
21800END//
21801delimiter ;//
21802
21803CALL sp88(-101);
21804
21805--disable_warnings ONCE
21806DROP PROCEDURE IF EXISTS sp89;
21807
21808delimiter //;
21809CREATE PROCEDURE sp89( f1 enum('1enum', '2enum'))
21810BEGIN
21811 IF f1 = '1enum' THEN set f1 = '2enum'; ELSE  set f1 = '1enum'; END IF;
21812END//
21813delimiter ;//
21814
21815CALL sp89( '1enum');
21816
21817--disable_warnings ONCE
21818DROP PROCEDURE IF EXISTS sp90;
21819
21820delimiter //;
21821CREATE PROCEDURE sp90( f1 set('1set', '2set'))
21822BEGIN
21823 IF f1 = '1set' THEN  set f1 = '2set';  ELSE set f1 = '1set'; END IF;
21824END//
21825delimiter ;//
21826
21827CALL sp90( '1set');
21828
21829--disable_warnings ONCE
21830DROP PROCEDURE IF EXISTS sp91;
21831
21832delimiter //;
21833CREATE PROCEDURE sp91( f1 date)
21834BEGIN
21835  set f1 = adddate(f1, interval 31 day);
21836  SELECT f1;
21837END//
21838delimiter ;//
21839
21840CALL sp91( '1997-12-31');
21841
21842--disable_warnings ONCE
21843DROP PROCEDURE IF EXISTS sp92;
21844
21845delimiter //;
21846CREATE PROCEDURE sp92( f1 time)
21847BEGIN
21848  set f1 = addtime(f1, '02:00:00.999998');
21849  SELECT f1;
21850END//
21851delimiter ;//
21852
21853CALL sp92( '23:59:59.999999');
21854
21855--disable_warnings ONCE
21856DROP PROCEDURE IF EXISTS sp93;
21857
21858delimiter //;
21859CREATE PROCEDURE sp93( f1 datetime)
21860BEGIN
21861  set f1 = addtime(f1, '1 1:1:1.000002');
21862  SELECT f1;
21863END//
21864delimiter ;//
21865
21866CALL sp93('1997-12-31 23:59:59.999999');
21867
21868--disable_warnings ONCE
21869DROP PROCEDURE IF EXISTS sp94;
21870
21871delimiter //;
21872CREATE PROCEDURE sp94( f1 char)
21873BEGIN
21874  set f1 = concat('a', f1);
21875  SELECT f1;
21876END//
21877delimiter ;//
21878
21879CALL sp94( 'h');
21880
21881--disable_warnings ONCE
21882DROP PROCEDURE IF EXISTS sp95;
21883
21884delimiter //;
21885CREATE PROCEDURE sp95( f1 char ascii)
21886BEGIN
21887  set f1 = concat('a', f1);
21888  SELECT f1;
21889END//
21890delimiter ;//
21891
21892CALL sp95( 'h');
21893
21894
21895--disable_warnings ONCE
21896DROP PROCEDURE IF EXISTS sp96;
21897
21898delimiter //;
21899CREATE PROCEDURE sp96( f1 char binary)
21900BEGIN
21901  set f1 = concat('a', f1);
21902  SELECT f1;
21903END//
21904delimiter ;//
21905
21906CALL sp96( 'h');
21907
21908
21909--disable_warnings ONCE
21910DROP PROCEDURE IF EXISTS sp97;
21911
21912delimiter //;
21913CREATE PROCEDURE sp97( f1 longtext)
21914BEGIN
21915  set f1 = concat('hello', f1);
21916  SELECT f1;
21917END//
21918delimiter ;//
21919
21920CALL sp97( 'world');
21921
21922--disable_warnings ONCE
21923DROP PROCEDURE IF EXISTS sp98;
21924
21925delimiter //;
21926CREATE PROCEDURE sp98( f1 mediumtext)
21927BEGIN
21928  set f1 = concat('hello', f1);
21929  SELECT f1;
21930END//
21931delimiter ;//
21932
21933CALL sp98( 'world');
21934
21935--disable_warnings ONCE
21936DROP PROCEDURE IF EXISTS sp99;
21937
21938delimiter //;
21939CREATE PROCEDURE sp99( f1 text)
21940BEGIN
21941  set f1 = concat('hello', f1);
21942  SELECT f1;
21943END//
21944delimiter ;//
21945
21946CALL sp99( 'world');
21947
21948--disable_warnings ONCE
21949DROP PROCEDURE IF EXISTS sp100;
21950
21951delimiter //;
21952CREATE PROCEDURE sp100( f1 tinytext)
21953BEGIN
21954  set f1 = concat('hello', f1);
21955  SELECT f1;
21956END//
21957delimiter ;//
21958
21959CALL sp100( 'world');
21960
21961--disable_warnings ONCE
21962DROP PROCEDURE IF EXISTS sp101;
21963
21964delimiter //;
21965CREATE PROCEDURE sp101( f1 year)
21966BEGIN
21967  set f1 = f1 + 10;
21968  SELECT f1;
21969END//
21970delimiter ;//
21971
21972CALL sp101(51);
21973
21974--disable_warnings ONCE
21975DROP PROCEDURE IF EXISTS sp102;
21976
21977delimiter //;
21978CREATE PROCEDURE sp102( f1 year(4))
21979BEGIN
21980  set f1 = f1 + 51;
21981  SELECT f1;
21982END//
21983delimiter ;//
21984
21985CALL sp102(1982);
21986
21987--disable_warnings ONCE
21988DROP PROCEDURE IF EXISTS sp103;
21989
21990delimiter //;
21991CREATE PROCEDURE sp103( f1 geometrycollection)
21992BEGIN
21993  set f1 = f1;
21994  SELECT f1;
21995END//
21996delimiter ;//
21997
21998CALL sp103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
21999
22000--disable_warnings ONCE
22001DROP PROCEDURE IF EXISTS sp104;
22002
22003delimiter //;
22004CREATE PROCEDURE sp104( f1 linestring)
22005BEGIN
22006  set f1 = f1;
22007  SELECT f1;
22008END//
22009delimiter ;//
22010
22011CALL sp104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@');
22012
22013--disable_warnings ONCE
22014DROP PROCEDURE IF EXISTS sp105;
22015
22016delimiter //;
22017CREATE PROCEDURE sp105( f1 point)
22018BEGIN
22019  set f1 = f1;
22020  SELECT f1;
22021END//
22022delimiter ;//
22023
22024CALL sp105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@');
22025
22026--disable_warnings ONCE
22027DROP PROCEDURE IF EXISTS sp106;
22028
22029delimiter //;
22030CREATE PROCEDURE sp106( f1 polygon)
22031BEGIN
22032  set f1 = f1;
22033  SELECT f1;
22034END//
22035delimiter ;//
22036
22037CALL sp106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@');
22038
22039--disable_warnings ONCE
22040DROP PROCEDURE IF EXISTS sp107;
22041
22042delimiter //;
22043CREATE PROCEDURE sp107( f1 timestamp)
22044BEGIN
22045  set f1 = now() + 0 + f1;
22046  SELECT f1;
22047END//
22048delimiter ;//
22049
22050--replace_column 1 returned
22051CALL sp107(2.00e+13);
22052
22053USE db_storedproc;
22054DROP DATABASE db1;
22055
22056
22057# ==============================================================================
22058# test plan section: 4.5 - parameter checks - multiple data types in stored procedure and functions
22059# ==============================================================================
22060
22061--disable_warnings ONCE
22062DROP DATABASE IF EXISTS db1;
22063
22064CREATE DATABASE db1;
22065USE db1;
22066
22067--disable_warnings
22068DROP PROCEDURE IF EXISTS sp1;
22069delimiter //;
22070CREATE PROCEDURE sp1( in f1 year, inout f2 year, out f3 year, in f4 year,
22071                     inout f5 year, out f6 year, in f7 year(4), inout f8 year(4),
22072                     out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
22073BEGIN
22074  set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
22075  set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
22076  set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
22077  set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
22078  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22079END//
22080delimiter ;//
22081
22082DROP PROCEDURE IF EXISTS spexecute01;
22083delimiter //;
22084CREATE PROCEDURE spexecute01()
22085BEGIN
22086  declare var1 year;
22087  declare var2 year;
22088  declare var3 year;
22089  declare var4 year;
22090  declare var5 year(4);
22091  declare var6 year(4);
22092  declare var7 year(4);
22093  declare var8 year(4);
22094  set var1 = 51;
22095  set var3 = 51;
22096  set var5 = 1982;
22097  set var7 = 1982;
22098  CALL sp1(51, var1, var2, 51, var3, var4, 1982, var5, var6, 1982, var7, var8);
22099  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22100END//
22101delimiter ;//
22102
22103CALL spexecute01();
22104DROP PROCEDURE spexecute01;
22105DROP PROCEDURE sp1;
22106
22107
22108DROP PROCEDURE IF EXISTS sp2;
22109delimiter //;
22110CREATE PROCEDURE sp2( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text,
22111                     out f6 text, in f7 tinytext, inout f8 tinytext, out f9 tinytext,
22112                     in f10 tinytext, inout f11 tinytext, out f12 tinytext)
22113BEGIN
22114  set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
22115  set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
22116  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
22117  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
22118  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22119END//
22120delimiter ;//
22121
22122DROP PROCEDURE IF EXISTS spexecute02;
22123delimiter //;
22124CREATE PROCEDURE spexecute02()
22125BEGIN
22126  declare var1 text;
22127  declare var2 text;
22128  declare var3 text;
22129  declare var4 text;
22130  declare var5 tinytext;
22131  declare var6 tinytext;
22132  declare var7 tinytext;
22133  declare var8 tinytext;
22134  set var1 =  'world';
22135  set var3 =  'world';
22136  set var5 =  'world';
22137  set var7 =  'world';
22138  CALL sp2( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
22139  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22140END//
22141delimiter ;//
22142
22143CALL spexecute02();
22144DROP PROCEDURE spexecute02;
22145DROP PROCEDURE sp2;
22146
22147
22148DROP PROCEDURE IF EXISTS sp3;
22149delimiter //;
22150CREATE PROCEDURE sp3( in f1 char, inout f2 char, out f3 char, in f4 char ascii,
22151                     inout f5 char ascii, out f6 char ascii, in f7 longtext,
22152                     inout f8 longtext, out f9 longtext, in f10 mediumtext,
22153                     inout f11 mediumtext, out f12 mediumtext)
22154BEGIN
22155  set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
22156  set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
22157  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f9);
22158  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
22159  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22160END//
22161delimiter ;//
22162
22163DROP PROCEDURE IF EXISTS spexecute03;
22164delimiter //;
22165CREATE PROCEDURE spexecute03()
22166BEGIN
22167  declare var1 char;
22168  declare var2 char;
22169  declare var3 char ascii;
22170  declare var4 char ascii;
22171  declare var5 longtext;
22172  declare var6 longtext;
22173  declare var7 mediumtext;
22174  declare var8 mediumtext;
22175  set var1 =  'h';
22176  set var3 =  'h';
22177  set var5 =  'world';
22178  set var7 =  'world';
22179  CALL sp3( 'h', var1, var2, 'h', var3, var4, 'world', var5, var6, 'world', var7, var8);
22180  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22181END//
22182delimiter ;//
22183
22184CALL spexecute03();
22185
22186DROP PROCEDURE spexecute03;
22187DROP PROCEDURE sp3;
22188
22189
22190DROP PROCEDURE IF EXISTS sp4;
22191delimiter //;
22192CREATE PROCEDURE sp4( in f1 bigint, inout f2 bigint, out f3 bigint,
22193                     in f4 bigint, inout f5 bigint, out f6 bigint,
22194                     in f7 bigint, inout f8 bigint, out f9 bigint,
22195                     in f10 bigint, inout f11 bigint, out f12 bigint)
22196BEGIN
22197   set f3 = f2;
22198   set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
22199   set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
22200   set f6 = f5;
22201   set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
22202   set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22203   set f9 = f8;
22204   set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
22205   set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22206   set f12 = f11;
22207   set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
22208   set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22209  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22210END//
22211delimiter ;//
22212
22213DROP PROCEDURE IF EXISTS spexecute04;
22214delimiter //;
22215CREATE PROCEDURE spexecute04()
22216BEGIN
22217  declare var1 bigint;
22218  declare var2 bigint;
22219  declare var3 bigint;
22220  declare var4 bigint;
22221  declare var5 bigint;
22222  declare var6 bigint;
22223  declare var7 bigint;
22224  declare var8 bigint;
22225  set var1 = -9.22e+18;
22226  set var3 = -9.22e+18;
22227  set var5 = -9.22e+18;
22228  set var7 = -9.22e+18;
22229  CALL sp4(-9.22e+18, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22230  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22231END//
22232delimiter ;//
22233
22234CALL spexecute04();
22235DROP PROCEDURE spexecute04;
22236DROP PROCEDURE sp4;
22237
22238# sp5 removed
22239
22240DROP PROCEDURE IF EXISTS sp6;
22241delimiter //;
22242CREATE PROCEDURE sp6( in f1 timestamp, inout f2 timestamp, out f3 timestamp, in f4 timestamp, inout f5 timestamp, out f6 timestamp, in f7 timestamp, inout f8 timestamp, out f9 timestamp, in f10 timestamp, inout f11 timestamp, out f12 timestamp)
22243BEGIN
22244  set f1 = now() + 0 + f1; set f2 = now() + 0 + f2; set f3 = now() + 0 + f1;
22245  set f4 = now() + 0 + f4; set f5 = now() + 0 + f5; set f6 = now() + 0 + f5;
22246  set f7 = now() + 0 + f7; set f8 = now() + 0 + f8; set f9 = now() + 0 + f8;
22247  set f10 = now() + 0 + f10; set f11 = now() + 0 + f11; set f12 = now() + 0 + f11;
22248  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22249END//
22250delimiter ;//
22251
22252DROP PROCEDURE IF EXISTS spexecute06;
22253delimiter //;
22254CREATE PROCEDURE spexecute06()
22255BEGIN
22256  declare var1 timestamp;
22257  declare var2 timestamp;
22258  declare var3 timestamp;
22259  declare var4 timestamp;
22260  declare var5 timestamp;
22261  declare var6 timestamp;
22262  declare var7 timestamp;
22263  declare var8 timestamp;
22264  set var1 = 2.00e+13;
22265  set var3 = 2.00e+13;
22266  set var5 = 2.00e+13;
22267  set var7 = 2.00e+13;
22268  CALL sp6(2.00e+13, var1, var2, 2.00e+13, var3, var4, 2.00e+13, var5, var6, 2.00e+13, var7, var8);
22269END//
22270delimiter ;//
22271
22272--replace_column 1 returned 2 returned 3 returned 4 returned 5 returned 6 returned 7 returned 8 returned 9 returned 10 returned 11 returned 12 returned
22273CALL spexecute06();
22274DROP PROCEDURE spexecute06;
22275DROP PROCEDURE sp6;
22276
22277
22278DROP PROCEDURE IF EXISTS sp07;
22279delimiter //;
22280CREATE PROCEDURE sp07( IN  f1 BIGINT UNSIGNED,
22281                     INOUT f2 BIGINT UNSIGNED,
22282                     OUT   f3 BIGINT UNSIGNED,
22283                     IN    f4 BIGINT,
22284                     INOUT f5 BIGINT,
22285                     OUT   f6 BIGINT,
22286                     IN    f7 BIGINT,
22287                     INOUT f8 BIGINT,
22288                     OUT   f9 BIGINT,
22289                     IN    f10 BIGINT,
22290                     INOUT f11 BIGINT,
22291                     OUT   f12 BIGINT)
22292BEGIN
22293   SELECT f1, f2, f3;
22294   SELECT f4, f5, f6;
22295   SELECT f7, f8, f9;
22296   SELECT f10, f11, f12;
22297   set f3 = f2;
22298   set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
22299   set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
22300   set f3 = (f3 * 2); set f3 = (f3 - 10); set f3 = (f3 + 10);
22301   set f6 = f5;
22302   set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
22303   set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22304   set f9 = f8;
22305   set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
22306   set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22307   set f12 = f11;
22308   set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
22309   set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22310   SELECT f1, f2, f3;
22311   SELECT f4, f5, f6;
22312   SELECT f7, f8, f9;
22313   SELECT f10, f11, f12;
22314END//
22315delimiter ;//
22316
22317DROP PROCEDURE IF EXISTS spexecute07;
22318delimiter //;
22319CREATE PROCEDURE spexecute07()
22320BEGIN
22321  declare var1 bigint unsigned;
22322  declare var2 bigint unsigned;
22323  declare var3 bigint;
22324  declare var4 bigint;
22325  declare var5 bigint;
22326  declare var6 bigint;
22327  declare var7 bigint;
22328  declare var8 bigint;
22329  set var1 =  1.84e+19;
22330  set var3 = -9.22e+18;
22331  set var5 = -9.22e+18;
22332  set var7 = -9.22e+18;
22333  SELECT var1, var2;
22334  SELECT var3, var4;
22335  SELECT var5, var6;
22336  SELECT var7, var8;
22337  CALL sp07( var1, var1, var2, var3, var3, var4,
22338             var5, var5, var6, var7, var7, var8 );
22339  SELECT var1, var2;
22340  SELECT var3, var4;
22341  SELECT var5, var6;
22342  SELECT var7, var8;
22343END//
22344delimiter ;//
22345
22346CALL spexecute07();
22347DROP PROCEDURE spexecute07;
22348DROP PROCEDURE sp07;
22349
22350
22351DROP PROCEDURE IF EXISTS sp8;
22352delimiter //;
22353CREATE PROCEDURE sp8( in   f1 bigint unsigned zerofill,
22354                     inout f2 bigint unsigned zerofill,
22355                     out   f3 bigint unsigned zerofill,
22356                     in    f4 bigint,
22357                     inout f5 bigint,
22358                     out   f6 bigint,
22359                     in    f7 bigint,
22360                     inout f8 bigint,
22361                     out   f9 bigint,
22362                     in    f10 bigint,
22363                     inout f11 bigint,
22364                     out   f12 bigint)
22365BEGIN
22366   set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
22367   set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
22368   set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22369   set f6 = f5;
22370   set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
22371   set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22372   set f9 = f8;
22373   set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
22374   set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22375   set f12 = f11;
22376   set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
22377   set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22378   SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22379END//
22380delimiter ;//
22381
22382DROP PROCEDURE IF EXISTS spexecute08;
22383delimiter //;
22384CREATE PROCEDURE spexecute08()
22385BEGIN
22386   declare var1 bigint unsigned zerofill;
22387   declare var2 bigint unsigned zerofill;
22388   declare var3 bigint;
22389   declare var4 bigint;
22390   declare var5 bigint;
22391   declare var6 bigint;
22392   declare var7 bigint;
22393   declare var8 bigint;
22394   set var1 = 1.84e+17;
22395   set var3 = -9.22e+18;
22396   set var5 = -9.22e+18;
22397   set var7 = -9.22e+18;
22398   CALL sp8(1.84e+17, var1, var2, -9.22e+18, var3, var4,
22399                      -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22400   SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22401END//
22402delimiter ;//
22403
22404CALL spexecute08();
22405DROP PROCEDURE spexecute08;
22406DROP PROCEDURE sp8;
22407
22408
22409DROP PROCEDURE IF EXISTS sp9;
22410delimiter //;
22411CREATE PROCEDURE sp9( in   f1 bigint zerofill,
22412                     inout f2 bigint zerofill,
22413                     out   f3 bigint zerofill,
22414                     in    f4 bigint,
22415                     inout f5 bigint,
22416                     out   f6 bigint,
22417                     in    f7 bigint,
22418                     inout f8 bigint,
22419                     out   f9 bigint,
22420                     in    f10 bigint,
22421                     inout f11 bigint,
22422                     out   f12 bigint)
22423BEGIN
22424   set f3 = f2;
22425   set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10);
22426   set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10);
22427   set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22428   set f6 = f5;
22429   set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10);
22430   set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22431   set f9 = f8;
22432   set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10);
22433   set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22434   set f12 = f11;
22435   set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10);
22436   set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22437   SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22438END//
22439delimiter ;//
22440
22441DROP PROCEDURE IF EXISTS spexecute09;
22442delimiter //;
22443CREATE PROCEDURE spexecute09()
22444BEGIN
22445   declare var1 bigint zerofill;
22446   declare var2 bigint zerofill;
22447   declare var3 bigint;
22448   declare var4 bigint;
22449   declare var5 bigint;
22450   declare var6 bigint;
22451   declare var7 bigint;
22452   declare var8 bigint;
22453   set var1 = -9.22e+15;
22454   set var3 = -9.22e+18;
22455   set var5 = -9.22e+18;
22456   set var7 = -9.22e+18;
22457   CALL sp9(-9.22e+15, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22458   SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22459END//
22460delimiter ;//
22461
22462CALL spexecute09();
22463DROP PROCEDURE spexecute09;
22464DROP PROCEDURE sp9;
22465
22466
22467DROP PROCEDURE IF EXISTS sp10;
22468delimiter //;
22469CREATE PROCEDURE sp10( in f1 decimal,
22470                      inout f2 decimal,
22471                      out f3 decimal,
22472                      in f4 bigint,
22473                      inout f5 bigint,
22474                      out f6 bigint,
22475                      in f7 bigint,
22476                      inout f8 bigint,
22477                      out f9 bigint,
22478                      in f10 bigint,
22479                      inout f11 bigint,
22480                      out f12 bigint)
22481BEGIN
22482   set f3 = f2;
22483   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22484   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22485   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22486   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22487  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22488END//
22489delimiter ;//
22490
22491DROP PROCEDURE IF EXISTS spexecute10;
22492delimiter //;
22493CREATE PROCEDURE spexecute10()
22494BEGIN
22495   declare var1 decimal;
22496   declare var2 decimal;
22497   declare var3 bigint;
22498   declare var4 bigint;
22499   declare var5 bigint;
22500   declare var6 bigint;
22501   declare var7 bigint;
22502   declare var8 bigint;
22503   set var1 = -1.00e+09;
22504   set var3 = -9.22e+18;
22505   set var5 = -9.22e+18;
22506   set var7 = -9.22e+18;
22507   CALL sp10(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22508   SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22509END//
22510delimiter ;//
22511
22512CALL spexecute10();
22513DROP PROCEDURE spexecute10;
22514DROP PROCEDURE sp10;
22515
22516
22517DROP PROCEDURE IF EXISTS sp11;
22518delimiter //;
22519CREATE PROCEDURE sp11( in f1 decimal (0), inout f2 decimal (0), out f3 decimal (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22520BEGIN
22521   set f3 = f2;
22522   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22523   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22524   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22525   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22526   SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22527END//
22528delimiter ;//
22529
22530DROP PROCEDURE IF EXISTS spexecute11;
22531delimiter //;
22532CREATE PROCEDURE spexecute11()
22533BEGIN
22534  declare var1 decimal (0);
22535  declare var2 decimal (0);
22536  declare var3 bigint;
22537  declare var4 bigint;
22538  declare var5 bigint;
22539  declare var6 bigint;
22540  declare var7 bigint;
22541  declare var8 bigint;
22542  set var1 = --1.00e+09;
22543  set var3 = -9.22e+18;
22544  set var5 = -9.22e+18;
22545  set var7 = -9.22e+18;
22546  CALL sp11(--1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22547  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22548END//
22549delimiter ;//
22550
22551CALL spexecute11();
22552DROP PROCEDURE spexecute11;
22553DROP PROCEDURE sp11;
22554
22555
22556DROP PROCEDURE IF EXISTS sp12;
22557delimiter //;
22558CREATE PROCEDURE sp12( in f1 decimal (0) unsigned, inout f2 decimal (0) unsigned, out f3 decimal (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22559BEGIN
22560   set f3 = f2;
22561   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22562   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22563   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22564   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22565  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22566END//
22567delimiter ;//
22568
22569DROP PROCEDURE IF EXISTS spexecute12;
22570delimiter //;
22571CREATE PROCEDURE spexecute12()
22572BEGIN
22573  declare var1 decimal (0) unsigned;
22574  declare var2 decimal (0) unsigned;
22575  declare var3 bigint;
22576  declare var4 bigint;
22577  declare var5 bigint;
22578  declare var6 bigint;
22579  declare var7 bigint;
22580  declare var8 bigint;
22581  set var1 = 99999999999;
22582  set var3 = -9.22e+18;
22583  set var5 = -9.22e+18;
22584  set var7 = -9.22e+18;
22585  CALL sp12(99999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22586  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22587END//
22588delimiter ;//
22589
22590CALL spexecute12();
22591DROP PROCEDURE spexecute12;
22592DROP PROCEDURE sp12;
22593
22594
22595DROP PROCEDURE IF EXISTS sp13;
22596delimiter //;
22597CREATE PROCEDURE sp13( in f1 decimal (0, 0) zerofill, inout f2 decimal (0, 0) zerofill, out f3 decimal (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22598BEGIN
22599   set f3 = f2;
22600   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22601   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22602   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22603   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22604  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22605END//
22606delimiter ;//
22607
22608DROP PROCEDURE IF EXISTS spexecute13;
22609delimiter //;
22610CREATE PROCEDURE spexecute13()
22611BEGIN
22612  declare var1 decimal (0, 0) zerofill;
22613  declare var2 decimal (0, 0) zerofill;
22614  declare var3 bigint;
22615  declare var4 bigint;
22616  declare var5 bigint;
22617  declare var6 bigint;
22618  declare var7 bigint;
22619  declare var8 bigint;
22620  set var1 = -1.00e+09;
22621  set var3 = -9.22e+18;
22622  set var5 = -9.22e+18;
22623  set var7 = -9.22e+18;
22624  CALL sp13(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22625  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22626END//
22627delimiter ;//
22628
22629CALL spexecute13();
22630DROP PROCEDURE spexecute13;
22631DROP PROCEDURE sp13;
22632
22633
22634DROP PROCEDURE IF EXISTS sp14;
22635delimiter //;
22636CREATE PROCEDURE sp14( in f1 decimal (63, 30), inout f2 decimal (63, 30), out f3 decimal (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22637BEGIN
22638   set f3 = f2;
22639   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22640   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22641   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22642   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22643  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22644END//
22645delimiter ;//
22646
22647DROP PROCEDURE IF EXISTS spexecute14;
22648delimiter //;
22649CREATE PROCEDURE spexecute14()
22650BEGIN
22651  declare var1 decimal (63, 30);
22652  declare var2 decimal (63, 30);
22653  declare var3 bigint;
22654  declare var4 bigint;
22655  declare var5 bigint;
22656  declare var6 bigint;
22657  declare var7 bigint;
22658  declare var8 bigint;
22659  set var1 = -1.00e+21;
22660  set var3 = -9.22e+18;
22661  set var5 = -9.22e+18;
22662  set var7 = -9.22e+18;
22663  CALL sp14(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22664  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22665END//
22666delimiter ;//
22667
22668CALL spexecute14();
22669DROP PROCEDURE spexecute14;
22670DROP PROCEDURE sp14;
22671
22672
22673DROP PROCEDURE IF EXISTS sp15;
22674delimiter //;
22675CREATE PROCEDURE sp15( in f1 double, inout f2 double, out f3 double, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22676BEGIN
22677   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22678   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22679   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22680   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22681  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22682END//
22683delimiter ;//
22684
22685DROP PROCEDURE IF EXISTS spexecute15;
22686delimiter //;
22687CREATE PROCEDURE spexecute15()
22688BEGIN
22689  declare var1 double;
22690  declare var2 double;
22691  declare var3 bigint;
22692  declare var4 bigint;
22693  declare var5 bigint;
22694  declare var6 bigint;
22695  declare var7 bigint;
22696  declare var8 bigint;
22697  set var1 = 1.00e+00;
22698  set var3 = -9.22e+18;
22699  set var5 = -9.22e+18;
22700  set var7 = -9.22e+18;
22701  CALL sp15(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22702  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22703END//
22704delimiter ;//
22705
22706CALL spexecute15();
22707DROP PROCEDURE spexecute15;
22708DROP PROCEDURE sp15;
22709
22710
22711DROP PROCEDURE IF EXISTS sp16;
22712delimiter //;
22713CREATE PROCEDURE sp16( in f1 double zerofill, inout f2 double zerofill, out f3 double zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22714BEGIN
22715   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22716   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22717   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22718   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22719  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22720END//
22721delimiter ;//
22722
22723DROP PROCEDURE IF EXISTS spexecute16;
22724delimiter //;
22725CREATE PROCEDURE spexecute16()
22726BEGIN
22727  declare var1 double zerofill;
22728  declare var2 double zerofill;
22729  declare var3 bigint;
22730  declare var4 bigint;
22731  declare var5 bigint;
22732  declare var6 bigint;
22733  declare var7 bigint;
22734  declare var8 bigint;
22735  set var1 = 1.00e+00;
22736  set var3 = -9.22e+18;
22737  set var5 = -9.22e+18;
22738  set var7 = -9.22e+18;
22739  CALL sp16(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22740  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22741END//
22742delimiter ;//
22743
22744CALL spexecute16();
22745DROP PROCEDURE spexecute16;
22746DROP PROCEDURE sp16;
22747
22748
22749DROP PROCEDURE IF EXISTS sp17;
22750delimiter //;
22751CREATE PROCEDURE sp17( in f1 double unsigned, inout f2 double unsigned, out f3 double unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22752BEGIN
22753   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22754   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22755   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22756   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22757  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22758END//
22759delimiter ;//
22760
22761DROP PROCEDURE IF EXISTS spexecute17;
22762delimiter //;
22763CREATE PROCEDURE spexecute17()
22764BEGIN
22765  declare var1 double unsigned;
22766  declare var2 double unsigned;
22767  declare var3 bigint;
22768  declare var4 bigint;
22769  declare var5 bigint;
22770  declare var6 bigint;
22771  declare var7 bigint;
22772  declare var8 bigint;
22773  set var1 = 1.00e+00;
22774  set var3 = -9.22e+18;
22775  set var5 = -9.22e+18;
22776  set var7 = -9.22e+18;
22777  CALL sp17(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22778  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22779END//
22780delimiter ;//
22781
22782CALL spexecute17();
22783DROP PROCEDURE spexecute17;
22784DROP PROCEDURE sp17;
22785
22786
22787DROP PROCEDURE IF EXISTS sp18;
22788delimiter //;
22789CREATE PROCEDURE sp18( in f1 double unsigned zerofill, inout f2 double unsigned zerofill, out f3 double unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22790BEGIN
22791   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22792   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22793   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22794   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22795  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22796END//
22797delimiter ;//
22798
22799DROP PROCEDURE IF EXISTS spexecute18;
22800delimiter //;
22801CREATE PROCEDURE spexecute18()
22802BEGIN
22803  declare var1 double unsigned zerofill;
22804  declare var2 double unsigned zerofill;
22805  declare var3 bigint;
22806  declare var4 bigint;
22807  declare var5 bigint;
22808  declare var6 bigint;
22809  declare var7 bigint;
22810  declare var8 bigint;
22811  set var1 = 1.00e+00;
22812  set var3 = -9.22e+18;
22813  set var5 = -9.22e+18;
22814  set var7 = -9.22e+18;
22815  CALL sp18(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22816  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22817END//
22818delimiter ;//
22819
22820CALL spexecute18();
22821DROP PROCEDURE spexecute18;
22822DROP PROCEDURE sp18;
22823
22824
22825DROP PROCEDURE IF EXISTS sp19;
22826delimiter //;
22827CREATE PROCEDURE sp19( in f1 float unsigned, inout f2 float unsigned, out f3 float unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22828BEGIN
22829   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22830   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22831   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22832   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22833  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22834END//
22835delimiter ;//
22836
22837DROP PROCEDURE IF EXISTS spexecute19;
22838delimiter //;
22839CREATE PROCEDURE spexecute19()
22840BEGIN
22841  declare var1 float unsigned;
22842  declare var2 float unsigned;
22843  declare var3 bigint;
22844  declare var4 bigint;
22845  declare var5 bigint;
22846  declare var6 bigint;
22847  declare var7 bigint;
22848  declare var8 bigint;
22849  set var1 = 1.00e+00;
22850  set var3 = -9.22e+18;
22851  set var5 = -9.22e+18;
22852  set var7 = -9.22e+18;
22853  CALL sp19(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22854  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22855END//
22856delimiter ;//
22857
22858CALL spexecute19();
22859DROP PROCEDURE spexecute19;
22860DROP PROCEDURE sp19;
22861
22862
22863DROP PROCEDURE IF EXISTS sp20;
22864delimiter //;
22865CREATE PROCEDURE sp20( in f1 float unsigned zerofill, inout f2 float unsigned zerofill, out f3 float unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22866BEGIN
22867   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22868   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22869   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22870   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22871  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22872END//
22873delimiter ;//
22874
22875DROP PROCEDURE IF EXISTS spexecute20;
22876delimiter //;
22877CREATE PROCEDURE spexecute20()
22878BEGIN
22879  declare var1 float unsigned zerofill;
22880  declare var2 float unsigned zerofill;
22881  declare var3 bigint;
22882  declare var4 bigint;
22883  declare var5 bigint;
22884  declare var6 bigint;
22885  declare var7 bigint;
22886  declare var8 bigint;
22887  set var1 = 1.00e+00;
22888  set var3 = -9.22e+18;
22889  set var5 = -9.22e+18;
22890  set var7 = -9.22e+18;
22891  CALL sp20(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22892  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22893END//
22894delimiter ;//
22895
22896CALL spexecute20();
22897DROP PROCEDURE spexecute20;
22898DROP PROCEDURE sp20;
22899
22900
22901DROP PROCEDURE IF EXISTS sp21;
22902delimiter //;
22903CREATE PROCEDURE sp21( in f1 float zerofill, inout f2 float zerofill, out f3 float zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22904BEGIN
22905   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22906   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22907   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22908   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22909  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22910END//
22911delimiter ;//
22912
22913DROP PROCEDURE IF EXISTS spexecute21;
22914delimiter //;
22915CREATE PROCEDURE spexecute21()
22916BEGIN
22917  declare var1 float zerofill;
22918  declare var2 float zerofill;
22919  declare var3 bigint;
22920  declare var4 bigint;
22921  declare var5 bigint;
22922  declare var6 bigint;
22923  declare var7 bigint;
22924  declare var8 bigint;
22925  set var1 = 1.00e+00;
22926  set var3 = -9.22e+18;
22927  set var5 = -9.22e+18;
22928  set var7 = -9.22e+18;
22929  CALL sp21(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22930  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22931END//
22932delimiter ;//
22933
22934CALL spexecute21();
22935DROP PROCEDURE spexecute21;
22936DROP PROCEDURE sp21;
22937
22938
22939DROP PROCEDURE IF EXISTS sp22;
22940delimiter //;
22941CREATE PROCEDURE sp22( in f1 float(0), inout f2 float(0), out f3 float(0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22942BEGIN
22943   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22944   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22945   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22946   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22947  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22948END//
22949delimiter ;//
22950
22951DROP PROCEDURE IF EXISTS spexecute22;
22952delimiter //;
22953CREATE PROCEDURE spexecute22()
22954BEGIN
22955  declare var1 float(0);
22956  declare var2 float(0);
22957  declare var3 bigint;
22958  declare var4 bigint;
22959  declare var5 bigint;
22960  declare var6 bigint;
22961  declare var7 bigint;
22962  declare var8 bigint;
22963  set var1 = 1.00e+00;
22964  set var3 = -9.22e+18;
22965  set var5 = -9.22e+18;
22966  set var7 = -9.22e+18;
22967  CALL sp22(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
22968  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
22969END//
22970delimiter ;//
22971
22972CALL spexecute22();
22973DROP PROCEDURE spexecute22;
22974DROP PROCEDURE sp22;
22975
22976
22977DROP PROCEDURE IF EXISTS sp23;
22978delimiter //;
22979CREATE PROCEDURE sp23( in f1 numeric, inout f2 numeric, out f3 numeric, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
22980BEGIN
22981   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
22982   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
22983   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
22984   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
22985  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
22986END//
22987delimiter ;//
22988
22989DROP PROCEDURE IF EXISTS spexecute23;
22990delimiter //;
22991CREATE PROCEDURE spexecute23()
22992BEGIN
22993  declare var1 numeric;
22994  declare var2 numeric;
22995  declare var3 bigint;
22996  declare var4 bigint;
22997  declare var5 bigint;
22998  declare var6 bigint;
22999  declare var7 bigint;
23000  declare var8 bigint;
23001  set var1 = -999999999;
23002  set var3 = -9.22e+18;
23003  set var5 = -9.22e+18;
23004  set var7 = -9.22e+18;
23005  CALL sp23(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23006  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23007END//
23008delimiter ;//
23009
23010CALL spexecute23();
23011DROP PROCEDURE spexecute23;
23012DROP PROCEDURE sp23;
23013
23014
23015DROP PROCEDURE IF EXISTS sp24;
23016delimiter //;
23017CREATE PROCEDURE sp24( in f1 real, inout f2 real, out f3 real, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23018BEGIN
23019   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
23020   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23021   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23022   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23023  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23024END//
23025delimiter ;//
23026
23027DROP PROCEDURE IF EXISTS spexecute24;
23028delimiter //;
23029CREATE PROCEDURE spexecute24()
23030BEGIN
23031  declare var1 real;
23032  declare var2 real;
23033  declare var3 bigint;
23034  declare var4 bigint;
23035  declare var5 bigint;
23036  declare var6 bigint;
23037  declare var7 bigint;
23038  declare var8 bigint;
23039  set var1 = 1.1;
23040  set var3 = -9.22e+18;
23041  set var5 = -9.22e+18;
23042  set var7 = -9.22e+18;
23043  CALL sp24(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23044  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23045END//
23046delimiter ;//
23047
23048CALL spexecute24();
23049DROP PROCEDURE spexecute24;
23050DROP PROCEDURE sp24;
23051
23052
23053DROP PROCEDURE IF EXISTS sp25;
23054delimiter //;
23055CREATE PROCEDURE sp25( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23056BEGIN
23057   set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
23058   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23059   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23060   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23061  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23062END//
23063delimiter ;//
23064
23065DROP PROCEDURE IF EXISTS spexecute25;
23066delimiter //;
23067CREATE PROCEDURE spexecute25()
23068BEGIN
23069  declare var1 smallint;
23070  declare var2 smallint;
23071  declare var3 bigint;
23072  declare var4 bigint;
23073  declare var5 bigint;
23074  declare var6 bigint;
23075  declare var7 bigint;
23076  declare var8 bigint;
23077  set var1 = -32701;
23078  set var3 = -9.22e+18;
23079  set var5 = -9.22e+18;
23080  set var7 = -9.22e+18;
23081  CALL sp25(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23082  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23083END//
23084delimiter ;//
23085
23086CALL spexecute25();
23087DROP PROCEDURE spexecute25;
23088DROP PROCEDURE sp25;
23089
23090
23091DROP PROCEDURE IF EXISTS sp26;
23092delimiter //;
23093CREATE PROCEDURE sp26( in f1 date, inout f2 date, out f3 date, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23094BEGIN
23095  set f1 = adddate(f1, interval 31 day); set f2 = adddate(f2, interval 31 day); set f3 = adddate(f2, interval 31 day);
23096   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23097   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23098   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23099  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23100END//
23101delimiter ;//
23102
23103DROP PROCEDURE IF EXISTS spexecute26;
23104delimiter //;
23105CREATE PROCEDURE spexecute26()
23106BEGIN
23107  declare var1 date;
23108  declare var2 date;
23109  declare var3 bigint;
23110  declare var4 bigint;
23111  declare var5 bigint;
23112  declare var6 bigint;
23113  declare var7 bigint;
23114  declare var8 bigint;
23115  set var1 =  '1997-12-31';
23116  set var3 = -9.22e+18;
23117  set var5 = -9.22e+18;
23118  set var7 = -9.22e+18;
23119  CALL sp26( '1997-12-31', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23120  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23121END//
23122delimiter ;//
23123
23124CALL spexecute26();
23125DROP PROCEDURE spexecute26;
23126DROP PROCEDURE sp26;
23127
23128
23129DROP PROCEDURE IF EXISTS sp27;
23130delimiter //;
23131CREATE PROCEDURE sp27( in f1 time, inout f2 time, out f3 time, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23132BEGIN
23133  set f1 = addtime(f1, '02:00:00.999998'); set f2 = addtime(f2, '02:00:00.999998'); set f3 = addtime(f2, '02:00:00.999998');
23134   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23135   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23136   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23137  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23138END//
23139delimiter ;//
23140
23141DROP PROCEDURE IF EXISTS spexecute27;
23142delimiter //;
23143CREATE PROCEDURE spexecute27()
23144BEGIN
23145  declare var1 time;
23146  declare var2 time;
23147  declare var3 bigint;
23148  declare var4 bigint;
23149  declare var5 bigint;
23150  declare var6 bigint;
23151  declare var7 bigint;
23152  declare var8 bigint;
23153  set var1 =  '23:59:59.999999';
23154  set var3 = -9.22e+18;
23155  set var5 = -9.22e+18;
23156  set var7 = -9.22e+18;
23157  CALL sp27( '23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23158  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23159END//
23160delimiter ;//
23161
23162CALL spexecute27();
23163DROP PROCEDURE spexecute27;
23164DROP PROCEDURE sp27;
23165
23166
23167DROP PROCEDURE IF EXISTS sp28;
23168delimiter //;
23169CREATE PROCEDURE sp28( in f1 datetime, inout f2 datetime, out f3 datetime, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23170BEGIN
23171  set f1 = addtime(f1, '1 1:1:1.000002'); set f2 = addtime(f2, '1 1:1:1.000002'); set f3 = addtime(f1, '1 1:1:1.000002');
23172   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23173   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23174   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23175  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23176END//
23177delimiter ;//
23178
23179DROP PROCEDURE IF EXISTS spexecute28;
23180delimiter //;
23181CREATE PROCEDURE spexecute28()
23182BEGIN
23183  declare var1 datetime;
23184  declare var2 datetime;
23185  declare var3 bigint;
23186  declare var4 bigint;
23187  declare var5 bigint;
23188  declare var6 bigint;
23189  declare var7 bigint;
23190  declare var8 bigint;
23191  set var1 = '1997-12-31 23:59:59.999999';
23192  set var3 = -9.22e+18;
23193  set var5 = -9.22e+18;
23194  set var7 = -9.22e+18;
23195  CALL sp28('1997-12-31 23:59:59.999999', var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23196  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23197END//
23198delimiter ;//
23199
23200CALL spexecute28();
23201DROP PROCEDURE spexecute28;
23202DROP PROCEDURE sp28;
23203
23204
23205DROP PROCEDURE IF EXISTS sp29;
23206delimiter //;
23207CREATE PROCEDURE sp29( in f1 float(0) unsigned, inout f2 float(0) unsigned, out f3 float(0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23208BEGIN
23209   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23210   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23211   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23212   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23213  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23214END//
23215delimiter ;//
23216
23217DROP PROCEDURE IF EXISTS spexecute29;
23218delimiter //;
23219CREATE PROCEDURE spexecute29()
23220BEGIN
23221  declare var1 float(0) unsigned;
23222  declare var2 float(0) unsigned;
23223  declare var3 bigint;
23224  declare var4 bigint;
23225  declare var5 bigint;
23226  declare var6 bigint;
23227  declare var7 bigint;
23228  declare var8 bigint;
23229  set var1 = 1.00e+00;
23230  set var3 = -9.22e+18;
23231  set var5 = -9.22e+18;
23232  set var7 = -9.22e+18;
23233  CALL sp29(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23234  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23235END//
23236delimiter ;//
23237
23238CALL spexecute29();
23239DROP PROCEDURE spexecute29;
23240DROP PROCEDURE sp29;
23241
23242
23243DROP PROCEDURE IF EXISTS sp30;
23244delimiter //;
23245CREATE PROCEDURE sp30( in f1 float(0) zerofill, inout f2 float(0) zerofill, out f3 float(0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23246BEGIN
23247   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23248   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23249   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23250   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23251  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23252END//
23253delimiter ;//
23254
23255DROP PROCEDURE IF EXISTS spexecute30;
23256delimiter //;
23257CREATE PROCEDURE spexecute30()
23258BEGIN
23259  declare var1 float(0) zerofill;
23260  declare var2 float(0) zerofill;
23261  declare var3 bigint;
23262  declare var4 bigint;
23263  declare var5 bigint;
23264  declare var6 bigint;
23265  declare var7 bigint;
23266  declare var8 bigint;
23267  set var1 = 1.00e+00;
23268  set var3 = -9.22e+18;
23269  set var5 = -9.22e+18;
23270  set var7 = -9.22e+18;
23271  CALL sp30(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23272  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23273END//
23274delimiter ;//
23275
23276CALL spexecute30();
23277DROP PROCEDURE spexecute30;
23278DROP PROCEDURE sp30;
23279
23280
23281DROP PROCEDURE IF EXISTS sp31;
23282delimiter //;
23283CREATE PROCEDURE sp31( in f1 float(23), inout f2 float(23), out f3 float(23), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23284BEGIN
23285   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23286   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23287   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23288   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23289  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23290END//
23291delimiter ;//
23292
23293DROP PROCEDURE IF EXISTS spexecute31;
23294delimiter //;
23295CREATE PROCEDURE spexecute31()
23296BEGIN
23297  declare var1 float(23);
23298  declare var2 float(23);
23299  declare var3 bigint;
23300  declare var4 bigint;
23301  declare var5 bigint;
23302  declare var6 bigint;
23303  declare var7 bigint;
23304  declare var8 bigint;
23305  set var1 = 1.00e+00;
23306  set var3 = -9.22e+18;
23307  set var5 = -9.22e+18;
23308  set var7 = -9.22e+18;
23309  CALL sp31(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23310  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23311END//
23312delimiter ;//
23313
23314CALL spexecute31();
23315DROP PROCEDURE spexecute31;
23316DROP PROCEDURE sp31;
23317
23318
23319DROP PROCEDURE IF EXISTS sp32;
23320delimiter //;
23321CREATE PROCEDURE sp32( in f1 float(23) unsigned, inout f2 float(23) unsigned, out f3 float(23) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23322BEGIN
23323   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23324   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23325   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23326   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23327  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23328END//
23329delimiter ;//
23330
23331DROP PROCEDURE IF EXISTS spexecute32;
23332delimiter //;
23333CREATE PROCEDURE spexecute32()
23334BEGIN
23335  declare var1 float(23) unsigned;
23336  declare var2 float(23) unsigned;
23337  declare var3 bigint;
23338  declare var4 bigint;
23339  declare var5 bigint;
23340  declare var6 bigint;
23341  declare var7 bigint;
23342  declare var8 bigint;
23343  set var1 = 1.00e+00;
23344  set var3 = -9.22e+18;
23345  set var5 = -9.22e+18;
23346  set var7 = -9.22e+18;
23347  CALL sp32(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23348  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23349END//
23350delimiter ;//
23351
23352CALL spexecute32();
23353DROP PROCEDURE spexecute32;
23354DROP PROCEDURE sp32;
23355
23356
23357DROP PROCEDURE IF EXISTS sp33;
23358delimiter //;
23359CREATE PROCEDURE sp33( in f1 float(23) zerofill, inout f2 float(23) zerofill, out f3 float(23) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23360BEGIN
23361   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23362   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23363   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23364   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23365  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23366END//
23367delimiter ;//
23368
23369DROP PROCEDURE IF EXISTS spexecute33;
23370delimiter //;
23371CREATE PROCEDURE spexecute33()
23372BEGIN
23373  declare var1 float(23) zerofill;
23374  declare var2 float(23) zerofill;
23375  declare var3 bigint;
23376  declare var4 bigint;
23377  declare var5 bigint;
23378  declare var6 bigint;
23379  declare var7 bigint;
23380  declare var8 bigint;
23381  set var1 = 1.00e+00;
23382  set var3 = -9.22e+18;
23383  set var5 = -9.22e+18;
23384  set var7 = -9.22e+18;
23385  CALL sp33(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23386  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23387END//
23388delimiter ;//
23389
23390CALL spexecute33();
23391DROP PROCEDURE spexecute33;
23392DROP PROCEDURE sp33;
23393
23394
23395DROP PROCEDURE IF EXISTS sp34;
23396delimiter //;
23397CREATE PROCEDURE sp34( in f1 float(24), inout f2 float(24), out f3 float(24), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23398BEGIN
23399   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23400   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23401   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23402   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23403  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23404END//
23405delimiter ;//
23406
23407DROP PROCEDURE IF EXISTS spexecute34;
23408delimiter //;
23409CREATE PROCEDURE spexecute34()
23410BEGIN
23411  declare var1 float(24);
23412  declare var2 float(24);
23413  declare var3 bigint;
23414  declare var4 bigint;
23415  declare var5 bigint;
23416  declare var6 bigint;
23417  declare var7 bigint;
23418  declare var8 bigint;
23419  set var1 = 1.00e+00;
23420  set var3 = -9.22e+18;
23421  set var5 = -9.22e+18;
23422  set var7 = -9.22e+18;
23423  CALL sp34(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23424  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23425END//
23426delimiter ;//
23427
23428CALL spexecute34();
23429DROP PROCEDURE spexecute34;
23430DROP PROCEDURE sp34;
23431
23432
23433DROP PROCEDURE IF EXISTS sp35;
23434delimiter //;
23435CREATE PROCEDURE sp35( in f1 float(24) unsigned, inout f2 float(24) unsigned, out f3 float(24) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23436BEGIN
23437   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23438   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23439   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23440   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23441  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23442END//
23443delimiter ;//
23444
23445DROP PROCEDURE IF EXISTS spexecute35;
23446delimiter //;
23447CREATE PROCEDURE spexecute35()
23448BEGIN
23449  declare var1 float(24) unsigned;
23450  declare var2 float(24) unsigned;
23451  declare var3 bigint;
23452  declare var4 bigint;
23453  declare var5 bigint;
23454  declare var6 bigint;
23455  declare var7 bigint;
23456  declare var8 bigint;
23457  set var1 = 1.00e+00;
23458  set var3 = -9.22e+18;
23459  set var5 = -9.22e+18;
23460  set var7 = -9.22e+18;
23461  CALL sp35(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23462  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23463END//
23464delimiter ;//
23465
23466CALL spexecute35();
23467DROP PROCEDURE spexecute35;
23468DROP PROCEDURE sp35;
23469
23470
23471DROP PROCEDURE IF EXISTS sp36;
23472delimiter //;
23473CREATE PROCEDURE sp36( in f1 float(24) zerofill, inout f2 float(24) zerofill, out f3 float(24) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23474BEGIN
23475   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23476   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23477   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23478   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23479  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23480END//
23481delimiter ;//
23482
23483DROP PROCEDURE IF EXISTS spexecute36;
23484delimiter //;
23485CREATE PROCEDURE spexecute36()
23486BEGIN
23487  declare var1 float(24) zerofill;
23488  declare var2 float(24) zerofill;
23489  declare var3 bigint;
23490  declare var4 bigint;
23491  declare var5 bigint;
23492  declare var6 bigint;
23493  declare var7 bigint;
23494  declare var8 bigint;
23495  set var1 = 1.00e+00;
23496  set var3 = -9.22e+18;
23497  set var5 = -9.22e+18;
23498  set var7 = -9.22e+18;
23499  CALL sp36(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23500  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23501END//
23502delimiter ;//
23503
23504CALL spexecute36();
23505DROP PROCEDURE spexecute36;
23506DROP PROCEDURE sp36;
23507
23508
23509DROP PROCEDURE IF EXISTS sp37;
23510delimiter //;
23511CREATE PROCEDURE sp37( in f1 float(53), inout f2 float(53), out f3 float(53), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23512BEGIN
23513   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23514   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23515   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23516   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23517  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23518END//
23519delimiter ;//
23520
23521DROP PROCEDURE IF EXISTS spexecute37;
23522delimiter //;
23523CREATE PROCEDURE spexecute37()
23524BEGIN
23525  declare var1 float(53);
23526  declare var2 float(53);
23527  declare var3 bigint;
23528  declare var4 bigint;
23529  declare var5 bigint;
23530  declare var6 bigint;
23531  declare var7 bigint;
23532  declare var8 bigint;
23533  set var1 = 1.00e+00;
23534  set var3 = -9.22e+18;
23535  set var5 = -9.22e+18;
23536  set var7 = -9.22e+18;
23537  CALL sp37(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23538  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23539END//
23540delimiter ;//
23541
23542CALL spexecute37();
23543DROP PROCEDURE spexecute37;
23544DROP PROCEDURE sp37;
23545
23546
23547DROP PROCEDURE IF EXISTS sp38;
23548delimiter //;
23549CREATE PROCEDURE sp38( in f1 float(53) unsigned, inout f2 float(53) unsigned, out f3 float(53) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23550BEGIN
23551   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23552   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23553   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23554   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23555  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23556END//
23557delimiter ;//
23558
23559DROP PROCEDURE IF EXISTS spexecute38;
23560delimiter //;
23561CREATE PROCEDURE spexecute38()
23562BEGIN
23563  declare var1 float(53) unsigned;
23564  declare var2 float(53) unsigned;
23565  declare var3 bigint;
23566  declare var4 bigint;
23567  declare var5 bigint;
23568  declare var6 bigint;
23569  declare var7 bigint;
23570  declare var8 bigint;
23571  set var1 = 1.00e+00;
23572  set var3 = -9.22e+18;
23573  set var5 = -9.22e+18;
23574  set var7 = -9.22e+18;
23575  CALL sp38(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23576  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23577END//
23578delimiter ;//
23579
23580CALL spexecute38();
23581DROP PROCEDURE spexecute38;
23582DROP PROCEDURE sp38;
23583
23584
23585DROP PROCEDURE IF EXISTS sp39;
23586delimiter //;
23587CREATE PROCEDURE sp39( in f1 float(53) zerofill, inout f2 float(53) zerofill, out f3 float(53) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23588BEGIN
23589   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23590   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23591   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23592   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23593  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23594END//
23595delimiter ;//
23596
23597DROP PROCEDURE IF EXISTS spexecute39;
23598delimiter //;
23599CREATE PROCEDURE spexecute39()
23600BEGIN
23601  declare var1 float(53) zerofill;
23602  declare var2 float(53) zerofill;
23603  declare var3 bigint;
23604  declare var4 bigint;
23605  declare var5 bigint;
23606  declare var6 bigint;
23607  declare var7 bigint;
23608  declare var8 bigint;
23609  set var1 = 1.00e+00;
23610  set var3 = -9.22e+18;
23611  set var5 = -9.22e+18;
23612  set var7 = -9.22e+18;
23613  CALL sp39(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23614  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23615END//
23616delimiter ;//
23617
23618CALL spexecute39();
23619DROP PROCEDURE spexecute39;
23620DROP PROCEDURE sp39;
23621
23622
23623DROP PROCEDURE IF EXISTS sp40;
23624delimiter //;
23625CREATE PROCEDURE sp40( in f1 real unsigned, inout f2 real unsigned, out f3 real unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23626BEGIN
23627   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23628   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23629   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23630   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23631  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23632END//
23633delimiter ;//
23634
23635DROP PROCEDURE IF EXISTS spexecute40;
23636delimiter //;
23637CREATE PROCEDURE spexecute40()
23638BEGIN
23639  declare var1 real unsigned;
23640  declare var2 real unsigned;
23641  declare var3 bigint;
23642  declare var4 bigint;
23643  declare var5 bigint;
23644  declare var6 bigint;
23645  declare var7 bigint;
23646  declare var8 bigint;
23647  set var1 = 1.1;
23648  set var3 = -9.22e+18;
23649  set var5 = -9.22e+18;
23650  set var7 = -9.22e+18;
23651  CALL sp40(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23652  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23653END//
23654delimiter ;//
23655
23656CALL spexecute40();
23657DROP PROCEDURE spexecute40;
23658DROP PROCEDURE sp40;
23659
23660
23661DROP PROCEDURE IF EXISTS sp41;
23662delimiter //;
23663CREATE PROCEDURE sp41( in f1 real unsigned zerofill, inout f2 real unsigned zerofill, out f3 real unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23664BEGIN
23665   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23666   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23667   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23668   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23669  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23670END//
23671delimiter ;//
23672
23673DROP PROCEDURE IF EXISTS spexecute41;
23674delimiter //;
23675CREATE PROCEDURE spexecute41()
23676BEGIN
23677  declare var1 real unsigned zerofill;
23678  declare var2 real unsigned zerofill;
23679  declare var3 bigint;
23680  declare var4 bigint;
23681  declare var5 bigint;
23682  declare var6 bigint;
23683  declare var7 bigint;
23684  declare var8 bigint;
23685  set var1 = 1.1;
23686  set var3 = -9.22e+18;
23687  set var5 = -9.22e+18;
23688  set var7 = -9.22e+18;
23689  CALL sp41(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23690  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23691END//
23692delimiter ;//
23693
23694CALL spexecute41();
23695DROP PROCEDURE spexecute41;
23696DROP PROCEDURE sp41;
23697
23698
23699DROP PROCEDURE IF EXISTS sp42;
23700delimiter //;
23701CREATE PROCEDURE sp42( in f1 real zerofill, inout f2 real zerofill, out f3 real zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23702BEGIN
23703   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23704   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23705   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23706   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23707  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23708END//
23709delimiter ;//
23710
23711DROP PROCEDURE IF EXISTS spexecute42;
23712delimiter //;
23713CREATE PROCEDURE spexecute42()
23714BEGIN
23715  declare var1 real zerofill;
23716  declare var2 real zerofill;
23717  declare var3 bigint;
23718  declare var4 bigint;
23719  declare var5 bigint;
23720  declare var6 bigint;
23721  declare var7 bigint;
23722  declare var8 bigint;
23723  set var1 = 1.1;
23724  set var3 = -9.22e+18;
23725  set var5 = -9.22e+18;
23726  set var7 = -9.22e+18;
23727  CALL sp42(1.1, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23728  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23729END//
23730delimiter ;//
23731
23732CALL spexecute42();
23733DROP PROCEDURE spexecute42;
23734DROP PROCEDURE sp42;
23735
23736
23737DROP PROCEDURE IF EXISTS sp43;
23738delimiter //;
23739CREATE PROCEDURE sp43( in f1 numeric (0), inout f2 numeric (0), out f3 numeric (0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23740BEGIN
23741   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23742   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23743   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23744   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23745  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23746END//
23747delimiter ;//
23748
23749DROP PROCEDURE IF EXISTS spexecute43;
23750delimiter //;
23751CREATE PROCEDURE spexecute43()
23752BEGIN
23753  declare var1 numeric (0);
23754  declare var2 numeric (0);
23755  declare var3 bigint;
23756  declare var4 bigint;
23757  declare var5 bigint;
23758  declare var6 bigint;
23759  declare var7 bigint;
23760  declare var8 bigint;
23761  set var1 = -999999999;
23762  set var3 = -9.22e+18;
23763  set var5 = -9.22e+18;
23764  set var7 = -9.22e+18;
23765  CALL sp43(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23766  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23767END//
23768delimiter ;//
23769
23770CALL spexecute43();
23771DROP PROCEDURE spexecute43;
23772DROP PROCEDURE sp43;
23773
23774
23775DROP PROCEDURE IF EXISTS sp44;
23776delimiter //;
23777CREATE PROCEDURE sp44( in f1 numeric (0) unsigned, inout f2 numeric (0) unsigned, out f3 numeric (0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23778BEGIN
23779   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23780   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23781   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23782   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23783  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23784END//
23785delimiter ;//
23786
23787DROP PROCEDURE IF EXISTS spexecute44;
23788delimiter //;
23789CREATE PROCEDURE spexecute44()
23790BEGIN
23791  declare var1 numeric (0) unsigned;
23792  declare var2 numeric (0) unsigned;
23793  declare var3 bigint;
23794  declare var4 bigint;
23795  declare var5 bigint;
23796  declare var6 bigint;
23797  declare var7 bigint;
23798  declare var8 bigint;
23799  set var1 = 9999999999;
23800  set var3 = -9.22e+18;
23801  set var5 = -9.22e+18;
23802  set var7 = -9.22e+18;
23803  CALL sp44(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23804  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23805END//
23806delimiter ;//
23807
23808CALL spexecute44();
23809DROP PROCEDURE spexecute44;
23810DROP PROCEDURE sp44;
23811
23812
23813DROP PROCEDURE IF EXISTS sp45;
23814delimiter //;
23815CREATE PROCEDURE sp45( in f1 numeric (0) zerofill, inout f2 numeric (0) zerofill, out f3 numeric (0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23816BEGIN
23817   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23818   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23819   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23820   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23821  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23822END//
23823delimiter ;//
23824
23825DROP PROCEDURE IF EXISTS spexecute45;
23826delimiter //;
23827CREATE PROCEDURE spexecute45()
23828BEGIN
23829  declare var1 numeric (0) zerofill;
23830  declare var2 numeric (0) zerofill;
23831  declare var3 bigint;
23832  declare var4 bigint;
23833  declare var5 bigint;
23834  declare var6 bigint;
23835  declare var7 bigint;
23836  declare var8 bigint;
23837  set var1 = -99999999;
23838  set var3 = -9.22e+18;
23839  set var5 = -9.22e+18;
23840  set var7 = -9.22e+18;
23841  CALL sp45(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23842  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23843END//
23844delimiter ;//
23845
23846CALL spexecute45();
23847DROP PROCEDURE spexecute45;
23848DROP PROCEDURE sp45;
23849
23850
23851DROP PROCEDURE IF EXISTS sp46;
23852delimiter //;
23853CREATE PROCEDURE sp46( in f1 numeric (0, 0), inout f2 numeric (0, 0), out f3 numeric (0, 0), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23854BEGIN
23855   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23856   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23857   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23858   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23859  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23860END//
23861delimiter ;//
23862
23863DROP PROCEDURE IF EXISTS spexecute46;
23864delimiter //;
23865CREATE PROCEDURE spexecute46()
23866BEGIN
23867  declare var1 numeric (0, 0);
23868  declare var2 numeric (0, 0);
23869  declare var3 bigint;
23870  declare var4 bigint;
23871  declare var5 bigint;
23872  declare var6 bigint;
23873  declare var7 bigint;
23874  declare var8 bigint;
23875  set var1 = -999999999;
23876  set var3 = -9.22e+18;
23877  set var5 = -9.22e+18;
23878  set var7 = -9.22e+18;
23879  CALL sp46(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23880  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23881END//
23882delimiter ;//
23883
23884CALL spexecute46();
23885DROP PROCEDURE spexecute46;
23886DROP PROCEDURE sp46;
23887
23888
23889DROP PROCEDURE IF EXISTS sp47;
23890delimiter //;
23891CREATE PROCEDURE sp47( in f1 numeric (0, 0) unsigned, inout f2 numeric (0, 0) unsigned, out f3 numeric (0, 0) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23892BEGIN
23893   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23894   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23895   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23896   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23897  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23898END//
23899delimiter ;//
23900
23901DROP PROCEDURE IF EXISTS spexecute47;
23902delimiter //;
23903CREATE PROCEDURE spexecute47()
23904BEGIN
23905  declare var1 numeric (0, 0) unsigned;
23906  declare var2 numeric (0, 0) unsigned;
23907  declare var3 bigint;
23908  declare var4 bigint;
23909  declare var5 bigint;
23910  declare var6 bigint;
23911  declare var7 bigint;
23912  declare var8 bigint;
23913  set var1 = 9999999999;
23914  set var3 = -9.22e+18;
23915  set var5 = -9.22e+18;
23916  set var7 = -9.22e+18;
23917  CALL sp47(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23918  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23919END//
23920delimiter ;//
23921
23922CALL spexecute47();
23923DROP PROCEDURE spexecute47;
23924DROP PROCEDURE sp47;
23925
23926
23927DROP PROCEDURE IF EXISTS sp48;
23928delimiter //;
23929CREATE PROCEDURE sp48( in f1 numeric (0, 0) zerofill, inout f2 numeric (0, 0) zerofill, out f3 numeric (0, 0) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23930BEGIN
23931   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23932   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23933   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23934   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23935  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23936END//
23937delimiter ;//
23938
23939DROP PROCEDURE IF EXISTS spexecute48;
23940delimiter //;
23941CREATE PROCEDURE spexecute48()
23942BEGIN
23943  declare var1 numeric (0, 0) zerofill;
23944  declare var2 numeric (0, 0) zerofill;
23945  declare var3 bigint;
23946  declare var4 bigint;
23947  declare var5 bigint;
23948  declare var6 bigint;
23949  declare var7 bigint;
23950  declare var8 bigint;
23951  set var1 = -99999999;
23952  set var3 = -9.22e+18;
23953  set var5 = -9.22e+18;
23954  set var7 = -9.22e+18;
23955  CALL sp48(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23956  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23957END//
23958delimiter ;//
23959
23960CALL spexecute48();
23961DROP PROCEDURE spexecute48;
23962DROP PROCEDURE sp48;
23963
23964
23965DROP PROCEDURE IF EXISTS sp49;
23966delimiter //;
23967CREATE PROCEDURE sp49( in f1 numeric unsigned, inout f2 numeric unsigned, out f3 numeric unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
23968BEGIN
23969   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
23970   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
23971   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
23972   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
23973  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
23974END//
23975delimiter ;//
23976
23977DROP PROCEDURE IF EXISTS spexecute49;
23978delimiter //;
23979CREATE PROCEDURE spexecute49()
23980BEGIN
23981  declare var1 numeric unsigned;
23982  declare var2 numeric unsigned;
23983  declare var3 bigint;
23984  declare var4 bigint;
23985  declare var5 bigint;
23986  declare var6 bigint;
23987  declare var7 bigint;
23988  declare var8 bigint;
23989  set var1 = -999999999;
23990  set var3 = -9.22e+18;
23991  set var5 = -9.22e+18;
23992  set var7 = -9.22e+18;
23993  CALL sp49(-999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
23994  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
23995END//
23996delimiter ;//
23997
23998CALL spexecute49();
23999DROP PROCEDURE spexecute49;
24000DROP PROCEDURE sp49;
24001
24002
24003DROP PROCEDURE IF EXISTS sp50;
24004delimiter //;
24005CREATE PROCEDURE sp50( in f1 numeric unsigned zerofill, inout f2 numeric unsigned zerofill, out f3 numeric unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24006BEGIN
24007   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24008   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24009   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24010   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24011  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24012END//
24013delimiter ;//
24014
24015DROP PROCEDURE IF EXISTS spexecute50;
24016delimiter //;
24017CREATE PROCEDURE spexecute50()
24018BEGIN
24019  declare var1 numeric unsigned zerofill;
24020  declare var2 numeric unsigned zerofill;
24021  declare var3 bigint;
24022  declare var4 bigint;
24023  declare var5 bigint;
24024  declare var6 bigint;
24025  declare var7 bigint;
24026  declare var8 bigint;
24027  set var1 = 9999999999;
24028  set var3 = -9.22e+18;
24029  set var5 = -9.22e+18;
24030  set var7 = -9.22e+18;
24031  CALL sp50(9999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24032  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24033END//
24034delimiter ;//
24035
24036CALL spexecute50();
24037DROP PROCEDURE spexecute50;
24038DROP PROCEDURE sp50;
24039
24040
24041DROP PROCEDURE IF EXISTS sp51;
24042delimiter //;
24043CREATE PROCEDURE sp51( in f1 numeric zerofill, inout f2 numeric zerofill, out f3 numeric zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24044BEGIN
24045   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24046   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24047   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24048   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24049  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24050END//
24051delimiter ;//
24052
24053DROP PROCEDURE IF EXISTS spexecute51;
24054delimiter //;
24055CREATE PROCEDURE spexecute51()
24056BEGIN
24057  declare var1 numeric zerofill;
24058  declare var2 numeric zerofill;
24059  declare var3 bigint;
24060  declare var4 bigint;
24061  declare var5 bigint;
24062  declare var6 bigint;
24063  declare var7 bigint;
24064  declare var8 bigint;
24065  set var1 = -99999999;
24066  set var3 = -9.22e+18;
24067  set var5 = -9.22e+18;
24068  set var7 = -9.22e+18;
24069  CALL sp51(-99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24070  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24071END//
24072delimiter ;//
24073
24074CALL spexecute51();
24075DROP PROCEDURE spexecute51;
24076DROP PROCEDURE sp51;
24077
24078
24079DROP PROCEDURE IF EXISTS sp52;
24080delimiter //;
24081CREATE PROCEDURE sp52( in f1 numeric (63, 30), inout f2 numeric (63, 30), out f3 numeric (63, 30), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24082BEGIN
24083   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24084   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24085   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24086   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24087  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24088END//
24089delimiter ;//
24090
24091DROP PROCEDURE IF EXISTS spexecute52;
24092delimiter //;
24093eval CREATE PROCEDURE spexecute52()
24094BEGIN
24095  declare var1 numeric (63, 30);
24096  declare var2 numeric (63, 30);
24097  declare var3 bigint;
24098  declare var4 bigint;
24099  declare var5 bigint;
24100  declare var6 bigint;
24101  declare var7 bigint;
24102  declare var8 bigint;
24103  set var1 = $procvar01_m36;
24104  set var3 = $procvar03;
24105  set var5 = $procvar05;
24106  set var7 = $procvar07;
24107  CALL sp52($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24108  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24109END//
24110delimiter ;//
24111
24112CALL spexecute52();
24113DROP PROCEDURE spexecute52;
24114DROP PROCEDURE sp52;
24115
24116
24117DROP PROCEDURE IF EXISTS sp53;
24118delimiter //;
24119CREATE PROCEDURE sp53( in f1 numeric (64), inout f2 numeric (64), out f3 numeric (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24120BEGIN
24121   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24122   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24123   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24124   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24125  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24126END//
24127delimiter ;//
24128
24129DROP PROCEDURE IF EXISTS spexecute53;
24130delimiter //;
24131eval CREATE PROCEDURE spexecute53()
24132BEGIN
24133  declare var1 numeric (64);
24134  declare var2 numeric (64);
24135  declare var3 bigint;
24136  declare var4 bigint;
24137  declare var5 bigint;
24138  declare var6 bigint;
24139  declare var7 bigint;
24140  declare var8 bigint;
24141  set var1 = $procvar01_m40;
24142  set var3 = $procvar03;
24143  set var5 = $procvar05;
24144  set var7 = $procvar07;
24145  CALL sp53($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24146  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24147END//
24148delimiter ;//
24149
24150CALL spexecute53();
24151DROP PROCEDURE spexecute53;
24152DROP PROCEDURE sp53;
24153
24154
24155DROP PROCEDURE IF EXISTS sp54;
24156delimiter //;
24157CREATE PROCEDURE sp54( in f1 numeric (64) unsigned, inout f2 numeric (64) unsigned, out f3 numeric (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24158BEGIN
24159   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24160   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24161   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24162   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24163  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24164END//
24165delimiter ;//
24166
24167DROP PROCEDURE IF EXISTS spexecute54;
24168delimiter //;
24169eval CREATE PROCEDURE spexecute54()
24170BEGIN
24171  declare var1 numeric (64) unsigned;
24172  declare var2 numeric (64) unsigned;
24173  declare var3 bigint;
24174  declare var4 bigint;
24175  declare var5 bigint;
24176  declare var6 bigint;
24177  declare var7 bigint;
24178  declare var8 bigint;
24179  set var1 = $procvar01_40;
24180  set var3 = $procvar03;
24181  set var5 = $procvar05;
24182  set var7 = $procvar07;
24183  CALL sp54($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24184  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24185END//
24186delimiter ;//
24187
24188CALL spexecute54();
24189DROP PROCEDURE spexecute54;
24190DROP PROCEDURE sp54;
24191
24192
24193DROP PROCEDURE IF EXISTS sp55;
24194delimiter //;
24195CREATE PROCEDURE sp55( in f1 numeric (64) zerofill, inout f2 numeric (64) zerofill, out f3 numeric (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24196BEGIN
24197   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24198   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24199   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24200   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24201  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24202END//
24203delimiter ;//
24204
24205DROP PROCEDURE IF EXISTS spexecute55;
24206delimiter //;
24207eval CREATE PROCEDURE spexecute55()
24208BEGIN
24209  declare var1 numeric (64) zerofill;
24210  declare var2 numeric (64) zerofill;
24211  declare var3 bigint;
24212  declare var4 bigint;
24213  declare var5 bigint;
24214  declare var6 bigint;
24215  declare var7 bigint;
24216  declare var8 bigint;
24217  set var1 = $procvar01_m40;
24218  set var3 = $procvar03;
24219  set var5 = $procvar05;
24220  set var7 = $procvar07;
24221  CALL sp55($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24222  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24223END//
24224delimiter ;//
24225
24226CALL spexecute55();
24227DROP PROCEDURE spexecute55;
24228DROP PROCEDURE sp55;
24229
24230
24231DROP PROCEDURE IF EXISTS sp56;
24232delimiter //;
24233CREATE PROCEDURE sp56( in f1 year, inout f2 year, out f3 year, in f4 year, inout f5 year, out f6 year, in f7 year, inout f8 year, out f9 year, in f10 year, inout f11 year, out f12 year)
24234BEGIN
24235  set f1 = f1 + 10; set f2 = f2 + 10; set f3 = f2 + 10;
24236  set f4 = f4 + 10; set f5 = f5 + 10; set f6 = f5 + 10;
24237  set f7 = f7 + 10; set f8 = f8 + 10; set f9 = f8 + 10;
24238  set f10= f10+ 10; set f11 = f11 + 10; set f12 = f11 + 10;
24239  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24240END//
24241delimiter ;//
24242
24243DROP PROCEDURE IF EXISTS spexecute56;
24244delimiter //;
24245CREATE PROCEDURE spexecute56()
24246BEGIN
24247  declare var1 year;
24248  declare var2 year;
24249  declare var3 year;
24250  declare var4 year;
24251  declare var5 year;
24252  declare var6 year;
24253  declare var7 year;
24254  declare var8 year;
24255  set var1 = 51;
24256  set var3 = 51;
24257  set var5 = 51;
24258  set var7 = 51;
24259  CALL sp56(51, var1, var2, 51, var3, var4, 51, var5, var6, 51, var7, var8);
24260  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24261END//
24262delimiter ;//
24263
24264CALL spexecute56();
24265DROP PROCEDURE spexecute56;
24266DROP PROCEDURE sp56;
24267
24268
24269DROP PROCEDURE IF EXISTS sp57;
24270delimiter //;
24271CREATE PROCEDURE sp57( in f1 year(4), inout f2 year(4), out f3 year(4), in f4 year(4), inout f5 year(4), out f6 year(4), in f7 year(4), inout f8 year(4), out f9 year(4), in f10 year(4), inout f11 year(4), out f12 year(4))
24272BEGIN
24273  set f1 = f1 + 51; set f2 = f2 + 51; set f3 = f2 + 51;
24274  set f4 = f4 + 51; set f5 = f5 + 51; set f6 = f5 + 51;
24275  set f7 = f7 + 51; set f8 = f8 + 51; set f9 = f8 + 51;
24276  set f10 = f10 + 51; set f11 = f11 + 51; set f12 = f11 + 51;
24277  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24278END//
24279delimiter ;//
24280
24281DROP PROCEDURE IF EXISTS spexecute57;
24282delimiter //;
24283CREATE PROCEDURE spexecute57()
24284BEGIN
24285  declare var1 year(4);
24286  declare var2 year(4);
24287  declare var3 year(4);
24288  declare var4 year(4);
24289  declare var5 year(4);
24290  declare var6 year(4);
24291  declare var7 year(4);
24292  declare var8 year(4);
24293  set var1 = 1982;
24294  set var3 = 1982;
24295  set var5 = 1982;
24296  set var7 = 1982;
24297  CALL sp57(1982, var1, var2, 1982, var3, var4, 1982, var5, var6, 1982, var7, var8);
24298  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24299END//
24300delimiter ;//
24301
24302CALL spexecute57();
24303DROP PROCEDURE spexecute57;
24304DROP PROCEDURE sp57;
24305
24306
24307DROP PROCEDURE IF EXISTS sp58;
24308delimiter //;
24309CREATE PROCEDURE sp58( in f1 text, inout f2 text, out f3 text, in f4 text, inout f5 text, out f6 text, in f7 text, inout f8 text, out f9 text, in f10 text, inout f11 text, out f12 text)
24310BEGIN
24311  set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
24312  set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
24313  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
24314  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
24315  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24316END//
24317delimiter ;//
24318
24319DROP PROCEDURE IF EXISTS spexecute58;
24320delimiter //;
24321CREATE PROCEDURE spexecute58()
24322BEGIN
24323  declare var1 text;
24324  declare var2 text;
24325  declare var3 text;
24326  declare var4 text;
24327  declare var5 text;
24328  declare var6 text;
24329  declare var7 text;
24330  declare var8 text;
24331  set var1 =  'world';
24332  set var3 =  'world';
24333  set var5 =  'world';
24334  set var7 =  'world';
24335  CALL sp58( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
24336  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24337END//
24338delimiter ;//
24339
24340CALL spexecute58();
24341DROP PROCEDURE spexecute58;
24342DROP PROCEDURE sp58;
24343
24344
24345DROP PROCEDURE IF EXISTS sp59;
24346delimiter //;
24347CREATE PROCEDURE sp59( in f1 tinytext, inout f2 tinytext, out f3 tinytext, in f4 tinytext, inout f5 tinytext, out f6 tinytext, in f7 tinytext, inout f8 tinytext, out f9 tinytext, in f10 tinytext, inout f11 tinytext, out f12 tinytext)
24348BEGIN
24349  set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
24350  set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
24351  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
24352  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
24353  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24354END//
24355delimiter ;//
24356
24357DROP PROCEDURE IF EXISTS spexecute59;
24358delimiter //;
24359CREATE PROCEDURE spexecute59()
24360BEGIN
24361  declare var1 tinytext;
24362  declare var2 tinytext;
24363  declare var3 tinytext;
24364  declare var4 tinytext;
24365  declare var5 tinytext;
24366  declare var6 tinytext;
24367  declare var7 tinytext;
24368  declare var8 tinytext;
24369  set var1 =  'world';
24370  set var3 =  'world';
24371  set var5 =  'world';
24372  set var7 =  'world';
24373  CALL sp59( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
24374  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24375END//
24376delimiter ;//
24377
24378CALL spexecute59();
24379DROP PROCEDURE spexecute59;
24380DROP PROCEDURE sp59;
24381
24382
24383DROP PROCEDURE IF EXISTS sp60;
24384delimiter //;
24385CREATE PROCEDURE sp60( in f1 char, inout f2 char, out f3 char, in f4 char, inout f5 char, out f6 char, in f7 char, inout f8 char, out f9 char, in f10 char, inout f11 char, out f12 char)
24386BEGIN
24387  set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f1);
24388  set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f5);
24389  set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f8);
24390  set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
24391  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24392END//
24393delimiter ;//
24394
24395DROP PROCEDURE IF EXISTS spexecute60;
24396delimiter //;
24397CREATE PROCEDURE spexecute60()
24398BEGIN
24399  declare var1 char;
24400  declare var2 char;
24401  declare var3 char;
24402  declare var4 char;
24403  declare var5 char;
24404  declare var6 char;
24405  declare var7 char;
24406  declare var8 char;
24407  set var1 =  'h';
24408  set var3 =  'h';
24409  set var5 =  'h';
24410  set var7 =  'h';
24411  CALL sp60( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
24412  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24413END//
24414delimiter ;//
24415
24416CALL spexecute60();
24417DROP PROCEDURE spexecute60;
24418DROP PROCEDURE sp60;
24419
24420
24421DROP PROCEDURE IF EXISTS sp61;
24422delimiter //;
24423CREATE PROCEDURE sp61( in f1 char ascii, inout f2 char ascii, out f3 char ascii, in f4 char ascii, inout f5 char ascii, out f6 char ascii, in f7 char ascii, inout f8 char ascii, out f9 char ascii, in f10 char ascii, inout f11 char ascii, out f12 char ascii)
24424BEGIN
24425  set f1 = concat('a', f1); set f2 = concat('a', f2); set f3 = concat('a', f2);
24426  set f4 = concat('a', f4); set f5 = concat('a', f5); set f6 = concat('a', f4);
24427  set f7 = concat('a', f7); set f8 = concat('a', f8); set f9 = concat('a', f9);
24428  set f10 = concat('a', f10); set f11 = concat('a', f11); set f12 = concat('a', f11);
24429  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24430END//
24431delimiter ;//
24432
24433DROP PROCEDURE IF EXISTS spexecute61;
24434delimiter //;
24435CREATE PROCEDURE spexecute61()
24436BEGIN
24437  declare var1 char ascii;
24438  declare var2 char ascii;
24439  declare var3 char ascii;
24440  declare var4 char ascii;
24441  declare var5 char ascii;
24442  declare var6 char ascii;
24443  declare var7 char ascii;
24444  declare var8 char ascii;
24445  set var1 =  'h';
24446  set var3 =  'h';
24447  set var5 =  'h';
24448  set var7 =  'h';
24449  CALL sp61( 'h', var1, var2, 'h', var3, var4, 'h', var5, var6, 'h', var7, var8);
24450  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24451END//
24452delimiter ;//
24453
24454CALL spexecute61();
24455
24456DROP PROCEDURE spexecute61;
24457DROP PROCEDURE sp61;
24458
24459
24460DROP PROCEDURE IF EXISTS sp62;
24461delimiter //;
24462CREATE PROCEDURE sp62( in f1 longtext, inout f2 longtext, out f3 longtext, in f4 longtext, inout f5 longtext, out f6 longtext, in f7 longtext, inout f8 longtext, out f9 longtext, in f10 longtext, inout f11 longtext, out f12 longtext)
24463BEGIN
24464  set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f2);
24465  set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
24466  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
24467  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
24468  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24469END//
24470delimiter ;//
24471
24472DROP PROCEDURE IF EXISTS spexecute62;
24473delimiter //;
24474CREATE PROCEDURE spexecute62()
24475BEGIN
24476  declare var1 longtext;
24477  declare var2 longtext;
24478  declare var3 longtext;
24479  declare var4 longtext;
24480  declare var5 longtext;
24481  declare var6 longtext;
24482  declare var7 longtext;
24483  declare var8 longtext;
24484  set var1 =  'world';
24485  set var3 =  'world';
24486  set var5 =  'world';
24487  set var7 =  'world';
24488  CALL sp62( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
24489  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24490END//
24491delimiter ;//
24492
24493CALL spexecute62();
24494DROP PROCEDURE spexecute62;
24495DROP PROCEDURE sp62;
24496
24497
24498DROP PROCEDURE IF EXISTS sp63;
24499delimiter //;
24500CREATE PROCEDURE sp63( in f1 mediumtext, inout f2 mediumtext, out f3 mediumtext, in f4 mediumtext, inout f5 mediumtext, out f6 mediumtext, in f7 mediumtext, inout f8 mediumtext, out f9 mediumtext, in f10 mediumtext, inout f11 mediumtext, out f12 mediumtext)
24501BEGIN
24502  set f1 = concat('hello', f1); set f2 = concat('hello', f2); set f3 = concat('hello', f3);
24503  set f4 = concat('hello', f4); set f5 = concat('hello', f5); set f6 = concat('hello', f5);
24504  set f7 = concat('hello', f7); set f8 = concat('hello', f8); set f9 = concat('hello', f8);
24505  set f10 = concat('hello', f10); set f11 = concat('hello', f11); set f12 = concat('hello', f11);
24506  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24507END//
24508delimiter ;//
24509
24510DROP PROCEDURE IF EXISTS spexecute63;
24511delimiter //;
24512CREATE PROCEDURE spexecute63()
24513BEGIN
24514  declare var1 mediumtext;
24515  declare var2 mediumtext;
24516  declare var3 mediumtext;
24517  declare var4 mediumtext;
24518  declare var5 mediumtext;
24519  declare var6 mediumtext;
24520  declare var7 mediumtext;
24521  declare var8 mediumtext;
24522  set var1 =  'world';
24523  set var3 =  'world';
24524  set var5 =  'world';
24525  set var7 =  'world';
24526  CALL sp63( 'world', var1, var2, 'world', var3, var4, 'world', var5, var6, 'world', var7, var8);
24527  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24528END//
24529delimiter ;//
24530
24531CALL spexecute63();
24532
24533DROP PROCEDURE spexecute63;
24534DROP PROCEDURE sp63;
24535
24536
24537DROP PROCEDURE IF EXISTS sp64;
24538delimiter //;
24539CREATE PROCEDURE sp64( in f1 decimal, inout f2 decimal, out f3 decimal, in f4 decimal, inout f5 decimal, out f6 decimal, in f7 decimal, inout f8 decimal, out f9 decimal, in f10 decimal, inout f11 decimal, out f12 decimal)
24540BEGIN
24541   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f2 / 2); set f3 = (f2 * 2); set f3 = (f2 - 10); set f3 = (f2 + 10);
24542   set f4 = (f4 / 2); set f4 = (f4 * 2); set f4 = (f4 - 10); set f4 = (f4 + 10); set f5 = (f5 / 2); set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f5 / 2); set f6 = (f5 * 2); set f6 = (f5 - 10); set f6 = (f5 + 10);
24543   set f7 = (f7 / 2); set f7 = (f7 * 2); set f7 = (f7 - 10); set f7 = (f7 + 10); set f8 = (f8 / 2); set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f8 / 2); set f9 = (f8 * 2); set f9 = (f8 - 10); set f9 = (f8 + 10);
24544   set f10 = (f10 / 2); set f10 = (f10 * 2); set f10 = (f10 - 10); set f10 = (f10 + 10); set f11 = (f11 / 2); set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f11 / 2); set f12 = (f11 * 2); set f12 = (f11 - 10); set f12 = (f11 + 10);
24545  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24546END//
24547delimiter ;//
24548
24549DROP PROCEDURE IF EXISTS spexecute64;
24550delimiter //;
24551CREATE PROCEDURE spexecute64()
24552BEGIN
24553  declare var1 decimal;
24554  declare var2 decimal;
24555  declare var3 decimal;
24556  declare var4 decimal;
24557  declare var5 decimal;
24558  declare var6 decimal;
24559  declare var7 decimal;
24560  declare var8 decimal;
24561  set var1 = --1.00e+09;
24562  set var3 = --1.00e+09;
24563  set var5 = --1.00e+09;
24564  set var7 = --1.00e+09;
24565  CALL sp64(--1.00e+09, var1, var2, --1.00e+09, var3, var4, --1.00e+09, var5, var6, --1.00e+09, var7, var8);
24566  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24567END//
24568delimiter ;//
24569
24570CALL spexecute64();
24571DROP PROCEDURE spexecute64;
24572DROP PROCEDURE sp64;
24573
24574
24575DROP PROCEDURE IF EXISTS sp65;
24576delimiter //;
24577CREATE PROCEDURE sp65( in f1 decimal (0, 0) unsigned zerofill, inout f2 decimal (0, 0) unsigned zerofill, out f3 decimal (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24578BEGIN
24579   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24580   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24581   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24582   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24583  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24584END//
24585delimiter ;//
24586
24587DROP PROCEDURE IF EXISTS spexecute65;
24588delimiter //;
24589CREATE PROCEDURE spexecute65()
24590BEGIN
24591  declare var1 decimal (0, 0) unsigned zerofill;
24592  declare var2 decimal (0, 0) unsigned zerofill;
24593  declare var3 bigint;
24594  declare var4 bigint;
24595  declare var5 bigint;
24596  declare var6 bigint;
24597  declare var7 bigint;
24598  declare var8 bigint;
24599  set var1 = 999999999;
24600  set var3 = -9.22e+18;
24601  set var5 = -9.22e+18;
24602  set var7 = -9.22e+18;
24603  CALL sp65(999999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24604  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24605END//
24606delimiter ;//
24607
24608CALL spexecute65();
24609DROP PROCEDURE spexecute65;
24610DROP PROCEDURE sp65;
24611
24612
24613DROP PROCEDURE IF EXISTS sp66;
24614delimiter //;
24615CREATE PROCEDURE sp66( in f1 decimal (63, 30) unsigned, inout f2 decimal (63, 30) unsigned, out f3 decimal (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24616BEGIN
24617   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24618   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24619   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24620   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24621  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24622END//
24623delimiter ;//
24624
24625DROP PROCEDURE IF EXISTS spexecute66;
24626delimiter //;
24627CREATE PROCEDURE spexecute66()
24628BEGIN
24629  declare var1 decimal (63, 30) unsigned;
24630  declare var2 decimal (63, 30) unsigned;
24631  declare var3 bigint;
24632  declare var4 bigint;
24633  declare var5 bigint;
24634  declare var6 bigint;
24635  declare var7 bigint;
24636  declare var8 bigint;
24637  set var1 = 1.00e+16;
24638  set var3 = -9.22e+18;
24639  set var5 = -9.22e+18;
24640  set var7 = -9.22e+18;
24641  CALL sp66(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24642  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24643END//
24644delimiter ;//
24645
24646CALL spexecute66();
24647DROP PROCEDURE spexecute66;
24648DROP PROCEDURE sp66;
24649
24650
24651DROP PROCEDURE IF EXISTS sp67;
24652delimiter //;
24653CREATE PROCEDURE sp67( in f1 decimal (63, 30) unsigned zerofill, inout f2 decimal (63, 30) unsigned zerofill, out f3 decimal (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24654BEGIN
24655   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24656   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24657   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24658   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24659  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24660END//
24661delimiter ;//
24662
24663DROP PROCEDURE IF EXISTS spexecute67;
24664delimiter //;
24665CREATE PROCEDURE spexecute67()
24666BEGIN
24667  declare var1 decimal (63, 30) unsigned zerofill;
24668  declare var2 decimal (63, 30) unsigned zerofill;
24669  declare var3 bigint;
24670  declare var4 bigint;
24671  declare var5 bigint;
24672  declare var6 bigint;
24673  declare var7 bigint;
24674  declare var8 bigint;
24675  set var1 = 1.00e+16;
24676  set var3 = -9.22e+18;
24677  set var5 = -9.22e+18;
24678  set var7 = -9.22e+18;
24679  CALL sp67(1.00e+16, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24680  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24681END//
24682delimiter ;//
24683
24684CALL spexecute67();
24685DROP PROCEDURE spexecute67;
24686DROP PROCEDURE sp67;
24687
24688
24689DROP PROCEDURE IF EXISTS sp68;
24690delimiter //;
24691CREATE PROCEDURE sp68( in f1 decimal (63, 30) zerofill, inout f2 decimal (63, 30) zerofill, out f3 decimal (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24692BEGIN
24693   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24694   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24695   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24696   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24697  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24698END//
24699delimiter ;//
24700
24701DROP PROCEDURE IF EXISTS spexecute68;
24702delimiter //;
24703CREATE PROCEDURE spexecute68()
24704BEGIN
24705  declare var1 decimal (63, 30) zerofill;
24706  declare var2 decimal (63, 30) zerofill;
24707  declare var3 bigint;
24708  declare var4 bigint;
24709  declare var5 bigint;
24710  declare var6 bigint;
24711  declare var7 bigint;
24712  declare var8 bigint;
24713  set var1 = -1.00e+21;
24714  set var3 = -9.22e+18;
24715  set var5 = -9.22e+18;
24716  set var7 = -9.22e+18;
24717  CALL sp68(-1.00e+21, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24718  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24719END//
24720delimiter ;//
24721
24722CALL spexecute68();
24723DROP PROCEDURE spexecute68;
24724DROP PROCEDURE sp68;
24725
24726
24727DROP PROCEDURE IF EXISTS sp69;
24728delimiter //;
24729CREATE PROCEDURE sp69( in f1 decimal (64), inout f2 decimal (64), out f3 decimal (64), in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24730BEGIN
24731   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24732   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24733   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24734   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24735  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24736END//
24737delimiter ;//
24738
24739DROP PROCEDURE IF EXISTS spexecute69;
24740delimiter //;
24741eval CREATE PROCEDURE spexecute69()
24742BEGIN
24743  declare var1 decimal (64);
24744  declare var2 decimal (64);
24745  declare var3 bigint;
24746  declare var4 bigint;
24747  declare var5 bigint;
24748  declare var6 bigint;
24749  declare var7 bigint;
24750  declare var8 bigint;
24751  set var1 = $procvar01_m30;
24752  set var3 = $procvar03;
24753  set var5 = $procvar05;
24754  set var7 = $procvar07;
24755  CALL sp69($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24756  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24757END//
24758delimiter ;//
24759
24760CALL spexecute69();
24761DROP PROCEDURE spexecute69;
24762DROP PROCEDURE sp69;
24763
24764
24765DROP PROCEDURE IF EXISTS sp70;
24766delimiter //;
24767CREATE PROCEDURE sp70( in f1 decimal (64) unsigned, inout f2 decimal (64) unsigned, out f3 decimal (64) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24768BEGIN
24769   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24770   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24771   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24772   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24773  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24774END//
24775delimiter ;//
24776
24777DROP PROCEDURE IF EXISTS spexecute70;
24778delimiter //;
24779eval CREATE PROCEDURE spexecute70()
24780BEGIN
24781  declare var1 decimal (64) unsigned;
24782  declare var2 decimal (64) unsigned;
24783  declare var3 bigint;
24784  declare var4 bigint;
24785  declare var5 bigint;
24786  declare var6 bigint;
24787  declare var7 bigint;
24788  declare var8 bigint;
24789  set var1 = $procvar01_20;
24790  set var3 = $procvar03;
24791  set var5 = $procvar05;
24792  set var7 = $procvar07;
24793  CALL sp70($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24794  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24795END//
24796delimiter ;//
24797
24798CALL spexecute70();
24799DROP PROCEDURE spexecute70;
24800DROP PROCEDURE sp70;
24801
24802
24803DROP PROCEDURE IF EXISTS sp71;
24804delimiter //;
24805CREATE PROCEDURE sp71( in f1 decimal (64) unsigned zerofill, inout f2 decimal (64) unsigned zerofill, out f3 decimal (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24806BEGIN
24807   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24808   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24809   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24810   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24811  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24812END//
24813delimiter ;//
24814
24815DROP PROCEDURE IF EXISTS spexecute71;
24816delimiter //;
24817eval CREATE PROCEDURE spexecute71()
24818BEGIN
24819  declare var1 decimal (64) unsigned zerofill;
24820  declare var2 decimal (64) unsigned zerofill;
24821  declare var3 bigint;
24822  declare var4 bigint;
24823  declare var5 bigint;
24824  declare var6 bigint;
24825  declare var7 bigint;
24826  declare var8 bigint;
24827  set var1 = $procvar01_24;
24828  set var3 = $procvar03;
24829  set var5 = $procvar05;
24830  set var7 = $procvar07;
24831  CALL sp71($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
24832  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24833END//
24834delimiter ;//
24835
24836CALL spexecute71();
24837DROP PROCEDURE spexecute71;
24838DROP PROCEDURE sp71;
24839
24840
24841DROP PROCEDURE IF EXISTS sp72;
24842delimiter //;
24843CREATE PROCEDURE sp72( in f1 decimal (64) zerofill, inout f2 decimal (64) zerofill, out f3 decimal (64) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24844BEGIN
24845   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24846   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24847   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24848   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24849  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24850END//
24851delimiter ;//
24852
24853DROP PROCEDURE IF EXISTS spexecute72;
24854delimiter //;
24855CREATE PROCEDURE spexecute72()
24856BEGIN
24857  declare var1 decimal (64) zerofill;
24858  declare var2 decimal (64) zerofill;
24859  declare var3 bigint;
24860  declare var4 bigint;
24861  declare var5 bigint;
24862  declare var6 bigint;
24863  declare var7 bigint;
24864  declare var8 bigint;
24865  set var1 = 1.00e+00;
24866  set var3 = -9.22e+18;
24867  set var5 = -9.22e+18;
24868  set var7 = -9.22e+18;
24869  CALL sp72(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24870  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24871END//
24872delimiter ;//
24873
24874CALL spexecute72();
24875DROP PROCEDURE spexecute72;
24876DROP PROCEDURE sp72;
24877
24878
24879DROP PROCEDURE IF EXISTS sp73;
24880delimiter //;
24881CREATE PROCEDURE sp73( in f1 decimal unsigned, inout f2 decimal unsigned, out f3 decimal unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24882BEGIN
24883   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24884   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24885   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24886   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24887  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24888END//
24889delimiter ;//
24890
24891DROP PROCEDURE IF EXISTS spexecute73;
24892delimiter //;
24893CREATE PROCEDURE spexecute73()
24894BEGIN
24895  declare var1 decimal unsigned;
24896  declare var2 decimal unsigned;
24897  declare var3 bigint;
24898  declare var4 bigint;
24899  declare var5 bigint;
24900  declare var6 bigint;
24901  declare var7 bigint;
24902  declare var8 bigint;
24903  set var1 = 1.00e+00;
24904  set var3 = -9.22e+18;
24905  set var5 = -9.22e+18;
24906  set var7 = -9.22e+18;
24907  CALL sp73(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24908  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24909END//
24910delimiter ;//
24911
24912CALL spexecute73();
24913DROP PROCEDURE spexecute73;
24914DROP PROCEDURE sp73;
24915
24916
24917DROP PROCEDURE IF EXISTS sp74;
24918delimiter //;
24919CREATE PROCEDURE sp74( in f1 decimal unsigned zerofill, inout f2 decimal unsigned zerofill, out f3 decimal unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24920BEGIN
24921   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24922   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24923   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24924   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24925  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24926END//
24927delimiter ;//
24928
24929DROP PROCEDURE IF EXISTS spexecute74;
24930delimiter //;
24931CREATE PROCEDURE spexecute74()
24932BEGIN
24933  declare var1 decimal unsigned zerofill;
24934  declare var2 decimal unsigned zerofill;
24935  declare var3 bigint;
24936  declare var4 bigint;
24937  declare var5 bigint;
24938  declare var6 bigint;
24939  declare var7 bigint;
24940  declare var8 bigint;
24941  set var1 = 1.00e+00;
24942  set var3 = -9.22e+18;
24943  set var5 = -9.22e+18;
24944  set var7 = -9.22e+18;
24945  CALL sp74(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24946  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24947END//
24948delimiter ;//
24949
24950CALL spexecute74();
24951DROP PROCEDURE spexecute74;
24952DROP PROCEDURE sp74;
24953
24954
24955DROP PROCEDURE IF EXISTS sp75;
24956delimiter //;
24957CREATE PROCEDURE sp75( in f1 decimal zerofill, inout f2 decimal zerofill, out f3 decimal zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24958BEGIN
24959   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24960   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24961   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
24962   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
24963  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
24964END//
24965delimiter ;//
24966
24967DROP PROCEDURE IF EXISTS spexecute75;
24968delimiter //;
24969CREATE PROCEDURE spexecute75()
24970BEGIN
24971  declare var1 decimal zerofill;
24972  declare var2 decimal zerofill;
24973  declare var3 bigint;
24974  declare var4 bigint;
24975  declare var5 bigint;
24976  declare var6 bigint;
24977  declare var7 bigint;
24978  declare var8 bigint;
24979  set var1 = -1.00e+09;
24980  set var3 = -9.22e+18;
24981  set var5 = -9.22e+18;
24982  set var7 = -9.22e+18;
24983  CALL sp75(-1.00e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
24984  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
24985END//
24986delimiter ;//
24987
24988CALL spexecute75();
24989DROP PROCEDURE spexecute75;
24990DROP PROCEDURE sp75;
24991
24992
24993DROP PROCEDURE IF EXISTS sp76;
24994delimiter //;
24995CREATE PROCEDURE sp76( in f1 float(0) unsigned zerofill, inout f2 float(0) unsigned zerofill, out f3 float(0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
24996BEGIN
24997   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
24998   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
24999   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25000   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25001  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25002END//
25003delimiter ;//
25004
25005DROP PROCEDURE IF EXISTS spexecute76;
25006delimiter //;
25007CREATE PROCEDURE spexecute76()
25008BEGIN
25009  declare var1 float(0) unsigned zerofill;
25010  declare var2 float(0) unsigned zerofill;
25011  declare var3 bigint;
25012  declare var4 bigint;
25013  declare var5 bigint;
25014  declare var6 bigint;
25015  declare var7 bigint;
25016  declare var8 bigint;
25017  set var1 = 1.00e+00;
25018  set var3 = -9.22e+18;
25019  set var5 = -9.22e+18;
25020  set var7 = -9.22e+18;
25021  CALL sp76(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25022  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25023END//
25024delimiter ;//
25025
25026CALL spexecute76();
25027DROP PROCEDURE spexecute76;
25028DROP PROCEDURE sp76;
25029
25030
25031DROP PROCEDURE IF EXISTS sp77;
25032delimiter //;
25033CREATE PROCEDURE sp77( in f1 float(23) unsigned zerofill, inout f2 float(23) unsigned zerofill, out f3 float(23) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25034BEGIN
25035   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25036   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25037   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25038   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25039  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25040END//
25041delimiter ;//
25042
25043DROP PROCEDURE IF EXISTS spexecute77;
25044delimiter //;
25045CREATE PROCEDURE spexecute77()
25046BEGIN
25047  declare var1 float(23) unsigned zerofill;
25048  declare var2 float(23) unsigned zerofill;
25049  declare var3 bigint;
25050  declare var4 bigint;
25051  declare var5 bigint;
25052  declare var6 bigint;
25053  declare var7 bigint;
25054  declare var8 bigint;
25055  set var1 = 1.00e+00;
25056  set var3 = -9.22e+18;
25057  set var5 = -9.22e+18;
25058  set var7 = -9.22e+18;
25059  CALL sp77(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25060  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25061END//
25062delimiter ;//
25063
25064CALL spexecute77();
25065DROP PROCEDURE spexecute77;
25066DROP PROCEDURE sp77;
25067
25068
25069DROP PROCEDURE IF EXISTS sp78;
25070delimiter //;
25071CREATE PROCEDURE sp78( in f1 float(24) unsigned zerofill, inout f2 float(24) unsigned zerofill, out f3 float(24) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25072BEGIN
25073   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25074   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25075   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25076   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25077  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25078END//
25079delimiter ;//
25080
25081DROP PROCEDURE IF EXISTS spexecute78;
25082delimiter //;
25083CREATE PROCEDURE spexecute78()
25084BEGIN
25085  declare var1 float(24) unsigned zerofill;
25086  declare var2 float(24) unsigned zerofill;
25087  declare var3 bigint;
25088  declare var4 bigint;
25089  declare var5 bigint;
25090  declare var6 bigint;
25091  declare var7 bigint;
25092  declare var8 bigint;
25093  set var1 = 1.00e+00;
25094  set var3 = -9.22e+18;
25095  set var5 = -9.22e+18;
25096  set var7 = -9.22e+18;
25097  CALL sp78(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25098  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25099END//
25100delimiter ;//
25101
25102CALL spexecute78();
25103DROP PROCEDURE spexecute78;
25104DROP PROCEDURE sp78;
25105
25106
25107DROP PROCEDURE IF EXISTS sp79;
25108delimiter //;
25109CREATE PROCEDURE sp79( in f1 float(53) unsigned zerofill, inout f2 float(53) unsigned zerofill, out f3 float(53) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25110BEGIN
25111   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25112   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25113   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25114   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25115  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25116END//
25117delimiter ;//
25118
25119DROP PROCEDURE IF EXISTS spexecute79;
25120delimiter //;
25121CREATE PROCEDURE spexecute79()
25122BEGIN
25123  declare var1 float(53) unsigned zerofill;
25124  declare var2 float(53) unsigned zerofill;
25125  declare var3 bigint;
25126  declare var4 bigint;
25127  declare var5 bigint;
25128  declare var6 bigint;
25129  declare var7 bigint;
25130  declare var8 bigint;
25131  set var1 = 1.00e+00;
25132  set var3 = -9.22e+18;
25133  set var5 = -9.22e+18;
25134  set var7 = -9.22e+18;
25135  CALL sp79(1.00e+00, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25136  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25137END//
25138delimiter ;//
25139
25140CALL spexecute79();
25141DROP PROCEDURE spexecute79;
25142DROP PROCEDURE sp79;
25143
25144
25145DROP PROCEDURE IF EXISTS sp80;
25146delimiter //;
25147CREATE PROCEDURE sp80( in f1 int, inout f2 int, out f3 int, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25148BEGIN
25149   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25150   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25151   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25152   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25153  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25154END//
25155delimiter ;//
25156
25157DROP PROCEDURE IF EXISTS spexecute80;
25158delimiter //;
25159CREATE PROCEDURE spexecute80()
25160BEGIN
25161  declare var1 int;
25162  declare var2 int;
25163  declare var3 bigint;
25164  declare var4 bigint;
25165  declare var5 bigint;
25166  declare var6 bigint;
25167  declare var7 bigint;
25168  declare var8 bigint;
25169  set var1 = -2.15e+09;
25170  set var3 = -9.22e+18;
25171  set var5 = -9.22e+18;
25172  set var7 = -9.22e+18;
25173  CALL sp80(-2.15e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25174  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25175END//
25176delimiter ;//
25177
25178CALL spexecute80();
25179DROP PROCEDURE spexecute80;
25180DROP PROCEDURE sp80;
25181
25182
25183DROP PROCEDURE IF EXISTS sp81;
25184delimiter //;
25185CREATE PROCEDURE sp81( in f1 int unsigned, inout f2 int unsigned, out f3 int unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25186BEGIN
25187   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25188   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25189   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25190   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25191  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25192END//
25193delimiter ;//
25194
25195DROP PROCEDURE IF EXISTS spexecute81;
25196delimiter //;
25197CREATE PROCEDURE spexecute81()
25198BEGIN
25199  declare var1 int unsigned;
25200  declare var2 int unsigned;
25201  declare var3 bigint;
25202  declare var4 bigint;
25203  declare var5 bigint;
25204  declare var6 bigint;
25205  declare var7 bigint;
25206  declare var8 bigint;
25207  set var1 = 4.29e+09;
25208  set var3 = -9.22e+18;
25209  set var5 = -9.22e+18;
25210  set var7 = -9.22e+18;
25211  CALL sp81(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25212  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25213END//
25214delimiter ;//
25215
25216CALL spexecute81();
25217DROP PROCEDURE spexecute81;
25218DROP PROCEDURE sp81;
25219
25220
25221DROP PROCEDURE IF EXISTS sp82;
25222delimiter //;
25223CREATE PROCEDURE sp82( in f1 int unsigned zerofill, inout f2 int unsigned zerofill, out f3 int unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25224BEGIN
25225   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25226   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25227   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25228   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25229  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25230END//
25231delimiter ;//
25232
25233DROP PROCEDURE IF EXISTS spexecute82;
25234delimiter //;
25235CREATE PROCEDURE spexecute82()
25236BEGIN
25237  declare var1 int unsigned zerofill;
25238  declare var2 int unsigned zerofill;
25239  declare var3 bigint;
25240  declare var4 bigint;
25241  declare var5 bigint;
25242  declare var6 bigint;
25243  declare var7 bigint;
25244  declare var8 bigint;
25245  set var1 = 4.29e+09;
25246  set var3 = -9.22e+18;
25247  set var5 = -9.22e+18;
25248  set var7 = -9.22e+18;
25249  CALL sp82(4.29e+09, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25250  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25251END//
25252delimiter ;//
25253
25254CALL spexecute82();
25255DROP PROCEDURE spexecute82;
25256DROP PROCEDURE sp82;
25257
25258
25259DROP PROCEDURE IF EXISTS sp83;
25260delimiter //;
25261CREATE PROCEDURE sp83( in f1 int zerofill, inout f2 int zerofill, out f3 int zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25262BEGIN
25263   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25264   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25265   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25266   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25267  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25268END//
25269delimiter ;//
25270
25271DROP PROCEDURE IF EXISTS spexecute83;
25272delimiter //;
25273CREATE PROCEDURE spexecute83()
25274BEGIN
25275  declare var1 int zerofill;
25276  declare var2 int zerofill;
25277  declare var3 bigint;
25278  declare var4 bigint;
25279  declare var5 bigint;
25280  declare var6 bigint;
25281  declare var7 bigint;
25282  declare var8 bigint;
25283  set var1 = 2.15e+08;
25284  set var3 = -9.22e+18;
25285  set var5 = -9.22e+18;
25286  set var7 = -9.22e+18;
25287  CALL sp83(2.15e+08, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25288  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25289END//
25290delimiter ;//
25291
25292CALL spexecute83();
25293DROP PROCEDURE spexecute83;
25294DROP PROCEDURE sp83;
25295
25296
25297DROP PROCEDURE IF EXISTS sp84;
25298delimiter //;
25299CREATE PROCEDURE sp84( in f1 mediumint, inout f2 mediumint, out f3 mediumint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25300BEGIN
25301   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25302   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25303   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25304   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25305  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25306END//
25307delimiter ;//
25308
25309DROP PROCEDURE IF EXISTS spexecute84;
25310delimiter //;
25311CREATE PROCEDURE spexecute84()
25312BEGIN
25313  declare var1 mediumint;
25314  declare var2 mediumint;
25315  declare var3 bigint;
25316  declare var4 bigint;
25317  declare var5 bigint;
25318  declare var6 bigint;
25319  declare var7 bigint;
25320  declare var8 bigint;
25321  set var1 = -8388600;
25322  set var3 = -9.22e+18;
25323  set var5 = -9.22e+18;
25324  set var7 = -9.22e+18;
25325  CALL sp84(-8388600, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25326  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25327END//
25328delimiter ;//
25329
25330CALL spexecute84();
25331DROP PROCEDURE spexecute84;
25332DROP PROCEDURE sp84;
25333
25334
25335DROP PROCEDURE IF EXISTS sp85;
25336delimiter //;
25337CREATE PROCEDURE sp85( in f1 mediumint unsigned, inout f2 mediumint unsigned, out f3 mediumint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25338BEGIN
25339   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25340   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25341   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25342   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25343  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25344END//
25345delimiter ;//
25346
25347DROP PROCEDURE IF EXISTS spexecute85;
25348delimiter //;
25349CREATE PROCEDURE spexecute85()
25350BEGIN
25351  declare var1 mediumint unsigned;
25352  declare var2 mediumint unsigned;
25353  declare var3 bigint;
25354  declare var4 bigint;
25355  declare var5 bigint;
25356  declare var6 bigint;
25357  declare var7 bigint;
25358  declare var8 bigint;
25359  set var1 = 16777201;
25360  set var3 = -9.22e+18;
25361  set var5 = -9.22e+18;
25362  set var7 = -9.22e+18;
25363  CALL sp85(16777201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25364  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25365END//
25366delimiter ;//
25367
25368CALL spexecute85();
25369DROP PROCEDURE spexecute85;
25370DROP PROCEDURE sp85;
25371
25372
25373DROP PROCEDURE IF EXISTS sp86;
25374delimiter //;
25375CREATE PROCEDURE sp86( in f1 mediumint unsigned zerofill, inout f2 mediumint unsigned zerofill, out f3 mediumint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25376BEGIN
25377   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25378   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25379   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25380   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25381  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25382END//
25383delimiter ;//
25384
25385DROP PROCEDURE IF EXISTS spexecute86;
25386delimiter //;
25387CREATE PROCEDURE spexecute86()
25388BEGIN
25389  declare var1 mediumint unsigned zerofill;
25390  declare var2 mediumint unsigned zerofill;
25391  declare var3 bigint;
25392  declare var4 bigint;
25393  declare var5 bigint;
25394  declare var6 bigint;
25395  declare var7 bigint;
25396  declare var8 bigint;
25397  set var1 = 16777210;
25398  set var3 = -9.22e+18;
25399  set var5 = -9.22e+18;
25400  set var7 = -9.22e+18;
25401  CALL sp86(16777210, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25402  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25403END//
25404delimiter ;//
25405
25406CALL spexecute86();
25407DROP PROCEDURE spexecute86;
25408DROP PROCEDURE sp86;
25409
25410
25411DROP PROCEDURE IF EXISTS sp87;
25412delimiter //;
25413CREATE PROCEDURE sp87( in f1 mediumint zerofill, inout f2 mediumint zerofill, out f3 mediumint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25414BEGIN
25415   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25416   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25417   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25418   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25419  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25420END//
25421delimiter ;//
25422
25423DROP PROCEDURE IF EXISTS spexecute87;
25424delimiter //;
25425CREATE PROCEDURE spexecute87()
25426BEGIN
25427  declare var1 mediumint zerofill;
25428  declare var2 mediumint zerofill;
25429  declare var3 bigint;
25430  declare var4 bigint;
25431  declare var5 bigint;
25432  declare var6 bigint;
25433  declare var7 bigint;
25434  declare var8 bigint;
25435  set var1 = -8388601;
25436  set var3 = -9.22e+18;
25437  set var5 = -9.22e+18;
25438  set var7 = -9.22e+18;
25439  CALL sp87(-8388601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25440  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25441END//
25442delimiter ;//
25443
25444CALL spexecute87();
25445DROP PROCEDURE spexecute87;
25446DROP PROCEDURE sp87;
25447
25448
25449DROP PROCEDURE IF EXISTS sp88;
25450delimiter //;
25451CREATE PROCEDURE sp88( in f1 numeric (0) unsigned zerofill, inout f2 numeric (0) unsigned zerofill, out f3 numeric (0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25452BEGIN
25453   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25454   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25455   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25456   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25457  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25458END//
25459delimiter ;//
25460
25461DROP PROCEDURE IF EXISTS spexecute88;
25462delimiter //;
25463CREATE PROCEDURE spexecute88()
25464BEGIN
25465  declare var1 numeric (0) unsigned zerofill;
25466  declare var2 numeric (0) unsigned zerofill;
25467  declare var3 bigint;
25468  declare var4 bigint;
25469  declare var5 bigint;
25470  declare var6 bigint;
25471  declare var7 bigint;
25472  declare var8 bigint;
25473  set var1 = 99999999;
25474  set var3 = -9.22e+18;
25475  set var5 = -9.22e+18;
25476  set var7 = -9.22e+18;
25477  CALL sp88(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25478  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25479END//
25480delimiter ;//
25481
25482CALL spexecute88();
25483DROP PROCEDURE spexecute88;
25484DROP PROCEDURE sp88;
25485
25486
25487DROP PROCEDURE IF EXISTS sp89;
25488delimiter //;
25489CREATE PROCEDURE sp89( in f1 numeric (0, 0) unsigned zerofill, inout f2 numeric (0, 0) unsigned zerofill, out f3 numeric (0, 0) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25490BEGIN
25491   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25492   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25493   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25494   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25495  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25496END//
25497delimiter ;//
25498
25499DROP PROCEDURE IF EXISTS spexecute89;
25500delimiter //;
25501CREATE PROCEDURE spexecute89()
25502BEGIN
25503  declare var1 numeric (0, 0) unsigned zerofill;
25504  declare var2 numeric (0, 0) unsigned zerofill;
25505  declare var3 bigint;
25506  declare var4 bigint;
25507  declare var5 bigint;
25508  declare var6 bigint;
25509  declare var7 bigint;
25510  declare var8 bigint;
25511  set var1 = 99999999;
25512  set var3 = -9.22e+18;
25513  set var5 = -9.22e+18;
25514  set var7 = -9.22e+18;
25515  CALL sp89(99999999, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25516  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25517END//
25518delimiter ;//
25519
25520CALL spexecute89();
25521DROP PROCEDURE spexecute89;
25522DROP PROCEDURE sp89;
25523
25524
25525DROP PROCEDURE IF EXISTS sp90;
25526delimiter //;
25527CREATE PROCEDURE sp90( in f1 numeric (63, 30) unsigned, inout f2 numeric (63, 30) unsigned, out f3 numeric (63, 30) unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25528BEGIN
25529   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25530   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25531   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25532   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25533  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25534END//
25535delimiter ;//
25536
25537DROP PROCEDURE IF EXISTS spexecute90;
25538delimiter //;
25539eval CREATE PROCEDURE spexecute90()
25540BEGIN
25541  declare var1 numeric (63, 30) unsigned;
25542  declare var2 numeric (63, 30) unsigned;
25543  declare var3 bigint;
25544  declare var4 bigint;
25545  declare var5 bigint;
25546  declare var6 bigint;
25547  declare var7 bigint;
25548  declare var8 bigint;
25549  set var1 = $procvar01_36;
25550  set var3 = $procvar03;
25551  set var5 = $procvar05;
25552  set var7 = $procvar07;
25553  CALL sp90($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
25554  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25555END//
25556delimiter ;//
25557
25558#FIXME: hpux11 - check later again with E+40
25559CALL spexecute90();
25560DROP PROCEDURE spexecute90;
25561DROP PROCEDURE sp90;
25562
25563
25564DROP PROCEDURE IF EXISTS sp91;
25565delimiter //;
25566CREATE PROCEDURE sp91( in f1 numeric (63, 30) unsigned zerofill, inout f2 numeric (63, 30) unsigned zerofill, out f3 numeric (63, 30) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25567BEGIN
25568   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25569   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25570   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25571   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25572  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25573END//
25574delimiter ;//
25575
25576DROP PROCEDURE IF EXISTS spexecute91;
25577delimiter //;
25578eval CREATE PROCEDURE spexecute91()
25579BEGIN
25580  declare var1 numeric (63, 30) unsigned zerofill;
25581  declare var2 numeric (63, 30) unsigned zerofill;
25582  declare var3 bigint;
25583  declare var4 bigint;
25584  declare var5 bigint;
25585  declare var6 bigint;
25586  declare var7 bigint;
25587  declare var8 bigint;
25588  set var1 = $procvar01_36;
25589  set var3 = $procvar03;
25590  set var5 = $procvar05;
25591  set var7 = $procvar07;
25592  CALL sp91($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
25593  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25594END//
25595delimiter ;//
25596
25597#FIXME: hpux11 - check later again with E+40
25598CALL spexecute91();
25599DROP PROCEDURE spexecute91;
25600DROP PROCEDURE sp91;
25601
25602
25603DROP PROCEDURE IF EXISTS sp92;
25604delimiter //;
25605CREATE PROCEDURE sp92( in f1 numeric (63, 30) zerofill, inout f2 numeric (63, 30) zerofill, out f3 numeric (63, 30) zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25606BEGIN
25607   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25608   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25609   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25610   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25611  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25612END//
25613delimiter ;//
25614
25615DROP PROCEDURE IF EXISTS spexecute92;
25616delimiter //;
25617eval CREATE PROCEDURE spexecute92()
25618BEGIN
25619  declare var1 numeric (63, 30) zerofill;
25620  declare var2 numeric (63, 30) zerofill;
25621  declare var3 bigint;
25622  declare var4 bigint;
25623  declare var5 bigint;
25624  declare var6 bigint;
25625  declare var7 bigint;
25626  declare var8 bigint;
25627  set var1 = $procvar01_m36;
25628  set var3 = $procvar03;
25629  set var5 = $procvar05;
25630  set var7 = $procvar07;
25631  CALL sp92($callvar01m, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
25632  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25633END//
25634delimiter ;//
25635
25636CALL spexecute92();
25637DROP PROCEDURE spexecute92;
25638DROP PROCEDURE sp92;
25639
25640
25641DROP PROCEDURE IF EXISTS sp93;
25642delimiter //;
25643CREATE PROCEDURE sp93( in f1 numeric (64) unsigned zerofill, inout f2 numeric (64) unsigned zerofill, out f3 numeric (64) unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25644BEGIN
25645   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25646   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25647   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25648   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25649  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25650END//
25651delimiter ;//
25652
25653DROP PROCEDURE IF EXISTS spexecute93;
25654delimiter //;
25655eval CREATE PROCEDURE spexecute93()
25656BEGIN
25657  declare var1 numeric (64) unsigned zerofill;
25658  declare var2 numeric (64) unsigned zerofill;
25659  declare var3 bigint;
25660  declare var4 bigint;
25661  declare var5 bigint;
25662  declare var6 bigint;
25663  declare var7 bigint;
25664  declare var8 bigint;
25665  set var1 = $procvar01_40;
25666  set var3 = $procvar03;
25667  set var5 = $procvar05;
25668  set var7 = $procvar07;
25669  CALL sp93($callvar01p, var1, var2, $callvar02, var3, var4, $callvar03, var5, var6, -9.22e+18, var7, var8);
25670  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25671END//
25672delimiter ;//
25673
25674CALL spexecute93();
25675DROP PROCEDURE spexecute93;
25676DROP PROCEDURE sp93;
25677
25678
25679DROP PROCEDURE IF EXISTS sp94;
25680delimiter //;
25681CREATE PROCEDURE sp94( in f1 smallint, inout f2 smallint, out f3 smallint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25682BEGIN
25683   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25684   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25685   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25686   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25687  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25688END//
25689delimiter ;//
25690
25691DROP PROCEDURE IF EXISTS spexecute94;
25692delimiter //;
25693CREATE PROCEDURE spexecute94()
25694BEGIN
25695  declare var1 smallint;
25696  declare var2 smallint;
25697  declare var3 bigint;
25698  declare var4 bigint;
25699  declare var5 bigint;
25700  declare var6 bigint;
25701  declare var7 bigint;
25702  declare var8 bigint;
25703  set var1 = -32701;
25704  set var3 = -9.22e+18;
25705  set var5 = -9.22e+18;
25706  set var7 = -9.22e+18;
25707  CALL sp94(-32701, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25708  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25709END//
25710delimiter ;//
25711
25712CALL spexecute94();
25713DROP PROCEDURE spexecute94;
25714DROP PROCEDURE sp94;
25715
25716
25717DROP PROCEDURE IF EXISTS sp95;
25718delimiter //;
25719CREATE PROCEDURE sp95( in f1 smallint unsigned, inout f2 smallint unsigned, out f3 smallint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25720BEGIN
25721   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25722   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25723   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25724   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25725  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25726END//
25727delimiter ;//
25728
25729DROP PROCEDURE IF EXISTS spexecute95;
25730delimiter //;
25731CREATE PROCEDURE spexecute95()
25732BEGIN
25733  declare var1 smallint unsigned;
25734  declare var2 smallint unsigned;
25735  declare var3 bigint;
25736  declare var4 bigint;
25737  declare var5 bigint;
25738  declare var6 bigint;
25739  declare var7 bigint;
25740  declare var8 bigint;
25741  set var1 = 65531;
25742  set var3 = -9.22e+18;
25743  set var5 = -9.22e+18;
25744  set var7 = -9.22e+18;
25745  CALL sp95(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25746  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25747END//
25748delimiter ;//
25749
25750CALL spexecute95();
25751DROP PROCEDURE spexecute95;
25752DROP PROCEDURE sp95;
25753
25754
25755DROP PROCEDURE IF EXISTS sp96;
25756delimiter //;
25757CREATE PROCEDURE sp96( in f1 smallint unsigned zerofill, inout f2 smallint unsigned zerofill, out f3 smallint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25758BEGIN
25759   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25760   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25761   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25762   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25763   SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25764END//
25765delimiter ;//
25766
25767DROP PROCEDURE IF EXISTS spexecute96;
25768delimiter //;
25769CREATE PROCEDURE spexecute96()
25770BEGIN
25771  declare var1 smallint unsigned zerofill;
25772  declare var2 smallint unsigned zerofill;
25773  declare var3 bigint;
25774  declare var4 bigint;
25775  declare var5 bigint;
25776  declare var6 bigint;
25777  declare var7 bigint;
25778  declare var8 bigint;
25779  set var1 = 65531;
25780  set var3 = -9.22e+18;
25781  set var5 = -9.22e+18;
25782  set var7 = -9.22e+18;
25783  CALL sp96(65531, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25784  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25785END//
25786delimiter ;//
25787
25788CALL spexecute96();
25789DROP PROCEDURE spexecute96;
25790DROP PROCEDURE sp96;
25791
25792
25793DROP PROCEDURE IF EXISTS sp97;
25794delimiter //;
25795CREATE PROCEDURE sp97( in f1 smallint zerofill, inout f2 smallint zerofill, out f3 smallint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25796BEGIN
25797   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25798   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25799   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25800   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25801  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25802END//
25803delimiter ;//
25804
25805DROP PROCEDURE IF EXISTS spexecute97;
25806delimiter //;
25807CREATE PROCEDURE spexecute97()
25808BEGIN
25809  declare var1 smallint zerofill;
25810  declare var2 smallint zerofill;
25811  declare var3 bigint;
25812  declare var4 bigint;
25813  declare var5 bigint;
25814  declare var6 bigint;
25815  declare var7 bigint;
25816  declare var8 bigint;
25817  set var1 = -32601;
25818  set var3 = -9.22e+18;
25819  set var5 = -9.22e+18;
25820  set var7 = -9.22e+18;
25821  CALL sp97(-32601, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25822  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25823END//
25824delimiter ;//
25825
25826CALL spexecute97();
25827DROP PROCEDURE spexecute97;
25828DROP PROCEDURE sp97;
25829
25830
25831DROP PROCEDURE IF EXISTS sp98;
25832delimiter //;
25833CREATE PROCEDURE sp98( in f1 tinyint, inout f2 tinyint, out f3 tinyint, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25834BEGIN
25835   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25836   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25837   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25838   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25839  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25840END//
25841delimiter ;//
25842
25843DROP PROCEDURE IF EXISTS spexecute98;
25844delimiter //;
25845CREATE PROCEDURE spexecute98()
25846BEGIN
25847  declare var1 tinyint;
25848  declare var2 tinyint;
25849  declare var3 bigint;
25850  declare var4 bigint;
25851  declare var5 bigint;
25852  declare var6 bigint;
25853  declare var7 bigint;
25854  declare var8 bigint;
25855  set var1 = -115;
25856  set var3 = -9.22e+18;
25857  set var5 = -9.22e+18;
25858  set var7 = -9.22e+18;
25859  CALL sp98(-115, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25860  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25861END//
25862delimiter ;//
25863
25864CALL spexecute98();
25865DROP PROCEDURE spexecute98;
25866DROP PROCEDURE sp98;
25867
25868
25869DROP PROCEDURE IF EXISTS sp99;
25870delimiter //;
25871CREATE PROCEDURE sp99( in f1 tinyint unsigned, inout f2 tinyint unsigned, out f3 tinyint unsigned, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25872BEGIN
25873   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25874   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25875   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25876   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25877  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25878END//
25879delimiter ;//
25880
25881DROP PROCEDURE IF EXISTS spexecute99;
25882delimiter //;
25883CREATE PROCEDURE spexecute99()
25884BEGIN
25885  declare var1 tinyint unsigned;
25886  declare var2 tinyint unsigned;
25887  declare var3 bigint;
25888  declare var4 bigint;
25889  declare var5 bigint;
25890  declare var6 bigint;
25891  declare var7 bigint;
25892  declare var8 bigint;
25893  set var1 = 251;
25894  set var3 = -9.22e+18;
25895  set var5 = -9.22e+18;
25896  set var7 = -9.22e+18;
25897  CALL sp99(251, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25898  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25899END//
25900delimiter ;//
25901
25902CALL spexecute99();
25903DROP PROCEDURE spexecute99;
25904DROP PROCEDURE sp99;
25905
25906
25907DROP PROCEDURE IF EXISTS sp100;
25908delimiter //;
25909CREATE PROCEDURE sp100( in f1 tinyint unsigned zerofill, inout f2 tinyint unsigned zerofill, out f3 tinyint unsigned zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25910BEGIN
25911   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25912   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25913   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25914   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25915   SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25916END//
25917delimiter ;//
25918
25919DROP PROCEDURE IF EXISTS spexecute100;
25920delimiter //;
25921CREATE PROCEDURE spexecute100()
25922BEGIN
25923  declare var1 tinyint unsigned zerofill;
25924  declare var2 tinyint unsigned zerofill;
25925  declare var3 bigint;
25926  declare var4 bigint;
25927  declare var5 bigint;
25928  declare var6 bigint;
25929  declare var7 bigint;
25930  declare var8 bigint;
25931  set var1 = 201;
25932  set var3 = -9.22e+18;
25933  set var5 = -9.22e+18;
25934  set var7 = -9.22e+18;
25935  CALL sp100(201, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25936  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25937END//
25938delimiter ;//
25939
25940CALL spexecute100();
25941DROP PROCEDURE spexecute100;
25942DROP PROCEDURE sp100;
25943
25944
25945DROP PROCEDURE IF EXISTS sp101;
25946delimiter //;
25947CREATE PROCEDURE sp101( in f1 tinyint zerofill, inout f2 tinyint zerofill, out f3 tinyint zerofill, in f4 bigint, inout f5 bigint, out f6 bigint, in f7 bigint, inout f8 bigint, out f9 bigint, in f10 bigint, inout f11 bigint, out f12 bigint)
25948BEGIN
25949   set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); set f2 = (f2 / 2); set f2 = (f2 * 2); set f2 = (f2 - 10); set f2 = (f2 + 10); set f3 = (f1 / 2); set f3 = (f1 * 2); set f3 = (f1 - 10); set f3 = (f1 + 10);
25950   set f6 = f5; set f5 = (f5 * 2); set f5 = (f5 - 10); set f5 = (f5 + 10); set f6 = (f6 * 2); set f6 = (f6 - 10); set f6 = (f6 + 10);
25951   set f9 = f8; set f8 = (f8 * 2); set f8 = (f8 - 10); set f8 = (f8 + 10); set f9 = (f9 * 2); set f9 = (f9 - 10); set f9 = (f9 + 10);
25952   set f12 = f11; set f11 = (f11 * 2); set f11 = (f11 - 10); set f11 = (f11 + 10); set f12 = (f12 * 2); set f12 = (f12 - 10); set f12 = (f12 + 10);
25953  SELECT f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12;
25954END//
25955delimiter ;//
25956
25957DROP PROCEDURE IF EXISTS spexecute101;
25958delimiter //;
25959CREATE PROCEDURE spexecute101()
25960BEGIN
25961  declare var1 tinyint zerofill;
25962  declare var2 tinyint zerofill;
25963  declare var3 bigint;
25964  declare var4 bigint;
25965  declare var5 bigint;
25966  declare var6 bigint;
25967  declare var7 bigint;
25968  declare var8 bigint;
25969  set var1 = -101;
25970  set var3 = -9.22e+18;
25971  set var5 = -9.22e+18;
25972  set var7 = -9.22e+18;
25973  CALL sp101(-101, var1, var2, -9.22e+18, var3, var4, -9.22e+18, var5, var6, -9.22e+18, var7, var8);
25974  SELECT var1, var2, var3, var4, var5, var6, var7, var8;
25975END//
25976delimiter ;//
25977
25978CALL spexecute101();
25979DROP PROCEDURE spexecute101;
25980DROP PROCEDURE sp101;
25981
25982USE db_storedproc;
25983DROP DATABASE db1;
25984
25985
25986
25987USE db_storedproc;
25988# ------------------------------------------------------------------------------
25989let $message= Testcase 4.7.2:
25990FIXME: a wrong testcase number and/or description has been detected here. This
25991FIXME: needs to be checked to be sure where the missing testcase is located.
25992.
25993check for "allow_invalid_dates" server sql mode
25994;
25995--source include/show_msg80.inc
25996
25997--disable_warnings
25998DROP PROCEDURE IF EXISTS sp2;
25999drop table IF EXISTS temp_table;
26000--enable_warnings
26001
26002create table temp_table (f1 datetime);
26003
26004set @@sql_mode = 'allow_invalid_dates';
26005
26006delimiter //;
26007CREATE PROCEDURE sp2 ()
26008BEGIN
26009    declare a datetime;
26010    set a = '2005-03-14 01:01:02';
26011    insert into temp_table values(a);
26012END//
26013delimiter ;//
26014
26015show CREATE PROCEDURE sp2;
26016
26017set @@sql_mode = 'traditional';
26018
26019CALL sp2 ();
26020SELECT * from temp_table;
26021
26022SELECT @@sql_mode;
26023
26024# cleanup
26025DROP PROCEDURE sp2;
26026drop table temp_table;
26027
26028
26029# ------------------------------------------------------------------------------
26030let $message= Testcase 4.7.3:
26031FIXME: a wrong testcase number and/or description has been detected here. This
26032FIXME: needs to be checked to be sure where the missing testcase is located.
26033.
26034check for *high_not_precedence* server sql mode
26035;
26036--source include/show_msg80.inc
26037
26038--disable_warnings ONCE
26039DROP PROCEDURE IF EXISTS sp3;
26040
26041set @@sql_mode = 'high_not_precedence';
26042
26043delimiter //;
26044CREATE PROCEDURE sp3()
26045BEGIN
26046    declare a int signed;
26047    declare b int unsigned;
26048    set a = -5;
26049    set b = 5;
26050    SELECT not 1 between a and b;
26051END//
26052delimiter ;//
26053
26054show CREATE PROCEDURE sp3;
26055
26056set @@sql_mode='';
26057
26058CALL sp3();
26059SELECT @@sql_mode;
26060
26061# cleanup
26062DROP PROCEDURE sp3;
26063
26064
26065# ------------------------------------------------------------------------------
26066let $message= Testcase 4.7.4:
26067FIXME: a wrong testcase number and/or description has been detected here. This
26068FIXME: needs to be checked to be sure where the missing testcase is located.
26069.
26070check for combination of server sql modes
26071;
26072--source include/show_msg80.inc
26073
26074--disable_warnings ONCE
26075DROP PROCEDURE IF EXISTS sp4;
26076
26077set @@sql_mode = 'ansi, error_for_division_by_zero';
26078
26079# now set the corrent value:
26080set @@sql_mode = 'ansi,error_for_division_by_zero';
26081
26082SHOW VARIABLES LIKE 'sql_mode';
26083
26084delimiter //;
26085CREATE PROCEDURE sp4()
26086BEGIN
26087    declare a int;
26088    declare b int;
26089    declare c int;
26090    set a = 0;
26091    set b = 1;
26092    set c = b/a;
26093    show warnings;
26094END//
26095delimiter ;//
26096
26097show CREATE PROCEDURE sp4;
26098
26099set @@sql_mode='';
26100
26101CALL sp4();
26102
26103# cleanup
26104DROP PROCEDURE sp4;
26105set @@sql_mode='';
26106
26107
26108# ==============================================================================
26109let $message= Section 3.1.8 - SHOW statement checks:;
26110--source include/show_msg80.inc
26111
26112
26113USE db_storedproc;
26114
26115
26116# ------------------------------------------------------------------------------
26117let $message= Testcase 4.8.1:;
26118--source include/show_msg80.inc
26119
26120# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show create
26121#        procedure statement is executed.
26122
26123--disable_warnings
26124DROP PROCEDURE IF EXISTS sp6;
26125DROP PROCEDURE IF EXISTS sp6a;
26126DROP PROCEDURE IF EXISTS sp6b;
26127DROP PROCEDURE IF EXISTS sp6c;
26128--enable_warnings
26129
26130delimiter //;
26131CREATE PROCEDURE sp6a (i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real)
26132language sql
26133BEGIN
26134   set @x=i1;
26135   set @y=@x;
26136END//
26137delimiter ;//
26138
26139delimiter //;
26140CREATE PROCEDURE sp6b (out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real)
26141deterministic
26142BEGIN
26143   set @x=i1;
26144   set @y=@x;
26145END//
26146delimiter ;//
26147
26148delimiter //;
26149CREATE PROCEDURE sp6c (inout i1 longtext, inout  i2 mediumint , inout i3 longblob, inout  i4 year, inout  i5 real) comment 'this is a comment'
26150BEGIN
26151   set @x=i1;
26152   set @y=@x;
26153END//
26154delimiter ;//
26155
26156show CREATE PROCEDURE sp6a;
26157
26158show CREATE PROCEDURE sp6b;
26159
26160show CREATE PROCEDURE sp6c;
26161
26162--replace_column 5 <modified> 6 <created>
26163SHOW PROCEDURE status like 'sp6a';
26164
26165--replace_column 5 <modified> 6 <created>
26166SHOW PROCEDURE status like 'sp6b';
26167
26168--replace_column 5 <modified> 6 <created>
26169SHOW PROCEDURE status like 'sp6c';
26170
26171# cleanup
26172DROP PROCEDURE sp6a;
26173DROP PROCEDURE sp6b;
26174DROP PROCEDURE sp6c;
26175
26176
26177# ------------------------------------------------------------------------------
26178let $message= Testcase 4.8.2:;
26179--source include/show_msg80.inc
26180
26181# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show procedure
26182#      status statement is executed.
26183
26184--disable_warnings ONCE
26185DROP PROCEDURE IF EXISTS sp6;
26186
26187delimiter //;
26188CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26189BEGIN
26190    set @x=i1;
26191      set @y=@x;
26192END//
26193delimiter ;//
26194
26195--replace_column 5 <modified> 6 <created>
26196SHOW PROCEDURE status like 'sp6';
26197
26198# cleanup
26199DROP PROCEDURE sp6;
26200
26201
26202# ------------------------------------------------------------------------------
26203let $message= Testcase 4.8.3:;
26204--source include/show_msg80.inc
26205
26206# testcase: ensure that the definition of a procedure is not displayed when a show create function
26207#      statement is executed.
26208
26209--disable_warnings ONCE
26210DROP PROCEDURE IF EXISTS sp6;
26211
26212delimiter //;
26213CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26214BEGIN
26215    set @x=i1;
26216    set @y=@x;
26217END//
26218delimiter ;//
26219
26220--error ER_SP_DOES_NOT_EXIST
26221SHOW CREATE FUNCTION sp6;
26222
26223# cleanup
26224DROP PROCEDURE sp6;
26225
26226
26227# ------------------------------------------------------------------------------
26228let $message= Testcase 4.8.4:;
26229--source include/show_msg80.inc
26230
26231# testcase: ensure that the definition of a procedure is properly recorded and displayed when a show function
26232#      status statement is executed.
26233
26234--disable_warnings ONCE
26235DROP PROCEDURE IF EXISTS sp6;
26236
26237delimiter //;
26238CREATE FUNCTION sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real) returns longtext
26239  BEGIN
26240    set @x=i1;
26241    set @y=@x;
26242    return 0;
26243END//
26244delimiter ;//
26245
26246--replace_column 5 <modified> 6 <created>
26247  show  function status like 'sp6';
26248
26249# cleanup
26250DROP FUNCTION sp6;
26251
26252
26253# ------------------------------------------------------------------------------
26254let $message= Testcase 4.8.5:;
26255--source include/show_msg80.inc
26256
26257# testcase: ensure that the attempt to execute show CREATE PROCEDURE with the name of a non-existing
26258#      procedure fails with an appropriate error message.
26259
26260--disable_warnings ONCE
26261DROP PROCEDURE IF EXISTS sp7;
26262
26263--error ER_SP_DOES_NOT_EXIST
26264  show CREATE PROCEDURE sp7;
26265
26266
26267# ------------------------------------------------------------------------------
26268let $message= Testcase 4.8.6:;
26269--source include/show_msg80.inc
26270
26271# testcase: ensure that the attempt to execute SHOW PROCEDURE status with the name of a non-existing
26272#          procedure returns an empty set.
26273
26274--disable_warnings ONCE
26275DROP PROCEDURE IF EXISTS sp6;
26276
26277    show  procedure status like 'sp6';
26278
26279
26280
26281# ------------------------------------------------------------------------------
26282let $message= Testcase 4.8.7:;
26283--source include/show_msg80.inc
26284
26285# testcase: ensure that an attempt to execute show CREATE PROCEDURE with the name of a function fails
26286#      with an appropriate error message.
26287
26288--disable_warnings ONCE
26289DROP FUNCTION IF EXISTS fn1;
26290
26291delimiter //;
26292CREATE FUNCTION fn1 (i1 real) returns real
26293  BEGIN
26294    return i1;
26295END//
26296delimiter ;//
26297
26298--error ER_SP_DOES_NOT_EXIST
26299  show CREATE PROCEDURE fn1;
26300
26301# cleanup
26302DROP FUNCTION fn1;
26303
26304
26305# ------------------------------------------------------------------------------
26306let $message= Testcase 4.8.8:;
26307--source include/show_msg80.inc
26308
26309# testcase: ensure that an attempt to execute SHOW PROCEDURE status with the name of a
26310#        function returns an empty set.
26311
26312
26313--disable_warnings ONCE
26314DROP FUNCTION IF EXISTS fn1;
26315
26316delimiter //;
26317CREATE FUNCTION fn1 (i1 real) returns real
26318  BEGIN
26319    return i1;
26320END//
26321delimiter ;//
26322
26323--replace_column 5 <modified> 6 <created>
26324  show  procedure status like 'fn1';
26325
26326# cleanup
26327DROP FUNCTION fn1;
26328
26329
26330# ------------------------------------------------------------------------------
26331let $message= Testcase 4.8.9:;
26332--source include/show_msg80.inc
26333
26334# testcase: ensure that the definition of a function is properly recorded and displayed when a
26335#        show CREATE FUNCTION statement is executed.
26336
26337# part of 3.1.8.9
26338
26339# ------------------------------------------------------------------------------
26340let $message= Testcase 4.8.10:;
26341--source include/show_msg80.inc
26342
26343# testcase: ensure that the definition of a function is properly recorded and displayed when a
26344# SHOW FUNCTION status.
26345
26346--disable_warnings ONCE
26347DROP FUNCTION IF EXISTS fn1;
26348
26349delimiter //;
26350CREATE FUNCTION fn1 (i1 real) returns real
26351BEGIN
26352   return i1;
26353END//
26354delimiter ;//
26355
26356--replace_column 5 <modified> 6 <created>
26357SHOW FUNCTION STATUS LIKE 'fn1';
26358
26359# cleanup
26360DROP FUNCTION fn1;
26361
26362
26363# ------------------------------------------------------------------------------
26364let $message= Testcase 4.8.11:;
26365--source include/show_msg80.inc
26366
26367# testcase: ensure that the definition of a function is not displayed when a
26368#        show CREATE PROCEDURE statement is executed.
26369
26370--disable_warnings ONCE
26371DROP FUNCTION IF EXISTS fn1;
26372
26373delimiter //;
26374CREATE FUNCTION fn1 (x int) returns int
26375  BEGIN
26376    return x;
26377END//
26378delimiter ;//
26379
26380--error ER_SP_DOES_NOT_EXIST
26381  show CREATE PROCEDURE fn1;
26382
26383# cleanup
26384DROP FUNCTION fn1;
26385
26386
26387
26388# ------------------------------------------------------------------------------
26389let $message= Testcase 4.8.12:;
26390--source include/show_msg80.inc
26391
26392# testcase: ensure that the attempt to execute show CREATE FUNCTION with the name of a
26393#      non-existing function fails with an appropriate error message.
26394
26395--disable_warnings ONCE
26396DROP FUNCTION IF EXISTS fn1;
26397
26398delimiter //;
26399CREATE FUNCTION fn1(x int) returns int
26400  BEGIN
26401            return x;
26402END//
26403delimiter ;//
26404
26405DROP FUNCTION fn1;
26406
26407--error ER_SP_DOES_NOT_EXIST
26408  show CREATE FUNCTION fn1;
26409
26410
26411
26412# ------------------------------------------------------------------------------
26413let $message= Testcase 4.8.13:;
26414--source include/show_msg80.inc
26415
26416# testcase: ensure that the attempt to execute show function status  with the name of a
26417#      non-existing function returns an empty set.
26418
26419
26420--disable_warnings ONCE
26421DROP FUNCTION IF EXISTS f1000;
26422
26423SHOW FUNCTION STATUS LIKE 'f1000';
26424
26425
26426# ------------------------------------------------------------------------------
26427let $message= Testcase 4.8.14:;
26428--source include/show_msg80.inc
26429
26430# testcase: ensure that an attempt to execute show CREATE FUNCTION with the name of a procedure
26431#        fails with an appropriate error message.
26432
26433--disable_warnings ONCE
26434DROP PROCEDURE IF EXISTS sp1;
26435
26436delimiter //;
26437CREATE PROCEDURE sp1()
26438BEGIN
26439    SELECT * from t8;
26440END//
26441delimiter ;//
26442
26443--error ER_SP_DOES_NOT_EXIST
26444  show CREATE FUNCTION sp1;
26445
26446# cleanup
26447DROP PROCEDURE sp1;
26448
26449
26450# ------------------------------------------------------------------------------
26451let $message= Testcase 4.8.15:;
26452--source include/show_msg80.inc
26453
26454# testcase: ensure that an attempt to execute show function status with the name of a procedure fails with an
26455#      appropriate error message.
26456
26457
26458--disable_warnings ONCE
26459DROP PROCEDURE IF EXISTS sp6;
26460
26461delimiter //;
26462CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26463BEGIN
26464    set @x=i1;
26465    set @y=@x;
26466END//
26467delimiter ;//
26468
26469--replace_column 5 <modified> 6 <created>
26470  show  function status like 'sp6';
26471
26472# cleanup
26473DROP PROCEDURE sp6;
26474
26475
26476
26477# ------------------------------------------------------------------------------
26478let $message= Testcase 4.8.16:;
26479--source include/show_msg80.inc
26480
26481# testcase: ensure that all stored procedure changes made with alter procedure are properly recorded
26482#      and displayed when a  show CREATE PROCEDURE statement is executed.
26483
26484# part of 3.1.8.9
26485
26486
26487# ------------------------------------------------------------------------------
26488let $message= Testcase 4.8.17:;
26489--source include/show_msg80.inc
26490
26491# testcase: ensure that all stored procedure changes made with alter procedure are properly recorded
26492#      and displayed when a  SHOW PROCEDURE status statement is executed.
26493
26494--disable_warnings ONCE
26495DROP PROCEDURE IF EXISTS sp6;
26496
26497delimiter //;
26498CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26499BEGIN
26500    set @x=i1;
26501    set @y=@x;
26502END//
26503delimiter ;//
26504
26505  alter procedure sp6 sql security invoker;
26506
26507  alter procedure sp6 comment  'this is a new comment';
26508
26509--replace_column 5 <modified> 6 <created>
26510SHOW PROCEDURE status like 'sp6';
26511
26512# cleanup
26513DROP PROCEDURE sp6;
26514
26515
26516# ------------------------------------------------------------------------------
26517let $message= Testcase 4.8.18:;
26518--source include/show_msg80.inc
26519
26520# testcase: ensure that all stored procedure changes made with alter function are properly recorded
26521#        and displayed when a show CREATE FUNCTION statement is executed.
26522
26523--disable_warnings ONCE
26524DROP FUNCTION IF EXISTS fn1;
26525
26526delimiter //;
26527CREATE FUNCTION fn1 (x int) returns int
26528  BEGIN
26529    return x;
26530END//
26531delimiter ;//
26532
26533  alter function fn1 sql security invoker;
26534
26535  show  create  function  fn1;
26536
26537# cleanup
26538DROP FUNCTION fn1;
26539
26540
26541# ------------------------------------------------------------------------------
26542let $message= Testcase 4.8.19:;
26543--source include/show_msg80.inc
26544
26545# testcase: ensure that all function changes made with alter function are properly recorded and
26546#      displayed when a show  function status statement is executed.
26547
26548--disable_warnings ONCE
26549DROP FUNCTION IF EXISTS fn1;
26550
26551delimiter //;
26552CREATE FUNCTION fn1 (i1 longtext) returns longtext
26553  BEGIN
26554    return i1;
26555END//
26556delimiter ;//
26557
26558  alter function fn1 sql security invoker;
26559  alter function fn1 comment 'this is a function 3242#@%$#@';
26560
26561--replace_column 5 <modified> 6 <created>
26562  show  function status like 'fn1';
26563
26564# cleanup
26565DROP FUNCTION fn1;
26566
26567
26568
26569# ------------------------------------------------------------------------------
26570let $message= Testcase 4.8.20:;
26571--source include/show_msg80.inc
26572
26573# testcase: ensure that all stored procedure changes made with alter procedure are properly
26574#      recorded and displayed   when a show CREATE PROCEDURE statement is executed.
26575
26576--disable_warnings ONCE
26577DROP PROCEDURE IF EXISTS sp6;
26578
26579delimiter //;
26580CREATE PROCEDURE sp6 (i1 int , i2 int)
26581BEGIN
26582    set @x=i1;
26583    set @y=@x;
26584END//
26585delimiter ;//
26586
26587  alter procedure sp6 comment 'this is simple';
26588
26589  show CREATE PROCEDURE sp6;
26590
26591# cleanup
26592DROP PROCEDURE sp6;
26593
26594# ------------------------------------------------------------------------------
26595let $message= Testcase 4.8.21:;
26596--source include/show_msg80.inc
26597
26598# testcase: ensure that when a stored procedure is dropped, its definition no longer appears when
26599#      a show CREATE PROCEDURE is executed.
26600
26601--disable_warnings ONCE
26602DROP PROCEDURE IF EXISTS sp6;
26603
26604delimiter //;
26605CREATE PROCEDURE sp6 (i1 int, i2 int)
26606BEGIN
26607    set @x=i1;
26608    set @y=@x;
26609END//
26610delimiter ;//
26611
26612DROP PROCEDURE sp6;
26613
26614--error ER_SP_DOES_NOT_EXIST
26615  show CREATE PROCEDURE sp6;
26616
26617# ------------------------------------------------------------------------------
26618let $message= Testcase 4.8.22:;
26619--source include/show_msg80.inc
26620
26621# testcase: ensure that when a stored procedure is dropped, its definition no longer appears when
26622#      SHOW PROCEDURE status.
26623
26624
26625--disable_warnings ONCE
26626DROP PROCEDURE IF EXISTS sp6;
26627
26628delimiter //;
26629CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26630BEGIN
26631    set @x=i3;
26632    set @y=@x;
26633END//
26634delimiter ;//
26635
26636DROP PROCEDURE sp6;
26637
26638--replace_column 5 <modified> 6 <created>
26639SHOW PROCEDURE status like 'sp6';
26640
26641
26642# ------------------------------------------------------------------------------
26643let $message= Testcase 4.8.23:;
26644--source include/show_msg80.inc
26645
26646# testcase: ensure that when a stored procedure is dropped, its definition no longer appears
26647#      when a statement or a show CREATE FUNCTION statement is executed.
26648
26649--disable_warnings ONCE
26650DROP FUNCTION IF EXISTS fn1;
26651
26652delimiter //;
26653CREATE FUNCTION fn1 (x int) returns int
26654  BEGIN
26655    return x;
26656END//
26657delimiter ;//
26658
26659DROP FUNCTION fn1;
26660
26661--error ER_SP_DOES_NOT_EXIST
26662  show CREATE FUNCTION fn1;
26663
26664
26665# ------------------------------------------------------------------------------
26666let $message= Testcase 4.8.24:;
26667--source include/show_msg80.inc
26668
26669# testcase: ensure that when a function is dropped, its definition no longer appears when a
26670# SHOW FUNCTION status statement is executed.
26671# suppressed: the test does not display an error message. it just returns an empty set
26672
26673--disable_warnings ONCE
26674DROP FUNCTION IF EXISTS fn1;
26675
26676delimiter //;
26677CREATE FUNCTION fn1 (i1 longtext) returns longtext
26678BEGIN
26679    return i1;
26680END//
26681delimiter ;//
26682
26683DROP FUNCTION fn1;
26684
26685--replace_column 5 <modified> 6 <created>
26686SHOW FUNCTION STATUS LIKE 'fn1';
26687
26688
26689# ==============================================================================
26690let $message= Section 3.1.9 - Routine body checks:;
26691--source include/show_msg80.inc
26692
26693USE db_storedproc;
26694
26695# ------------------------------------------------------------------------------
26696let $message= Testcase 4.9.1:;
26697--source include/show_msg80.inc
26698
26699# testcase: verify SELECT sql statements that may be executed by a stored procedure.
26700#
26701
26702--disable_warnings ONCE
26703DROP PROCEDURE IF EXISTS sp6;
26704
26705delimiter //;
26706CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26707BEGIN
26708    set @x = i3;
26709    set @a = i5;
26710    set @y = @x;
26711    set @b = @a;
26712    SELECT * from t9 limit 0, 100;
26713END//
26714delimiter ;//
26715
26716--sorted_result
26717CALL sp6 (10, 20, 30, 40, 50);
26718
26719# cleanup
26720DROP PROCEDURE sp6;
26721
26722
26723# ------------------------------------------------------------------------------
26724let $message= Testcase 4.9.2:;
26725--source include/show_msg80.inc
26726
26727# testcase: verify insert sql statements that can be executed by a stored procedure.
26728#
26729
26730--disable_warnings
26731DROP PROCEDURE IF EXISTS sp6;
26732drop  table IF EXISTS res_t9;
26733--enable_warnings
26734
26735  create table res_t9 (f1 int, f2 char(25), f3 int);
26736
26737delimiter //;
26738CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26739BEGIN
26740    set @x = i3;
26741    set @a = i5;
26742    set @y = @x;
26743    set @b = @a;
26744    insert into res_t9 values (@y, @a, 111);
26745    SELECT * from res_t9;
26746END//
26747delimiter ;//
26748
26749CALL sp6 (10, 20, 30, 40, 50);
26750
26751# cleanup
26752DROP PROCEDURE sp6;
26753drop table res_t9;
26754
26755
26756# ------------------------------------------------------------------------------
26757let $message= Testcase 4.9.3:;
26758--source include/show_msg80.inc
26759
26760# testcase: verify delete sql statements that may be executed by a stored procedure.
26761#
26762
26763--disable_warnings
26764DROP PROCEDURE IF EXISTS sp6;
26765drop  table IF EXISTS res_t9;
26766--enable_warnings
26767
26768  create table res_t9 (f1 int, f2 char(25), f3 int);
26769
26770delimiter //;
26771CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26772BEGIN
26773    set @x = i3;
26774    set @a = i5;
26775    set @y = @x;
26776    set @b = @a;
26777    insert into res_t9 values (@y, @a, 111);
26778    SELECT * from res_t9;
26779    delete from res_t9;
26780    SELECT * from res_t9;
26781END//
26782delimiter ;//
26783
26784
26785CALL sp6 (10, 20, 30, 40, 50);
26786
26787# cleanup
26788DROP PROCEDURE sp6;
26789drop table res_t9;
26790
26791
26792# ------------------------------------------------------------------------------
26793let $message= Testcase 4.9.4:;
26794--source include/show_msg80.inc
26795
26796# testcase: verify update sql statements that may be executed by a stored procedure.
26797#
26798
26799--disable_warnings
26800DROP PROCEDURE IF EXISTS sp6;
26801drop  table IF EXISTS res_t9;
26802--enable_warnings
26803
26804  create table res_t9 (f1 int, f2 char(25), f3 int);
26805
26806delimiter //;
26807CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26808BEGIN
26809    set @x = i3;
26810    set @a = i5;
26811    set @y = @x;
26812    set @b = @a;
26813    insert into res_t9 values (@y, @a, 111);
26814    SELECT * from res_t9;
26815    update res_t9 set f2 = 1000 where f2 = 50;
26816    SELECT * from res_t9;
26817END//
26818delimiter ;//
26819
26820CALL sp6 (10, 20, 30, 40, 50);
26821
26822# cleanup
26823DROP PROCEDURE sp6;
26824drop table res_t9;
26825
26826
26827# ------------------------------------------------------------------------------
26828let $message= Testcase 4.9.5:;
26829--source include/show_msg80.inc
26830
26831# testcase: verify create sql statements that may be executed by a stored procedure
26832#
26833--disable_warnings
26834DROP PROCEDURE IF EXISTS sp6;
26835drop table IF EXISTS res_t9;
26836--enable_warnings
26837
26838delimiter //;
26839CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26840BEGIN
26841   set @x = i1;
26842   set @y = i3;
26843   set @z = i5;
26844   set @a = @x;
26845   set @b = @y;
26846   set @c = @z;
26847   create table res_t9(f1 longtext, f2 longblob, f3 real);
26848   insert into res_t9 values (@a, @b, @c);
26849   SELECT * from res_t9;
26850END//
26851delimiter ;//
26852
26853CALL sp6 (10, 20, 30, 40, 50);
26854
26855# cleanup
26856DROP PROCEDURE sp6;
26857--disable_warnings ONCE
26858drop table IF EXISTS res_t9;
26859
26860# ------------------------------------------------------------------------------
26861let $message= Testcase 4.9.6:;
26862--source include/show_msg80.inc
26863
26864# testcase:  verify select/insert/update/create statements are disallowed in a function.
26865# updated testcase:  verify select/insert/update/create statements are ALLOWED in a function.
26866#
26867DROP FUNCTION IF EXISTS fn1;
26868
26869delimiter //;
26870--error ER_SP_NO_RETSET
26871CREATE FUNCTION fn1(i1 longtext) returns longtext
26872BEGIN
26873   SELECT * from t9 limit 0, 100;
26874   return i1;
26875END//
26876delimiter ;//
26877
26878DROP FUNCTION IF EXISTS fn1;
26879drop table IF EXISTS res_t9;
26880
26881create table res_t9 (f1 int, f2 char(25), f3 int);
26882insert into res_t9 values (10, 'abc', 20);
26883
26884delimiter //;
26885--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
26886CREATE FUNCTION fn1(i1 longtext) returns longtext
26887BEGIN
26888   delete from res_t9;
26889   drop table res_t9;
26890   return i1;
26891END//
26892delimiter ;//
26893
26894DROP FUNCTION IF EXISTS fn1;
26895drop table IF EXISTS res_t9;
26896
26897delimiter //;
26898--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
26899CREATE FUNCTION fn1(i1 longtext) returns longtext
26900BEGIN
26901    create table res_t9 (f1 longtext, f2 longblob, f3 real);
26902    drop table res_t9;
26903    return i1;
26904END//
26905delimiter ;//
26906
26907DROP FUNCTION IF EXISTS fn1;
26908drop  table IF EXISTS res_t9;
26909
26910create table res_t9 (f1 int, f2 char(25), f3 int);
26911
26912delimiter //;
26913--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
26914CREATE FUNCTION fn1(i1 longtext) returns longtext
26915BEGIN
26916   insert into res_t9 values (100, 'abc', 300);
26917   drop table res_t9;
26918   return i1;
26919END//
26920delimiter ;//
26921
26922DROP FUNCTION IF EXISTS fn1;
26923drop  table IF EXISTS res_t9;
26924
26925create table res_t9 (f1 int, f2 char(25), f3 int);
26926insert into res_t9 values (10, 'abc', 20);
26927
26928delimiter //;
26929--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
26930CREATE FUNCTION fn1(i1 longtext) returns longtext
26931BEGIN
26932   update res_t9 set f1 = 20;
26933   drop table res_t9;
26934   return i1;
26935END//
26936delimiter ;//
26937
26938# cleanup
26939drop table res_t9;
26940DROP FUNCTION IF EXISTS fn1;
26941
26942
26943# ------------------------------------------------------------------------------
26944let $message= Testcase 4.9.7:;
26945--source include/show_msg80.inc
26946
26947# testcase: verify create index sql statement that may be executed by a stored procedure
26948#
26949--disable_warnings
26950DROP PROCEDURE IF EXISTS sp6;
26951drop table IF EXISTS res_t9;
26952--enable_warnings
26953
26954  create table res_t9 (f1 longtext, f2 longblob, f3 real);
26955
26956delimiter //;
26957CREATE PROCEDURE sp6 (i1 longtext, i2 mediumint , i3 longblob, i4 year, i5 real)
26958BEGIN
26959    set @x = i1;
26960    set @y = i3;
26961    set @z = i5;
26962    set @a = @x;
26963    set @b = @y;
26964    set @c = @z;
26965    insert into res_t9 values (@a, @b, @c);
26966    SELECT * from res_t9;
26967    create index index_1 on res_t9 (f1 (5));
26968    show index from res_t9;
26969END//
26970delimiter ;//
26971
26972CALL sp6 (10, 20, 30, 40, 50);
26973
26974# cleanup
26975DROP PROCEDURE sp6;
26976drop table res_t9;
26977
26978
26979# ==============================================================================
26980#
26981# test plan section: 4.11 - verify handlers with continue and exit conditions
26982#
26983# ==============================================================================
26984let $message= Section 3.1._ - :;
26985--source include/show_msg80.inc
26986
26987USE db_storedproc;
26988
26989# ------------------------------------------------------------------------------
26990let $message= Testcase 4.11.1:;
26991--source include/show_msg80.inc
26992
26993# testcase: verify continue handler for error code 1318 (er_sp_wrong_no_of_args)
26994--disable_warnings
26995DROP PROCEDURE IF EXISTS h1;
26996DROP PROCEDURE IF EXISTS sp1;
26997--enable_warnings
26998
26999delimiter //;
27000CREATE PROCEDURE sp1 (x int, y int)
27001BEGIN
27002    set @y=x;
27003END//
27004delimiter ;//
27005
27006delimiter //;
27007CREATE PROCEDURE h1 ()
27008BEGIN
27009    declare continue handler for 1318 set @x2 = 1;
27010    set @x=0;
27011  CALL sp1 (1);
27012    set @x=1;
27013    SELECT @x, @x2;
27014END//
27015delimiter ;//
27016
27017CALL h1 ();
27018
27019# cleanup
27020DROP PROCEDURE h1;
27021DROP PROCEDURE sp1;
27022
27023
27024
27025# ------------------------------------------------------------------------------
27026let $message= Testcase 4.11.2:;
27027--source include/show_msg80.inc
27028
27029# testcase: verify continue handler for error code 1305 (er_sp_does_not_exist)
27030
27031--disable_warnings ONCE
27032DROP PROCEDURE IF EXISTS h1;
27033
27034delimiter //;
27035CREATE PROCEDURE h1 ()
27036BEGIN
27037    declare continue handler for 1305 set @x2 = 1;
27038    set @x=0;
27039  CALL sp1 (1);
27040    set @x=1;
27041    SELECT @x, @x2;
27042END//
27043delimiter ;//
27044
27045CALL h1 ();
27046
27047# cleanup
27048DROP PROCEDURE h1;
27049
27050
27051# ------------------------------------------------------------------------------
27052let $message= Testcase 4.11.3:;
27053--source include/show_msg80.inc
27054
27055# testcase: verify exit handler for error code 1318 (er_sp_wrong_no_of_args)
27056
27057--disable_warnings
27058DROP PROCEDURE IF EXISTS h1;
27059DROP PROCEDURE IF EXISTS sp1;
27060--enable_warnings
27061
27062delimiter //;
27063CREATE PROCEDURE sp1 (x int, y int)
27064BEGIN
27065    set @xx=1;
27066END//
27067delimiter ;//
27068
27069delimiter //;
27070CREATE PROCEDURE h1 ()
27071BEGIN
27072    declare exit handler for 1318 set @x2 = 1;
27073    set @x=1;
27074    set @x2=0;
27075  CALL sp1 (1);
27076    set @x=0;
27077END//
27078delimiter ;//
27079
27080CALL h1();
27081
27082  SELECT @x, @x2;
27083
27084# cleanup
27085DROP PROCEDURE h1;
27086DROP PROCEDURE sp1;
27087
27088
27089
27090# ------------------------------------------------------------------------------
27091let $message= Testcase 4.11.4:;
27092--source include/show_msg80.inc
27093
27094# testcase: verify exit handler for error code 1305 (er_sp_does_not_exist)
27095
27096--disable_warnings ONCE
27097DROP PROCEDURE IF EXISTS h1;
27098
27099delimiter //;
27100CREATE PROCEDURE h1 ()
27101BEGIN
27102    declare exit handler for 1305 set @x2 = 1;
27103    set @x=1;
27104    set @x2=0;
27105  CALL sp1 (1);
27106    set @x=0;
27107END//
27108delimiter ;//
27109
27110CALL h1 ();
27111
27112  SELECT @x, @x2;
27113
27114# cleanup
27115DROP PROCEDURE h1;
27116
27117
27118
27119# ------------------------------------------------------------------------------
27120let $message= Testcase 4.11.5:;
27121--source include/show_msg80.inc
27122
27123# testcase: verify undo handler for error code 1318 (er_sp_wrong_no_of_args)
27124
27125
27126--disable_warnings
27127DROP PROCEDURE IF EXISTS h1;
27128DROP PROCEDURE IF EXISTS sp1;
27129--enable_warnings
27130
27131delimiter //;
27132CREATE PROCEDURE sp1 (x int, y int)
27133BEGIN
27134    set @y=x;
27135END//
27136delimiter ;//
27137
27138delimiter //;
27139CREATE PROCEDURE h1 ()
27140BEGIN
27141    declare continue handler for 1318 set @x2 = 1;
27142    set @x=0;
27143  CALL sp1 (1);
27144    set @x=1;
27145    SELECT @x, @x2;
27146END//
27147delimiter ;//
27148
27149CALL h1 ();
27150
27151# cleanup
27152DROP PROCEDURE h1;
27153DROP PROCEDURE sp1;
27154
27155
27156
27157# ------------------------------------------------------------------------------
27158let $message= Testcase 4.11.6:;
27159--source include/show_msg80.inc
27160
27161# testcase: verify undo handler for error code 1305 (er_sp_does_not_exist)
27162
27163
27164--disable_warnings
27165DROP PROCEDURE IF EXISTS h1;
27166DROP PROCEDURE IF EXISTS sp1;
27167--enable_warnings
27168
27169delimiter //;
27170CREATE PROCEDURE sp1 (x int, y int)
27171BEGIN
27172    set @y=x;
27173END//
27174delimiter ;//
27175
27176delimiter //;
27177CREATE PROCEDURE h1 ()
27178BEGIN
27179    declare continue handler for 1318 set @x2 = 1;
27180    set @x=0;
27181  CALL sp1 (1);
27182    set @x=1;
27183    SELECT @x, @x2;
27184END//
27185delimiter ;//
27186
27187CALL h1 ();
27188
27189# cleanup
27190DROP PROCEDURE h1;
27191DROP PROCEDURE sp1;
27192
27193
27194
27195# ------------------------------------------------------------------------------
27196let $message= Testcase 4.11.7:;
27197--source include/show_msg80.inc
27198
27199# testcase: verify continue handler for sql state 42000 (er_sp_wrong_no_of_args)
27200
27201--disable_warnings
27202DROP PROCEDURE IF EXISTS h1;
27203DROP PROCEDURE IF EXISTS sp1;
27204--enable_warnings
27205
27206delimiter //;
27207CREATE PROCEDURE sp1 (x int, y int)
27208BEGIN
27209    set @y=x;
27210END//
27211delimiter ;//
27212
27213delimiter //;
27214CREATE PROCEDURE h1 ()
27215BEGIN
27216    declare continue handler for sqlstate '42000' set @x2 = 1;
27217    set @x=0;
27218  CALL sp1 (1);
27219    set @x=1;
27220    SELECT @x, @x2;
27221END//
27222delimiter ;//
27223
27224CALL h1 ();
27225
27226# cleanup
27227DROP PROCEDURE h1;
27228DROP PROCEDURE sp1;
27229
27230
27231# ------------------------------------------------------------------------------
27232let $message= Testcase 4.11.8:;
27233--source include/show_msg80.inc
27234
27235# testcase: verify continue handler for sql state 42000 (er_sp_does_not_exist)
27236
27237--disable_warnings ONCE
27238DROP PROCEDURE IF EXISTS h1;
27239
27240
27241delimiter //;
27242CREATE PROCEDURE h1 ()
27243BEGIN
27244    declare continue handler for sqlstate '42000' set @x2 = 1;
27245    set @x=0;
27246  CALL sp1 (1);
27247    set @x=1;
27248    SELECT @x, @x2;
27249END//
27250delimiter ;//
27251
27252CALL h1 ();
27253
27254# cleanup
27255DROP PROCEDURE h1;
27256
27257
27258# ------------------------------------------------------------------------------
27259let $message= Testcase 4.11.9:;
27260--source include/show_msg80.inc
27261
27262# testcase: verify exit handler for sql state 42000 (er_sp_wrong_no_of_args)
27263
27264--disable_warnings
27265DROP PROCEDURE IF EXISTS h1;
27266DROP PROCEDURE IF EXISTS sp1;
27267--enable_warnings
27268
27269delimiter //;
27270CREATE PROCEDURE sp1 (x int, y int)
27271BEGIN
27272    set @xx=1;
27273END//
27274delimiter ;//
27275
27276delimiter //;
27277CREATE PROCEDURE h1 ()
27278BEGIN
27279    declare exit handler for sqlstate '42000' set @x2 = 1;
27280    set @x=1;
27281    set @x2=0;
27282  CALL sp1 (1);
27283    set @x=0;
27284END//
27285delimiter ;//
27286
27287CALL h1();
27288
27289  SELECT @x, @x2;
27290
27291# cleanup
27292DROP PROCEDURE h1;
27293DROP PROCEDURE sp1;
27294
27295
27296
27297# ------------------------------------------------------------------------------
27298let $message= Testcase 4.11.10:;
27299--source include/show_msg80.inc
27300
27301# testcase: verify exit handler for sql state 42000 (er_sp_does_not_exist)
27302
27303--disable_warnings ONCE
27304DROP PROCEDURE IF EXISTS h1;
27305
27306delimiter //;
27307CREATE PROCEDURE h1 ()
27308BEGIN
27309    declare exit handler for sqlstate '42000' set @x2 = 1;
27310    set @x=1;
27311    set @x2=0;
27312  CALL sp1 (1);
27313    set @x=0;
27314END//
27315delimiter ;//
27316
27317CALL h1 ();
27318  SELECT @x, @x2;
27319
27320# cleanup
27321DROP PROCEDURE h1;
27322
27323
27324
27325# ------------------------------------------------------------------------------
27326let $message= Testcase 4.11.11:;
27327--source include/show_msg80.inc
27328
27329# testcase: verify undo handler for sql state 42000 (er_sp_wrong_no_of_args)
27330
27331--disable_warnings
27332DROP PROCEDURE IF EXISTS h1;
27333DROP PROCEDURE IF EXISTS sp1;
27334--enable_warnings
27335
27336delimiter //;
27337CREATE PROCEDURE sp1 (x int, y int)
27338BEGIN
27339    set @y=x;
27340END//
27341delimiter ;//
27342
27343delimiter //;
27344CREATE PROCEDURE h1 ()
27345BEGIN
27346    declare continue handler for sqlstate '42000' set @x2 = 1;
27347    set @x=0;
27348  CALL sp1 (1);
27349    set @x=1;
27350    SELECT @x, @x2;
27351END//
27352delimiter ;//
27353
27354CALL h1 ();
27355
27356# cleanup
27357DROP PROCEDURE h1;
27358DROP PROCEDURE sp1;
27359
27360
27361
27362# ------------------------------------------------------------------------------
27363let $message= Testcase 4.11.12:;
27364--source include/show_msg80.inc
27365
27366# testcase: verify undo handler for sql state 42000 (er_sp_does_not_exist)
27367
27368
27369--disable_warnings
27370DROP PROCEDURE IF EXISTS h1;
27371DROP PROCEDURE IF EXISTS sp1;
27372--enable_warnings
27373
27374delimiter //;
27375CREATE PROCEDURE sp1 (x int, y int)
27376BEGIN
27377    set @y=x;
27378END//
27379delimiter ;//
27380
27381delimiter //;
27382CREATE PROCEDURE h1 ()
27383BEGIN
27384    declare continue handler for sqlstate '42000' set @x2 = 1;
27385    set @x=0;
27386  CALL sp1 (1);
27387    set @x=1;
27388    SELECT @x, @x2;
27389END//
27390delimiter ;//
27391
27392CALL h1 ();
27393
27394# cleanup
27395DROP PROCEDURE h1;
27396DROP PROCEDURE sp1;
27397
27398# ------------------------------------------------------------------------------
27399let $message= Testcase 4.11.13:;
27400--source include/show_msg80.inc
27401
27402# testcase: verify continue handler for sql state 02000 (er_sp_fetch_no_data)
27403
27404--disable_warnings
27405DROP PROCEDURE IF EXISTS h1;
27406drop table IF EXISTS res_t1;
27407drop table IF EXISTS res_t2;
27408--enable_warnings
27409
27410  create table res_t1(w char, x char);
27411
27412  create table res_t2(y char, z char);
27413
27414delimiter //;
27415CREATE PROCEDURE h1()
27416BEGIN
27417    declare done int default 0;
27418    declare a, b char;
27419    declare cur1 cursor for SELECT w, x from res_t1;
27420    declare continue handler for sqlstate '02000' set done = 1;
27421    open cur1;
27422    repeat
27423      SELECT done;
27424      fetch cur1 into a, b;
27425      SELECT done;
27426      if not done then
27427        insert into res_t2 values (a, b);
27428      END if;
27429    until done END repeat;
27430    SELECT done;
27431    close cur1;
27432END//
27433delimiter ;//
27434
27435CALL h1();
27436
27437# cleanup
27438--disable_warnings
27439DROP PROCEDURE IF EXISTS h1;
27440DROP TABLE IF EXISTS res_t1;
27441DROP TABLE IF EXISTS res_t2;
27442--enable_warnings
27443
27444
27445
27446# ------------------------------------------------------------------------------
27447let $message= Testcase 4.11.14:;
27448--source include/show_msg80.inc
27449
27450# testcase: verify continue handler for error code 1329 (er_sp_fetch_no_data)
27451
27452--disable_warnings
27453DROP PROCEDURE IF EXISTS h1;
27454drop table IF EXISTS res_t1;
27455drop table IF EXISTS res_t2;
27456
27457  create table res_t1(w char, x char);
27458
27459  create table res_t2(y char, z char);
27460
27461delimiter //;
27462CREATE PROCEDURE h1()
27463BEGIN
27464    declare done int default 0;
27465    declare a, b char;
27466    declare cur1 cursor for SELECT w, x from res_t1;
27467    declare continue handler for sqlstate '02000' set done = 1;
27468    open cur1;
27469    repeat
27470      SELECT done;
27471      fetch cur1 into a, b;
27472      SELECT done;
27473      if not done then
27474        insert into res_t2 values (a, b);
27475      END if;
27476    until done END repeat;
27477    SELECT done;
27478    close cur1;
27479END//
27480delimiter ;//
27481
27482CALL h1();
27483
27484# cleanup
27485--disable_warnings
27486DROP PROCEDURE IF EXISTS h1;
27487DROP TABLE IF EXISTS res_t1;
27488DROP TABLE IF EXISTS res_t2;
27489--enable_warnings
27490
27491
27492
27493# ------------------------------------------------------------------------------
27494let $message= Testcase 4.11.15:;
27495--source include/show_msg80.inc
27496
27497# testcase: verify exit handler for error code 1329 (er_sp_fetch_no_data)
27498
27499--disable_warnings
27500DROP PROCEDURE IF EXISTS h1;
27501drop table IF EXISTS res_t1;
27502drop table IF EXISTS res_t2;
27503--enable_warnings
27504
27505  create table res_t1(w char, x char);
27506
27507  create table res_t2(y char, z char);
27508
27509delimiter //;
27510CREATE PROCEDURE h1()
27511BEGIN
27512    declare done int default 0;
27513    declare a, b char;
27514    declare cur1 cursor for SELECT w, x from res_t1;
27515    declare continue handler for sqlstate '02000' set done = 1;
27516    open cur1;
27517    repeat
27518      SELECT done;
27519      set @x=0;
27520      fetch cur1 into a, b;
27521      SELECT @x=1;
27522      if not done then
27523        insert into res_t2 values (a, b);
27524      END if;
27525    until done END repeat;
27526    SELECT done;
27527    close cur1;
27528END//
27529delimiter ;//
27530
27531CALL h1();
27532
27533# cleanup
27534--disable_warnings
27535DROP PROCEDURE IF EXISTS h1;
27536DROP TABLE IF EXISTS res_t1;
27537DROP TABLE IF EXISTS res_t2;
27538--enable_warnings
27539
27540
27541# ------------------------------------------------------------------------------
27542let $message= Testcase 4.11.16:;
27543--source include/show_msg80.inc
27544
27545# testcase: verify exit handler for sql state '02000' (er_sp_fetch_no_data)
27546
27547--disable_warnings
27548DROP PROCEDURE IF EXISTS h1;
27549drop table IF EXISTS res_t1;
27550drop table IF EXISTS res_t2;
27551--enable_warnings
27552
27553  create table res_t1(w char, x char);
27554
27555  create table res_t2(y char, z char);
27556
27557delimiter //;
27558CREATE PROCEDURE h1()
27559BEGIN
27560    declare done int default 0;
27561    declare a, b char;
27562    declare cur1 cursor for SELECT w, x from res_t1;
27563    declare continue handler for sqlstate '02000' set done = 1;
27564    open cur1;
27565    repeat
27566      SELECT done;
27567      set @x=0;
27568      fetch cur1 into a, b;
27569      SELECT @x=1;
27570      if not done then
27571        insert into res_t2 values (a, b);
27572      END if;
27573      until done END repeat;
27574    SELECT done;
27575    close cur1;
27576END//
27577delimiter ;//
27578
27579CALL h1();
27580
27581# cleanup
27582--disable_warnings
27583DROP PROCEDURE IF EXISTS h1;
27584DROP TABLE IF EXISTS res_t1;
27585DROP TABLE IF EXISTS res_t2;
27586--enable_warnings
27587
27588
27589# ------------------------------------------------------------------------------
27590let $message= Testcase 4.11.17:;
27591--source include/show_msg80.inc
27592
27593# testcase: verify continue handler for sql state HY000 (er_sp_wrong_no_of_fetch_args)
27594
27595--disable_warnings
27596DROP PROCEDURE IF EXISTS h1;
27597drop table IF EXISTS res_t1;
27598drop table IF EXISTS res_t2;
27599--enable_warnings
27600
27601  create table res_t1(w char, x char);
27602
27603  insert into res_t1 values('a', 'b');
27604  insert into res_t1 values('c', 'd');
27605
27606  create table res_t2(y char, z char);
27607
27608delimiter //;
27609CREATE PROCEDURE h1()
27610BEGIN
27611    declare done int default 0;
27612    declare a, b char;
27613    declare cur1 cursor for SELECT w, x from res_t1;
27614    declare continue handler for sqlstate 'HY000' set done = 1;
27615    open cur1;
27616    SELECT done;
27617    fetch cur1 into a;
27618    SELECT done;
27619    close cur1;
27620END//
27621delimiter ;//
27622
27623CALL h1();
27624
27625# cleanup
27626--disable_warnings
27627DROP PROCEDURE IF EXISTS h1;
27628DROP TABLE IF EXISTS res_t1;
27629DROP TABLE IF EXISTS res_t2;
27630--enable_warnings
27631
27632
27633# ------------------------------------------------------------------------------
27634let $message= Testcase 4.11.18:;
27635--source include/show_msg80.inc
27636
27637# testcase: verify continue handler for error code 1328 (er_sp_wrong_no_of_fetch_args)
27638
27639--disable_warnings
27640DROP PROCEDURE IF EXISTS h1;
27641drop table IF EXISTS res_t1;
27642drop table IF EXISTS res_t2;
27643--enable_warnings
27644
27645  create table res_t1(w char, x char);
27646
27647  insert into res_t1 values('a', 'b');
27648  insert into res_t1 values('c', 'd');
27649
27650  create table res_t2(y char, z char);
27651
27652delimiter //;
27653CREATE PROCEDURE h1()
27654BEGIN
27655    declare done int default 0;
27656    declare a, b char;
27657    declare cur1 cursor for SELECT w, x from res_t1;
27658    declare continue handler for 1328 set done = 1;
27659    open cur1;
27660    SELECT done;
27661    fetch cur1 into a;
27662    SELECT done;
27663    close cur1;
27664END//
27665delimiter ;//
27666
27667CALL h1();
27668
27669# cleanup
27670--disable_warnings
27671DROP PROCEDURE IF EXISTS h1;
27672DROP TABLE IF EXISTS res_t1;
27673DROP TABLE IF EXISTS res_t2;
27674--enable_warnings
27675
27676# ------------------------------------------------------------------------------
27677let $message= Testcase 4.11.19:;
27678--source include/show_msg80.inc
27679
27680# testcase: verify exit handler for sql state HY000 (er_sp_wrong_no_of_fetch_args)
27681
27682--disable_warnings
27683DROP PROCEDURE IF EXISTS h1;
27684drop table IF EXISTS res_t1;
27685drop table IF EXISTS res_t2;
27686--enable_warnings
27687
27688  create table res_t1(w char, x char);
27689
27690  insert into res_t1 values('a', 'b');
27691  insert into res_t1 values('c', 'd');
27692
27693  create table res_t2(y char, z char);
27694
27695delimiter //;
27696CREATE PROCEDURE h1()
27697BEGIN
27698    declare done int default 0;
27699    declare a, b char;
27700    declare cur1 cursor for SELECT w, x from res_t1;
27701    declare exit handler for sqlstate 'HY000' set done = 1;
27702    open cur1;
27703    SELECT done;
27704    set @x=0;
27705    fetch cur1 into a;
27706    set @x=1;
27707    SELECT done, @x;
27708    close cur1;
27709END//
27710delimiter ;//
27711
27712CALL h1();
27713
27714# cleanup
27715--disable_warnings
27716DROP PROCEDURE IF EXISTS h1;
27717DROP TABLE IF EXISTS res_t1;
27718DROP TABLE IF EXISTS res_t2;
27719--enable_warnings
27720
27721# ------------------------------------------------------------------------------
27722let $message= Testcase 4.11.20:;
27723--source include/show_msg80.inc
27724
27725# testcase: verify exit handler for error code 1328 (er_sp_wrong_no_of_fetch_args)
27726
27727--disable_warnings
27728DROP PROCEDURE IF EXISTS h1;
27729drop table IF EXISTS res_t1;
27730drop table IF EXISTS res_t2;
27731--enable_warnings
27732
27733  create table res_t1(w char, x char);
27734
27735  insert into res_t1 values('a', 'b');
27736  insert into res_t1 values('c', 'd');
27737
27738  create table res_t2(y char, z char);
27739
27740delimiter //;
27741CREATE PROCEDURE h1()
27742BEGIN
27743    declare done int default 0;
27744    declare a, b char;
27745    declare cur1 cursor for SELECT w, x from res_t1;
27746    declare exit handler for 1328 set done = 1;
27747    open cur1;
27748    SELECT done;
27749    set @x=0;
27750    fetch cur1 into a;
27751    set @x=1;
27752    SELECT done;
27753    close cur1;
27754END//
27755delimiter ;//
27756
27757CALL h1();
27758
27759# cleanup
27760--disable_warnings
27761DROP PROCEDURE IF EXISTS h1;
27762DROP TABLE IF EXISTS res_t1;
27763DROP TABLE IF EXISTS res_t2;
27764--enable_warnings
27765
27766
27767# ------------------------------------------------------------------------------
27768let $message= Testcase 4.11.21:;
27769--source include/show_msg80.inc
27770
27771# testcase: verify continue handler for error code 1325 (er_sp_cursor_already_open)
27772
27773--disable_warnings
27774DROP PROCEDURE IF EXISTS h1;
27775drop table IF EXISTS res_t1;
27776drop table IF EXISTS res_t2;
27777--enable_warnings
27778
27779  create table res_t1(w char, x char);
27780
27781  insert into res_t1 values('a', 'b');
27782  insert into res_t1 values('c', 'd');
27783
27784  create table res_t2(y char, z char);
27785
27786delimiter //;
27787CREATE PROCEDURE h1()
27788BEGIN
27789    declare done int default 0;
27790    declare a, b char;
27791    declare cur1 cursor for SELECT w, x from res_t1;
27792    declare continue handler for 1325 set done = 1;
27793    open cur1;
27794    SELECT done;
27795    open cur1;
27796    SELECT done;
27797    close cur1;
27798END//
27799delimiter ;//
27800
27801CALL h1();
27802
27803# cleanup
27804--disable_warnings
27805DROP PROCEDURE IF EXISTS h1;
27806DROP TABLE IF EXISTS res_t1;
27807DROP TABLE IF EXISTS res_t2;
27808--enable_warnings
27809
27810# ------------------------------------------------------------------------------
27811let $message= Testcase 4.11.22:;
27812--source include/show_msg80.inc
27813
27814# testcase: verify continue handler for sqlstate 24000 (er_sp_cursor_already_open)
27815
27816--disable_warnings
27817DROP PROCEDURE IF EXISTS h1;
27818drop table IF EXISTS res_t1;
27819drop table IF EXISTS res_t2;
27820--enable_warnings
27821
27822  create table res_t1(w char, x char);
27823
27824  insert into res_t1 values('a', 'b');
27825  insert into res_t1 values('c', 'd');
27826
27827  create table res_t2(y char, z char);
27828
27829delimiter //;
27830CREATE PROCEDURE h1()
27831BEGIN
27832    declare done int default 0;
27833    declare a, b char;
27834    declare cur1 cursor for SELECT w, x from res_t1;
27835    declare continue handler for 1325 set done = 1;
27836    open cur1;
27837    SELECT done;
27838    open cur1;
27839    set @x=1;
27840    SELECT done, @x;
27841    close cur1;
27842END//
27843delimiter ;//
27844
27845CALL h1();
27846
27847# cleanup
27848--disable_warnings
27849DROP PROCEDURE IF EXISTS h1;
27850DROP TABLE IF EXISTS res_t1;
27851DROP TABLE IF EXISTS res_t2;
27852--enable_warnings
27853
27854# ------------------------------------------------------------------------------
27855let $message= Testcase 4.11.23:;
27856--source include/show_msg80.inc
27857
27858# testcase: verify exit handler for error code 1325 (er_sp_cursor_already_open)
27859
27860--disable_warnings
27861DROP PROCEDURE IF EXISTS h1;
27862drop table IF EXISTS res_t1;
27863drop table IF EXISTS res_t2;
27864--enable_warnings
27865
27866  create table res_t1(w char, x char);
27867
27868  insert into res_t1 values('a', 'b');
27869  insert into res_t1 values('c', 'd');
27870
27871  create table res_t2(y char, z char);
27872
27873delimiter //;
27874CREATE PROCEDURE h1()
27875BEGIN
27876    declare done int default 0;
27877    declare a, b char;
27878    declare cur1 cursor for SELECT w, x from res_t1;
27879    declare exit handler for 1325 set done = 1;
27880    open cur1;
27881    set @x=0;
27882    SELECT done;
27883    open cur1;
27884    set @x=1;
27885    SELECT done;
27886    close cur1;
27887END//
27888delimiter ;//
27889
27890CALL h1();
27891
27892# cleanup
27893--disable_warnings
27894DROP PROCEDURE IF EXISTS h1;
27895DROP TABLE IF EXISTS res_t1;
27896DROP TABLE IF EXISTS res_t2;
27897--enable_warnings
27898
27899# ------------------------------------------------------------------------------
27900let $message= Testcase 4.11.24:;
27901--source include/show_msg80.inc
27902
27903# testcase: verify exit handler for sqlstate 24000 (er_sp_cursor_already_open)
27904
27905--disable_warnings
27906DROP PROCEDURE IF EXISTS h1;
27907drop table IF EXISTS res_t1;
27908drop table IF EXISTS res_t2;
27909--enable_warnings
27910
27911  create table res_t1(w char, x char);
27912
27913  insert into res_t1 values('a', 'b');
27914  insert into res_t1 values('c', 'd');
27915
27916  create table res_t2(y char, z char);
27917
27918delimiter //;
27919CREATE PROCEDURE h1()
27920BEGIN
27921    declare done int default 0;
27922    declare a, b char;
27923    declare cur1 cursor for SELECT w, x from res_t1;
27924    declare exit handler for sqlstate '24000' set done = 1;
27925    open cur1;
27926    set @x=0;
27927    SELECT done;
27928    open cur1;
27929    set @x=1;
27930    SELECT done, @x;
27931    close cur1;
27932END//
27933delimiter ;//
27934
27935CALL h1();
27936
27937# cleanup
27938--disable_warnings
27939DROP PROCEDURE IF EXISTS h1;
27940DROP TABLE IF EXISTS res_t1;
27941DROP TABLE IF EXISTS res_t2;
27942--enable_warnings
27943
27944# ------------------------------------------------------------------------------
27945let $message= Testcase 4.11.25:;
27946--source include/show_msg80.inc
27947
27948# testcase: verify continue handler for error code 1326 (er_sp_cursor_not_open)
27949
27950--disable_warnings
27951DROP PROCEDURE IF EXISTS h1;
27952drop table IF EXISTS res_t1;
27953drop table IF EXISTS res_t2;
27954--enable_warnings
27955
27956  create table res_t1(w char, x char);
27957
27958  insert into res_t1 values('a', 'b');
27959  insert into res_t1 values('c', 'd');
27960
27961  create table res_t2(y char, z char);
27962
27963delimiter //;
27964CREATE PROCEDURE h1()
27965BEGIN
27966    declare done int default 0;
27967    declare a, b char;
27968    declare cur1 cursor for SELECT w, x from res_t1;
27969    declare continue handler for 1326 set done = 1;
27970    set @x=0;
27971    fetch cur1 into a, b;
27972    set @x=1;
27973    SELECT done, @x;
27974END//
27975delimiter ;//
27976
27977CALL h1();
27978
27979# cleanup
27980--disable_warnings
27981DROP PROCEDURE IF EXISTS h1;
27982DROP TABLE IF EXISTS res_t1;
27983DROP TABLE IF EXISTS res_t2;
27984--enable_warnings
27985
27986
27987
27988# ------------------------------------------------------------------------------
27989let $message= Testcase 4.11.26:;
27990--source include/show_msg80.inc
27991
27992# testcase: verify continue handler for sqlstate 24000 (er_sp_cursor_not_open)
27993
27994--disable_warnings
27995DROP PROCEDURE IF EXISTS h1;
27996drop table IF EXISTS res_t1;
27997drop table IF EXISTS res_t2;
27998--enable_warnings
27999
28000  create table res_t1(w char, x char);
28001
28002  insert into res_t1 values('a', 'b');
28003  insert into res_t1 values('c', 'd');
28004
28005  create table res_t2(y char, z char);
28006
28007delimiter //;
28008CREATE PROCEDURE h1()
28009BEGIN
28010    declare done int default 0;
28011    declare a, b char;
28012    declare cur1 cursor for SELECT w, x from res_t1;
28013    declare continue handler for sqlstate '24000' set done = 1;
28014    set @x=0;
28015    fetch cur1 into a, b;
28016    set @x=1;
28017    SELECT done, @x;
28018END//
28019delimiter ;//
28020
28021CALL h1();
28022
28023# cleanup
28024--disable_warnings
28025DROP PROCEDURE IF EXISTS h1;
28026DROP TABLE IF EXISTS res_t1;
28027DROP TABLE IF EXISTS res_t2;
28028--enable_warnings
28029
28030
28031# ------------------------------------------------------------------------------
28032let $message= Testcase 4.11.27:;
28033--source include/show_msg80.inc
28034
28035# testcase: verify exit handler for error code 1326 (er_sp_cursor_not_open)
28036
28037--disable_warnings
28038DROP PROCEDURE IF EXISTS h1;
28039drop table IF EXISTS res_t1;
28040drop table IF EXISTS res_t2;
28041--enable_warnings
28042
28043  create table res_t1(w char, x char);
28044
28045  insert into res_t1 values('a', 'b');
28046  insert into res_t1 values('c', 'd');
28047
28048  create table res_t2(y char, z char);
28049
28050delimiter //;
28051CREATE PROCEDURE h1()
28052BEGIN
28053    declare done int default 0;
28054    declare a, b char;
28055    declare cur1 cursor for SELECT w, x from res_t1;
28056    declare exit handler for 1326 set done = 1;
28057    set @x=0;
28058    fetch cur1 into a, b;
28059    set @x=1;
28060    SELECT done, @x;
28061END//
28062delimiter ;//
28063
28064CALL h1();
28065
28066# cleanup
28067--disable_warnings
28068DROP PROCEDURE IF EXISTS h1;
28069DROP TABLE IF EXISTS res_t1;
28070DROP TABLE IF EXISTS res_t2;
28071--enable_warnings
28072
28073
28074# ------------------------------------------------------------------------------
28075let $message= Testcase 4.11.28:;
28076--source include/show_msg80.inc
28077
28078# testcase: verify exit handler for sqlstate 24000 (er_sp_cursor_not_open)
28079
28080--disable_warnings
28081DROP PROCEDURE IF EXISTS h1;
28082drop table IF EXISTS res_t1;
28083drop table IF EXISTS res_t2;
28084--enable_warnings
28085
28086  create table res_t1(w char, x char);
28087
28088  insert into res_t1 values('a', 'b');
28089  insert into res_t1 values('c', 'd');
28090
28091  create table res_t2(y char, z char);
28092
28093delimiter //;
28094CREATE PROCEDURE h1()
28095BEGIN
28096    declare done int default 0;
28097    declare a, b char;
28098    declare cur1 cursor for SELECT w, x from res_t1;
28099    declare exit handler for sqlstate '24000' set done = 1;
28100    set @x=0;
28101    fetch cur1 into a, b;
28102    set @x=1;
28103    SELECT done, @x;
28104END//
28105delimiter ;//
28106
28107CALL h1();
28108
28109# cleanup
28110--disable_warnings
28111DROP PROCEDURE IF EXISTS h1;
28112drop table IF EXISTS res_t1;
28113drop table IF EXISTS res_t2;
28114--enable_warnings
28115
28116
28117# ------------------------------------------------------------------------------
28118let $message= Testcase 4.11.29:;
28119--source include/show_msg80.inc
28120
28121# testcase: verify continue handler for error code 1339 (er_sp_case_not_found)
28122
28123--disable_warnings
28124DROP PROCEDURE IF EXISTS h1;
28125drop table IF EXISTS res_t1;
28126drop table IF EXISTS res_t2;
28127--enable_warnings
28128
28129  create table res_t1(w char, x char);
28130
28131  insert into res_t1 values('a', 'b');
28132  insert into res_t1 values('c', 'd');
28133
28134  create table res_t2(y char, z char);
28135
28136delimiter //;
28137CREATE PROCEDURE h1()
28138BEGIN
28139    declare done int default 0;
28140    declare a, b char;
28141    declare cur1 cursor for SELECT w, x from res_t1;
28142    declare continue handler for 1339 set done = 1;
28143    set @x=0;
28144    case @x
28145          when 1 then set @x=10;
28146          when 2 then set @x=11;
28147    END case;
28148    set @x=1;
28149    SELECT done, @x;
28150END//
28151delimiter ;//
28152
28153CALL h1();
28154
28155# cleanup
28156--disable_warnings
28157DROP PROCEDURE IF EXISTS h1;
28158drop table IF EXISTS res_t1;
28159drop table IF EXISTS res_t2;
28160--enable_warnings
28161
28162
28163# ------------------------------------------------------------------------------
28164let $message= Testcase 4.11.30:;
28165--source include/show_msg80.inc
28166
28167# testcase: verify continue handler for sqlstate 20000 (er_sp_case_not_found)
28168
28169--disable_warnings
28170DROP PROCEDURE IF EXISTS h1;
28171drop table IF EXISTS res_t1;
28172drop table IF EXISTS res_t2;
28173--enable_warnings
28174
28175  create table res_t1(w char, x char);
28176
28177  insert into res_t1 values('a', 'b');
28178  insert into res_t1 values('c', 'd');
28179
28180  create table res_t2(y char, z char);
28181
28182delimiter //;
28183CREATE PROCEDURE h1()
28184BEGIN
28185    declare done int default 0;
28186    declare a, b char;
28187    declare cur1 cursor for SELECT w, x from res_t1;
28188    declare continue handler for sqlstate '20000' set done = 1;
28189    set @x=0;
28190    case @x
28191          when 1 then set @x=10;
28192          when 2 then set @x=11;
28193    END case;
28194    set @x=1;
28195    SELECT done, @x;
28196END//
28197delimiter ;//
28198
28199CALL h1();
28200
28201# cleanup
28202--disable_warnings
28203DROP PROCEDURE IF EXISTS h1;
28204drop table IF EXISTS res_t1;
28205drop table IF EXISTS res_t2;
28206--enable_warnings
28207
28208
28209# ------------------------------------------------------------------------------
28210let $message= Testcase 4.11.31:;
28211--source include/show_msg80.inc
28212
28213# testcase: verify exit handler for error code 1339 (er_sp_case_not_found)
28214
28215--disable_warnings
28216DROP PROCEDURE IF EXISTS h1;
28217drop table IF EXISTS res_t1;
28218drop table IF EXISTS res_t2;
28219--enable_warnings
28220
28221  create table res_t1(w char, x char);
28222
28223  insert into res_t1 values('a', 'b');
28224  insert into res_t1 values('c', 'd');
28225
28226  create table res_t2(y char, z char);
28227
28228delimiter //;
28229CREATE PROCEDURE h1()
28230BEGIN
28231    declare done int default 0;
28232    declare a, b char;
28233    declare cur1 cursor for SELECT w, x from res_t1;
28234    declare exit handler for 1339 set done = 1;
28235    set @x=0;
28236    case @x
28237          when 1 then set @x=10;
28238          when 2 then set @x=11;
28239    END case;
28240    set @x=1;
28241    SELECT done, @x;
28242END//
28243delimiter ;//
28244
28245CALL h1();
28246
28247# cleanup
28248--disable_warnings
28249DROP PROCEDURE IF EXISTS h1;
28250drop table IF EXISTS res_t1;
28251drop table IF EXISTS res_t2;
28252--enable_warnings
28253
28254
28255# ------------------------------------------------------------------------------
28256let $message= Testcase 4.11.32:;
28257--source include/show_msg80.inc
28258
28259# testcase: verify exit handler for sqlstate 20000 (er_sp_case_not_found)
28260
28261--disable_warnings
28262DROP PROCEDURE IF EXISTS h1;
28263drop table IF EXISTS res_t1;
28264drop table IF EXISTS res_t2;
28265--enable_warnings
28266
28267  create table res_t1(w char, x char);
28268
28269  insert into res_t1 values('a', 'b');
28270  insert into res_t1 values('c', 'd');
28271
28272  create table res_t2(y char, z char);
28273
28274delimiter //;
28275CREATE PROCEDURE h1()
28276BEGIN
28277    declare done int default 0;
28278    declare a, b char;
28279    declare cur1 cursor for SELECT w, x from res_t1;
28280    declare exit handler for sqlstate '20000' set done = 1;
28281    set @x=0;
28282    case @x
28283          when 1 then set @x=10;
28284          when 2 then set @x=11;
28285    END case;
28286    set @x=1;
28287    SELECT done, @x;
28288END//
28289delimiter ;//
28290
28291CALL h1();
28292
28293# cleanup
28294--disable_warnings
28295DROP PROCEDURE IF EXISTS h1;
28296DROP TABLE IF EXISTS res_t1;
28297DROP TABLE IF EXISTS res_t2;
28298--enable_warnings
28299
28300# ------------------------------------------------------------------------------
28301let $message= Testcase 4.11.33:;
28302--source include/show_msg80.inc
28303
28304# testcase: ensure that no two conditions declared with the same scope may have the same condition name.
28305#            (same condition name in same scope)
28306
28307--disable_warnings
28308DROP PROCEDURE IF EXISTS h1;
28309drop table IF EXISTS res_t1;
28310--enable_warnings
28311
28312  create table res_t1(w char, x char);
28313
28314  insert into res_t1 values('a', 'b');
28315  insert into res_t1 values('c', 'd');
28316
28317delimiter //;
28318--error ER_SP_DUP_COND
28319CREATE PROCEDURE h1()
28320BEGIN
28321      declare condname condition for sqlstate '20000';
28322    declare done int default 0;
28323      declare a, b char;
28324      declare condname condition for sqlstate '20000';
28325      declare cur1 cursor for SELECT w, x from t1;
28326    set @x=2;
28327    case @x
28328      when 1 then set @x=10;
28329        when 2 then set @x=11;
28330    END case;
28331    set @x=1;
28332    SELECT done, @x;
28333END//
28334delimiter ;//
28335
28336# cleanup
28337--disable_warnings ONCE
28338DROP TABLE IF EXISTS res_t1;
28339
28340
28341# ------------------------------------------------------------------------------
28342let $message= Testcase 4.11.35:;
28343
28344# Ensure that every sqlstate value declared with a declare condition for
28345# statement and declare handler is a character string that is 5 character and
28346# cannot be an invalid state.;
28347
28348--source include/show_msg80.inc
28349
28350--disable_warnings
28351DROP PROCEDURE IF EXISTS h1;
28352drop table IF EXISTS res_t1;
28353--enable_warnings
28354
28355CREATE TABLE res_t1(w INT UNIQUE, x CHAR);
28356
28357insert into res_t1 values (1, 'a');
28358
28359delimiter //;
28360
28361--error ER_SP_BAD_SQLSTATE
28362CREATE PROCEDURE h1 ()
28363begin1_label:BEGIN
28364   declare condname1 condition for sqlstate '020';
28365   declare condname2 condition for sqlstate 'wewe';
28366   declare condname3 condition for 9999;
28367   declare exit handler for sqlstate '020' set @var1 = 1;
28368   declare exit handler for sqlstate 'wewe'set @var1 = 1;
28369   declare exit handler for 9999 set @var1 = 1;
28370   set @var2 = 1;
28371   insert into res_t1 values (2, 'b');
28372   begin2_label: BEGIN
28373      declare continue handler for sqlstate '90000023' set @var3= 1;
28374      set @var4 = 1;
28375      insert into res_t1 values (3, 'c');
28376   END begin2_label;
28377END begin1_label//
28378
28379--error ER_SP_BAD_SQLSTATE
28380CREATE PROCEDURE h1 ()
28381begin1_label:BEGIN
28382   declare condname1 condition for sqlstate '020';
28383   declare condname2 condition for sqlstate 'wewe';
28384   declare condname3 condition for 9999;
28385   set @var2 = 1;
28386   insert into res_t1 values (2, 'b');
28387   begin2_label: BEGIN
28388      declare continue handler for sqlstate '90000023' set @var3= 1;
28389      set @var4 = 1;
28390      insert into res_t1 values (3, 'c');
28391   END begin2_label;
28392END begin1_label//
28393delimiter ;//
28394
28395# cleanup
28396--disable_warnings ONCE
28397DROP TABLE IF EXISTS res_t1;
28398
28399
28400# ------------------------------------------------------------------------------
28401let $message= Testcase 4.11.36:;
28402--source include/show_msg80.inc
28403
28404# testcase: ensure that the declare  condition for statement cannot declare a condition for the successful
28405#            completion sqlstate:  00000.
28406
28407
28408--disable_warnings ONCE
28409DROP PROCEDURE IF EXISTS h1;
28410
28411delimiter //;
28412CREATE PROCEDURE h1 ()
28413BEGIN
28414    declare x1 int default 0;
28415    BEGIN
28416        declare condname1 condition for sqlstate '00000';
28417      declare exit handler for condname1 set @x = 1;
28418      set x1 = 1;
28419      set x1 = 2;
28420    END;
28421    SELECT @x, x1;
28422END//
28423delimiter ;//
28424
28425# cleanup
28426--disable_warnings ONCE
28427DROP PROCEDURE IF EXISTS h1;
28428
28429
28430
28431
28432
28433
28434# ------------------------------------------------------------------------------
28435let $message= Testcase 4.11.40:;
28436--source include/show_msg80.inc
28437
28438# testcase: ensure that within the same scope, no two handlers may be declared for the same condition
28439
28440--disable_warnings
28441DROP PROCEDURE IF EXISTS h1;
28442DROP TABLE IF EXISTS res_t1;
28443--enable_warnings
28444
28445CREATE TABLE res_t1(w CHAR UNIQUE, x CHAR);
28446INSERT INTO res_t1 VALUES ('a', 'b');
28447
28448# suppressed--error for having two similar handlers in the same scope
28449
28450delimiter //;
28451--error ER_SP_DUP_HANDLER
28452CREATE PROCEDURE h1 ()
28453BEGIN
28454   DECLARE x1, x2, x3, x4, x5 int default 0;
28455   DECLARE condname1 CONDITION FOR SQLSTATE '42000';
28456   DECLARE condname2 CONDITION FOR SQLSTATE '42000';
28457   DECLARE CONTINUE HANDLER FOR condname1 set x1 = 1;
28458   DECLARE CONTINUE HANDLER FOR condname1 set x2 = 1;
28459   DECLARE EXIT HANDLER FOR condname1 SET x3 = 1;
28460   DECLARE CONTINUE HANDLER FOR condname2 SET x4 = 1;
28461   DECLARE EXIT HANDLER FOR condname2 SET x5 = 1;
28462END//
28463delimiter ;//
28464
28465#CALL h1();
28466
28467# cleanup
28468--disable_warnings
28469DROP PROCEDURE IF EXISTS h1;
28470DROP TABLE IF EXISTS res_t1;
28471--enable_warnings
28472
28473
28474# ------------------------------------------------------------------------------
28475let $message= Testcase 4.11.41:;
28476--source include/show_msg80.inc
28477
28478# testcase: ensure that the declare  handler for statement cannot declare a condition for the successful
28479#            completion sqlstate:  00000.
28480
28481--disable_warnings ONCE
28482DROP PROCEDURE IF EXISTS h1;
28483
28484delimiter //;
28485CREATE PROCEDURE h1 ()
28486BEGIN
28487   DECLARE x1 INT DEFAULT 0;
28488   BEGIN
28489      DECLARE condname1 CONDITION FOR SQLSTATE '00000';
28490      DECLARE EXIT HANDLER FOR SQLSTATE '00000' SET @x = 1;
28491      SET x1 = 1;
28492      SET x1 = 2;
28493   END;
28494   SELECT @x, x1;
28495END//
28496delimiter ;//
28497
28498CALL h1();
28499
28500# cleanup
28501--disable_warnings ONCE
28502DROP PROCEDURE IF EXISTS h1;
28503
28504
28505# ------------------------------------------------------------------------------
28506# FIXME 3.1.2.53: check numbering difference
28507let $message= * Testcase 3.1.2.53 (4.11.42):
28508* Ensure that a handler condition of sqlwarning takes the same action as a
28509* handler condition defined with an sqlstate that begins with 01.;
28510--source include/show_msg80.inc
28511
28512
28513--disable_warnings
28514DROP PROCEDURE IF EXISTS h1;
28515DROP TABLE IF EXISTS res_t1;
28516--enable_warnings
28517
28518delimiter //;
28519CREATE PROCEDURE h1()
28520BEGIN
28521   DECLARE EXIT HANDLER FOR SQLWARNING SET @done = 1;
28522   SET @done=0;
28523   SET @x=1;
28524   INSERT INTO res_t1 VALUES('xxx', 'yy');
28525   SET @x=0;
28526END//
28527delimiter ;//
28528
28529# table doesn't exist
28530--error ER_NO_SUCH_TABLE
28531CALL h1();
28532SELECT @done, @x;
28533
28534CREATE TABLE res_t1(w CHAR, x CHAR);
28535INSERT INTO res_t1 VALUES('a', 'b');
28536INSERT INTO res_t1 VALUES('c', 'd');
28537
28538# now table exists
28539CALL h1();
28540SELECT @done, @x;
28541
28542--disable_warnings
28543DROP PROCEDURE IF EXISTS h1;
28544DROP TABLE IF EXISTS res_t1;
28545--enable_warnings
28546
28547delimiter //;
28548CREATE PROCEDURE h1()
28549BEGIN
28550   DECLARE CONTINUE HANDLER FOR SQLWARNING SET @done = 1;
28551   SET @done=0;
28552   SET @x=0;
28553   INSERT INTO res_t1 VALUES('xxx', 'yy');
28554   SET @x=1;
28555END//
28556delimiter ;//
28557
28558# table doesn't exist
28559--error ER_NO_SUCH_TABLE
28560CALL h1();
28561SELECT @done, @x;
28562
28563CREATE TABLE res_t1(w CHAR, x CHAR);
28564INSERT INTO res_t1 VALUES('a', 'b');
28565INSERT INTO res_t1 VALUES('c', 'd');
28566
28567# now table exists
28568CALL h1();
28569SELECT @done, @x;
28570
28571# cleanup
28572--disable_warnings
28573DROP PROCEDURE IF EXISTS h1;
28574DROP TABLE IF EXISTS res_t1;
28575--enable_warnings
28576
28577
28578# ==============================================================================
28579# USE the same .inc to cleanup before and after the test
28580--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
28581
28582# ==============================================================================
28583let $message= .                               +++ END OF SCRIPT +++;
28584--source include/show_msg80.inc
28585# ==============================================================================
28586