Menu ▾ ▴

#90 drivers/mysql_backend.cpp: may be need another length in std::string s.reserve(...)

cppcms-v1.0.x
open
nobody
cppdb (9)
1
2014-10-30
2013-02-07
Anonymous
No

In 'drivers/mysql_backend.cpp' where using 'mysql_real_escape_string' (line 290):
size_t len = mysql_real_escape_string(conn_,&buf.front(),b,e-b);
std::string &s=at(col);

Return length of the escaped string.
But after in the code:
s.reserve(e-b+2);

May be need use variable len ?

Discussion

  • Anonymous

    Anonymous - 2013-06-25

    Project "cppdb" is not a priority?

    s.reserve( len + 2 );

     

Anonymous
Anonymous

Add attachments
Cancel