Emysql
Emysql copied to clipboard
Connecting to sphinx
Error with badarg while add_pool
dbg:tracer() :
(<0.130.0>) call emysql_auth:parse_greeting({packet,52,0, <<10,53,46,48,46,51,55,0,1,0,0,0,1,2,3,4,5,6,7,8,0,8,130,33,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13>>}) (<0.130.0>) call emysql_auth:build_greeting(stage1,<<53,46,48,46,51,55,0,1,0,0,0,1,2,3,4,5,6,7,8,0,8,130,33,2,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13>>,{greeting,10,undefined,undefined,undefined,undefined,undefined,undefined, undefined,undefined,0,undefined}) (<0.130.0>) call emysql_auth:asciiz(<<53,46,48,46,51,55,0,1,0,0,0,1,2,3,4,5,6,7,8,0,8,130,33,2,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13>>) (<0.130.0>) call emysql_auth:build_greeting(stage2,<<1,2,3,4,5,6,7,8,0,8,130,33,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9, 10,11,12,13>>,{greeting,10,<<"5.0.37">>,1,undefined,undefined,undefined,undefined,undefined, undefined,0,undefined}) (<0.130.0>) call emysql_auth:asciiz(<<1,2,3,4,5,6,7,8,0,8,130,33,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9, 10,11,12,13>>) (<0.130.0>) call emysql_auth:build_greeting({stage3,13},<<1,2,3,4,5,6,7,8,9,10,11,12,13>>,{greeting,10,<<"5.0.37">>,1, <<1,2,3,4,5,6,7,8>>, undefined,33288,0,33,2,0,undefined}) (<0.130.0>) call emysql_auth:asciiz(<<1,2,3,4,5,6,7,8,9,10,11,12,13>>)
It fixes, but there is no guarantee. Where lost zero-byte, it is unclear.
asciiz(Data) when is_binary(Data) ->
case binary:split(Data, <<0>>) of
[S, R] -> {S, R};
[S] -> {S, <<>>}
end.
Thanks ! Will check soon.