Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-8291

MySQL 8.0.29 crashes with ALTER DROP

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • None
    • 8.0.29-21 (Q2 2022)
    • None
    • None

    Description

      MySQL 8.0.29 (upstream) is crashing with add/drop column with ALGLORITHM=INSTANT.
      Find attached SQL file to repeat the crash

      Below is the stack trace and crashing query

      Assertion failure: dict0dd.cc:1685:dd_column_is_dropped(old_col) thread 140415301224192
      
      
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005559e573d6c8 in my_write_core (sig=6) at /home/mohit.joshi/upstream-8.0/mysys/stacktrace.cc:295
      #2  0x00005559e41b8984 in handle_fatal_signal (sig=6) at /home/mohit.joshi/upstream-8.0/sql/signal_handler.cc:202
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00007fb5217cf859 in __GI_abort () at abort.c:79
      #6  0x00005559e41b8b0d in my_server_abort () at /home/mohit.joshi/upstream-8.0/sql/signal_handler.cc:258
      #7  0x00005559e5733acc in my_abort () at /home/mohit.joshi/upstream-8.0/mysys/my_init.cc:258
      #8  0x00005559e5c0534a in ut_dbg_assertion_failed (expr=0x5559e7bffc1f "dd_column_is_dropped(old_col)",
          file=0x5559e7bff098 "/home/mohit.joshi/upstream-8.0/storage/innobase/dict/dict0dd.cc", line=1685) at /home/mohit.joshi/upstream-8.0/storage/innobase/ut/ut0dbg.cc:99
      #9  0x00005559e5d95452 in dd_copy_table_columns (ha_alter_info=0x7fb4fc262f20, new_table=..., old_table=..., dict_table=0x7fb513790388)
          at /home/mohit.joshi/upstream-8.0/storage/innobase/dict/dict0dd.cc:1685
      #10 0x00005559e5dc1292 in Instant_ddl_impl<dd::Table>::commit_instant_add_col_low (this=0x7fb4fc2622f0) at /home/mohit.joshi/upstream-8.0/storage/innobase/dict/dict0inst.cc:124
      #11 0x00005559e5dbed92 in Instant_ddl_impl<dd::Table>::commit_instant_add_col (this=0x7fb4fc2622f0) at /home/mohit.joshi/upstream-8.0/storage/innobase/dict/dict0inst.cc:140
      #12 0x00005559e5dc1abb in Instant_ddl_impl<dd::Table>::commit_instant_ddl (this=0x7fb4fc2622f0) at /home/mohit.joshi/upstream-8.0/storage/innobase/dict/dict0inst.cc:239
      #13 0x00005559e59036b0 in ha_innobase::commit_inplace_alter_table (this=0x7fb45c04cfd0, altered_table=0x7fb45c174650, ha_alter_info=0x7fb4fc262f20, commit=true,
          old_dd_tab=0x7fb4540de438, new_dd_tab=0x7fb45c197718) at /home/mohit.joshi/upstream-8.0/storage/innobase/handler/handler0alter.cc:1577
      #14 0x00005559e437727d in handler::ha_commit_inplace_alter_table (this=0x7fb45c04cfd0, altered_table=0x7fb45c174650, ha_alter_info=0x7fb4fc262f20, commit=true,
          old_table_def=0x7fb4540de438, new_table_def=0x7fb45c197718) at /home/mohit.joshi/upstream-8.0/sql/handler.cc:4923
      #15 0x00005559e408853b in mysql_inplace_alter_table (thd=0x7fb45c001040, schema=..., new_schema=..., table_def=0x7fb4540de438, altered_table_def=0x7fb45c197718,
          table_list=0x7fb45c16c6a0, table=0x7fb45c05b760, altered_table=0x7fb45c174650, ha_alter_info=0x7fb4fc262f20, inplace_supported=HA_ALTER_INPLACE_INSTANT, alter_ctx=0x7fb4fc263a40,
          Python Exception <class 'AttributeError'> 'NoneType' object has no attribute 'pointer':
      columns=std::set with 0 elements, fk_key_info=0x7fb45c16f5b8, fk_key_count=0, fk_invalidator=0x7fb4fc262e60) at /home/mohit.joshi/upstream-8.0/sql/sql_table.cc:13366
      #16 0x00005559e4094b7b in mysql_alter_table (thd=0x7fb45c001040, new_db=0x7fb45c16cd08 "test", new_name=0x0, create_info=0x7fb4fc264d80, table_list=0x7fb45c16c6a0,
          alter_info=0x7fb4fc264ec0) at /home/mohit.joshi/upstream-8.0/sql/sql_table.cc:17316
      #17 0x00005559e46ede17 in Sql_cmd_alter_table::execute (this=0x7fb45c16ce28, thd=0x7fb45c001040) at /home/mohit.joshi/upstream-8.0/sql/sql_alter.cc:349
      #18 0x00005559e3fa1d39 in mysql_execute_command (thd=0x7fb45c001040, first_level=true) at /home/mohit.joshi/upstream-8.0/sql/sql_parse.cc:4576
      #19 0x00005559e3fa3fb8 in dispatch_sql_command (thd=0x7fb45c001040, parser_state=0x7fb4fc266b50) at /home/mohit.joshi/upstream-8.0/sql/sql_parse.cc:5207
      #20 0x00005559e3f99d35 in dispatch_command (thd=0x7fb45c001040, com_data=0x7fb4fc267b40, command=COM_QUERY) at /home/mohit.joshi/upstream-8.0/sql/sql_parse.cc:1957
      #21 0x00005559e3f97d5b in do_command (thd=0x7fb45c001040) at /home/mohit.joshi/upstream-8.0/sql/sql_parse.cc:1352
      #22 0x00005559e41a2763 in handle_connection (arg=0x5559ec1a1fb0) at /home/mohit.joshi/upstream-8.0/sql/conn_handler/connection_handler_per_thread.cc:302
      #23 0x00005559e607749e in pfs_spawn_thread (arg=0x5559ec488930) at /home/mohit.joshi/upstream-8.0/storage/perfschema/pfs.cc:2942
      #24 0x00007fb521cf3609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x00007fb5218cc163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

      Attachments

        Activity

          People

            marcelo.altmann Marcelo Altmann
            mohit.joshi Mohit Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1 day, 7 hours
                1d 7h

                Smart Checklist