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

Wrong Number of rows in mysqlbinlog output.

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3, 10.4, 10.5
    • Fix Version/s: 10.3.19, 10.4.9
    • Component/s: Replication
    • Labels:
      None
    • Environment:
      All

      Description

      Following test case different way It print different no of rows the actual rows.

      --source include/have_binlog_format_row.inc
       
      --let $MYSQLD_DATADIR= `select @@datadir`
      --let $binlog_file= $MYSQLD_DATADIR/master-bin.000001
      --let $output_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.output
       
      CREATE TABLE t1(c_char_utf8 CHAR(10) ,
        c_varchar_utf8 char(10) ,
        c_text_utf8 blob );
       
      INSERT into t1   values("B", "B", REPEAT("!", 20000));
       
      --exec $MYSQL_BINLOG -F $binlog_file > $output_file
      --remove_file $output_file
      drop table t1;
      

      Output

      ISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEh
      ISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEh
      ISEhISEhISEhISEhISEhISEhISEhISEhISEhISEpm2rJ
      '/*!*/;
      # Number of rows: 313
      

      So instead of ! we use # in repeat

      INSERT into t1   values("B", "B", REPEAT("#", 20000));
      

      IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
      IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMLiFNr
      '/*!*/;
      # Number of rows: 3670
      

      INSERT into t1   values("B", "B", REPEAT("#", 2000));
      

      IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
      IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMLiFNr
      '/*!*/;
      # Number of rows: 2
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                sachin.setiya.007 Sachin Setiya
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: