[11928] Some warning fixes

This commit is contained in:
zergtmn 2012-02-16 20:31:48 +06:00
parent 7c827733f5
commit c6a751134c
18 changed files with 28 additions and 38 deletions

View file

@ -307,7 +307,7 @@ QueryResult* Database::PQuery(const char *format,...)
if(res==-1)
{
sLog.outError("SQL Query truncated (and not execute) for format: %s",format);
return false;
return NULL;
}
return Query(szQuery);
@ -326,7 +326,7 @@ QueryNamedResult* Database::PQueryNamed(const char *format,...)
if(res==-1)
{
sLog.outError("SQL Query truncated (and not execute) for format: %s",format);
return false;
return NULL;
}
return QueryNamed(szQuery);

View file

@ -337,7 +337,7 @@ bool MySqlPreparedStatement::prepare()
m_stmt = mysql_stmt_init(m_pMySQLConn);
if (!m_stmt)
{
sLog.outError("SQL: mysql_stmt_init()() failed ");
sLog.outError("SQL: mysql_stmt_init() failed ");
return false;
}

View file

@ -72,6 +72,8 @@ class MANGOS_DLL_SPEC MySQLConnection : public SqlConnection
MySQLConnection(Database& db) : SqlConnection(db), mMysql(NULL) {}
~MySQLConnection();
//! Initializes Mysql and connects to a server.
/*! infoString should be formated like hostname;username;password;database. */
bool Initialize(const char *infoString);
QueryResult* Query(const char *sql);
@ -102,9 +104,6 @@ class MANGOS_DLL_SPEC DatabaseMysql : public Database
DatabaseMysql();
~DatabaseMysql();
//! Initializes Mysql and connects to a server.
/*! infoString should be formated like hostname;username;password;database. */
// must be call before first query in thread
void ThreadStart();
// must be call before finish thread run