Skip to content

Commit

Permalink
FIX: abort when password is not presented.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtm committed Nov 12, 2021
1 parent eb91dc1 commit 32c92c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def connect(host=nil, user=nil, passwd=nil, db=nil, port=nil, socket=nil, flag=0
flag &= ~CLIENT_COMPRESS
end
@protocol = Protocol.new(host, port, socket, @opts)
@protocol.authenticate user, passwd, db, flag, @charset
@protocol.authenticate user, passwd.to_s, db, flag, @charset
@charset ||= @protocol.charset
@host_info = (host.nil? || host == "localhost") ? 'Localhost via UNIX socket' : "#{host} via TCP/IP"
query @init_command if @init_command
Expand Down

0 comments on commit 32c92c7

Please sign in to comment.