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

Assertion `flags != Gtid_log_event::FL_START_ALTER_E1 || binlog_setup_trx_data()->gtid_flags3 == 0' failed after converting S3 to Aria with binlog_alter_two_phase

    XMLWordPrintable

Details

    Description

      The test case requires S3 engine. I don't know if it can be reproduced without S3.
      To run S3, one either needs AWS credentials, or MinIO installed 1 on the local machine.

      After MinIO is up and running, you can put the test case into suite/s3 folder and run it the usual way as ./mtr s3.<testname>.

      --source include/have_log_bin.inc
       
      set binlog_alter_two_phase= ON;
       
      CREATE TABLE t (a INT) ENGINE=Aria;
      ALTER TABLE t ENGINE=S3;
      ALTER TABLE t ENGINE Aria;
      ALTER TABLE t FORCE;
      DROP TABLE t;
      

      10.8

      mariadbd: /data/src/10.8/sql/log.cc:5940: void THD::set_binlog_flags_for_alter(uchar): Assertion `flags != Gtid_log_event::FL_START_ALTER_E1 || binlog_setup_trx_data()->gtid_flags3 == 0' failed.
      230409  1:16:33 [ERROR] mysqld got signal 6 ;
       
      #8  0x00007fee2b045395 in __assert_fail_base (fmt=0x7fee2b1b9a70 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5645a260b240 "flags != Gtid_log_event::FL_START_ALTER_E1 || binlog_setup_trx_data()->gtid_flags3 == 0", file=0x5645a260813c "/data/src/10.8/sql/log.cc", line=5940, function=<optimized out>) at ./assert/assert.c:92
      #9  0x00007fee2b053df2 in __GI___assert_fail (assertion=0x5645a260b240 "flags != Gtid_log_event::FL_START_ALTER_E1 || binlog_setup_trx_data()->gtid_flags3 == 0", file=0x5645a260813c "/data/src/10.8/sql/log.cc", line=5940, function=0x5645a260b298 "void THD::set_binlog_flags_for_alter(uchar)") at ./assert/assert.c:101
      #10 0x00005645a1b35e80 in THD::set_binlog_flags_for_alter (this=0x7fee08000dc8, flags=2 '\002') at /data/src/10.8/sql/log.cc:5940
      #11 0x00005645a1b25216 in write_bin_log_start_alter (thd=0x7fee08000dc8, partial_alter=@0x7fee249e6f76: false, start_alter_id=0, if_exists=false) at /data/src/10.8/sql/log.cc:690
      #12 0x00005645a1726263 in mysql_alter_table (thd=0x7fee08000dc8, new_db=0x7fee08005aa0, new_name=0x7fee08005ef0, create_info=0x7fee249e92e0, table_list=0x7fee08015690, recreate_info=0x7fee249e91b0, alter_info=0x7fee249e91f0, order_num=0, order=0x0, ignore=false, if_exists=false) at /data/src/10.8/sql/sql_table.cc:10844
      #13 0x00005645a17e083f in Sql_cmd_alter_table::execute (this=0x7fee08015da0, thd=0x7fee08000dc8) at /data/src/10.8/sql/sql_alter.cc:558
      #14 0x00005645a15fde0e in mysql_execute_command (thd=0x7fee08000dc8, is_called_from_prepared_stmt=false) at /data/src/10.8/sql/sql_parse.cc:5994
      #15 0x00005645a1604083 in mysql_parse (thd=0x7fee08000dc8, rawbuf=0x7fee080155c0 "ALTER TABLE t FORCE", length=19, parser_state=0x7fee249ea380) at /data/src/10.8/sql/sql_parse.cc:8019
      #16 0x00005645a15efcec in dispatch_command (command=COM_QUERY, thd=0x7fee08000dc8, packet=0x7fee0800bb29 "ALTER TABLE t FORCE", packet_length=19, blocking=true) at /data/src/10.8/sql/sql_parse.cc:1894
      #17 0x00005645a15ee653 in do_command (thd=0x7fee08000dc8, blocking=true) at /data/src/10.8/sql/sql_parse.cc:1407
      #18 0x00005645a17d4c98 in do_handle_one_connection (connect=0x5645a5a25018, put_in_cache=true) at /data/src/10.8/sql/sql_connect.cc:1416
      #19 0x00005645a17d4a0d in handle_one_connection (arg=0x5645a5a27818) at /data/src/10.8/sql/sql_connect.cc:1318
      #20 0x00005645a1cf4574 in pfs_spawn_thread (arg=0x5645a5a24b58) at /data/src/10.8/storage/perfschema/pfs.cc:2201
      #21 0x00007fee2b0a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #22 0x00007fee2b12866c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      


      1 To see how MinIO can be installed and started locally, you can refer to S3 tests running in the old buildbot. Here is an approximate example. If it doesn't work for you, please study the buildbot logs to see what goes differently there comparing to your attempt.
      Check paths and comments below before trying to run it.

      if ! curl ftp://ftp.askmonty.org/public/minio/minio-linux-amd64 --output ~/minio ; then
        echo "ERROR: Could not download MinIO server for Linux amd64"
        exit 1
      fi
      chmod a+x ~/minio
      MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minioadmin ~/minio server /tmp/shared 2>&1 &
       
      #
      # This is not a repetition, it is a client, while the above is the server
      #
      if ! curl ftp://ftp.askmonty.org/public/minio/mc-linux-amd64 --output ~/mc ; then
        echo "ERROR: Could not download MinIO client for Linux amd64"
        exit 1
      fi
      chmod a+x ~/mc
       
      # ATTENTION !!!!
      # YOU NEED TO WAIT A BIT HERE FOR MinIO server to start up.
      # When you do it locally, for a cleaner output it's better to start MinIO server
      # NOT in the background but in a separate shell and wait till it says
      # that you are running an old version and suggests to upgrade.
      # Do NOT attempt to upgrade.
      #
       
      ~/mc alias set local http://127.0.0.1:9000  minio minioadmin ; then
      ~/mc mb --ignore-existing local/storage-engine
      

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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