Hello,
I've got two bugs report:
1. Query::preview() adds extra null chars.
This one was reported by others, but I see it's still not fixed in SVN.
The fix is to remove "*this << std::ends;" from Query::str(SQLQueryParms& p)
and make Query::preview_char() look like this:
-----------------------------------
char*
Query::preview_char()
{
std::string const str(sbuffer_.str());
char* s = new char[str.size() + 1];
memcpy(s, str.c_str(), str.size() + 1);
}
-----------------------------------
Note that reading one byte past the end of std::string data is OK, as
std::strings are always null-terminated.
2. Connection copy constructor doesn't work, because it doesn't initialize
is_connected_ member, which is then accessed here:
-----------------------------------
void
Connection::copy(const Connection& other)
{
if (connected()) {
disconnect();
}