Skip to content

Commit 5812124

Browse files
committed
Fixed setting of MYSQL_BIND is_unsigned value.
1 parent 89a4fd6 commit 5812124

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Data/MySQL/include/Poco/Data/MySQL/Extractor.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class MySQL_API Extractor: public Poco::Data::AbstractExtractor
9898
virtual bool extract(std::size_t pos, long& val);
9999
/// Extracts a long. Returns false if null was received.
100100

101-
102101
virtual bool extract(std::size_t pos, unsigned long& val);
103102
/// Extracts an unsigned long. Returns false if null was received.
104103
#endif
@@ -342,7 +341,7 @@ class MySQL_API Extractor: public Poco::Data::AbstractExtractor
342341

343342
private:
344343

345-
bool realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, std::size_t length = 0, bool isUnsigned = false);
344+
bool realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned = false);
346345

347346
// Prevent VC8 warning "operator= could not be generated"
348347
Extractor& operator=(const Extractor&);

Data/MySQL/src/Extractor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,14 @@ void Extractor::reset()
257257
}
258258

259259

260-
bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, std::size_t length, bool isUnsigned)
260+
bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned)
261261
{
262262
MYSQL_BIND bind = {0};
263263
my_bool isNull = 0;
264264

265265
bind.is_null = &isNull;
266266
bind.buffer_type = type;
267267
bind.buffer = buffer;
268-
bind.buffer_length = static_cast<unsigned long>(length);
269268
bind.is_unsigned = isUnsigned;
270269

271270
if (!_stmt.fetchColumn(pos, &bind))

0 commit comments

Comments
 (0)