@@ -154,6 +154,7 @@ def load_current_schema
154154 loader . execute ( schema_sql ) . do
155155 loader . execute ( sp_sql ) . do
156156 loader . execute ( sp_error_sql ) . do
157+ loader . execute ( sp_several_prints_sql ) . do
157158 loader . close
158159 true
159160 end
@@ -171,7 +172,13 @@ def drop_sql_sybase
171172 ) DROP PROCEDURE tinytds_TestReturnCodes
172173 IF EXISTS(
173174 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|
175182 end
176183
177184 def drop_sql_microsoft
@@ -189,7 +196,11 @@ def drop_sql_microsoft
189196 IF EXISTS (
190197 SELECT name FROM sysobjects
191198 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|
193204 end
194205
195206 def sp_sql
@@ -206,6 +217,14 @@ def sp_error_sql
206217 RAISERROR('Error following print', 16, 1)|
207218 end
208219
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+
209228 def find_value ( id , column , query_options = { } )
210229 query_options [ :timezone ] ||= :utc
211230 sql = "SELECT [#{ column } ] FROM [datatypes] WHERE [id] = #{ id } "
0 commit comments