innodb-force-recovery=2 crashes when ALTER is used | void Protocol::end_statement(): Assertion `0' failed. in Protocol::end_statement

Bug #1666116 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
New
High
Unassigned
5.6
Triaged
High
Unassigned
5.7
New
High
Unassigned

Bug Description

Core was generated by `/sda/PS260117-percona-server-5.6.35-80.0-linux-x86_64-debug/bin/mysqld --no-def'.
Program terminated with signal 6, Aborted.
#0 0x00007f4d33e27741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0 0x00007f4d33e27741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000ac4648 in my_write_core (sig=6) at /sda/PS-5.6.35_dbg/mysys/stacktrace.c:424
#2 0x0000000000737acd in handle_fatal_signal (sig=6) at /sda/PS-5.6.35_dbg/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f4d321bb1d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f4d321bc8c8 in __GI_abort () at abort.c:90
#6 0x00007f4d321b4146 in __assert_fail_base (fmt=0x7f4d323053a8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xebad2e "0",
    file=file@entry=0xebad70 "/sda/PS-5.6.35_dbg/sql/protocol.cc", line=line@entry=515,
    function=function@entry=0xebb620 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:92
#7 0x00007f4d321b41f2 in __GI___assert_fail (assertion=0xebad2e "0", file=0xebad70 "/sda/PS-5.6.35_dbg/sql/protocol.cc", line=515,
    function=0xebb620 <Protocol::end_statement()::__PRETTY_FUNCTION__> "void Protocol::end_statement()") at assert.c:101
#8 0x000000000072ea5b in Protocol::end_statement (this=0x7f4d08f48500) at /sda/PS-5.6.35_dbg/sql/protocol.cc:515
#9 0x00000000007e97ff in dispatch_command (command=COM_QUERY, thd=0x7f4d08f48000, packet=0x7f4cfbbd8001 "ALTER TABLE t1 CHANGE COLUMN a a BINARY(1)", packet_length=42)
    at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:1913
#10 0x00000000007e7264 in do_command (thd=0x7f4d08f48000) at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:1065
#11 0x00000000007ae7b5 in do_handle_one_connection (thd_arg=0x7f4d08f48000) at /sda/PS-5.6.35_dbg/sql/sql_connect.cc:1553
#12 0x00000000007ae4bc in handle_one_connection (arg=0x7f4d08f48000) at /sda/PS-5.6.35_dbg/sql/sql_connect.cc:1457
#13 0x0000000000e24767 in pfs_spawn_thread (arg=0x7f4d16ffb6a0) at /sda/PS-5.6.35_dbg/storage/perfschema/pfs.cc:1860
#14 0x00007f4d33e22dc5 in start_thread (arg=0x7f4d34414700) at pthread_create.c:308
#15 0x00007f4d3227d73d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

2017-02-20 17:25:05 7453 [Note] /sda/PS260117-percona-server-5.6.35-80.0-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.6.35-80.0-debug' socket: '/sda/PS260117-percona-server-5.6.35-80.0-linux-x86_64-debug/socket.sock' port: 19387 MySQL Community Server (GPL)
mysqld: /sda/PS-5.6.35_dbg/sql/protocol.cc:515: void Protocol::end_statement(): Assertion `0' failed.

# mysqld options required for replay: --innodb-force-recovery=2
DROP DATABASE test;CREATE DATABASE test;USE test;
SET SESSION expand_fast_index_creation=ON;
CREATE TABLE t1(a INT UNSIGNED,b INT,c BINARY(1),d CHAR (1),e VARCHAR(1),f VARCHAR(1),g BLOB,h BLOB,id INT,KEY(b),KEY(e)) ENGINE=InnoDB;
ALTER TABLE t1 CHANGE COLUMN a a BINARY(1);

Upstream does not fail:

MS 5.6.35

mysql> ALTER TABLE t1 CHANGE COLUMN a a BINARY(1);
ERROR 1025 (HY000): Error on rename of './test/t1' to './test/#sql2-757b-3' (errno: 190 - Operation not allowed when innodb_forced_recovery > 0)

PS 5.6.35

mysql> ALTER TABLE t1 CHANGE COLUMN a a BINARY(1);
ERROR 2013 (HY000): Lost connection to MySQL server during query

tags: added: expand-fast-index-creation
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1062

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.