ngerakines / erlang_mysql

A GitHub mirror of the native Erlang MySQL client library.
24 stars 3 forks source link

Connect Error - Usage Error #1

Closed ck closed 15 years ago

ck commented 15 years ago

First let me apologize for submitting this issue. I have to do something wrong, but I can't figure out what.

Cloning and building erlang_mysql works fine, but then I run into errors executing the tests:

$ make test
sh ebin/mysql.app.in 3
mkdir -p ebin
(cd src;make)
/Users/ck/lib/erlang/erlang_mysql/src
make[1]: Nothing to be done for `all'.
prove t/*.t
t/001-load..............ok                                                   
t/connect...............ok 1/0                                               
Crash dump was written to: erl_crash.dump
init terminating in do_boot (badarg)
t/connect...............dubious                                              
    Test returned status 1 (wstat 256, 0x100)
t/execute...............
Crash dump was written to: erl_crash.dump
init terminating in do_boot (badarg)
t/execute...............dubious                                              
    Test returned status 1 (wstat 256, 0x100)
t/fetch_many............
Crash dump was written to: erl_crash.dump
init terminating in do_boot (badarg)
t/fetch_many............dubious                                              
    Test returned status 1 (wstat 256, 0x100)
t/prepare...............
Crash dump was written to: erl_crash.dump
init terminating in do_boot (badarg)
t/prepare...............dubious                                              
    Test returned status 1 (wstat 256, 0x100)
t/prepare_concurrent....
Crash dump was written to: erl_crash.dump
init terminating in do_boot (badarg)
t/prepare_concurrent....dubious                                              
    Test returned status 1 (wstat 256, 0x100)
Failed Test            Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/connect.t               1   256    ??   ??  ??
t/execute.t               1   256    ??   ??  ??
t/fetch_many.t            1   256    ??   ??  ??
t/prepare.t               1   256    ??   ??  ??
t/prepare_concurrent.t    1   256    ??   ??  ??
Failed 5/6 test scripts. -1/4 subtests failed.
Files=6, Tests=4,  4 wallclock secs ( 1.78 cusr +  2.41 csys =  4.19 CPU)
Failed 5/6 test programs. -1/4 subtests failed.
make: *** [test] Error 1

Then I check my existing code using the mysql drivers from http://erlang-mysql-driver.googlecode.com/svn/trunk to ensure everything is fine with MySQL. I'm able to connect to the database and retrieve rows. Replacing the mysql lib and the connect call with the one in erlang_mysql I again ran into the same error.

Any pointers where I went of the track are appreciated,

-ck

ngerakines commented 15 years ago

This was resolved in one of the last several commits.

ck commented 15 years ago

Fix confirmed:

 $ make test
 sh ebin/mysql.app.in 4
 mkdir -p ebin
 (cd src;make)
 ~/lib/erlang/erlang_mysql/src
 make[1]: Nothing to be done for `all'.
 prove t/*.t
 t/001-load..............ok
 t/connect...............ok
 t/execute...............ok
 t/fetch_many............ok
 t/prepare...............ok
 t/prepare_concurrent....ok
 t/sleep.................ok
 All tests successful.
 Files=7, Tests=2044,  4 wallclock secs ( 0.98 cusr +  0.36 csys =  1.34 CPU)

Thanks for your patience and help,

-ck