Skip to content

Commit

Permalink
Ensure MySQL clients allow for LOCAL INFILE usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Jun 13, 2019
1 parent 3617845 commit a7c36d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions spec/support/jruby_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ def initialize(host, username, password)
properties = Java::JavaUtil::Properties.new
properties.setProperty "user", username if username
properties.setProperty "password", password if password
properties.setProperty "useSSL", "false"
properties.setProperty "allowLoadLocalInfile", "true"

@client = Java::ComMysqlJdbc::Driver.new.connect address, properties
end
Expand Down
7 changes: 4 additions & 3 deletions spec/support/mri_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
class MRIClient
def initialize(host, username, password)
@client = Mysql2::Client.new(
:host => host,
:username => username,
:password => password
:host => host,
:username => username,
:password => password,
:local_infile => true
)
end

Expand Down

0 comments on commit a7c36d9

Please sign in to comment.