pocoproject/poco — pull request #355 by latitude37s (2013-12-19 18:15:45+00:00)
Title: Fixed setting of MYSQL_BIND is_unsigned value.

If you look at the places where realExtractFixed() is called in /Data/MySQL/src/Extractor.cpp, it always uses the default value for 'length'. It also specifies a non-default value for 'isUnsigned' in several situations:

```cpp
return realExtractFixed(pos, MYSQL_TYPE_TINY, &val);
return realExtractFixed(pos, MYSQL_TYPE_TINY, &val, true);
return realExtractFixed(pos, MYSQL_TYPE_SHORT, &val);
return realExtractFixed(pos, MYSQL_TYPE_SHORT, &val, true);
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val);
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val, true);
return realExtractFixed(pos, MYSQL_TYPE_LONGLONG, &val);
return realExtractFixed(pos, MYSQL_TYPE_LONGLONG, &val, true);
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val);
return realExtractFixed(pos, MYSQL_TYPE_LONG, &val, true);
return realExtractFixed(pos, MYSQL_TYPE_TINY, &val);
return realExtractFixed(pos, MYSQL_TYPE_FLOAT, &val);
return realExtractFixed(pos, MYSQL_TYPE_DOUBLE, &val);
return realExtractFixed(pos, MYSQL_TYPE_TINY, &val);
```

Where 'true' is used to specify the 'isUnsigned' value, this will be implicitly converted to size_t and interpreted as a length value by realExtractFixed().

The MYSQL_BIND buffer_length field is only used for character and binary C data. See: http://dev.mysql.com/doc/refman/5.5/en/c-api-prepared-statement-data-structures.html

realExtractFixed is not used for those data types. Therefore the most efficient solution is just to remove the length parameter.