From: Warren Young Date: July 21 2006 12:10pm Subject: Re: Bug in const ColData Row::at(size_type i) const List-Archive: http://lists.mysql.com/plusplus/5837 Message-Id: <44C0C42B.1040402@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Alex Burton wrote: > > I have traced a problem with blobs to this function > const ColData Row::at(size_type i) const We're aware of a whole class of problems in this area. The biggest substantive change in the next version (whenever that happens) will be to fix these problems. See the current Wishlist (not the one in your tarball!) if you want to help make that day come quicker by contributing patches: http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?view=markup > I have made the following modification: > > Added this to Row : > > const std::string & raw_string(int i) const > { > return data_[i]; > } > > This solves my problem, for the moment but doesn't fix the problem, > All of the functions that return ColData from Row have truncated data. The proper fix probably involves adding another ctor to ColData that takes a length in addition to a char* and making the various parts of the code use it. Note that you can't just add the length parameter to the existing ctor, or you'll break the ABI.