void user_var_entry::lock(): Assertion `m_owner != __null' failed.

Description

mysqld: /git/PS-5.7_dbg/sql/item_func.cc:6225: void user_var_entry::lock(): Assertion `m_owner != __null' failed.
10:27:02 UTC - mysqld got signal 6 ;

+bt
#0 0x00007f47c7248741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000001845fb8 in my_write_core (sig=6) at /git/PS-5.7_dbg/mysys/stacktrace.c:247
#2 0x0000000000e7d01b in handle_fatal_signal (sig=6) at /git/PS-5.7_dbg/sql/signal_handler.cc:223
#3 <signal handler called>
#4 0x00007f47c55df5f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f47c55e0ce8 in __GI_abort () at abort.c:90
#6 0x00007f47c55d8566 in __assert_fail_base (fmt=0x7f47c5728ce8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1dc594b "m_owner != _null", file=file@entry=0x1dc4f78 "/git/PS-5.7_dbg/sql/item_func.cc", line=line@entry=6225, function=function@entry=0x1dc7fc0 <user_var_entry::lock()::PRETTY_FUNCTION_> "void user_var_entry::lock()") at assert.c:92
#7 0x00007f47c55d8612 in _GI__assert_fail (assertion=0x1dc594b "m_owner != _null", file=0x1dc4f78 "/git/PS-5.7_dbg/sql/item_func.cc", line=6225, function=0x1dc7fc0 <user_var_entry::lock()::PRETTY_FUNCTION_> "void user_var_entry::lock()") at assert.c:101
#8 0x0000000000fab864 in user_var_entry::lock (this=0x7f4782863040) at /git/PS-5.7_dbg/sql/item_func.cc:6225
#9 0x0000000000fab91b in Item_func_set_user_var::update_hash (this=0x7f4782837c08, ptr=0x7f4782837d60, length=8, res_type=INT_RESULT, cs=0x2c45320 <my_charset_utf8_general_ci>, dv=DERIVATION_IMPLICIT, unsigned_arg=true) at /git/PS-5.7_dbg/sql/item_func.cc:6241
#10 0x0000000000fac3fa in Item_func_set_user_var::update (this=0x7f4782837c08) at /git/PS-5.7_dbg/sql/item_func.cc:6526
#11 0x000000000144e7b4 in set_var_user::update (this=0x7f4782837d78, thd=0x7f478281b000) at /git/PS-5.7_dbg/sql/set_var.cc:876
#12 0x000000000144de7e in sql_set_variables (thd=0x7f478281b000, var_list=0x7f478281d9b8) at /git/PS-5.7_dbg/sql/set_var.cc:669
#13 0x0000000001519156 in mysql_execute_command (thd=0x7f478281b000, first_level=true) at /git/PS-5.7_dbg/sql/sql_parse.cc:3832
#14 0x000000000151e7cb in mysql_parse (thd=0x7f478281b000, parser_state=0x7f47c7771500) at /git/PS-5.7_dbg/sql/sql_parse.cc:5838
#15 0x0000000001513613 in dispatch_command (thd=0x7f478281b000, com_data=0x7f47c7771c90, command=COM_QUERY) at /git/PS-5.7_dbg/sql/sql_parse.cc:1447
#16 0x000000000151252d in do_command (thd=0x7f478281b000) at /git/PS-5.7_dbg/sql/sql_parse.cc:1010
#17 0x000000000164e8a8 in handle_connection (arg=0x7f479a7f7610) at /git/PS-5.7_dbg/sql/conn_handler/connection_handler_per_thread.cc:312
#18 0x0000000001874bf0 in pfs_spawn_thread (arg=0x7f47bb391220) at /git/PS-5.7_dbg/storage/perfschema/pfs.cc:2188
#19 0x00007f47c7243dc5 in start_thread (arg=0x7f47c7772700) at pthread_create.c:308
#20 0x00007f47c56a0ced in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

mysqld options required for replay: --plugin-load-add=tokudb=ha_tokudb.so --init-file=/home/roel/percona-qa/plugins_57.sql

plugins_57.sql can be found here;
wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/plugins_57.sql

DROP DATABASE test;CREATE DATABASE test;USE test;
SET STATEMENT keep_files_on_create=OFF FOR SELECT * FROM t1;
CREATE TABLE t1(c1 CHAR (1));
SET @tzid=LAST_INSERT_ID();
SELECT COUNTFROM t1;
SET @tzid=LAST_INSERT_ID();

Server crashes on last line

Environment

None

Status

Assignee

Unassigned

Reporter

roel.vandepaar

Labels

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Freshdesk Tickets

None

Affects versions

Percona-Server-5.7.17-11

Priority

Major
Configure