sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

MySQL: Proper type for YEAR and TINYINT

Open Necoro opened this issue 1 year ago • 1 comments

Version

1.25.0

What happened?

In issue #3088, SMALLINT was (correctly) changed from int32 to int16. Surprisingly, TINYINT, which should have int8, has not been touched, resulting in the situation that TINYINT is now larger than SMALLINT.

Additionally, YEAR is checked for signed vs unsigned, even though this flag is not possible for MySQL: it should always result in an uint16.

FWIW: Closing this issue will also close #1856

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

No response

What operating system are you using?

Linux

What database engines are you using?

MySQL

What type of code are you generating?

Go

Necoro avatar Feb 14 '24 22:02 Necoro

@Necoro this is a good catch. We'll make sure to make this change before we release 1.26.

kyleconroy avatar Feb 16 '24 17:02 kyleconroy