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

Unable to parse BinaryDataReader with different authentication plugins #128

Open
janpalacky opened this issue Nov 26, 2024 · 0 comments
Open

Comments

@janpalacky
Copy link

Please provide the following details.

  • Operating System: Ubuntu 22.04
  • PHP Version: 8.3.13
  • php-mysql-replication Version: 8.1.0
  • *mysql version (SELECT VERSION();): 8.0.37

Steps required to reproduce the problem.

  1. Setup default-authentication-plugin=mysql_native_password for mysql
  2. Set caching_sha2_password to binlog user

Expected Result.

  • Binlog is read successfully or some authentication exception is thrown, if the binlog is unable to be read with this setting.

Actual Result.

  • BinaryDataReader cannot be parsed, exception is thrown:
Exception: MySQLReplication\BinaryDataReader\BinaryDataReader::readInt32(): Return value must be of type int, null returned
  Type: TypeError
  File: vendor/krowinski/php-mysql-replication/src/MySQLReplication/BinaryDataReader/BinaryDataReader.php
  Line: 274
  StackTrace: 
  #0 vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php:143 MySQLReplication\BinaryDataReader\BinaryDataReader->readInt32()
  #1 vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php:51 MySQLReplication\Event\Event->createEventInfo()
  #2 vendor/krowinski/php-mysql-replication/src/MySQLReplication/Event/Event.php:45 MySQLReplication\Event\Event->makeEvent()
  #3 vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php:109 MySQLReplication\Event\Event->consume()
  #4 vendor/krowinski/php-mysql-replication/src/MySQLReplication/MySQLReplicationFactory.php:103 MySQLReplication\MySQLReplicationFactory->consume()
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