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

Crash while altering persistent virtual column

    XMLWordPrintable

Details

    Description

      Let's say we have the following table:

      CREATE TABLE `tab1` (
        `id` bigint(20) NOT NULL AUTO_INCREMENT,
        `field2` set('option1','option2','option3','option4') NOT NULL,
        `field3` set('option1','option2','option3','option4','option5') NOT NULL,
        `field4` set('option1','option2','option3','option4') NOT NULL,
        `field5` varchar(32) NOT NULL,
        `field6` varchar(32) NOT NULL,
        `field7` varchar(32) NOT NULL,
        `field8` varchar(32) NOT NULL,
        `field9` int(11) NOT NULL DEFAULT '1',
        `field10` varchar(16) NOT NULL,
        `field11` enum('option1','option2','option3') NOT NULL DEFAULT 'option1',
        `v_col` varchar(128) AS (IF(field11='option1',CONCAT_WS(":","field1",field2,field3,field4,field5,field6,field7,field8,field9,field10), CONCAT_WS(":","field1",field11,field2,field3,field4,field5,field6,field7,field8,field9,field10))) PERSISTENT,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
      

      If we execute the following alter:

      alter table tab1 CHANGE COLUMN v_col `v_col` varchar(128);
      

      Then we see the following crash:

      161024 12:00:05 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
       
      Server version: 10.1.18-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467121 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x7f38e93aa008
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f3909672130 thread_stack 0x48400
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f390a21ca6e]
      /usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x7f3909d428d5]
      /lib64/libpthread.so.0(+0xf100)[0x7f390935d100]
      /usr/sbin/mysqld(+0x376869)[0x7f3909b04869]
      /usr/sbin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P14HA_CREATE_INFOP10TABLE_LISTP10Alter_infojP8st_orderb+0xfc7)[0x7f3909c4ca57]
      mysys/stacktrace.c:268(my_print_stacktrace)[0x7f3909c93eca]
      sql/sql_alter.cc:327(Sql_cmd_alter_table::execute(THD*))[0x7f3909bbe226]
      sql/sql_parse.cc:7319(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x7f3909bc6952]
      sql/sql_parse.cc:1487(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f3909bc9e2b]
      sql/sql_parse.cc:1110(do_command(THD*))[0x7f3909bca6a9]
      sql/sql_connect.cc:1350(do_handle_one_connection(THD*))[0x7f3909c9119a]
      sql/sql_connect.cc:1264(handle_one_connection)[0x7f3909c91370]
      /lib64/libpthread.so.0(+0x7dc5)[0x7f3909355dc5]
      /lib64/libc.so.6(clone+0x6d)[0x7f3907777ced]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f38e1694020): alter table tab1 CHANGE COLUMN v_col `v_col` varchar(128)
      Connection ID (thread ID): 3
      Status: NOT_KILLED
      

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.