Hi,

I've faced a problem reading unsigned int value from database into 
soci::row.
I think an error is in mysql backend.

Does anyone know how to fix it? The crashing example is above.

#include <iostream>
#include "soci.h"
#include "mysql/soci-mysql.h"

int main()
{
   unsigned int mask = 0xffffff00;
   soci::session sql(soci::mysql, "user=billing password=billing 
dbname=billing");
   sql << "create temporary table ipaddr ( ip int(11) unsigned )";
   sql << "insert into ipaddr set ip = " << mask;
   soci::rowset<> rows( sql.prepare << "select ip from ipaddr" );
   for( soci::rowset<>::iterator it = rows.begin(), end = rows.end(); it 
!= end; ++it )
   {
     std::cout << "line" << std::endl;
   }
   return 0;
}


-- 
Best regards, Michael Evdokimov
Network Solutions, Moscow, Russia, Office: +7-495-7950677, Mobile: 
+7-963-6054013
Web: www.lanbilling.ru, www.lanbilling.tv, www.helpdesk2.ru

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to