Description:
hzh_from_china
hzh62@163.com
very bad memory holl
I am from china,understanding my a little english.
I use directly mysqlpp 2.1 source code download from www.mysql.org,not use mysqlpp.lib. 
is my very simple programm,present bad memory holl.
use mysqlpp.lib ,present bad memory holl.
unsigned long __stdcall update(void *argc)
{
int i = 0;
for(;;)
{
Sleep(1000 * 0.1);
std::string sql = "update processingtransactioninterface";
sql += " set actresult = 1 where actresult = 2";
//CMysqlClient client;
//mysqlpp::Connection * conn = client.GetConnect(1);
//if(conn == NULL)
//{
//continue;
//}
        
mysqlpp::Connection conn(false);   // = new mysqlpp::Connection(false);
conn.connect("new_db","127.0.0.1","root","mysql5",3306);
mysqlpp::Query query = conn.query();
if(!query.exec(sql))
{
std::cout<<"update fail"<<endl;
}
else
{
            std::cout<<"update success"<<endl;
}
}
return 0;
}
int main( int argc, char * argv[] ) 
{
unsigned long p3 = 1;
int parm3 = 2;
::CreateThread(0,0,update,(void*)&parm3,0,&p3);
system("pause");
return 1;
}
How to repeat:
Drang test
  
 
 
Description: hzh_from_china hzh62@163.com very bad memory holl I am from china,understanding my a little english. I use directly mysqlpp 2.1 source code download from www.mysql.org,not use mysqlpp.lib. is my very simple programm,present bad memory holl. use mysqlpp.lib ,present bad memory holl. unsigned long __stdcall update(void *argc) { int i = 0; for(;;) { Sleep(1000 * 0.1); std::string sql = "update processingtransactioninterface"; sql += " set actresult = 1 where actresult = 2"; //CMysqlClient client; //mysqlpp::Connection * conn = client.GetConnect(1); //if(conn == NULL) //{ //continue; //} mysqlpp::Connection conn(false); // = new mysqlpp::Connection(false); conn.connect("new_db","127.0.0.1","root","mysql5",3306); mysqlpp::Query query = conn.query(); if(!query.exec(sql)) { std::cout<<"update fail"<<endl; } else { std::cout<<"update success"<<endl; } } return 0; } int main( int argc, char * argv[] ) { unsigned long p3 = 1; int parm3 = 2; ::CreateThread(0,0,update,(void*)&parm3,0,&p3); system("pause"); return 1; } How to repeat: Drang test