<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 90: drivers/mysql_backend.cpp: may be need another length in std::string s.reserve(...)</title><link href="https://sourceforge.net/p/cppcms/bugs/90/" rel="alternate"/><link href="https://sourceforge.net/p/cppcms/bugs/90/feed.atom" rel="self"/><id>https://sourceforge.net/p/cppcms/bugs/90/</id><updated>2013-06-25T09:36:02.588000Z</updated><subtitle>Recent changes to 90: drivers/mysql_backend.cpp: may be need another length in std::string s.reserve(...)</subtitle><entry><title>#90 drivers/mysql_backend.cpp: may be need another length in std::string s.reserve(...)</title><link href="https://sourceforge.net/p/cppcms/bugs/90/?limit=50#4641" rel="alternate"/><published>2013-06-25T09:36:02.588000Z</published><updated>2013-06-25T09:36:02.588000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netb24f3aad25f0cce93a020223b8e0d9ca9e21334d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Project "cppdb" is not a priority?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;s.reserve( len + 2 );&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>drivers/mysql_backend.cpp: may be need another length in std::string s.reserve(...)</title><link href="https://sourceforge.net/p/cppcms/bugs/90/" rel="alternate"/><published>2013-02-07T16:48:04.850000Z</published><updated>2013-02-07T16:48:04.850000Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net8b56136b23e24b759552a43004d1b8c7dd00c869</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In 'drivers/mysql_backend.cpp' where using 'mysql_real_escape_string' (line 290):&lt;br /&gt;
&lt;b&gt;size_t len = mysql_real_escape_string(conn_,&amp;amp;buf.front(),b,e-b);&lt;br /&gt;
std::string &amp;amp;s=at(col);&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Return length of the escaped string.&lt;br /&gt;
But after in the code:&lt;br /&gt;
&lt;b&gt;s.reserve(e-b+2);&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;May be need use variable &lt;b&gt;len&lt;/b&gt; ?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>