Commit ceb2a221 authored by Pavel Vainerman's avatar Pavel Vainerman

XXSQLInterface: minor fixes..

parent 2f129676
...@@ -177,6 +177,13 @@ string MySQLInterface::addslashes( const string& str ) ...@@ -177,6 +177,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);
......
...@@ -222,6 +222,13 @@ bool SQLiteInterface::isConnection() ...@@ -222,6 +222,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