Skip to content

Unable to parse BinaryDataReader with different authentication plugins #128

Open
@janpalacky

Description

@janpalacky

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions