Bug #85586 InnoDB: Failing assertion: len <= col->len || ((col->mtype) == 5 || (col->mtype)
Submitted: 22 Mar 2017 21:54 Modified: 22 Mar 2017 22:00
Reporter: Roel Van de Paar Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S6 (Debug Builds)
Version:5.7.17 OS:Any
Assigned to: CPU Architecture:Any

[22 Mar 2017 21:54] Roel Van de Paar
Description:
2017-03-23 08:52:54 0x7f3b5c98e700  InnoDB: Assertion failure in thread 139892933322496 in file rem0rec.cc line 867
InnoDB: Failing assertion: len <= col->len || ((col->mtype) == 5 || (col->mtype) == 16 || (col->mtype) == 14) || (((col->mtype) == 15 || (col->mtype) == 16) && len == 2 * 2 * sizeof(double)) || (col->len == 0 && col->mtype == 1)

Query (7f3b3542b030): SELECT GROUP_CONCAT(c1 ORDER BY c1)FROM t1 GROUP BY c1 COLLATE ucs2_latvian_ci

Core was generated by `/sda/MS200317-mysql-5.7.17-linux-x86_64-debug/bin/mysqld --no-defaults --sql_mo'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimised out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
62	../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x7f3b5c98e700 (LWP 20877))]
(gdb) bt
#0  __pthread_kill (threadid=<optimised out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1  0x000055c940f9ccb4 in my_write_core (sig=6) at /git/MS57_dbg/mysys/stacktrace.c:249
#2  0x000055c94054a78f in handle_fatal_signal (sig=6) at /git/MS57_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#5  0x00007f3b5a6573ea in __GI_abort () at abort.c:89
#6  0x000055c9412411ad in ut_dbg_assertion_failed (
    expr=0x55c941862860 "len <= col->len || ((col->mtype) == 5 || (col->mtype) == 16 || (col->mtype) == 14) || (((col->mtype) == 15 || (col->mtype) == 16) && len == 2 * 2 * sizeof(double)) || (col->len == 0 && col->mtype == 1"..., file=0x55c941862598 "/git/MS57_dbg/storage/innobase/rem/rem0rec.cc", line=867)
    at /git/MS57_dbg/storage/innobase/ut/ut0dbg.cc:67
#7  0x000055c94110e329 in rec_get_converted_size_comp_prefix_low (index=0x7f3b3547a2a0, fields=0x7f3b35479fe8, n_fields=4, v_entry=0x0, extra=0x0, 
    temp=false) at /git/MS57_dbg/storage/innobase/rem/rem0rec.cc:864
#8  0x000055c94110ea08 in rec_get_converted_size_comp (index=0x7f3b3547a2a0, status=0, fields=0x7f3b35479fe8, n_fields=4, extra=0x0)
    at /git/MS57_dbg/storage/innobase/rem/rem0rec.cc:1019
#9  0x000055c94126a00b in rec_get_converted_size (index=0x7f3b3547a2a0, dtuple=0x7f3b35479fa0, n_ext=0)
    at /git/MS57_dbg/storage/innobase/include/rem0rec.ic:1653
#10 0x000055c9412753be in btr_cur_optimistic_insert (flags=3, cursor=0x7f3b5c98b180, offsets=0x7f3b5c98b138, heap=0x7f3b5c98b130, entry=0x7f3b35479fa0, 
    rec=0x7f3b5c98b140, big_rec=0x7f3b5c98b148, n_ext=0, thr=0x7f3b354a2850, mtr=0x7f3b35529328) at /git/MS57_dbg/storage/innobase/btr/btr0cur.cc:3104
#11 0x000055c9411364a4 in row_ins_sorted_clust_index_entry (mode=2, index=0x7f3b3547a2a0, entry=0x7f3b35479fa0, n_ext=0, thr=0x7f3b354a2850)
    at /git/MS57_dbg/storage/innobase/row/row0ins.cc:2727
#12 0x000055c941137fec in row_ins_clust_index_entry (index=0x7f3b3547a2a0, entry=0x7f3b35479fa0, thr=0x7f3b354a2850, n_ext=0, dup_chk_only=false)
    at /git/MS57_dbg/storage/innobase/row/row0ins.cc:3295
#13 0x000055c941158c19 in row_insert_for_mysql_using_cursor (mysql_rec=0x7f3b354aae08 "\376\024\060\060\060\060-00-00 00:00:0", prebuilt=0x7f3b354a20a0)
    at /git/MS57_dbg/storage/innobase/row/row0mysql.cc:1591
#14 0x000055c94115992c in row_insert_for_mysql (mysql_rec=0x7f3b354aae08 "\376\024\060\060\060\060-00-00 00:00:0", prebuilt=0x7f3b354a20a0)
    at /git/MS57_dbg/storage/innobase/row/row0mysql.cc:1854
#15 0x000055c940ff1da7 in ha_innobase::intrinsic_table_write_row (this=0x7f3b354ab030, record=0x7f3b354aae08 "\376\024\060\060\060\060-00-00 00:00:0")
    at /git/MS57_dbg/storage/innobase/handler/ha_innodb.cc:7321
#16 0x000055c940ff1e81 in ha_innobase::write_row (this=0x7f3b354ab030, record=0x7f3b354aae08 "\376\024\060\060\060\060-00-00 00:00:0")
    at /git/MS57_dbg/storage/innobase/handler/ha_innodb.cc:7345
#17 0x000055c9405db5b2 in handler::ha_write_row (this=0x7f3b354ab030, buf=0x7f3b354aae08 "\376\024\060\060\060\060-00-00 00:00:0")
    at /git/MS57_dbg/sql/handler.cc:7923
#18 0x000055c940bf7314 in end_write_group (join=0x7f3b3549b2f8, qep_tab=0x7f3b3549be50, end_of_records=true) at /git/MS57_dbg/sql/sql_executor.cc:3557
#19 0x000055c940bfa4c7 in QEP_tmp_table::put_record (this=0x7f3b3549c438, end_of_records=true) at /git/MS57_dbg/sql/sql_executor.cc:4633
#20 0x000055c940bfa52b in QEP_tmp_table::end_send (this=0x7f3b3549c438) at /git/MS57_dbg/sql/sql_executor.cc:4654
#21 0x000055c940bf0ffa in sub_select_op (join=0x7f3b3549b2f8, qep_tab=0x7f3b3549be50, end_of_records=true) at /git/MS57_dbg/sql/sql_executor.cc:1063
#22 0x000055c940bf1154 in sub_select (join=0x7f3b3549b2f8, qep_tab=0x7f3b3549bcd8, end_of_records=true) at /git/MS57_dbg/sql/sql_executor.cc:1220
#23 0x000055c940bf0c6c in do_select (join=0x7f3b3549b2f8) at /git/MS57_dbg/sql/sql_executor.cc:946
#24 0x000055c940beea35 in JOIN::exec (this=0x7f3b3549b2f8) at /git/MS57_dbg/sql/sql_executor.cc:199
#25 0x000055c940c90ea2 in handle_query (thd=0x7f3b35419000, lex=0x7f3b3541b2f8, result=0x7f3b3542cfd0, added_options=0, removed_options=0)
#26 0x000055c940c41620 in execute_sqlcom_select (thd=0x7f3b35419000, all_tables=0x7f3b3542c858) at /git/MS57_dbg/sql/sql_parse.cc:5195
#27 0x000055c940c3a505 in mysql_execute_command (thd=0x7f3b35419000, first_level=true) at /git/MS57_dbg/sql/sql_parse.cc:2794
#28 0x000055c940c425d2 in mysql_parse (thd=0x7f3b35419000, parser_state=0x7f3b5c98d510) at /git/MS57_dbg/sql/sql_parse.cc:5611
#29 0x000055c940c370dc in dispatch_command (thd=0x7f3b35419000, com_data=0x7f3b5c98ddc0, command=COM_QUERY) at /git/MS57_dbg/sql/sql_parse.cc:1461
#30 0x000055c940c35e5a in do_command (thd=0x7f3b35419000) at /git/MS57_dbg/sql/sql_parse.cc:999
#31 0x000055c940d777a2 in handle_connection (arg=0x7f3b3f366a40) at /git/MS57_dbg/sql/conn_handler/connection_handler_per_thread.cc:300
#32 0x000055c94146761d in pfs_spawn_thread (arg=0x7f3b483eef20) at /git/MS57_dbg/storage/perfschema/pfs.cc:2188
#33 0x00007f3b5b2966ca in start_thread (arg=0x7f3b5c98e700) at pthread_create.c:333
#34 0x00007f3b5a7280af in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

How to repeat:
# mysqld options required for replay:  --sql_mode=
DROP DATABASE test;CREATE DATABASE test;USE test;
SET @@session.sql_buffer_result=ON;
CREATE TEMPORARY TABLE t1(c1 TIMESTAMP);
insert INTO t1 values(repeat(0,0));
SELECT GROUP_CONCAT(c1 ORDER BY c1)FROM t1 GROUP BY c1 COLLATE ucs2_latvian_ci;
[22 Mar 2017 22:00] Roel Van de Paar
Duplicate of bug 79794