We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ebee19 commit b819265Copy full SHA for b819265
test/test_integration_statement.rb
@@ -191,4 +191,20 @@ def test_committing_tx_with_statement_active
191
end
192
assert called
193
194
+
195
+ def test_long_running_statements_get_interrupted_when_statement_timeout_set
196
+ @db.statement_timeout = 100
197
+ assert_raises(SQLite3::InterruptException) do
198
+ @db.execute <<~SQL
199
+ WITH RECURSIVE r(i) AS (
200
+ VALUES(0)
201
+ UNION ALL
202
+ SELECT i FROM r
203
+ LIMIT 10000000
204
+ )
205
+ SELECT i FROM r ORDER BY i LIMIT 1;
206
+ SQL
207
+ end
208
+ @db.statement_timeout = nil
209
210
0 commit comments