Bug #93321 Assertion `rc == TYPE_OK' failed
Submitted: 24 Nov 2018 0:23 Modified: 20 Dec 2018 19:22
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any
Tags: Release Build

[24 Nov 2018 0:23] Roel Van de Paar
Description:
Optimized:
ERROR 3507 (HY000): Failed to update columns dictionary object.

Debug:
ERROR 2013 (HY000): Lost connection to MySQL server during query

mysqld: /git/MS-8.0-trunk_dbg/sql/dd/impl/raw/raw_record.cc:158: bool dd::Raw_record::store(int, const String_type&, bool): Assertion `rc == TYPE_OK' failed.

Core was generated by `/sda/MS221118-mysql-8.0.13-linux-x86_64-debug/bin/mysqld --no-defaults --core-f'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
57	../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory.
[Current thread is 1 (Thread 0x7f69ddb19700 (LWP 17069))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
#1  0x000055bb11b1a6b7 in my_write_core (sig=6) at /git/MS-8.0-trunk_dbg/mysys/stacktrace.cc:278
#2  0x000055bb107cb880 in handle_fatal_signal (sig=6) at /git/MS-8.0-trunk_dbg/sql/signal_handler.cc:249
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5  0x00007f69ddb5a801 in __GI_abort () at abort.c:79
#6  0x00007f69ddb4a39a in __assert_fail_base (fmt=0x7f69ddcd17d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x55bb130835c0 "rc == TYPE_OK", 
    file=file@entry=0x55bb13083568 "/git/MS-8.0-trunk_dbg/sql/dd/impl/raw/raw_record.cc", line=line@entry=158, 
    function=function@entry=0x55bb130836e0 <dd::Raw_record::store(int, std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&, bool)::__PRETTY_FUNCTION__> "bool dd::Raw_record::store(int, const String_type&, bool)") at assert.c:92
#7  0x00007f69ddb4a412 in __GI___assert_fail (assertion=0x55bb130835c0 "rc == TYPE_OK", 
    file=0x55bb13083568 "/git/MS-8.0-trunk_dbg/sql/dd/impl/raw/raw_record.cc", line=158, 
    function=0x55bb130836e0 <dd::Raw_record::store(int, std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&, bool)::__PRETTY_FUNCTION__> "bool dd::Raw_record::store(int, const String_type&, bool)") at assert.c:101
#8  0x000055bb1197803e in dd::Raw_record::store (this=0x7f69b54a61f8, field_no=22,s="\202\240\203C\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261\202\240\202\242\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261\202\240\202\242\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261\202\240\202\242\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261\202\240\202\242\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261\202\240\202\242\202\244\202\246\202\250\202\251\202\253\202\255\202\257\202\261", is_null=false)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/raw/raw_record.cc:158
#9  0x000055bb119de21f in dd::Column_impl::store_attributes (this=0x7f69b55c8200, r=0x7f69b54a61f8)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/types/column_impl.cc:318
#10 0x000055bb11a233f4 in dd::Weak_object_impl::store (this=0x7f69b55c8200, otx=0x7f69ddb13f20)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/types/weak_object_impl.cc:119
#11 0x000055bb117c9448 in dd::Collection<dd::Column*>::store_items (this=0x7f69b5488558, otx=0x7f69ddb13f20)
    at /git/MS-8.0-trunk_dbg/sql/dd/collection.cc:220
#12 0x000055bb119d502f in dd::Abstract_table_impl::store_children (this=0x7f69b5488500, otx=0x7f69ddb13f20)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/types/abstract_table_impl.cc:110
#13 0x000055bb11a0918d in dd::Table_impl::store_children (this=0x7f69b5488500, otx=0x7f69ddb13f20)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/types/table_impl.cc:358
#14 0x000055bb11a2352d in dd::Weak_object_impl::store (this=0x7f69b5488500, otx=0x7f69ddb13f20)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/types/weak_object_impl.cc:147
#15 0x000055bb119608d8 in dd::cache::Storage_adapter::store<dd::Table> (thd=0x7f69b5423000, object=0x7f69b5488788)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/cache/storage_adapter.cc:296
#16 0x000055bb11853f0b in dd::cache::Dictionary_client::store<dd::Table> (this=0x7f69b5449180, object=0x7f69b5488788)
    at /git/MS-8.0-trunk_dbg/sql/dd/impl/cache/dictionary_client.cc:2418
#17 0x000055bb106cba6b in mysql_inplace_alter_table (thd=0x7f69b5423000, schema=..., new_schema=..., table_def=0x0, 
    altered_table_def=0x7f69b5488788, table_list=0x7f69b5632080, table=0x0, altered_table=0x7f69b54f7420, 
    ha_alter_info=0x7f69ddb14b30, inplace_supported=HA_ALTER_INPLACE_INSTANT, alter_ctx=0x7f69ddb15520, 
    columns=std::set with 0 elements, fk_key_info=0x7f69b5634598, fk_key_count=0, fk_invalidator=0x7f69ddb14a70)
    at /git/MS-8.0-trunk_dbg/sql/sql_table.cc:11716
#18 0x000055bb106d6073 in mysql_alter_table (thd=0x7f69b5423000, new_db=0x7f69b5632618 "test", new_name=0x0, 
    create_info=0x7f69ddb16850, table_list=0x7f69b5632080, alter_info=0x7f69ddb16950)
    at /git/MS-8.0-trunk_dbg/sql/sql_table.cc:14963
#19 0x000055bb10bbac96 in Sql_cmd_alter_table::execute (this=0x7f69b5632708, thd=0x7f69b5423000)
    at /git/MS-8.0-trunk_dbg/sql/sql_alter.cc:343
#20 0x000055bb10614866 in mysql_execute_command (thd=0x7f69b5423000, first_level=true)
    at /git/MS-8.0-trunk_dbg/sql/sql_parse.cc:4307
#21 0x000055bb10616f16 in mysql_parse (thd=0x7f69b5423000, parser_state=0x7f69ddb18320, force_primary_storage_engine=false)
    at /git/MS-8.0-trunk_dbg/sql/sql_parse.cc:5041
#22 0x000055bb1060c8a1 in dispatch_command (thd=0x7f69b5423000, com_data=0x7f69ddb18c90, command=COM_QUERY)
    at /git/MS-8.0-trunk_dbg/sql/sql_parse.cc:1687
#23 0x000055bb1060af23 in do_command (thd=0x7f69b5423000) at /git/MS-8.0-trunk_dbg/sql/sql_parse.cc:1260
#24 0x000055bb107b72be in handle_connection (arg=0x7f69cb3ff960)
    at /git/MS-8.0-trunk_dbg/sql/conn_handler/connection_handler_per_thread.cc:308
#25 0x000055bb121e1e6e in pfs_spawn_thread (arg=0x7f69c9e1a420) at /git/MS-8.0-trunk_dbg/storage/perfschema/pfs.cc:2836
#26 0x00007f69df9696db in start_thread (arg=0x7f69ddb19700) at pthread_create.c:463
#27 0x00007f69ddc3b88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

How to repeat:
SOURCE attached_testcase.sql;

Suggested fix:
This may have been fixed by Bug 91987 fix in 8.0.14, please verify.
[24 Nov 2018 0:24] Roel Van de Paar
attached_file.sql

Attachment: bug_93321.sql (application/sql, text), 285 bytes.

[26 Nov 2018 18:04] MySQL Verification Team
Thank you for the bug report.
[20 Dec 2018 19:22] Paul DuBois
Posted by developer:
 
Fixed in 8.0.15.

For debug builds, an invalid utf8 character in the comment string for
a column type in CREATE or ALTER DDL statements raised an assertion.