Hello,
This is a problem in the C API, but I guess someone here could help me out.
int verify(const char *logid, const char *passwd)
{
MYSQL mysql;
mysql = database_initialize(0);
mysql_close(mysql);
}
The above is a cut down version from my functions. I'm trying to close the
mysql connection, but it crashes with a coredump everytime mysql_close() is
called... and that's the line where segmentation fault is attained.
database_initialize returns a copy of MYSQL.
MYSQL database_initialize(int x) {
MYSQL mysql;
mysql_init(&mysql);
mysql_real_connect(&mysql...
return MYSQL;
}
Don't know why it's crashing! Is something I'm doing wrong, cause it seems
passing MYSQL between functions is what makes this thing wrong?