When I try to run mysql_real_connect my program crashes. If anyone
could help me understand why I would be eternally grateful. I've
tried looking at all the documentation regarding this situation and
tried many different things, but I am still stumped with the same
crash. I've tried this on current builds of redhat linux and freebsd.
This is my code, with a backtrace at the end:
{
MYSQL mysql;
mysql_init( &mysql );
mysql_real_connect( &mysql, "localhost", "user", "pass", "db", 0, NULL, 0 );
mysql_close( &mysql );
}
(gdb) bt
#0 0x40072d41 in __kill () from /lib/libc.so.6
#1 0x400729b6 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x400740d8 in abort () at ../sysdeps/generic/abort.c:88
#3 0x809e820 in sig_handler (sig=11) at comm.c:3936
#4 0x40072c68 in __restore ()
at ../sysdeps/unix/sysv/linux/i386/sigaction.c:127
#5 0x812bbab in net_write_buff ()
#6 0x812bac4 in my_net_write ()
#7 0x812965e in mysql_real_connect ()
#8 0x80908f6 in do_save_object (ch=0x83cd6c8, argument=0xbffff813 "")
at build.c:9074
#9 0x80c7dd6 in interpret (ch=0x83cd6c8, argument=0xbffff813 "")
at interp.c:740
#10 0x80985e1 in game_loop () at comm.c:620
#11 0x8097f90 in main (argc=1, argv=0xbffffcf4) at comm.c:273
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php