Emysql icon indicating copy to clipboard operation
Emysql copied to clipboard

Connecting to sphinx

Open dtyuterev opened this issue 10 years ago • 2 comments

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>>)

dtyuterev avatar Jul 07 '14 09:07 dtyuterev

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.

gracheg avatar Feb 10 '15 14:02 gracheg

Thanks ! Will check soon.

dtyuterev avatar Mar 17 '15 05:03 dtyuterev