List:MySQL++« Previous MessageNext Message »
From:Marc-André Lavigne Date:June 5 2013 6:39pm
Subject:Mysql connection is disconnected after a query in 64 bit
View as plain text  
Hi,

I'm working with a 64 environment and I support both 32 and 64 bit. When I compile and run
the following code, I have different result in 32 vs 64 bit.

Basically the connection disconnect after a query storein is called only in 64 bit. When I
compile and execute in 32 bit, the connection is still connected.

Why it disconnects in 64 bit? I'm using mysqlpp 3.1.0

mysqlpp::Connection* conn = mDataSource->GetConnection();
if(conn != NULL && conn->connected())
{
                mysqlpp::Query query = conn->query(queryStr.c_str());
                LOG_ERROR(format("1------ IsConnected()=%1%") % conn->connected());
                query.storein(*result);
                success = query;
                LOG_ERROR(format("2------ IsConnected()=%1%") % conn->connected());
}

Where queryStr is a simple query ("select * from theme"), and success is true

Result in 64 bit:
2013-06-05 14:20:46: [ERROR] 1------ IsConnected()=1
2013-06-05 14:20:46: [ERROR] 2------ IsConnected()=0

Result in 32 bit:
2013-06-05 14:21:45: [ERROR] 1------ IsConnected()=1
2013-06-05 14:21:45: [ERROR] 2------ IsConnected()=1

Thanks,

Marc-André Lavigne




Thread
Mysql connection is disconnected after a query in 64 bitMarc-André Lavigne5 Jun
  • Re: Mysql connection is disconnected after a query in 64 bitMickael Wolff5 Jun
    • RE: Mysql connection is disconnected after a query in 64 bitMarc-André Lavigne10 Jun