Loading src/database/pgsql.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -48,11 +48,11 @@ namespace blogi { PQfinish(_dbconn); } int exec(SQL *sql,DBResult &res){ int exec(SQL *sql,DBResult &res) override{ PGresult *pres = PQexec(_dbconn,sql->c_str()); int pstate=PQresultStatus(pres); if( ( pstate!=PGRES_COMMAND_OK && pstate != PGRES_EMPTY_QUERY && pstate != PGRES_TUPLES_OK)) { if(pstate != PGRES_TUPLES_OK) { libhttppp::HTTPException exp; exp[libhttppp::HTTPException::Critical] << PQerrorMessage(_dbconn); PQclear(pres); Loading src/database/sqlite.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ namespace blogi { sqlite3_close(_dbconn); } int exec(SQL *sql,DBResult &res){ int exec(SQL *sql,DBResult &res) override{ while( sqllock.exchange(true, std::memory_order_acquire) ); char *ssql; ssql=new char[sql->length()]; Loading Loading
src/database/pgsql.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -48,11 +48,11 @@ namespace blogi { PQfinish(_dbconn); } int exec(SQL *sql,DBResult &res){ int exec(SQL *sql,DBResult &res) override{ PGresult *pres = PQexec(_dbconn,sql->c_str()); int pstate=PQresultStatus(pres); if( ( pstate!=PGRES_COMMAND_OK && pstate != PGRES_EMPTY_QUERY && pstate != PGRES_TUPLES_OK)) { if(pstate != PGRES_TUPLES_OK) { libhttppp::HTTPException exp; exp[libhttppp::HTTPException::Critical] << PQerrorMessage(_dbconn); PQclear(pres); Loading
src/database/sqlite.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ namespace blogi { sqlite3_close(_dbconn); } int exec(SQL *sql,DBResult &res){ int exec(SQL *sql,DBResult &res) override{ while( sqllock.exchange(true, std::memory_order_acquire) ); char *ssql; ssql=new char[sql->length()]; Loading