lib/fluent/plugin/out_dbi.rb in fluent-plugin-dbi-0.0.1 vs lib/fluent/plugin/out_dbi.rb in fluent-plugin-dbi-0.0.2
- old
+ new
@@ -26,9 +26,10 @@
end
def write(chunk)
begin
dbh = DBI.connect(@dsn, @db_user, @db_pass)
+ dbh['AutoCommit'] = false
sth = dbh.prepare(@query)
chunk.msgpack_each { |tag, time, record|
record.key?('time') || record['time'] = time
record.key('tag') || record['tag'] = tag
values = []