krowinski/php-mysql-replication

getDatetime2 not reads fsp when date is wrong

Stern87 opened this issue · 4 comments

Please provide the following details.

  • Operating System: Linux
  • PHP Version: 7.1
  • php-mysql-replication Version: 5.0.5
  • *mysql version (SELECT VERSION();): 5.7.26-log

Steps required to reproduce the problem.

  1. Have a table with column type DATETIME(6) NOT NULL - with fractional seconds
  2. Update any row and set value of this column to NULL
  3. Now you will receive an event that will fail when try to read value of any fields that go after mentioned above

Expected Result.

  • All data from binaryDataReader should go well after reading value from column with DATETIME(6) NOT NULL type

Actual Result.

  • binaryDataReader can't read next data because in the getDatetime2 function return null goes before it runs getFSP

Thanks for approving pull request and merging to master branch!
When the new version will be released?

Many thanks!

Tx for fix

I just released new tag,