Inserting into mysql.help_category with max_statement_time leads to assertion

Description

gdb:

(gdb) bt +bt #0 0x00007f034bc0a9d1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:59 #1 0x0000000000ad6acc in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.6.43_dbg/mysys/stacktrace.c:424 #2 0x0000000000747f58 in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/signal_handler.cc:236 #3 <signal handler called> #4 0x00007f0349d0e207 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:55 #5 0x00007f0349d0f8f8 in __GI_abort () at abort.c:90 #6 0x00007f0349d07026 in __assert_fail_base (fmt=0x7f0349e61ea0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xec903c "fixed == 1", file=file@entry=0xec8ff8 "/home/hrvoje/worktable/PS-5.6.43_dbg/sql/item_cmpfunc.cc", line=line@entry=2213, function=function@entry=0xec99c0 <Item_func_equal::val_int()::__PRETTY_FUNCTION__> "virtual longlong Item_func_equal::val_int()") at assert.c:92 #7 0x00007f0349d070d2 in __GI___assert_fail (assertion=0xec903c "fixed == 1", file=0xec8ff8 "/home/hrvoje/worktable/PS-5.6.43_dbg/sql/item_cmpfunc.cc", line=2213, function=0xec99c0 <Item_func_equal::val_int()::__PRETTY_FUNCTION__> "virtual longlong Item_func_equal::val_int()") at assert.c:101 #8 0x0000000000698381 in Item_func_equal::val_int (this=0x7f03024b73f0) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/item_cmpfunc.cc:2213 #9 0x00000000009c9b74 in get_all_items_for_category (thd=0x7f0320f7f000, items=0x7f030248ac00, pfname=0x7f0302426e78, select=0x7f03024b76f8, res=0x7f034c1fdb40) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_help.cc:414 #10 0x00000000009caebd in mysqld_help (thd=0x7f0320f7f000, mask=0x7f030241f0c0 "impossible_category_1") at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_help.cc:785 #11 0x00000000007fc304 in mysql_execute_command (thd=0x7f0320f7f000) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_parse.cc:3142 #12 0x0000000000806c99 in mysql_parse (thd=0x7f0320f7f000, rawbuf=0x7f030241f010 "help 'impossible_category_1'", length=28, parser_state=0x7f034c200450, update_userstat=false) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_parse.cc:7059 #13 0x00000000007f877b in dispatch_command (command=COM_QUERY, thd=0x7f0320f7f000, packet=0x7f0313aac001 "help 'impossible_category_1'", packet_length=28) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_parse.cc:1524 #14 0x00000000007f756e in do_command (thd=0x7f0320f7f000) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_parse.cc:1093 #15 0x00000000007bf781 in do_handle_one_connection (thd_arg=0x7f0320f36000) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_connect.cc:1590 #16 0x00000000007bf470 in handle_one_connection (arg=0x7f0320f36000) at /home/hrvoje/worktable/PS-5.6.43_dbg/sql/sql_connect.cc:1494 #17 0x0000000000b1a5af in pfs_spawn_thread (arg=0x7f03317ff420) at /home/hrvoje/worktable/PS-5.6.43_dbg/storage/perfschema/pfs.cc:1861 #18 0x00007f034bc05dd5 in start_thread (arg=0x7f034c201700) at pthread_create.c:307 #19 0x00007f0349dd5ead in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

SQL:

insert into mysql.help_category(help_category_id,name)values(0,'impossible_category_1'); SET @@session.max_statement_time=TRUE; help 'impossible_category_1'; help 'impossible_category_1';

Assertion happens only on debug build, opt looks like:

Executing testcase ./1548427764.sql against mysqld with socket /dev/shm/1548427764/socket.sock using the mysql CLI client... ERROR 1887 (70101) at line 3: Query execution was interrupted, max_statement_time exceeded source_category_name name is_it_category impossible_category_1 Contents Y impossible_category_1 Geographic Y

I'm able to reproduce this with 5.6.42-84.2 (debug) as well.

This looks like https://perconadev.atlassian.net/browse/PS-2090#icft=PS-2090.

Environment

None

Smart Checklist

Activity

Show:

Kathy Williamson April 22, 2020 at 3:47 PM

MySQL 5.6 is scheduled for EOL in Feb 2021.  At this time, we do not believe that this issue will be fixed prior to EOL.  If you believe this issue is important enough to be be fixed prior to EOL, or that it also affects a later version, please leave a comment and we will consider the new information

Hrvoje Matijakovic January 28, 2019 at 3:27 PM

max_statement_time was dropped in 5.7. Tested with max_execution_time but couldn't reproduce.

Laurynas Biveinis January 28, 2019 at 11:05 AM

What is other version status?

Won't Do

Details

Assignee

Reporter

Priority

Smart Checklist

Created January 28, 2019 at 9:59 AM
Updated March 6, 2024 at 12:22 PM
Resolved April 22, 2020 at 3:47 PM

Flag notifications