Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to sphinx #142

Open
dtyuterev opened this issue Jul 7, 2014 · 2 comments
Open

Connecting to sphinx #142

dtyuterev opened this issue Jul 7, 2014 · 2 comments

Comments

@dtyuterev
Copy link

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

@gracheg
Copy link

gracheg commented Feb 10, 2015

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.

@dtyuterev
Copy link
Author

Thanks ! Will check soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants