Author: wyoung
Date: Fri Jan 12 19:43:56 2007
New Revision: 1398

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1398&view=rev
Log:
Row::at() now uses the ColData ctor with an explicit length parameter
when creating the object it returns.  This fixes yet another place where
we can be bit by query results containing nulls.  Probably isn't the
last one, though.

Modified:
    trunk/lib/row.cpp

Modified: trunk/lib/row.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.cpp?rev=1398&r1=1397&r2=1398&view=diff
==============================================================================
--- trunk/lib/row.cpp (original)
+++ trunk/lib/row.cpp Fri Jan 12 19:43:56 2007
@@ -71,7 +71,9 @@
 const ColData Row::at(size_type i) const
 {
        if (initialized_) {
-               return ColData(data_.at(i).c_str(), res_->types(i), 
is_nulls_[i]);
+               const std::string& s = data_.at(i);
+               return ColData(s.c_str(), s.length(), res_->types(i),
+                               is_nulls_[i]);
        }
        else {
                if (throw_exceptions())


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to