Bug #88279 InnoDB: Assertion failure: rem0rec.cc:372:len <= col->len || ((col->mtype)==5...
Submitted: 28 Oct 2017 5:09 Modified: 4 Jan 2018 17:17
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Charsets Severity:S6 (Debug Builds)
Version:8.0.3 RC OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[28 Oct 2017 5:09] Roel Van de Paar
Description:
Core was generated by `/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld --no-defaults --core'.
Program terminated with signal 6, Aborted.
#0  0x00007f43f3b679b1 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  0x00007f43f3b679b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x000000000369e428 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.cc:291
#2  0x000000000286b8f6 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:234
#3  <signal handler called>
#4  0x00007f43f1e7f1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f43f1e808e8 in __GI_abort () at abort.c:90
#6  0x0000000003a8b8f9 in ut_dbg_assertion_failed (
    expr=0x489b280 "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=0x489b0a8 "/git/mysql-server_dbg/storage/innobase/rem/rem0rec.cc", line=372)
    at /git/mysql-server_dbg/storage/innobase/ut/ut0dbg.cc:60
#7  0x000000000396d4d4 in rec_get_converted_size_comp_prefix_low (index=0x7f43ad0a3eb8, fields=0x7f43ad0a4280, n_fields=20, 
    v_entry=0x0, extra=0x0, temp=false) at /git/mysql-server_dbg/storage/innobase/rem/rem0rec.cc:369
#8  0x000000000396db67 in rec_get_converted_size_comp (index=0x7f43ad0a3eb8, status=0, fields=0x7f43ad0a4280, n_fields=20, 
    extra=0x0) at /git/mysql-server_dbg/storage/innobase/rem/rem0rec.cc:525
#9  0x0000000003acd2ee in rec_get_converted_size (index=0x7f43ad0a3eb8, dtuple=0x7f43ad0a4238, n_ext=0)
    at /git/mysql-server_dbg/storage/innobase/include/rem0rec.ic:1254
#10 0x0000000003ad78ff in btr_cur_optimistic_insert (flags=3, cursor=0x7f43f410a6a0, offsets=0x7f43f410aa78, heap=0x7f43f410aa80, 
    entry=0x7f43ad0a4238, rec=0x7f43f410aa70, big_rec=0x7f43f410aa68, n_ext=0, thr=0x7f43ad3004b0, mtr=0x7f43ad2f00c8)
    at /git/mysql-server_dbg/storage/innobase/btr/btr0cur.cc:3039
#11 0x00000000039952c8 in row_ins_sorted_clust_index_entry (mode=2, index=0x7f43ad0a3eb8, entry=0x7f43ad0a4238, n_ext=0, 
    thr=0x7f43ad3004b0) at /git/mysql-server_dbg/storage/innobase/row/row0ins.cc:2955
#12 0x0000000003996936 in row_ins_clust_index_entry (index=0x7f43ad0a3eb8, entry=0x7f43ad0a4238, thr=0x7f43ad3004b0, n_ext=0, 
    dup_chk_only=false) at /git/mysql-server_dbg/storage/innobase/row/row0ins.cc:3492
#13 0x00000000039b3d3c in row_insert_for_mysql_using_cursor (mysql_rec=0x7f43ad2fd030 "\001\\\376\002t1", prebuilt=0x7f43ad2ff0b8)
    at /git/mysql-server_dbg/storage/innobase/row/row0mysql.cc:1568
#14 0x00000000039b49a7 in row_insert_for_mysql (mysql_rec=0x7f43ad2fd030 "\001\\\376\002t1", prebuilt=0x7f43ad2ff0b8)
    at /git/mysql-server_dbg/storage/innobase/row/row0mysql.cc:1848
#15 0x00000000038298a3 in ha_innobase::intrinsic_table_write_row (this=0x7f43ad2fb030, record=0x7f43ad2fd030 "\001\\\376\002t1")
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:8280
#16 0x000000000382997c in ha_innobase::write_row (this=0x7f43ad2fb030, record=0x7f43ad2fd030 "\001\\\376\002t1")
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:8306
#17 0x00000000029d7577 in handler::ha_write_row (this=0x7f43ad2fb030, buf=0x7f43ad2fd030 "\001\\\376\002t1")
    at /git/mysql-server_dbg/sql/handler.cc:8343
#18 0x000000000246d366 in end_write (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f2178, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:5658
#19 0x00000000024711c5 in QEP_tmp_table::put_record (this=0x7f43ad2f4660, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:7127
#20 0x0000000002472993 in QEP_tmp_table::put_record (this=0x7f43ad2f4660) at /git/mysql-server_dbg/sql/sql_executor.h:277
#21 0x0000000002463cbc in sub_select_op (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f2178, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1432
#22 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1ff8)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#23 0x00000000024642dc in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1ff8, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1704
#24 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1e78)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#25 0x0000000002465500 in evaluate_null_complemented_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1e78)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2203
#26 0x0000000002464350 in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1e78, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1711
#27 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1cf8)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#28 0x0000000002465500 in evaluate_null_complemented_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1cf8)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2203
#29 0x0000000002464350 in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1cf8, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1711
#30 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1b78)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#31 0x00000000024642dc in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1b78, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1704
#32 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f19f8)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#33 0x00000000024642dc in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f19f8, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1704
#34 0x0000000002464f21 in evaluate_join_record (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1878)
    at /git/mysql-server_dbg/sql/sql_executor.cc:2056
#35 0x00000000024642dc in sub_select (join=0x7f43ad2e8c18, qep_tab=0x7f43ad2f1878, end_of_records=false)
    at /git/mysql-server_dbg/sql/sql_executor.cc:1704
#36 0x0000000002463857 in do_select (join=0x7f43ad2e8c18) at /git/mysql-server_dbg/sql/sql_executor.cc:1295
#37 0x0000000002460c55 in JOIN::exec (this=0x7f43ad2e8c18) at /git/mysql-server_dbg/sql/sql_executor.cc:285
#38 0x00000000025116ac in handle_query (thd=0x7f43ad019000, lex=0x7f43ad01b1e8, result=0x7f43ad273f18, added_options=0, 
    removed_options=0) at /git/mysql-server_dbg/sql/sql_select.cc:203
#39 0x00000000024bf70e in execute_show (thd=0x7f43ad019000, all_tables=0x7f43ad0ba5d0)
    at /git/mysql-server_dbg/sql/sql_parse.cc:5068
#40 0x00000000024b9d04 in mysql_execute_command (thd=0x7f43ad019000, first_level=true)
    at /git/mysql-server_dbg/sql/sql_parse.cc:3017
#41 0x00000000024c042b in mysql_parse (thd=0x7f43ad019000, parser_state=0x7f43f410d2f0)
    at /git/mysql-server_dbg/sql/sql_parse.cc:5414
#42 0x00000000024b68e7 in dispatch_command (thd=0x7f43ad019000, com_data=0x7f43f410db80, command=COM_QUERY)
    at /git/mysql-server_dbg/sql/sql_parse.cc:1708
#43 0x00000000024b53f5 in do_command (thd=0x7f43ad019000) at /git/mysql-server_dbg/sql/sql_parse.cc:1291
#44 0x000000000285b2d6 in handle_connection (arg=0x7f43e02eb3c0)
    at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:328
#45 0x00000000036ec54d in pfs_spawn_thread (arg=0x7f43e0385520) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2985
#46 0x00007f43f3b62e25 in start_thread (arg=0x7f43f410e700) at pthread_create.c:308
#47 0x00007f43f1f4234d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
CREATE DATABASE test;
USE test;
CREATE TABLE t1(c1 INT,c2 CHAR (1)COMMENT'') COMMENT='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcde';
SET big_tables=1;
set character_set_connection=ucs2;
show table status;
[28 Oct 2017 5:09] Roel Van de Paar
2017-10-28T04:38:45.157121Z 0 [Note] /sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/bin/mysqld: ready for connections. Version: '8.0.3-rc-debug-log'  socket: '/sda/MS201017-mysql-8.0.3-rc-linux-x86_64-debug/socket.sock'  port: 16654  MySQL Community Server (GPL)
2017-10-28T04:38:57.240134Z 7 [ERROR] InnoDB: Assertion failure: rem0rec.cc:372: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)
InnoDB: thread 139929834284800
[28 Oct 2017 17:33] MySQL Verification Team
Thank you for the bug report. Verified as described.
[4 Jan 2018 17:17] Paul DuBois
Posted by developer:
 
Fixed in 8.0.4, 9.0.0.

With big_tables=1 and character_set_connection=ucs2, SHOW TABLE
STATUS could raise an assertion.