fluent-plugin-mysql 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +1 -0
- data/fluent-plugin-mysql.gemspec +1 -1
- data/lib/fluent/plugin/out_mysql_bulk.rb +17 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f7a1b730415fa30eb1edb533c2831a11b4b707792551da369085aaedee5b8bcc
|
4
|
+
data.tar.gz: 2622230abbc75bef6e2471f1109d54483dc75b3c264bc4cd36c96cbd540ce147
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61a4808b16de2d8139b3a356551115215bf40a8fd46bfd8ddb6c77687d4af25ba4c2ff261c957bc0d0f821b8866cd6b4f496a98fef451b113e7a9b3cdc38bd5d
|
7
|
+
data.tar.gz: 54881327059b13a63278bb166e544d02aff57e3c74a6bf085d317e38bcd75000c84af7a525c8a6aa48f7b39fa8665058e9b0da2e9572178d9549cb051f51a339
|
data/README.md
CHANGED
@@ -32,6 +32,7 @@ unixtimestamp_key_names|Key names which store data as datetime from unix time st
|
|
32
32
|
table|bulk insert table (require)
|
33
33
|
on_duplicate_key_update|on duplicate key update enable (true:false)
|
34
34
|
on_duplicate_update_keys|on duplicate key update column, comma separator
|
35
|
+
transaction_isolation_level|set transaction isolation level(default: nil)
|
35
36
|
|
36
37
|
## Configuration Example(bulk insert)
|
37
38
|
|
data/fluent-plugin-mysql.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-mysql"
|
4
|
-
gem.version = "0.3.
|
4
|
+
gem.version = "0.3.2"
|
5
5
|
gem.authors = ["TAGOMORI Satoshi", "Toyama Hiroshi"]
|
6
6
|
gem.email = ["tagomoris@gmail.com", "toyama0919@gmail.com"]
|
7
7
|
gem.description = %q{fluent plugin to insert mysql as json(single column) or insert statement}
|
@@ -51,6 +51,9 @@ DESC
|
|
51
51
|
config_param :on_duplicate_update_custom_values, :string, default: nil,
|
52
52
|
desc: "On_duplicate_update_custom_values, comma separator. specify the column name is insert value, custom value is use ${sql conditions}"
|
53
53
|
|
54
|
+
config_param :transaction_isolation_level, :enum, list: [:read_uncommitted, :read_committed, :repeatable_read, :serializable], default: :nil,
|
55
|
+
desc: "Set transaction isolation level."
|
56
|
+
|
54
57
|
attr_accessor :handler
|
55
58
|
|
56
59
|
def initialize
|
@@ -170,6 +173,7 @@ DESC
|
|
170
173
|
sql += @on_duplicate_key_update_sql if @on_duplicate_key_update
|
171
174
|
|
172
175
|
log.info "bulk insert values size (table: #{table}) => #{values.size}"
|
176
|
+
@handler.query("SET SESSION TRANSACTION ISOLATION LEVEL #{transaction_isolation_level}") if @transaction_isolation_level
|
173
177
|
@handler.xquery(sql)
|
174
178
|
@handler.close
|
175
179
|
end
|
@@ -202,5 +206,18 @@ DESC
|
|
202
206
|
values
|
203
207
|
end
|
204
208
|
end
|
209
|
+
|
210
|
+
def transaction_isolation_level
|
211
|
+
case @transaction_isolation_level
|
212
|
+
when :read_uncommitted
|
213
|
+
"READ UNCOMMITTED"
|
214
|
+
when :read_committed
|
215
|
+
"READ COMMITTED"
|
216
|
+
when :repeatable_read
|
217
|
+
"REPEATABLE READ"
|
218
|
+
when :serializable
|
219
|
+
"SERIALIZABLE"
|
220
|
+
end
|
221
|
+
end
|
205
222
|
end
|
206
223
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-mysql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.6
|
159
|
+
rubygems_version: 2.7.6
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: fluent plugin to insert mysql
|