MySQL TINYINT and unsigned integer columns read as 0
- Status
- Fixed
- Fixed in
- v26.9.4
- Area
- compiler
- Source discussion
- https://forum.objo.dev/d/1154-getting-started-with-objo-little-problem-on-execute-database-code
- Last updated
- 2026-09-28
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Reading integer values from certain MySQL column types returns 0 instead of the stored value. Affected column types are TINYINT (signed, other than tinyint(1)) and the unsigned integer types SMALLINT UNSIGNED, INT UNSIGNED, MEDIUMINT UNSIGNED, BIGINT UNSIGNED, and BIT. DatabaseColumn.IntegerValue returns 0 for every row, and DoubleValue/DecimalValue return 0/0.0 as well, so data copied out of MySQL is silently wrong. Expected behaviour: the column's actual numeric value. Signed SMALLINT/INT/BIGINT, tinyint(1), string, decimal, and date columns are unaffected.
Workaround until the fix ships: Integer.Parse(col.StringValue) returns the correct value, because StringValue converts the underlying value directly.