Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unpack(): Type C: not enough input values #123

Open
ronenb75 opened this issue Jul 11, 2024 · 0 comments
Open

unpack(): Type C: not enough input values #123

ronenb75 opened this issue Jul 11, 2024 · 0 comments

Comments

@ronenb75
Copy link

Please provide the following details.

  • Operating System: Linux
  • PHP Version: 8.3.9
  • php-mysql-replication Version: 8.1.0
  • *mysql version (SELECT VERSION();): 8.0.36

Steps required to reproduce the problem.

Using a modified version of the dump_events.php script, produce an error:

TypeError: MySQLReplication\BinaryDataReader\BinaryDataReader::readUInt8(): Return value must be of type int, null returned in /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/BinaryDataReader/BinaryDataReader.php:182

Stack trace:

#0 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/BinaryDataReader/BinaryDataReader.php(156): MySQLReplication\BinaryDataReader\BinaryDataReader->readUInt8()
#1 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/BinaryDataReader/BinaryDataReader.php(150): MySQLReplication\BinaryDataReader\BinaryDataReader->readUIntBySize(1)
#2 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php(614): MySQLReplication\BinaryDataReader\BinaryDataReader->readLengthString(1)
#3 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php(532): MySQLReplication\Event\RowEvent\RowEvent->getString(1)
#4 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php(458): MySQLReplication\Event\RowEvent\RowEvent->getColumnData('\x12\x00\x13')
#5 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/RowEvent/RowEvent.php(378): MySQLReplication\Event\RowEvent\RowEvent->getValues()
#6 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php(101): MySQLReplication\Event\RowEvent\RowEvent->makeWriteRowsDTO()
#7 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php(45): MySQLReplication\Event\Event->makeEvent(Object(MySQLReplication\BinaryDataReader\BinaryDataReader))
#8 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php(109): MySQLReplication\Event\Event->consume()
#9 /opt/vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php(103): MySQLReplication\MySQLReplicationFactory->consume()
#10 /opt/cdc.php(145): MySQLReplication\MySQLReplicationFactory->run()
#11 {main}

I'm not sure how I can pinpoint the offending row as the exception happens before I can output any information about this row.
I'd be happy to provide the actual row if there's a way to grab any information of the offending row.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant