Bug #89088 Assertion `length > 0' failed.

Submitted: 1 Jan 2018 22:31 Modified: 14 May 2018 17:57
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S1 (Critical)
Version:5.7.20 OS:Any
Assigned to: CPU Architecture:Any

[1 Jan 2018 22:31] Roel Van de Paar
Description:
Core was generated by `/sda/MS051217-mysql-5.7.20-linux-x86_64-debug/bin/mysqld --no-defaults --core-f'.
Program terminated with signal 6, Aborted.
#0  0x00007ff6735849b1 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  0x00007ff6735849b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x0000000001839a31 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.c:249
#2  0x0000000000e7f378 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007ff67189c1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007ff67189d8e8 in __GI_abort () at abort.c:90
#6  0x00007ff671895266 in __assert_fail_base (fmt=0x7ff6719e7e68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1d86b0c "length > 0", file=file@entry=0x1d86148 "/git/mysql-server_dbg/sql/field.cc", line=line@entry=8732, 
    function=function@entry=0x1d8a840 <Field_geom::store_internal(char const*, unsigned long, charset_info_st const*)::__PRETTY_FUNCTION__> "virtual type_conversion_status Field_geom::store_internal(const char*, size_t, const CHARSET_INFO*)") at assert.c:92
#7  0x00007ff671895312 in __GI___assert_fail (assertion=0x1d86b0c "length > 0", file=0x1d86148 "/git/mysql-server_dbg/sql/field.cc", line=8732, 
    function=0x1d8a840 <Field_geom::store_internal(char const*, unsigned long, charset_info_st const*)::__PRETTY_FUNCTION__> "virtual type_conversion_status Field_geom::store_internal(const char*, size_t, const CHARSET_INFO*)") at assert.c:101
#8  0x0000000000ed21d2 in Field_geom::store_internal (this=0x7ff635416910, from=0x7ff6359416a5 "", length=0, cs=0x2acdb00 <my_charset_bin>) at /git/mysql-server_dbg/sql/field.cc:8732
#9  0x0000000000ed0b2c in Field_blob::store (this=0x7ff635416910, from=0x7ff6359416a5 "", length=0, cs=0x2acdb00 <my_charset_bin>) at /git/mysql-server_dbg/sql/field.cc:8265
#10 0x0000000000ed1d6d in Field_blob::unpack (this=0x7ff635416910, to=0x7ff635416835 "", from=0x7ff6359416a1 "", param_data=0, low_byte_first=true) at /git/mysql-server_dbg/sql/field.cc:8623
#11 0x000000000142be74 in Field::unpack (this=0x7ff635416910, to=0x7ff635416835 "", from=0x7ff6359416a1 "") at /git/mysql-server_dbg/sql/field.h:1388
#12 0x00000000018e204c in ha_archive::unpack_row (this=0x7ff635857030, file_to_read=0x7ff6358572e0, record=0x7ff635416830 "\377") at /git/mysql-server_dbg/storage/archive/ha_archive.cc:1258
#13 0x00000000018e20c4 in ha_archive::get_row_version3 (this=0x7ff635857030, file_to_read=0x7ff6358572e0, buf=0x7ff635416830 "\377") at /git/mysql-server_dbg/storage/archive/ha_archive.cc:1269
#14 0x00000000018e1ba8 in ha_archive::get_row (this=0x7ff635857030, file_to_read=0x7ff6358572e0, buf=0x7ff635416830 "\377") at /git/mysql-server_dbg/storage/archive/ha_archive.cc:1169
#15 0x00000000018e25ca in ha_archive::rnd_next (this=0x7ff635857030, buf=0x7ff635416830 "\377") at /git/mysql-server_dbg/storage/archive/ha_archive.cc:1375
#16 0x0000000000efc338 in handler::ha_rnd_next (this=0x7ff635857030, buf=0x7ff635416830 "\377") at /git/mysql-server_dbg/sql/handler.cc:2947
#17 0x0000000000efe2d6 in handler::read_first_row (this=0x7ff635857030, buf=0x7ff635416830 "\377", primary_key=64) at /git/mysql-server_dbg/sql/handler.cc:3289
#18 0x00000000014bcd6f in read_system (table=0x7ff635500e20) at /git/mysql-server_dbg/sql/sql_executor.cc:1957
#19 0x00000000014bc9c2 in join_read_const_table (tab=0x7ff635875a68, pos=0x7ff635875c00) at /git/mysql-server_dbg/sql/sql_executor.cc:1882
#20 0x00000000014e8c41 in JOIN::extract_const_tables (this=0x7ff635875680) at /git/mysql-server_dbg/sql/sql_optimizer.cc:5417
#21 0x00000000014e7c48 in JOIN::make_join_plan (this=0x7ff635875680) at /git/mysql-server_dbg/sql/sql_optimizer.cc:5039
#22 0x00000000014dc71a in JOIN::optimize (this=0x7ff635875680) at /git/mysql-server_dbg/sql/sql_optimizer.cc:368
#23 0x0000000001554064 in st_select_lex::optimize (this=0x7ff63558f0b0, thd=0x7ff635412000) at /git/mysql-server_dbg/sql/sql_select.cc:1009
#24 0x00000000015527c0 in handle_query (thd=0x7ff635412000, lex=0x7ff635414308, result=0x7ff635590958, added_options=268435456, removed_options=0) at /git/mysql-server_dbg/sql/sql_select.cc:164
#25 0x0000000001502ee8 in mysql_execute_command (thd=0x7ff635412000, first_level=true) at /git/mysql-server_dbg/sql/sql_parse.cc:3225
#26 0x00000000015095de in mysql_parse (thd=0x7ff635412000, parser_state=0x7ff673b78550) at /git/mysql-server_dbg/sql/sql_parse.cc:5577
#27 0x00000000014fee90 in dispatch_command (thd=0x7ff635412000, com_data=0x7ff673b78cb0, command=COM_QUERY) at /git/mysql-server_dbg/sql/sql_parse.cc:1461
#28 0x00000000014fdd82 in do_command (thd=0x7ff635412000) at /git/mysql-server_dbg/sql/sql_parse.cc:999
#29 0x000000000162e58c in handle_connection (arg=0x7ff648b17d20) at /git/mysql-server_dbg/sql/conn_handler/connection_handler_per_thread.cc:300
#30 0x000000000186617d in pfs_spawn_thread (arg=0x7ff659fdff20) at /git/mysql-server_dbg/storage/perfschema/pfs.cc:2190
#31 0x00007ff67357fe25 in start_thread (arg=0x7ff673b79700) at pthread_create.c:308
#32 0x00007ff67195f34d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

2018-01-01T22:27:51.292626Z 0 [Note] /sda/MS051217-mysql-5.7.20-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.7.20-debug'  socket: '/sda/MS051217-mysql-5.7.20-linux-x86_64-debug/socket.sock'  port: 19348  MySQL Community Server (GPL)
2018-01-01T22:27:51.292651Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check.
2018-01-01T22:27:51.292665Z 0 [Note] Beginning of list of non-natively partitioned tables
2018-01-01T22:27:51.311771Z 0 [Note] End of list of non-natively partitioned tables
mysqld: /git/mysql-server_dbg/sql/field.cc:8732: virtual type_conversion_status Field_geom::store_internal(const char*, size_t, const CHARSET_INFO*): Assertion `length > 0' failed.
22:28:01 UTC - mysqld got signal 6 ;

How to repeat:
# mysqld options required for replay:  --sql_mode=
CREATE DATABASE test;
USE test;
SET default_storage_engine=archive;
CREATE TABLE t1(a INT,b POINT NOT NULL);
insert into t1 values();
CREATE TEMPORARY TABLE t1(primary key (a)) select * FROM t1;

Suggested fix:
This is a request for a backport of the 8.0 fix made in bug 85059
[2 Jan 2018 6:39] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.7.20 debug build is affected.

Thanks,
Umesh
[14 May 2018 17:57] Paul DuBois
Posted by developer:
 
Fixed in 5.7.23, 8.0.12.

For debug builds, an assertion was raised (rather than an error) for
ALTER TABLE for an ARCHIVE table with a GEOMETRY NOT NULL column
containing empty strings.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.