Re: mysql_real_connect() crash, null pointer suspected
Posted by: Damien
Date: August 08, 2005 05:08AM

Ok, I've tryed some more code : This is not about mysql_real_connect, this is about mysql_init() :

--8<----8<----8<----8<----8<----8<----8<----8<----8<--
Msg(" mysql_init(conn)\n");
if(mysql_init(conn)==NULL)
{
Warning("MySQL Init Error. MySQL is not aviliable\n");
}
else
{
if(conn==NULL)
{
Msg("conn is NULL\n");
}
Msg("mysql_real_connect(conn,'%s','%s','%s','%s',0,NULL,0)\n",db_host,db_user,db_pass,db_base);
if(!mysql_real_connect(conn,db_host,db_user,db_pass,db_base,0,NULL,0))
--8<----8<----8<----8<----8<----8<----8<----8<----8<--

I see the message "conn is NULL" before crash. So mysql_init() does not return NULL (so conn is initialized) but conn is NULL (not initialized).

Strange, isn't it ?

Is there a way I can find a solution for this ? Since it can't be a memory problem...

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: mysql_real_connect() crash, null pointer suspected
883
August 08, 2005 05:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.