Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/pannonia-technologies/bank_…
Browse files Browse the repository at this point in the history
…mysql
  • Loading branch information
essen committed Jun 8, 2013
2 parents 79e4f65 + cead3ca commit 3ac3ee6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bank_mysql.erl
Expand Up @@ -298,7 +298,11 @@ parse_handshake_init(Packet) ->
_ScrambleLength:8, 0:80, Rest3/bits >> = Rest2,
Caps = CapsLow bor (CapsHigh bsl 16),
[ScrambleBuff2, AuthPlugin]
= binary:split(Rest3, << 0:8 >>, [global, trim]),
= case binary:split(Rest3, << 0:8 >>, [global, trim]) of
[S, A] -> [S, A];
%% MySQL before version 5.5.7 didn't have auth_plugin_name
[S] -> [S, <<>>]
end,
{ok, ProtoVersion, ServerVersion, ThreadID,
<< ScrambleBuff1/binary, ScrambleBuff2/binary >>,
Caps, Language, Status, AuthPlugin}.
Expand Down

0 comments on commit 3ac3ee6

Please sign in to comment.