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

Delete event contains no values #101

Closed quakemmo closed 10 months ago

quakemmo commented 10 months ago

Please provide the following details.

Steps required to reproduce the problem.

  1. Run the dump_events example script
  2. Insert a row in a table
  3. Delete it

Expected Result.

Some values to work with in the event

Actual Result.

=== Event delete === 
Date: 2023-10-30T14:32:56+00:00
Log position: 302079776
Event size: 48
Table: mytable
Affected columns: 2
Changed rows: 0
Values: Array
(
)
quakemmo commented 10 months ago

Turns out this happens when the user the script connected to the mysql server with does not have SELECT privileges on the table. All good, just have to keep that in mind.