krowinski / php-mysql-replication

Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
MIT License
323 stars 98 forks source link

mysql bigint field return a string in after/before Array, should return int in php I think. #125

Open hetao29 opened 3 months ago

hetao29 commented 3 months ago

Please provide the following details.

Because

** PDO set \PDO::ATTR_STRINGIFY_FETCHES => false, the bigint will return int. PDO::ATTR_STRINGIFY_FETCHES

** Mysqli also return int. MYSQLI_OPT_INT_AND_FLOAT_NATIVE

** if >PHP_INT_MAX return string or return int, the pdo/mysqli do this.

hetao29 commented 3 months ago

https://github.com/hetao29/php-mysql-replication/commit/418625f36dcdb9b3fcbb24e94783556a26ee8d6d