Hi!

On Oct 26, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I am experiencing seg faults in seemingly innocent code with MySQL version 4.0.0
> and the embedded library, libmysqld.
> The fault only happens when calling particular functions, specifically
> mysql_ping() and mysql_query().  There might be others, but these are the only
> ones I've found so far.
> 

There was one bugfix in libmysql/libmysql.c, that in some circumstances
can cause sigsegv. Next MySQL release will contain this bugfix.

I'm not sure, though, that it has something to do with your problem.

If you'd like to try it yourself, here's the patch:

===== libmysql.c 1.61 vs 1.62 =====
--- 1.61/libmysql/libmysql.c    Fri Oct 19 21:10:53 2001
+++ 1.62/libmysql/libmysql.c    Wed Oct 24 21:38:47 2001
@@ -1572,13 +1572,13 @@
   }
   mysql_init(&tmp_mysql);
   tmp_mysql.options=mysql->options;
+  bzero((char*) &mysql->options,sizeof(mysql->options));
   if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
                          mysql->db, mysql->port, mysql->unix_socket,
                          mysql->client_flag))
     DBUG_RETURN(1);
   tmp_mysql.free_me=mysql->free_me;
   mysql->free_me=0;
-  bzero((char*) &mysql->options,sizeof(mysql->options));
   mysql_close(mysql);
   *mysql=tmp_mysql;
   net_clear(&mysql->net);


Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

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

Reply via email to