Merge pull request #353 from latitude37s/develop

Correctly set MySQL time_type for Poco::Data::Date.
This commit is contained in:
Aleksandar Fabijanic 2013-12-19 09:20:20 -08:00
commit 70a2f977a4
2 changed files with 4 additions and 2 deletions

View File

@ -210,6 +210,8 @@ void Binder::bind(std::size_t pos, const Date& val, Direction dir)
mt.month = val.month();
mt.day = val.day();
mt.time_type = MYSQL_TIMESTAMP_DATE;
_dates.push_back(new MYSQL_TIME(mt));
realBind(pos, MYSQL_TYPE_DATE, _dates.back(), sizeof(MYSQL_TIME));

View File

@ -189,8 +189,8 @@ void ResultMetadata::init(MYSQL_STMT* stmt)
{for (std::size_t i = 0; i < count; i++)
{
unsigned long size = fieldSize(fields[i]);
unsigned long zero = 0;
std::size_t size = fieldSize(fields[i]);
std::size_t zero = 0;
if (size == ~zero) size = 0;
_columns.push_back(MetaColumn(