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
319 stars 94 forks source link

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

Open hetao29 opened 2 weeks ago

hetao29 commented 2 weeks 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 2 weeks ago

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