Commit 82fbaa7c authored by Pavel Vainerman's avatar Pavel Vainerman Committed by Vinogradov Aleksei

XXSQLInterface: minor fixes..

parent 5b4371db
...@@ -184,6 +184,13 @@ string MySQLInterface::addslashes( const string& str ) ...@@ -184,6 +184,13 @@ string MySQLInterface::addslashes( const string& str )
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
void MySQLInterface::makeResult(DBResult& dbres, MYSQL_RES* myres, bool finalize ) void MySQLInterface::makeResult(DBResult& dbres, MYSQL_RES* myres, bool finalize )
{ {
if( !myres )
{
if( finalize )
mysql_free_result(myres);
return;
}
MYSQL_ROW mysql_row; MYSQL_ROW mysql_row;
unsigned int nfields = mysql_num_fields(myres); unsigned int nfields = mysql_num_fields(myres);
......
...@@ -229,6 +229,13 @@ bool SQLiteInterface::isConnection() ...@@ -229,6 +229,13 @@ bool SQLiteInterface::isConnection()
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
void SQLiteInterface::makeResult(DBResult& dbres, sqlite3_stmt* s, bool finalize ) void SQLiteInterface::makeResult(DBResult& dbres, sqlite3_stmt* s, bool finalize )
{ {
if( !s )
{
if( finalize )
sqlite3_finalize(s);
return;
}
do do
{ {
int n = sqlite3_data_count(s); int n = sqlite3_data_count(s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment