@@ -13,23 +13,26 @@ name VARCHAR(63)
13
13
) RETURNS VARCHAR(63)
14
14
BEGIN
15
15
RETURN name;
16
- END" ) ;
17
- Connection . Execute ( @"DROP FUNCTION IF EXISTS failing_function;
16
+ END;
17
+
18
+ DROP FUNCTION IF EXISTS failing_function;
18
19
CREATE FUNCTION failing_function()
19
20
RETURNS INT
20
21
BEGIN
21
22
DECLARE v1 INT;
22
23
SELECT c1 FROM table_that_does_not_exist INTO v1;
23
24
RETURN v1;
24
- END" ) ;
25
- Connection . Execute ( @"DROP PROCEDURE IF EXISTS echop;
25
+ END;
26
+
27
+ DROP PROCEDURE IF EXISTS echop;
26
28
CREATE PROCEDURE echop(
27
29
IN name VARCHAR(63)
28
30
)
29
31
BEGIN
30
32
SELECT name;
31
- END" ) ;
32
- Connection . Execute ( @"DROP PROCEDURE IF EXISTS circle;
33
+ END;
34
+
35
+ DROP PROCEDURE IF EXISTS circle;
33
36
CREATE PROCEDURE circle(
34
37
IN radius DOUBLE,
35
38
IN height DOUBLE,
@@ -47,24 +50,27 @@ OUT shape VARCHAR(63)
47
50
SELECT area * height INTO volume;
48
51
SELECT 'circle' INTO shape;
49
52
SELECT CONCAT(name, shape);
50
- END" ) ;
51
- Connection . Execute ( @"DROP PROCEDURE IF EXISTS out_string;
53
+ END;
54
+
55
+ DROP PROCEDURE IF EXISTS out_string;
52
56
CREATE PROCEDURE out_string(
53
57
OUT value VARCHAR(100)
54
58
)
55
59
BEGIN
56
60
SELECT 'test value' INTO value;
57
- END" ) ;
58
- Connection . Execute ( @"DROP PROCEDURE IF EXISTS out_null;
61
+ END;
62
+
63
+ DROP PROCEDURE IF EXISTS out_null;
59
64
CREATE PROCEDURE out_null(
60
65
OUT string_value VARCHAR(100),
61
66
OUT int_value INT
62
67
)
63
68
BEGIN
64
69
SELECT NULL INTO string_value;
65
70
SELECT NULL INTO int_value;
66
- END" ) ;
67
- Connection . Execute ( @"drop table if exists sproc_multiple_rows;
71
+ END;
72
+
73
+ drop table if exists sproc_multiple_rows;
68
74
create table sproc_multiple_rows (
69
75
value integer not null primary key auto_increment,
70
76
name text not null
@@ -77,21 +83,24 @@ insert into sproc_multiple_rows values
77
83
(5, 'five'),
78
84
(6, 'six'),
79
85
(7, 'seven'),
80
- (8, 'eight');" ) ;
81
- Connection . Execute ( @"drop procedure if exists number_multiples;
86
+ (8, 'eight');
87
+
88
+ drop procedure if exists number_multiples;
82
89
create procedure number_multiples (in factor int)
83
90
begin
84
91
select name from sproc_multiple_rows
85
92
where mod(value, factor) = 0
86
93
order by name;
87
- end;" ) ;
88
- Connection . Execute ( @"drop procedure if exists multiple_result_sets;
94
+ end;
95
+
96
+ drop procedure if exists multiple_result_sets;
89
97
create procedure multiple_result_sets (in pivot int)
90
98
begin
91
99
select name from sproc_multiple_rows where value < pivot order by name;
92
100
select name from sproc_multiple_rows where value > pivot order by name;
93
- end;" ) ;
94
- Connection . Execute ( @"drop procedure if exists number_lister;
101
+ end;
102
+
103
+ drop procedure if exists number_lister;
95
104
create procedure number_lister (inout high int)
96
105
begin
97
106
DECLARE i int;
@@ -103,17 +112,19 @@ create procedure number_lister (inout high int)
103
112
SET i = i + 1;
104
113
END WHILE;
105
114
SET high = high + 1;
106
- end;" ) ;
107
- Connection . Execute ( @"drop procedure if exists `dotted.name`;
115
+ end;
116
+
117
+ drop procedure if exists `dotted.name`;
108
118
create procedure `dotted.name`()
109
119
begin
110
120
select 1, 2, 3;
111
- end;" ) ;
112
- Connection . Execute ( @"DROP PROCEDURE IF EXISTS `GetTime`;
121
+ end;
122
+
123
+ DROP PROCEDURE IF EXISTS `GetTime`;
113
124
CREATE PROCEDURE `GetTime`(OUT OutTime TIME)
114
125
BEGIN
115
126
SET OutTime = CURTIME();
116
- END" ) ;
127
+ END; " ) ;
117
128
118
129
if ( AppConfig . SupportsJson )
119
130
{
0 commit comments