diff options
Diffstat (limited to 'lib/gitlab/database/bulk_update.rb')
-rw-r--r-- | lib/gitlab/database/bulk_update.rb | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/gitlab/database/bulk_update.rb b/lib/gitlab/database/bulk_update.rb index 4b4a9b38fd8..36dbb157b0d 100644 --- a/lib/gitlab/database/bulk_update.rb +++ b/lib/gitlab/database/bulk_update.rb @@ -43,15 +43,7 @@ module Gitlab end def update! - if without_prepared_statement? - # A workaround for https://github.com/rails/rails/issues/24893 - # When prepared statements are prevented (such as when using the - # query counter or in omnibus by default), we cannot call - # `exec_update`, since that will discard the bindings. - connection.send(:exec_no_cache, sql, log_name, params) # rubocop: disable GitlabSecurity/PublicSend - else - connection.exec_update(sql, log_name, params) - end + connection.exec_update(sql, log_name, params) end def self.column_definitions(model, columns) @@ -93,14 +85,6 @@ module Gitlab end end - # A workaround for https://github.com/rails/rails/issues/24893 - # We need to detect if prepared statements have been disabled. - def without_prepared_statement? - strong_memoize(:without_prepared_statement) do - connection.send(:without_prepared_statement?, [1]) # rubocop: disable GitlabSecurity/PublicSend - end - end - def query_attribute(column, key, values) value = values[column.name] key[column.name] = value if key.try(:id) # optimistic update |