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

rpl.rpl_rewrt_db test fails with [gdb,manual-gdb] with wrong parsing

    XMLWordPrintable

Details

    Description

      Error occurs when running the test with --manual-gdb (note " between second and third occurence of replicate_rewrite_db option):

      Starting program: /home/anel/mariadb/server/build/10.11/sql/mariadbd --defaults-group-suffix=.2 --defaults-file=/home/anel/mariadb/server/build/10.11/mysql-test/var/my.cnf --log-output=file --binlog-format=mixed --log-bin=slave-bin --log-bin=slave-bin 
      --replicate-rewrite-db=test->rewrite 
      "--replicate-rewrite-db=mysqltest1 -> test" 
      "--replicate-rewrite-db=x -> y" 
      --replicate-rewrite-db=database_master_temp_01->database_slave_temp_01 
      --replicate-rewrite-db=database_master_temp_02->database_slave_temp_02 
      --replicate-rewrite-db=database_master_temp_03->database_slave_temp_03 
      --core-file --loose-debug-sync-timeout=300 --loose-debug-gdb --loose-skip-stack-trace < /dev/null
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
      2022-08-22  9:01:39 0 [ERROR] Bad syntax in replicate-rewrite-db: missing '->'
      

      Options are read from rpl_rewrt_db-slave.opt file

      "--replicate-rewrite-db=test->rewrite" "--replicate-rewrite-db=mysqltest1 -> test" "--replicate-rewrite-db=x -> y" "--replicate-rewrite-db=database_master_temp_01->database_slave_temp_01" "--replicate-rewrite-db=database_master_temp_02->database_slave_temp_02" "--replicate-rewrite-db=database_master_temp_03->database_slave_temp_03"
      

      The wrong formated string is obtained in gdbinit file when test is run:

      $ cat var/tmp/gdbinit.mysqld.2 
      set args --defaults-group-suffix=.2 --defaults-file=/home/anel/mariadb/server/build/10.11/mysql-test/var/my.cnf --log-output=file --binlog-format=mixed --log-bin=slave-bin --log-bin=slave-bin --replicate-rewrite-db=test->rewrite "--replicate-rewrite-db=mysqltest1 -> test" "--replicate-rewrite-db=x -> y" --replicate-rewrite-db=database_master_temp_01->database_slave_temp_01 --replicate-rewrite-db=database_master_temp_02->database_slave_temp_02 --replicate-rewrite-db=database_master_temp_03->database_slave_temp_03 --core-file --loose-debug-sync-timeout=300 --loose-debug-gdb --loose-skip-stack-trace < /dev/null
      

      This is bt mtr_add_arg <- mysqld_arguments <-gdb_arguments

      When the test is run without manual-gdb it works

      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      rpl.rpl_rewrt_db 'mix'                   [ pass ]   1241
      rpl.rpl_rewrt_db 'row'                   [ skipped ]  Neither MIXED nor STATEMENT binlog format
      rpl.rpl_rewrt_db 'stmt'                  [ pass ]   1235
      --------------------------------------------------------------------------
      The servers were restarted 2 times
      Spent 2.476 of 8 seconds executing testcases
       
      Completed: All 2 tests were successful.
       
      1 tests were skipped, 1 by the test itself.
      

      In that case parsing is fine:

      $ /home/anel/mariadb/server/build/10.11/sql/mariadbd --defaults-group-suffix=.2 --defaults-file=/home/anel/mariadb/server/build/10.11/mysql-test/var/my.cnf --log-output=file --binlog-format=mixed --log-bin=slave-bin --log-bin=slave-bin 
      --replicate-rewrite-db=test->rewrite 
      --replicate-rewrite-db=mysqltest1 -> test 
      --replicate-rewrite-db=x -> y 
      --replicate-rewrite-db=database_master_temp_01->database_slave_temp_01 --replicate-rewrite-db=database_master_temp_02->database_slave_temp_02 --replicate-rewrite-db=database_master_temp_03->database_slave_temp_03 --core-file --loose-debug-sync-timeout=300
      

      Note ^^ double occurence of log-bin for master/slave - reason double usage of have_log_bin.inc in the test case (for have_binlog_format_mixed_or_statement.inc and rpl_init.inc.

      When running with --gdb error is obtained:

      $ ./mysql-test-run.pl rpl_rewrt_db --gdb
       
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      worker[1] mysql-test-run: WARNING: Process [mysqld.1 - pid: 70489, winpid: 70489] died after mysql-test-run waited 0.01 seconds for /home/anel/mariadb/server/src/10.11-source/mysql-test/var/run/mysqld.1.pid to be created.
      worker[1] rpl.rpl_rewrt_db
                              worker[1] [ fail ]
              Test ended at 2022-08-22 14:18:29
      worker[1] 
       
      Server log from this test:
      ----------SERVER LOG START-----------
      $ xterm -title mysqld.1 -e gdb -x /home/anel/mariadb/server/src/10.11-source/mysql-test/var/tmp/gdbinit.mysqld.1 /home/anel/mariadb/server/src/10.11-source/sql/mariadbd
      safe_process[70489]: FATAL ERROR, Failed to exec child
      error: 2, No such file or directory
      ----------SERVER LOG END-------------
       
       
      worker[1] mysql-test-run: *** ERROR: Failed to start mysqld mysqld.1 with command /home/anel/mariadb/server/src/10.11-source/sql/mariadbd  --defaults-group-suffix=.1 --defaults-file=/home/anel/mariadb/server/src/10.11-source/mysql-test/var/my.cnf --log-output=file --binlog-format=mixed --log-bin=master-bin --log-bin=master-bin --core-file --loose-debug-sync-timeout=300
      Error happened at lib/mtr_report.pm line 695.
      	mtr_report::mtr_error("Failed to start mysqld mysqld.1 with command /home/anel/maria"...) called at ./mysql-test-run.pl line 2743
      	main::mysql_server_start(My::Config::Group=HASH(0x556a3ca98748), My::Test=HASH(0x556a3b89a150)) called at ./mysql-test-run.pl line 5419
      	main::start_servers(My::Test=HASH(0x556a3b89a150)) called at ./mysql-test-run.pl line 3853
      	main::run_testcase(My::Test=HASH(0x556a3b89a150), IO::Socket::INET=GLOB(0x556a3ca2caf8)) called at ./mysql-test-run.pl line 962
      	main::run_worker(37487, 1) called at ./mysql-test-run.pl line 475
      	main::main() called at ./mysql-test-run.pl line 347
      rpl.rpl_rewrt_db
                              [ fail ]
              Test ended at 2022-08-22 14:18:29
       
      /home/anel/mariadb/server/src/10.11-source/mysql-test/var/log/current_test
       
      mysql-test-run: *** ERROR: Test suite aborted
      
      

      Attachments

        Issue Links

          Activity

            People

              anel Anel Husakovic
              anel Anel Husakovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.