MySQL doesn't have a proper boolean type - instead generally TINYINT(1) or BIT(1) are used to represent booleans. Since https://github.com/duckdb/duckdb_mysql/pull/26 we support loading those columns as booleans. TINYINT(1) columns, however, can contain a wider range of values than a boolean (from -128 to 127). Previously we would throw an exception when a larger number was encountered. This PR modifies the behavior so that we instead interpret numbers <= 0 as false, and numbers > 0 as true.
Fixes #75
MySQL doesn't have a proper boolean type - instead generally
TINYINT(1)
orBIT(1)
are used to represent booleans. Since https://github.com/duckdb/duckdb_mysql/pull/26 we support loading those columns as booleans.TINYINT(1)
columns, however, can contain a wider range of values than a boolean (from-128
to127
). Previously we would throw an exception when a larger number was encountered. This PR modifies the behavior so that we instead interpret numbers<= 0
as false, and numbers> 0
as true.