#2559·mysql

Better type casting of BIT values

Author: sidoraresCreated Nov 22, 2022Updated Nov 23, 2022

see similar discussion in https://github.com/sidorares/node-mysql2/issues/1597

Currently BIT fields are always returned as single byte Buffer:

https://github.com/mysqljs/mysql/blob/dc9c152a87ec51a1f647447268917243d2eab1fd/lib/protocol/packets/RowDataPacket.js#L107

I think this should be returned as a number. Might be good to coordinate both changes here in mysql2, this is potentially a breaking backwards incompatible change