Assertion `!field->orig_table->const_table' failed.

Bug #1662091 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
Undecided
Unassigned
5.6
Triaged
High
Unassigned
5.7
New
Undecided
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 0x00007fc3dfe65741 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 0x00007fc3dfe65741 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 0x00007fc3de1f91d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007fc3de1fa8c8 in __GI_abort () at abort.c:90
#6 0x00007fc3de1f2146 in __assert_fail_base (fmt=0x7fc3de3433a8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0xea05b0 "!field->orig_table->const_table", file=file@entry=0xea02d8 "/sda/PS-5.6.35_dbg/sql/item.cc", line=line@entry=2921,
    function=function@entry=0xea21a0 <Item_field::used_tables_for_level(unsigned char*)::__PRETTY_FUNCTION__> "virtual bool Item_field::used_tables_for_level(uchar*)")
    at assert.c:92
#7 0x00007fc3de1f21f2 in __GI___assert_fail (assertion=0xea05b0 "!field->orig_table->const_table", file=0xea02d8 "/sda/PS-5.6.35_dbg/sql/item.cc", line=2921,
    function=0xea21a0 <Item_field::used_tables_for_level(unsigned char*)::__PRETTY_FUNCTION__> "virtual bool Item_field::used_tables_for_level(uchar*)") at assert.c:101
#8 0x0000000000665663 in Item_field::used_tables_for_level (this=0x7fc390c23d78, arg=0x7fc3e044ee30 "ิ\265\303\177") at /sda/PS-5.6.35_dbg/sql/item.cc:2921
#9 0x0000000000658193 in Item::walk (this=0x7fc390c23d78, processor=&virtual table offset 720, walk_subquery=true, arg=0x7fc3e044ee30 "ิ\265\303\177")
    at /sda/PS-5.6.35_dbg/sql/item.h:1372
#10 0x0000000000665a17 in Item_ident::fix_after_pullout (this=0x7fc390c23d78, parent_select=0x7fc390c222c8, removed_select=0x7fc390c23410) at /sda/PS-5.6.35_dbg/sql/item.cc:3011
#11 0x00000000006b5be2 in Item_func::fix_after_pullout (this=0x7fc390c98010, parent_select=0x7fc390c222c8, removed_select=0x7fc390c23410)
    at /sda/PS-5.6.35_dbg/sql/item_func.cc:263
#12 0x00000000006b5be2 in Item_func::fix_after_pullout (this=0x7fc390c7ab78, parent_select=0x7fc390c222c8, removed_select=0x7fc390c23410)
    at /sda/PS-5.6.35_dbg/sql/item_func.cc:263
#13 0x00000000009dd66d in convert_subquery_to_semijoin (parent_join=0x7fc390c79010, subq_pred=0x7fc390c98658) at /sda/PS-5.6.35_dbg/sql/sql_optimizer.cc:6919
#14 0x00000000009ddedb in JOIN::flatten_subqueries (this=0x7fc390c79010) at /sda/PS-5.6.35_dbg/sql/sql_optimizer.cc:7096
#15 0x00000000009cc3c4 in JOIN::optimize (this=0x7fc390c79010) at /sda/PS-5.6.35_dbg/sql/sql_optimizer.cc:151
#16 0x000000000081d732 in mysql_execute_select (thd=0x7fc3b5b49000, select_lex=0x7fc390c222c8, free_join=false) at /sda/PS-5.6.35_dbg/sql/sql_select.cc:1087
#17 0x000000000081da79 in mysql_select (thd=0x7fc3b5b49000, tables=0x7fc390c22d88, wild_num=0, fields=..., conds=0x7fc390c98658, order=0x7fc390c22490, group=0x7fc390c223c8,
    having=0x0, select_options=2147748612, result=0x7fc390c99010, unit=0x7fc390c225d8, select_lex=0x7fc390c222c8) at /sda/PS-5.6.35_dbg/sql/sql_select.cc:1222
#18 0x000000000096912f in mysql_explain_unit (thd=0x7fc3b5b49000, unit=0x7fc390c225d8, result=0x7fc390c99010) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:2132
#19 0x00000000009640b2 in Explain::explain_subqueries (this=0x7fc3e044fa20, result=0x7fc390c99010) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:602
#20 0x0000000000964771 in Explain::send (this=0x7fc3e044fa20) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:713
#21 0x0000000000968b52 in explain_query_specification (thd=0x7fc3b5b49000, join=0x7fc390c99810) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:1967
#22 0x000000000081cfdd in JOIN::explain (this=0x7fc390c99810) at /sda/PS-5.6.35_dbg/sql/sql_select.cc:879
#23 0x000000000081d775 in mysql_execute_select (thd=0x7fc3b5b49000, select_lex=0x7fc3b5b4b8e0, free_join=true) at /sda/PS-5.6.35_dbg/sql/sql_select.cc:1097
#24 0x000000000081da79 in mysql_select (thd=0x7fc3b5b49000, tables=0x7fc390c989f8, wild_num=0, fields=..., conds=0x0, order=0x7fc3b5b4baa8, group=0x7fc3b5b4b9e0, having=0x0,
    select_options=2147748612, result=0x7fc390c99010, unit=0x7fc3b5b4b298, select_lex=0x7fc3b5b4b8e0) at /sda/PS-5.6.35_dbg/sql/sql_select.cc:1222
#25 0x000000000096912f in mysql_explain_unit (thd=0x7fc3b5b49000, unit=0x7fc3b5b4b298, result=0x7fc390c99010) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:2132
#26 0x0000000000968d09 in explain_query_expression (thd=0x7fc3b5b49000, result=0x7fc390c99010) at /sda/PS-5.6.35_dbg/sql/opt_explain.cc:2034
#27 0x00000000007f3b1b in execute_sqlcom_select (thd=0x7fc3b5b49000, all_tables=0x7fc390c989f8) at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:5759
#28 0x00000000007ebe29 in mysql_execute_command (thd=0x7fc3b5b49000) at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:3057
#29 0x00000000007f68e7 in mysql_parse (thd=0x7fc3b5b49000,
    rawbuf=0x7fc390c22010 "explain SELECT(SELECT a FROM t1 AS t2 WHERE a IN (SELECT t1.a+t2.a FROM t1 AS t3)) FROM t1 AS t1", length=96, parser_state=0x7fc3e04514f0)
    at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:7059
#30 0x00000000007e8466 in dispatch_command (command=COM_QUERY, thd=0x7fc3b5b49000, packet=0x7fc3afbc0001 "", packet_length=96) at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:1488
#31 0x00000000007e7264 in do_command (thd=0x7fc3b5b49000) at /sda/PS-5.6.35_dbg/sql/sql_parse.cc:1065
#32 0x00000000007ae7b5 in do_handle_one_connection (thd_arg=0x7fc3b5b49000) at /sda/PS-5.6.35_dbg/sql/sql_connect.cc:1553
#33 0x00000000007ae4bc in handle_one_connection (arg=0x7fc3b5b49000) at /sda/PS-5.6.35_dbg/sql/sql_connect.cc:1457
#34 0x0000000000e24767 in pfs_spawn_thread (arg=0x7fc3dc037380) at /sda/PS-5.6.35_dbg/storage/perfschema/pfs.cc:1860
#35 0x00007fc3dfe60dc5 in start_thread (arg=0x7fc3e0452700) at pthread_create.c:308
#36 0x00007fc3de2bb73d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

# mysqld options required for replay: --plugin-load-add=tokudb=ha_tokudb.so --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=MEMORY
DROP DATABASE test;CREATE DATABASE test;USE test;
create TABLE t1(a int,b int,c int,primary key(a,b)) ENGINE=INNODB partition by key(a);
explain SELECT(SELECT a FROM t1 AS t2 WHERE a IN (SELECT t1.a+t2.a FROM t1 AS t3)) FROM t1 AS t1;

This testcase (without TokuDB and without --enforce-storage-engine) does not crash MS.

Tags: qa
tags: added: qa
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-3635

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.