[Title] set db['AutoCommit'] = false
authorhyoun jiil <jiil.hyoun@samsung.com>
Wed, 20 Mar 2013 10:10:58 +0000 (19:10 +0900)
committerhyoun jiil <jiil.hyoun@samsung.com>
Wed, 20 Mar 2013 10:10:58 +0000 (19:10 +0900)
[Type] Enhancement
[Module] Toolchain /
[Priority] Major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: Iab0466d8d43f5936b572dbec3a328e96bdc7696d

src/build_server/BuildServer.rb

index 38e4bb7dd7793eddce9a4079f7314e1013284074..65753ccad68a94e547765b937c98d0ddea31295e 100644 (file)
@@ -695,17 +695,9 @@ class BuildServer
                                        @db = DBI.connect("DBI:#{@db_dsn}", @db_user, @db_passwd)
                                end
                        end
-                       if transaction then
-                               @db['AutoCommit'] = false
-                               begin
-                                       @db.transaction do |dbh|
-                                               yield dbh if block_given?
-                                       end
-                               ensure
-                                       @db['AutoCommit'] = true
-                               end
-                       else
-                               yield @db if block_given?
+                       @db['AutoCommit'] = false
+                       @db.transaction do |dbh|
+                               yield dbh if block_given?
                        end
 
                        return true