@@ -154,6 +154,7 @@ def load_current_schema
154
154
loader . execute ( schema_sql ) . do
155
155
loader . execute ( sp_sql ) . do
156
156
loader . execute ( sp_error_sql ) . do
157
+ loader . execute ( sp_several_prints_sql ) . do
157
158
loader . close
158
159
true
159
160
end
@@ -171,7 +172,13 @@ def drop_sql_sybase
171
172
) DROP PROCEDURE tinytds_TestReturnCodes
172
173
IF EXISTS(
173
174
SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestPrintWithError'
174
- ) DROP PROCEDURE tinytds_TestPrintWithError|
175
+ ) DROP PROCEDURE tinytds_TestPrintWithError
176
+ IF EXISTS(
177
+ SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestPrintWithError'
178
+ ) DROP PROCEDURE tinytds_TestPrintWithError
179
+ IF EXISTS(
180
+ SELECT 1 FROM sysobjects WHERE type = 'P' AND name = 'tinytds_TestSeveralPrints'
181
+ ) DROP PROCEDURE tinytds_TestSeveralPrints|
175
182
end
176
183
177
184
def drop_sql_microsoft
@@ -189,7 +196,11 @@ def drop_sql_microsoft
189
196
IF EXISTS (
190
197
SELECT name FROM sysobjects
191
198
WHERE name = 'tinytds_TestPrintWithError' AND type = 'P'
192
- ) DROP PROCEDURE tinytds_TestPrintWithError|
199
+ ) DROP PROCEDURE tinytds_TestPrintWithError
200
+ IF EXISTS (
201
+ SELECT name FROM sysobjects
202
+ WHERE name = 'tinytds_TestSeveralPrints' AND type = 'P'
203
+ ) DROP PROCEDURE tinytds_TestSeveralPrints|
193
204
end
194
205
195
206
def sp_sql
@@ -206,6 +217,14 @@ def sp_error_sql
206
217
RAISERROR('Error following print', 16, 1)|
207
218
end
208
219
220
+ def sp_several_prints_sql
221
+ %|CREATE PROCEDURE tinytds_TestSeveralPrints
222
+ AS
223
+ PRINT 'hello 1'
224
+ PRINT 'hello 2'
225
+ PRINT 'hello 3'|
226
+ end
227
+
209
228
def find_value ( id , column , query_options = { } )
210
229
query_options [ :timezone ] ||= :utc
211
230
sql = "SELECT [#{ column } ] FROM [datatypes] WHERE [id] = #{ id } "
0 commit comments