Here is my query:
UPDATE users SET active = -1 WHERE id = ? AND active IS NULL
It works on my current MySQL version. I mean it sets 1111111111
as active
value. Noted that active
is BIT(10)
datatype.
But recently I've upgraded the MySQL version and it throws:
string(94) "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'active' at row 1"
Any idea how can I fix it?