Open AgnisLV opened 3 years ago
Hi @AgnisLV in the MySQL protocol, the insertId
is always returned as a BIGINT no matter the query. The bigNumberStrings
is specifically around the typecasting of columns, not of the other aspects of MySQL protocol packets (like the results packet).
AFAIK there is no loss in the value. Can you provide a reproduction for the precision loss you are seeing so we can take a look?
Sorry, I was too hasty with my last comment. It seems that if supportBigNumbers
is enabled then insertId
will be returned as a String
when numbers are large enough. All clear now.
For INSERT query the last insertId is not cast to string when the auto-increment column is bigint. The bigNumberStrings is ignored and the result is returned as number.
typeof results.insertId == number