List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 21 2006 12:10pm
Subject:Re: Bug in const ColData Row::at(size_type i) const
View as plain text  
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.
Thread
Bug in const ColData Row::at(size_type i) constAlex Burton21 Jul
  • Re: Bug in const ColData Row::at(size_type i) constWarren Young21 Jul
    • Bug in mysqlpp::transactionAlex Burton31 Aug
      • Re: Bug in mysqlpp::transactionWarren Young12 Jan