mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-25 17:28:13 +02:00
Merge pull request #355 from latitude37s/develop
Fixed setting of MYSQL_BIND is_unsigned value.
This commit is contained in:
commit
e23800f60e
@ -98,7 +98,6 @@ public:
|
|||||||
virtual bool extract(std::size_t pos, long& val);
|
virtual bool extract(std::size_t pos, long& val);
|
||||||
/// Extracts a long. Returns false if null was received.
|
/// Extracts a long. Returns false if null was received.
|
||||||
|
|
||||||
|
|
||||||
virtual bool extract(std::size_t pos, unsigned long& val);
|
virtual bool extract(std::size_t pos, unsigned long& val);
|
||||||
/// Extracts an unsigned long. Returns false if null was received.
|
/// Extracts an unsigned long. Returns false if null was received.
|
||||||
#endif
|
#endif
|
||||||
@ -342,7 +341,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, std::size_t length = 0, bool isUnsigned = false);
|
bool realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned = false);
|
||||||
|
|
||||||
// Prevent VC8 warning "operator= could not be generated"
|
// Prevent VC8 warning "operator= could not be generated"
|
||||||
Extractor& operator=(const Extractor&);
|
Extractor& operator=(const Extractor&);
|
||||||
|
@ -257,7 +257,7 @@ void Extractor::reset()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, std::size_t length, bool isUnsigned)
|
bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* buffer, bool isUnsigned)
|
||||||
{
|
{
|
||||||
MYSQL_BIND bind = {0};
|
MYSQL_BIND bind = {0};
|
||||||
my_bool isNull = 0;
|
my_bool isNull = 0;
|
||||||
@ -265,7 +265,6 @@ bool Extractor::realExtractFixed(std::size_t pos, enum_field_types type, void* b
|
|||||||
bind.is_null = &isNull;
|
bind.is_null = &isNull;
|
||||||
bind.buffer_type = type;
|
bind.buffer_type = type;
|
||||||
bind.buffer = buffer;
|
bind.buffer = buffer;
|
||||||
bind.buffer_length = static_cast<unsigned long>(length);
|
|
||||||
bind.is_unsigned = isUnsigned;
|
bind.is_unsigned = isUnsigned;
|
||||||
|
|
||||||
if (!_stmt.fetchColumn(pos, &bind))
|
if (!_stmt.fetchColumn(pos, &bind))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user