You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emulate UNSIGNED integer semantics for CAST and CONVERT #359
MySQL's CAST(expr AS UNSIGNED) and CONVERT(expr, UNSIGNED) wrap negative values using modular arithmetic (2^64). For example, CAST('-10' AS UNSIGNED) returns 18446744073709551606 in MySQL.
SQLite has no unsigned integer type — its integers are always 64-bit signed. Currently, CAST('-10' AS UNSIGNED) returns -10 in the SQLite driver, which is incorrect.
Scope
The UNSIGNED semantics may need to be emulated in multiple places:
CAST(expr AS UNSIGNED) expressions.
CONVERT(expr, UNSIGNED) expressions.
Potentially other contexts where UNSIGNED integer behavior is expected (e.g., column types, arithmetic).
Activity