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

Server crashes in MYSQL_LOG::is_open upon ALTER vs FUNCTION

    XMLWordPrintable

Details

    Description

      It fails for me every time, but it should be non-deterministic due to the presence of --send, so run with --repeat=N if it doesn't fail right away.

      CREATE TABLE t (a INT);
      INSERT INTO t VALUES (1),(2);
       
      --delimiter $
      CREATE FUNCTION f () RETURNS INT
      BEGIN
        UPDATE t SET a = 10;
        RETURN 0;
      END $
      --delimiter ;
       
      --connect (con1,localhost,root,,)
      --send
        ALTER TABLE t FORCE, ALGORITHM=COPY;
       
      --connection default
      SELECT f();
       
      # Cleanup
      --connection con1
      --reap
      DROP TABLE t;
      DROP FUNCTION f;
      --disconnect con1
      

      bb-11.0-oalter fd06124e66

      #3  <signal handler called>
      #4  0x000055c025640498 in MYSQL_LOG::is_open (this=0x8f8f8f8f8f8f8f8f) at /data/src/bb-11.0-oalter-gcov/sql/log.h:323
      #5  0x000055c026234f66 in Event_log::flush_and_set_pending_rows_event (this=0x8f8f8f8f8f8f8f8f, thd=0x7fb174000dc8, event=0x0, cache_data=0x7fb174071ad0, is_transactional=true) at /data/src/bb-11.0-oalter-gcov/sql/log.cc:6528
      #6  0x000055c026234cc0 in binlog_flush_pending_rows_event (thd=0x7fb174000dc8, stmt_end=false, is_transactional=true, bin_log=0x8f8f8f8f8f8f8f8f, cache_data=0x7fb174071ad0) at /data/src/bb-11.0-oalter-gcov/sql/log.cc:6482
      #7  0x000055c02623c758 in binlog_online_alter_end_trans (thd=0x7fb174000dc8, all=false, commit=true) at /data/src/bb-11.0-oalter-gcov/sql/log.cc:7708
      #8  0x000055c02621ac81 in binlog_commit (thd=0x7fb174000dc8, all=false, ro_1pc=true) at /data/src/bb-11.0-oalter-gcov/sql/log.cc:2333
      #9  0x000055c025f9b2e6 in commit_one_phase_2 (thd=0x7fb174000dc8, all=false, trans=0x7fb1740047c0, is_real_trans=true) at /data/src/bb-11.0-oalter-gcov/sql/handler.cc:2116
      #10 0x000055c025f9aee1 in ha_commit_one_phase (thd=0x7fb174000dc8, all=false) at /data/src/bb-11.0-oalter-gcov/sql/handler.cc:2078
      #11 0x000055c025f98c7b in ha_commit_trans (thd=0x7fb174000dc8, all=false) at /data/src/bb-11.0-oalter-gcov/sql/handler.cc:1872
      #12 0x000055c025c0b6d2 in trans_commit_stmt (thd=0x7fb174000dc8) at /data/src/bb-11.0-oalter-gcov/sql/transaction.cc:472
      #13 0x000055c02585f29c in mysql_execute_command (thd=0x7fb174000dc8, is_called_from_prepared_stmt=false) at /data/src/bb-11.0-oalter-gcov/sql/sql_parse.cc:6061
      #14 0x000055c02586a489 in mysql_parse (thd=0x7fb174000dc8, rawbuf=0x7fb1740154d0 "SELECT f()", length=10, parser_state=0x7fb18b581370) at /data/src/bb-11.0-oalter-gcov/sql/sql_parse.cc:8000
      #15 0x000055c025840a3d in dispatch_command (command=COM_QUERY, thd=0x7fb174000dc8, packet=0x7fb17400ba59 "", packet_length=10, blocking=true) at /data/src/bb-11.0-oalter-gcov/sql/sql_parse.cc:1894
      #16 0x000055c02583db82 in do_command (thd=0x7fb174000dc8, blocking=true) at /data/src/bb-11.0-oalter-gcov/sql/sql_parse.cc:1407
      #17 0x000055c025bd1395 in do_handle_one_connection (connect=0x55c02bc0c818, put_in_cache=true) at /data/src/bb-11.0-oalter-gcov/sql/sql_connect.cc:1416
      #18 0x000055c025bd0dc0 in handle_one_connection (arg=0x55c02bc59788) at /data/src/bb-11.0-oalter-gcov/sql/sql_connect.cc:1318
      #19 0x000055c02650baf7 in pfs_spawn_thread (arg=0x55c02bc0c388) at /data/src/bb-11.0-oalter-gcov/storage/perfschema/pfs.cc:2201
      #20 0x00007fb194aa7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #21 0x00007fb194b2866c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.