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

SIGSEGV in Stat_table::common_init_stat_table on ALTER

    XMLWordPrintable

Details

    Description

      CREATE TABLE tab (c INT KEY,c2 POINT,c3 LINESTRING,c4 POLYGON,c5 GEOMETRY);
      ALTER TABLE mysql.column_stats RENAME TO mysql.column_stats1;
      CREATE TABLE t (a INT,b CHAR(1),c FLOAT);
      ALTER TABLE t RENAME mysql.column_stats;
      ALTER TABLE tab CHANGE COLUMN c3 c33 LINESTRING;
      

      Leads to:

      10.4.25 8d12dd8f503282179a078f2f883b88f6ccee5ebd (Optimized)

      Core was generated by `/test/MD160522-mariadb-10.4.25-linux-x86_64-opt/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000564e3b4ddf70 in Stat_table::common_init_stat_table (
          this=<optimized out>) at /test/10.4_opt/sql/sql_statistics.cc:3597
      [Current thread is 1 (Thread 0x154d24348700 (LWP 2514650))]
      (gdb) bt
      #0  0x0000564e3b4ddf70 in Stat_table::common_init_stat_table (this=<optimized out>) at /test/10.4_opt/sql/sql_statistics.cc:3597
      #1  Stat_table::Stat_table (tab=0x154cc003f828, stat=0x154cc002b7f8, this=<synthetic pointer>) at /test/10.4_opt/sql/sql_statistics.cc:493
      #2  Column_stat::Column_stat (tab=0x154cc003f828, stat=0x154cc002b7f8, this=<synthetic pointer>) at /test/10.4_opt/sql/sql_statistics.cc:910
      #3  rename_column_in_stat_tables (thd=thd@entry=0x154cc0000c48, tab=tab@entry=0x154cc003f828, col=col@entry=0x154cc0040dd0, new_name=0x154cc0010638 "c33") at /test/10.4_opt/sql/sql_statistics.cc:3597
      #4  0x0000564e3b4eecce in fill_alter_inplace_info (thd=thd@entry=0x154cc0000c48, table=table@entry=0x154cc003f828, varchar=varchar@entry=false, ha_alter_info=ha_alter_info@entry=0x154d24342cc0) at /test/10.4_opt/sql/sql_table.cc:7039
      #5  0x0000564e3b4f8b6c in mysql_alter_table (thd=thd@entry=0x154cc0000c48, new_db=new_db@entry=0x154cc00050c8, new_name=new_name@entry=0x154cc00054f0, create_info=create_info@entry=0x154d24345300, table_list=<optimized out>, table_list@entry=0x154cc000ff60, alter_info=alter_info@entry=0x154d24345240, order_num=0, order=0x0, ignore=false) at /test/10.4_opt/sql/sql_table.cc:10215
      #6  0x0000564e3b54ecfa in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x154cc0000c48) at /test/10.4_opt/sql/sql_alter.cc:520
      #7  0x0000564e3b454558 in mysql_execute_command (thd=0x154cc0000c48) at /test/10.4_opt/sql/sql_parse.cc:6208
      #8  0x0000564e3b45b4a2 in mysql_parse (thd=0x154cc0000c48, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:8011
      #9  0x0000564e3b45dec5 in dispatch_command (command=COM_QUERY, thd=0x154cc0000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1201
      #10 0x0000564e3b45fadf in do_command (thd=0x154cc0000c48) at /test/10.4_opt/sql/sql_parse.cc:1378
      #11 0x0000564e3b54a8ee in do_handle_one_connection (connect=<optimized out>) at /test/10.4_opt/sql/sql_connect.cc:1420
      #12 0x0000564e3b54a97d in handle_one_connection (arg=<optimized out>) at /test/10.4_opt/sql/sql_connect.cc:1316
      #13 0x0000154d26d20609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x0000154d2690e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.25 (opt), 10.4.26 (dbg), 10.5.16 (opt), 10.5.17 (dbg), 10.6.8 (opt), 10.6.9 (dbg), 10.7.4 (opt), 10.7.5 (dbg), 10.8.3 (opt), 10.8.4 (dbg), 10.9.2 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (opt), 10.3.36 (dbg)

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.