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

SIGSEGV in mysql_alter_table on ALTER on Aria table on optimized builds

    XMLWordPrintable

Details

    Description

      USE test;
      SET @@SESSION.sql_mode=TRADITIONAL;
      CREATE TABLE t (id INT) ENGINE=Aria;
      ALTER TABLE t ADD COLUMN c DATETIME NOT NULL,ALGORITHM=INPLACE;
      

      Leads to:

      10.5.3 98003440c2f8d20164a191ced1b7d92b283bb68f

      Core was generated by `/test/MD210420-mariadb-10.5.3-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x7f02dad18700 (LWP 596821))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055c89c69b03d in my_write_core (sig=sig@entry=11) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055c89be40d7b in handle_fatal_signal (sig=11) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  0x000055c89bc6fe48 in mysql_alter_table (thd=thd@entry=0x7f02ad415088, new_db=new_db@entry=0x7f02ad419940, new_name=new_name@entry=0x7f02ad419d48, create_info=create_info@entry=0x7f02dad162b0, table_list=<optimized out>, table_list@entry=0x7f02ad4741c8, alter_info=alter_info@entry=0x7f02dad161e0, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.5_dbg/sql/sql_table.cc:10864
      #5  0x000055c89bcf0f31 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7f02ad415088) at /test/10.5_dbg/sql/sql_alter.cc:520
      #6  0x000055c89bb9c422 in mysql_execute_command (thd=thd@entry=0x7f02ad415088) at /test/10.5_dbg/sql/sql_parse.cc:5912
      #7  0x000055c89bba3f2b in mysql_parse (thd=thd@entry=0x7f02ad415088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f02dad17450, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
      #8  0x000055c89bb8fc45 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f02ad415088, packet=packet@entry=0x7f02ad467089 "ALTER TABLE t ADD COLUMN c DATETIME NOT NULL,ALGORITHM=INPLACE", packet_length=packet_length@entry=62, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #9  0x000055c89bb8e49b in do_command (thd=0x7f02ad415088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #10 0x000055c89bce9415 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f02b8fc53a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #11 0x000055c89bce9744 in handle_one_connection (arg=arg@entry=0x7f02b8fc53a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #12 0x000055c89c149fb0 in pfs_spawn_thread (arg=0x7f02d8845b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #13 0x00007f02da13f6db in start_thread (arg=0x7f02dad18700) at pthread_create.c:463
      #14 0x00007f02d953d88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (dbg), 10.5.2 (opt), 10.5.3 (dbg), 10.5.3 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              Roel Roel Van de Paar
              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.