Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28768

mysqlbinlog can produce events larger than max_allowed_packet

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Won't Fix
    • 10.6, 10.11, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL)
    • N/A
    • Replication
    • None

    Description

      MDEV-10963 did not cover a case of to be fragmented Rows_log_event is not the final one
      from its parent sql statement.

      If one executes the following one a MariaDB server with "log_bin=1"
      create or replace table t1 (a int primary key, b varchar(1024)) engine=innodb;
      insert into t1 select seq,repeat("a",1024) from seq_1_to_100000

      The generated binary log has an entry:
      BINLOG '
      BoA2ZRMBAAAAMAAAAPcBAAAAABIAAAAAAAEABHRlc3QAAnQxAAIDDwIABAJW98rq
      BoA2ZRcBAAAAUhwAAEkeAAAAABIAAAAAAAAAAv/8AQAAAAAEYWFhYWFhYWFhYWFhYWFhYWFhYWFh
      YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
      YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
      YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
      ...
      ;
      That is much bigger than max_packet_size.

      This means one cannot send data to the server with mariadb-binlog --base64-output=auto | mysql ..

      The task is to split BINLOG ... ;
      into separate events no bigger than max_packet_size

      There are two options to do that:

      • Create a separate BINLOG event for each internal row_binlog_event.
      • Split the BINLOG event into 'max_binlog_size' events.

      Other things to fix in mariadb-binlog at the same time:

      • Ensure that --base64-output=auto is default (as said in mariadb-binlog --help)
      • Using --base64-output without options should be the same as using =auto

      Attachments

        Issue Links

          Activity

            People

              ParadoxV5 Jimmy Hú
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.