mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-18 16:37:13 +01:00
Merge pull request #353 from latitude37s/develop
Correctly set MySQL time_type for Poco::Data::Date.
This commit is contained in:
commit
70a2f977a4
@ -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));
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user