File: relax-dependency-sqlite3.patch

package info (click to toggle)
rails 2%3A7.2.2.1%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 43,352 kB
  • sloc: ruby: 349,799; javascript: 30,703; yacc: 46; sql: 43; sh: 29; makefile: 27
file content (46 lines) | stat: -rw-r--r-- 1,868 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: Relax dependency version - ruby-sqlite3
 From Rails 6, it started using `execute_batch2` function [1] which was
 introduced in gem sqlite3 1.4.0. This new function was confirmed at [1]
 that extremely faster than old `execute_batch` function. However, gem
 sqlite3 1.4.0 was not packaged in Debian yet (ruby-sqlite3 is 1.3.13-1+b2
 in Debian), so this function could not be used.
 .
 This patch will rollback the `execute_batch2` usages to `execute_batch`.
 This patch should be removed after the ruby-sqlite3 upgraded to 1.4.0.
 .
 [1] https://github.com/rails/rails/commit/0908184e4c2dca5b941030bbd0d5eb2dfcfed120
Author: Jongmin Kim <jmkim@pukyong.ac.kr>
Forwarded: not-needed
Last-Update: 2019-06-12
--- a/Gemfile
+++ b/Gemfile
@@ -129,7 +129,7 @@ platforms :ruby, :mswin, :mswin64, :ming
   gem "racc", ">=1.4.6", require: false
 
   # Active Record.
-  gem "sqlite3", "~> 1.4"
+  gem "sqlite3", ">= 1.3.6"
 
   group :db do
     gem "pg", ">= 1.3.0.rc1"
--- a/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb
@@ -121,7 +121,7 @@ module ActiveRecord
 
             log(sql, name) do
               ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
-                @connection.execute_batch2(sql)
+                @connection.execute_batch(sql)
               end
             end
           end
--- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -10,7 +10,6 @@ require "active_record/connection_adapte
 require "active_record/connection_adapters/sqlite3/schema_dumper"
 require "active_record/connection_adapters/sqlite3/schema_statements"
 
-gem "sqlite3", "~> 1.4"
 require "sqlite3"
 
 module ActiveRecord