Core/Mysql: Multiple changes

- added support for setting NULL column values to MySQL wrapper in core
- replaced nonstandard strdup function and manual memory management with std::string
- fixed bug in MySQLPreparedStatement::getQueryString method, it failed when string parameter contained embedded '?' symbols
- fixed memory leak in MySQLPreparedStatement::setString method
This commit is contained in:
Spp
2013-01-02 12:22:50 +01:00
parent 5280a77fe1
commit ebd14b4f01
12 changed files with 736 additions and 671 deletions
+1 -3
View File
@@ -62,9 +62,7 @@ struct MySQLConnectionInfo
std::string port_or_socket;
};
typedef std::map<uint32 /*index*/, std::pair<const char* /*query*/, ConnectionFlags /*sync/async*/> > PreparedStatementMap;
#define PREPARE_STATEMENT(a, b, c) m_queries[a] = std::make_pair(strdup(b), c);
typedef std::map<uint32 /*index*/, std::pair<std::string /*query*/, ConnectionFlags /*sync/async*/> > PreparedStatementMap;
class MySQLConnection
{