Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fluent-plugin-mysql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]

gem.add_runtime_dependency "fluentd", ['>= 0.14.8', '< 2']
gem.add_runtime_dependency "fluentd", ['>= 0.14.22', '< 2']
gem.add_runtime_dependency "mysql2-cs-bind"
gem.add_runtime_dependency "jsonpath"
gem.add_runtime_dependency "oj"
Expand Down
8 changes: 4 additions & 4 deletions lib/fluent/plugin/out_mysql_bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ def client(database)
)
end

def expand_placeholders(metadata)
database = extract_placeholders(@database, metadata).gsub('.', '_')
table = extract_placeholders(@table, metadata).gsub('.', '_')
def expand_placeholders(chunk)
database = extract_placeholders(@database, chunk).gsub('.', '_')
table = extract_placeholders(@table, chunk).gsub('.', '_')
return database, table
end

def write(chunk)
database, table = expand_placeholders(chunk.metadata)
database, table = expand_placeholders(chunk)
max_lengths = check_table_schema(database: database, table: table)
@handler = client(database)
values = []
Expand Down