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

Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE

    XMLWordPrintable

Details

    Description

      Stack trace from 5.5 commit 93d5cdf03f22df5cc6e071edd623a00f82b0e6e7

      160807  3:41:26 [Warning] Warning: Enabling keys got errno 175 on test.#sql-531d_2, retrying
      mysqld: /data/src/5.5/sql/protocol.cc:521: void Protocol::end_statement(): Assertion `0' failed.
      160807  3:41:26 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f9a3d268266 in __assert_fail_base (fmt=0x7f9a3d3a1238 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xd06d5d "0", file=file@entry=0xd06be0 "/data/src/5.5/sql/protocol.cc", line=line@entry=521, function=function@entry=0xd07500 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:92
      #7  0x00007f9a3d268312 in __GI___assert_fail (assertion=0xd06d5d "0", file=0xd06be0 "/data/src/5.5/sql/protocol.cc", line=521, function=0xd07500 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:101
      #8  0x0000000000567d72 in Protocol::end_statement (this=0x7f9a38e74628) at /data/src/5.5/sql/protocol.cc:521
      #9  0x00000000006017a2 in dispatch_command (command=COM_QUERY, thd=0x7f9a38e74060, packet=0x7f9a39b4e061 "ALTER TABLE t1 ADD UNIQUE KEY ind2 (d, v)", packet_length=41) at /data/src/5.5/sql/sql_parse.cc:1472
      #10 0x00000000005ff627 in do_command (thd=0x7f9a38e74060) at /data/src/5.5/sql/sql_parse.cc:793
      #11 0x00000000007017d9 in do_handle_one_connection (thd_arg=0x7f9a38e74060) at /data/src/5.5/sql/sql_connect.cc:1270
      #12 0x0000000000701566 in handle_one_connection (arg=0x7f9a38e74060) at /data/src/5.5/sql/sql_connect.cc:1186
      #13 0x0000000000943927 in pfs_spawn_thread (arg=0x7f9a39b7a300) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #14 0x00007f9a3eefc0a4 in start_thread (arg=0x7f9a3f2c1700) at pthread_create.c:309
      #15 0x00007f9a3d32287d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Test case

       CREATE TABLE t1 (
          pk INT AUTO_INCREMENT,
          i INT,
          d DATE,
          dt DATETIME,
          v VARCHAR(1),
          PRIMARY KEY (pk),
          KEY (dt)
      ) ENGINE=MyISAM;
      INSERT INTO t1 (i, d, dt, v) VALUES 
          (9, '2005-07-23', '2004-05-13 01:01:39', 't'),
          (2, '2009-11-01', '2003-12-24 07:39:29', 'h'),
          (6, NULL, '2008-07-03 05:32:22', 'l'),
          (6, '2007-07-16', '2008-08-28 18:46:11', 'j'),
          (5, NULL, '2001-07-12 21:27:00', 'h'),
          (3, '2007-07-22', '1900-01-01 00:00:00', 'p'),
          (2, '2000-11-21', '2007-05-25 11:58:54', 'g'),
          (6, '1900-01-01', '2009-06-03 17:11:10', 'i'),
          (2, '2008-02-10', '2001-06-15 16:20:07', 'p'),
          (3, '2009-06-04', '1900-01-01 00:00:00', 'h'),
          (9, '2007-04-25', '1900-01-01 00:00:00', 'e'),
          (9, '2006-03-02', '1900-01-01 00:00:00', 'e'),
          (1, '1900-01-01', '2002-11-08 09:33:27', 'u'),
          (7, '2008-07-13', '2007-08-07 17:35:52', 'j'),
          (0, '2004-11-12', '2006-05-01 00:00:00', 'e'),
          (0, '1900-01-01', '2003-05-01 00:00:00', 'z'),
          (1, '2009-09-02', '2007-02-12 09:30:49', 'w'),
          (0, '2004-11-06', '1900-01-01 00:00:00', 't'),
          (4, '2003-01-06', '2002-07-03 02:51:11', 'i'),
          (6, '2006-01-14', '2008-02-26 04:57:32', 'i'),
          (0, '2002-01-19', '2009-02-12 00:00:00', 'i'),
          (8, '2007-02-12', '1900-01-01 00:00:00', 'b'),
          (4, '1900-01-01', '2001-05-16 05:28:40', 'm'),
          (2, '2005-07-16', NULL, 'j'),
          (1, '2004-09-04', '2001-01-24 21:45:18', 'v'),
          (3, '2009-07-01', NULL, NULL),
          (2, '2009-07-21', '2002-07-24 00:00:00', 'h'),
          (4, NULL, '2001-11-03 12:22:30', 'q'),
          (1, '2002-06-22', '2008-06-17 03:17:59', 'f'),
          (7, '2005-06-23', '2005-12-24 00:00:00', 'p'),
          (6, '2001-05-20', '2008-10-23 00:00:00',  NULL),
          (3, '2001-10-01', '2000-10-12 16:32:35', 'o'),
          (3, '2001-01-07', '2005-09-11 10:09:54', 'w'),
          (6, '2007-11-02', '2009-09-10 01:44:18', 'l'),
          (6, NULL, NULL, 'i'),
          (9, NULL, '2002-05-18 15:21:55', 'd'),
          (4, '2008-12-21', '2004-10-15 10:09:54', 'j'),
          (6, '2003-10-05', '2009-07-13 03:51:02', 'e'),
          (2, '2001-03-03', '1900-01-01 00:00:00', 'e'),
          (2, '2007-04-04', '2001-11-08 21:14:52', 'q'),
          (5, NULL, '2006-12-02 00:00:00', 'm'),
          (0, '2009-01-04', '1900-01-01 00:00:00', NULL),
          (8, '2008-04-03', '2005-01-01 11:55:18', 'q'),
          (8, NULL, '2005-02-28 03:44:02', 'w'),
          (0, '2003-08-22', NULL, 'c'),
          (9, '1900-01-01', NULL, 'y'),
          (NULL, NULL, '2006-08-25 16:28:09', 'g'),
          (5, '2004-07-04', '2002-08-11 00:00:00', 'z'),
          (1, '1900-01-01', '2007-07-22 21:19:18', 'm'),
          (2, '2007-02-04', '2006-02-10 18:41:38', 't'),
          (2, '1900-01-01', '2009-02-16 14:58:58', 'd'),
          (7, '2001-03-14', '2007-08-14 00:00:00', 'h'),
          (0, NULL, '1900-01-01 00:00:00', NULL),
          (1, '2008-10-05', NULL, 'f'),
          (6, '2001-11-25', '2008-12-03 06:59:23', 'l'),
          (NULL, '2003-01-27', '2008-10-04 00:00:00', 'g'),
          (8, '2008-08-08', '2009-07-07 07:00:21', 'v'),
          (8, '2006-07-03', '2001-04-15 00:00:00', NULL),
          (5, '2002-11-21', '2007-07-08 04:01:58', 'm'),
          (5, '2006-04-08', '2007-09-23 00:01:35', 'i'),
          (5, '2001-05-06', '2008-05-15 00:00:00', 'h'),
          (7, '1900-01-01', '1900-01-01 00:00:00', 'u'),
          (30, '2007-04-16', '2004-03-05 23:35:38', 'o'),
          (NULL, '1900-01-01', '2007-08-25 01:32:47', 'z'),
          (6, '2004-12-03', '1900-01-01 00:00:00', 'o'),
          (8, '2001-06-23', '1900-01-01 00:00:00', 'f'),
          (NULL, '2008-12-15', '2001-05-19 08:28:28', 'a'),
          (9, '2000-02-15', '2009-09-03 06:07:22', 'd'),
          (2, '2001-08-05', '2006-10-08 07:17:27', 'k'),
          (5, '2004-01-17', '2003-09-06 20:36:01', 'd'),
          (4, '2003-10-01', '2001-02-05 18:10:49', 'u'),
          (4, '2003-07-28', '2001-01-07 16:11:37', 'h'),
          (0, '1900-01-01', '2008-08-01 05:26:38', 'w'),
          (9, '1900-01-01', '2001-05-08 00:00:00', 't'),
          (1, '2000-04-17', '2008-07-10 21:26:28', 'i'),
          (8, '2002-01-05', '2006-08-06 20:56:35', 'k'),
          (9, '2001-04-10', '2003-02-17 00:00:00', 'z'),
          (0, '2009-12-04', NULL, 'h'),
          (7, NULL, '2004-10-27 00:29:57', 'h'),
          (2, '2006-03-07', '2008-03-04 06:14:13', 'b'),
          (0, '2001-10-15', '2001-03-17 00:00:00', 'm'),
          (5, '1900-01-01', '2009-02-21 11:35:50', 'i'),
          (4, NULL, '1900-01-01 00:00:00', 'w'),
          (5, '2009-04-05', '1900-01-01 00:00:00', 'm'),
          (6, '2001-03-19', '2001-04-12 00:00:00', 'q'),
          (NULL, '2009-12-08', '2001-12-04 20:21:01', 'k'),
          (2, '2005-02-09', '2001-05-27 08:41:01', 'l'),
          (9, '2004-05-25', '2004-09-18 00:00:00', 'c'),
          (3, '2005-01-17', '2002-09-12 11:18:48', 'd'),
          (0, '2003-08-28', '1900-01-01 00:00:00', 'k'),
          (6, '2006-10-11', '2003-10-28 03:31:02', 'a'),
          (5, '1900-01-01', '2001-08-22 10:20:09', 'p'),
          (8, '1900-01-01', '2008-04-24 00:00:00', 'o'),
          (4, '2005-08-18', '2006-11-10 10:08:49', 'e'),
          (NULL, '2007-03-12', '2007-10-16 00:00:00', 'n'),
          (1, '2000-11-18', '2009-05-27 12:25:07', 't'),
          (4, '2001-03-03', NULL, 'u'),
          (3, '2003-09-11', '2001-09-10 18:10:10', 'f'),
          (4, '2007-06-17', '1900-01-01 00:00:00', 't'),
          (NULL, '2008-09-11', '2004-06-07 23:17:09', 'k');
      ALTER TABLE t1 ADD UNIQUE KEY ind1 (pk, d, i, v);
      ALTER TABLE t1 ADD UNIQUE KEY ind2 (d, v);
      

      Reproducible on older versions of 5.5.
      Not reproducible on 10.x. If it's indeed only a 5.5 problem and only a debug assertion, and you think it isn't worth fixing, please feel free to close as "won't fix".

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            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.