Business intelligence made simple
Use SET LOCAL for timeouts in transactions
Andrew Kanebcb1b7af672a
diff --git a/lib/blazer/adapters/sql_adapter.rb b/lib/blazer/adapters/sql_adapter.rbindex 57d9fc1a..a69a0f61 100644--- a/lib/blazer/adapters/sql_adapter.rb+++ b/lib/blazer/adapters/sql_adapter.rb@@ -116,7 +116,7 @@ module Blazerdef set_timeout(timeout)if postgresql? || redshift?- select_all("SET statement_timeout = #{timeout.to_i * 1000}")+ select_all("SET #{use_transaction? ? "LOCAL " : ""}statement_timeout = #{timeout.to_i * 1000}")elsif mysql?select_all("SET max_execution_time = #{timeout.to_i * 1000}")else