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

Cover missing test cases for mariadb-binlog options --raw [and] --flashback

    XMLWordPrintable

Details

    Description

      Here we should address 2 missing test cases in test suite:
      1. There is no test case where --raw is used without -R, since it is required option
      Proof:
      raw option (option used to create raw/binary data instead of SQL query) should be used with -R, --read-from-remote-server (see
      options)

      $ ./client/mysqlbinlog mysql-test/var/tmp/mysqlbinlog_row_flashback_3.sql  --raw
      ERROR: The --raw mode only works with --read-from-remote-server
      

      However we don't have that covered in test case mysql-test/suite/binlog/t/binlog_mysqlbinlog_raw_flush.test, this MDEV should create one.

      2. There is no test case for raw and --flashback and it is not documented behavior (spoted by cvicentiu).
      Theoretically mariadb-binlog can be used with both options to generate the file (what flashback option is used for); but generated file, will contain wrong data and as polluted cannot be used by mariadb client for query execution.

      • Proof:

        $ ./client/mariadb-binlog ../../src/10.11/mysql-test/master-bin.000003
         
        /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
        /*!40019 SET @@session.max_delayed_threads=0*/;
        /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
        DELIMITER /*!*/;
        # at 4
        #010909  3:46:40 server id 1  end_log_pos 256 CRC32 0x06b549c7  Start: binlog v 4, server v 10.11.3-MariaDB-debug-log created 010909  3:46:40
        BINLOG '
        AMqaOw8BAAAA/AAAAAABAAAAAAQAMTAuMTEuMy1NYXJpYURCLWRlYnVnLWxvZwAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAEEwQADQgICAoKCgHHSbUG
        ....
        

      Since this is not desired situation, we need to generate an error when the options are used together

      The tasks should be:
      1. Cover the test case for --raw without -R
      2. Write test case for -raw and -flasback and generate the error when used in conjuction and document in the KB.

      The above is not catched with Coverity scan.

      Attachments

        Activity

          People

            TheLinuxJedi Andrew Hutchings (Inactive)
            anel Anel Husakovic
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.