go-mysql-org / go-mysql

a powerful mysql toolset with Go
MIT License
4.58k stars 976 forks source link

add support for driver.NamedValueChecker on driver connection #887

Closed dvilaverde closed 3 months ago

dvilaverde commented 4 months ago

This PR is to address issue https://github.com/go-mysql-org/go-mysql/issues/886, which prevents a client from using custom value types, specifically uint64 in prepared statements.

dvilaverde commented 3 months ago

And just for #886, I'm not sure to handle the large unit64 value, simply skipping the checker can work well. (will the driver write legal payload?)

Based on the documentation calling ErrSkip will cause the DefaultParameterConverter to be used instead. The driver will write a legal payload, but I'm going to update the tests for this.