]> git.pld-linux.org Git - packages/ruby-sqlite3.git/commitdiff
- added
authoraredridel <aredridel@pld-linux.org>
Sat, 30 Aug 2008 16:53:16 +0000 (16:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ruby-sqlite3-threadmutex.patch -> 1.1

ruby-sqlite3-threadmutex.patch [new file with mode: 0644]

diff --git a/ruby-sqlite3-threadmutex.patch b/ruby-sqlite3-threadmutex.patch
new file mode 100644 (file)
index 0000000..dfd7f54
--- /dev/null
@@ -0,0 +1,35 @@
+diff -Nur sqlite3-ruby-1.2.4.orig/lib/sqlite3/database.rb sqlite3-ruby-1.2.4.threadmutex/lib/sqlite3/database.rb
+--- sqlite3-ruby-1.2.4.orig/lib/sqlite3/database.rb    2008-06-26 07:52:02.000000000 -0600
++++ sqlite3-ruby-1.2.4.threadmutex/lib/sqlite3/database.rb     2008-08-30 10:44:55.000000000 -0600
+@@ -4,6 +4,7 @@
+ require 'sqlite3/statement'
+ require 'sqlite3/translator'
+ require 'sqlite3/value'
++require 'thread'
+ module SQLite3
+@@ -82,6 +83,7 @@
+       @results_as_hash = options.fetch(:results_as_hash,false)
+       @type_translation = options.fetch(:type_translation,false)
+       @translator = nil
++      @transaction_mutex = Mutex.new
+       @transaction_active = false
+     end
+@@ -151,6 +153,7 @@
+     # The Statement can then be executed using Statement#execute.
+     #
+     def prepare( sql )
++      @transaction_mutex.synchronize do
+       stmt = @statement_factory.new( self, sql )
+       if block_given?
+         begin
+@@ -161,6 +164,7 @@
+       else
+         return stmt
+       end
++    end
+     end
+     # Executes the given SQL statement. If additional parameters are given,
This page took 0.079268 seconds and 4 git commands to generate.