Assertion `thd->get_transaction()->is_empty(Transaction_ctx::STMT) || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' failed.

Bug #1518183 reported by Roel Van de Paar
8
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
Undecided
Unassigned
5.6
New
Undecided
Unassigned
5.7
Triaged
High
Laurynas Biveinis

Bug Description

2015-11-20T05:08:49.090660Z 2 [ERROR] Column count of mysql.event is wrong. Expected 22, found 20. The table is probably corrupted
mysqld: /git/PS-5.7-Beta_dbg/sql/sql_base.cc:1557: void close_thread_tables(THD*): Assertion `thd->get_transaction()->is_empty(Transaction_ctx::STMT) || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' failed.
05:08:49 UTC - mysqld got signal 6 ;

+bt
#0 0x00007f77d3eef771 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x00000000017b8e24 in my_write_core (sig=6) at /git/PS-5.7-Beta_dbg/mysys/stacktrace.c:247
#2 0x0000000000e2663f in handle_fatal_signal (sig=6) at /git/PS-5.7-Beta_dbg/sql/signal_handler.cc:223
#3 <signal handler called>
#4 0x00007f77d2af35d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f77d2af4cc8 in __GI_abort () at abort.c:90
#6 0x00007f77d2aec546 in __assert_fail_base (fmt=0x7f77d2c3c128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1ec7cd0 "thd->get_transaction()->is_empty(Transaction_ctx::STMT) || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)", file=file@entry=0x1ec77a8 "/git/PS-5.7-Beta_dbg/sql/sql_base.cc", line=line@entry=1557, function=function@entry=0x1eca080 <close_thread_tables(THD*)::__PRETTY_FUNCTION__> "void close_thread_tables(THD*)") at assert.c:92
#7 0x00007f77d2aec5f2 in __GI___assert_fail (assertion=0x1ec7cd0 "thd->get_transaction()->is_empty(Transaction_ctx::STMT) || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)", file=0x1ec77a8 "/git/PS-5.7-Beta_dbg/sql/sql_base.cc", line=1557, function=0x1eca080 <close_thread_tables(THD*)::__PRETTY_FUNCTION__> "void close_thread_tables(THD*)") at assert.c:101
#8 0x00000000014245ce in close_thread_tables (thd=0x7f7708019000) at /git/PS-5.7-Beta_dbg/sql/sql_base.cc:1555
#9 0x00000000016c88e0 in Event_db_repository::open_event_table (thd=0x7f7708019000, lock_type=TL_WRITE, table=0x7f77d44e72e0) at /git/PS-5.7-Beta_dbg/sql/event_db_repository.cc:631
#10 0x00000000016c9479 in Event_db_repository::drop_event (this=0x7f77cabff1d0, thd=0x7f7708019000, db=..., name=..., drop_if_exists=true) at /git/PS-5.7-Beta_dbg/sql/event_db_repository.cc:915
#11 0x00000000015edd24 in Events::drop_event (thd=0x7f7708019000, dbname=..., name=..., if_exists=true) at /git/PS-5.7-Beta_dbg/sql/events.cc:587
#12 0x00000000014b3a31 in mysql_execute_command (thd=0x7f7708019000, first_level=true) at /git/PS-5.7-Beta_dbg/sql/sql_parse.cc:3975
#13 0x00000000014b8284 in mysql_parse (thd=0x7f7708019000, parser_state=0x7f77d44e8610) at /git/PS-5.7-Beta_dbg/sql/sql_parse.cc:5665
#14 0x00000000014ad12c in dispatch_command (thd=0x7f7708019000, com_data=0x7f77d44e8db0, command=COM_QUERY) at /git/PS-5.7-Beta_dbg/sql/sql_parse.cc:1304
#15 0x00000000014ac048 in do_command (thd=0x7f7708019000) at /git/PS-5.7-Beta_dbg/sql/sql_parse.cc:867
#16 0x00000000015e2a1b in handle_connection (arg=0x7f77223be280) at /git/PS-5.7-Beta_dbg/sql/conn_handler/connection_handler_per_thread.cc:298
#17 0x00000000017e8208 in pfs_spawn_thread (arg=0x7f77222a9820) at /git/PS-5.7-Beta_dbg/storage/perfschema/pfs.cc:2192
#18 0x00007f77d3eeadf5 in start_thread (arg=0x7f77d44e9700) at pthread_create.c:308
#19 0x00007f77d2bb41ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

# Freshly init'd, clean datadir required before each attempt
# mysqld options required for replay: --maximum-sort_buffer_size=1M --maximum-tmp_table_size=1M --maximum-transaction_alloc_block_size=1M --maximum-transaction_prealloc_size=1M --log-output=none --sql_mode=ONLY_FULL_GROUP_BY --enforce-storage-engine=InnoDB
DROP DATABASE test;CREATE DATABASE test;USE test;
ALTER TABLE mysql.event DROP comment,DROP starts;
drop event if exists event1;

Tags: qa qa57
Revision history for this message
Roel Van de Paar (roel11) wrote :

Not present in MS 5.7.9

Revision history for this message
Roel Van de Paar (roel11) wrote :

MS 5.7.9 output:

mysql> drop event if exists event1;
ERROR 1545 (HY000): Failed to open mysql.event

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.