Fix MySQL Wrapper Watcher
This commit is contained in:
parent
621ef36565
commit
35241984e0
|
@ -90,11 +90,11 @@ int MySQLConn::connect(const std::string& host, const std::string& user, const s
|
|||
}
|
||||
}
|
||||
|
||||
FILE* fp=fopen("sql_log.txt","w");
|
||||
FILE* fp=[](){FILE* s=fopen("sql_log.txt","a");fprintf(s,"%p=============\n",s);return s;}();
|
||||
|
||||
int MySQLConn::exec(const std::string& SQLCommand, const std::function<void(MySQLResult&)>& func)
|
||||
{
|
||||
fprintf(fp,"%s\n",SQLCommand.c_str());
|
||||
fprintf(fp,"%p: %s\n",this,SQLCommand.c_str());
|
||||
fflush(fp);
|
||||
|
||||
if(mysql_real_query(&(pimpl->m),SQLCommand.c_str(),SQLCommand.size())!=0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user