Bug #81408 void Item_row::illegal_method_call(const char*): Assertion `0' failed.

Submitted: 13 May 2016 3:14 Modified: 31 Jan 2020 13:32
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S6 (Debug Builds)
Version:5.5.49, 5.6.30 OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[13 May 2016 3:14] Roel Van de Paar
Description:
Version: '5.5.49-debug'  socket: '/sda/mysql-5.5.49-linux-x86_64-debug/socket.sock'  port: 19744  MySQL Community Server (GPL)
mysqld: /git/mysql-server/sql/item_row.cc:63: void Item_row::illegal_method_call(const char*): Assertion `0' failed.
02:58:54 UTC - mysqld got signal 6 ;

(gdb) bt
#0  0x00007fb9f6b4a741 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x00000000007de0c8 in my_write_core (sig=6) at /git/mysql-server/mysys/stacktrace.c:433
#2  0x00000000006a1088 in handle_fatal_signal (sig=6) at /git/mysql-server/sql/signal_handler.cc:247
#3  <signal handler called>
#4  0x00007fb9f5b6b5f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007fb9f5b6cce8 in __GI_abort () at abort.c:90
#6  0x00007fb9f5b64566 in __assert_fail_base (fmt=0x7fb9f5cb4228 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xb0df21 "0", file=file@entry=0xb07e88 "/git/mysql-server/sql/item_row.cc", line=line@entry=63, function=function@entry=0xb07f40 <Item_row::illegal_method_call(char const*)::__PRETTY_FUNCTION__> "void Item_row::illegal_method_call(const char*)") at assert.c:92
#7  0x00007fb9f5b64612 in __GI___assert_fail (assertion=0xb0df21 "0", file=0xb07e88 "/git/mysql-server/sql/item_row.cc", line=63, function=0xb07f40 <Item_row::illegal_method_call(char const*)::__PRETTY_FUNCTION__> "void Item_row::illegal_method_call(const char*)") at assert.c:101
#8  0x00000000007015d0 in Item_row::illegal_method_call (this=<optimized out>, method=method@entry=0xb04c11 "val_str") at /git/mysql-server/sql/item_row.cc:63
#9  0x000000000070173a in Item_row::val_str (this=<optimized out>) at /git/mysql-server/sql/item_row.h:57
#10 0x00000000006d0244 in Item_func_like::fix_fields (this=0x7fb95c2253e0, thd=0x7fb96ab06000, ref=<optimized out>) at /git/mysql-server/sql/item_cmpfunc.cc:4829
#11 0x0000000000548312 in setup_fields (thd=0x7fb96ab06000, ref_pointer_array=0x7fb95c226dc0, fields=..., mark_used_columns=mark_used_columns@entry=MARK_COLUMNS_READ, sum_func_list=sum_func_list@entry=0x7fb95c226c38, allow_sum_func=allow_sum_func@entry=true) at /git/mysql-server/sql/sql_base.cc:7934
#12 0x00000000005c26c8 in JOIN::prepare (this=this@entry=0x7fb95c225660, rref_pointer_array=rref_pointer_array@entry=0x7fb96ab08260, tables_init=tables_init@entry=0x0, wild_num=wild_num@entry=0, conds_init=conds_init@entry=0x0, og_num=og_num@entry=0, order_init=order_init@entry=0x0, group_init=group_init@entry=0x0, having_init=having_init@entry=0x0, proc_param_init=proc_param_init@entry=0x0, select_lex_arg=select_lex_arg@entry=0x7fb96ab08078, unit_arg=unit_arg@entry=0x7fb96ab07a58) at /git/mysql-server/sql/sql_select.cc:549
#13 0x00000000005cc7bb in mysql_select (thd=thd@entry=0x7fb96ab06000, rref_pointer_array=rref_pointer_array@entry=0x7fb96ab08260, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=select_options@entry=2147748608, result=result@entry=0x7fb95c225640, unit=unit@entry=0x7fb96ab07a58, select_lex=select_lex@entry=0x7fb96ab08078) at /git/mysql-server/sql/sql_select.cc:2598
#14 0x00000000005cca25 in handle_select (thd=thd@entry=0x7fb96ab06000, lex=lex@entry=0x7fb96ab079a8, result=result@entry=0x7fb95c225640, setup_tables_done_option=setup_tables_done_option@entry=0) at /git/mysql-server/sql/sql_select.cc:297
#15 0x0000000000583b27 in execute_sqlcom_select (thd=thd@entry=0x7fb96ab06000, all_tables=<optimized out>) at /git/mysql-server/sql/sql_parse.cc:4625
#16 0x00000000005899c6 in mysql_execute_command (thd=thd@entry=0x7fb96ab06000) at /git/mysql-server/sql/sql_parse.cc:2176
#17 0x0000000000590ff6 in mysql_parse (thd=thd@entry=0x7fb96ab06000, rawbuf=<optimized out>, length=38, parser_state=parser_state@entry=0x7fb9f715b680) at /git/mysql-server/sql/sql_parse.cc:5780
#18 0x0000000000592843 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fb96ab06000, packet=packet@entry=0x7fb96aaee581 "SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0))", packet_length=packet_length@entry=38) at /git/mysql-server/sql/sql_parse.cc:1038
#19 0x00000000005946cc in do_command (thd=0x7fb96ab06000) at /git/mysql-server/sql/sql_parse.cc:773
#20 0x000000000063c978 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7fb96ab06000) at /git/mysql-server/sql/sql_connect.cc:862
#21 0x000000000063ca35 in handle_one_connection (arg=0x7fb96ab06000) at /git/mysql-server/sql/sql_connect.cc:781
#22 0x00007fb9f6b45dc5 in start_thread (arg=0x7fb9f715c700) at pthread_create.c:308
#23 0x00007fb9f5c2c21d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0));
[13 May 2016 3:14] Roel Van de Paar
Debug only
[13 May 2016 3:18] Roel Van de Paar
SELECT ('a%b' LIKE 'ax%b' ESCAPE ('x', 'y'));
[13 May 2016 5:17] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.5.49/5.6.30 debug builds are affected.

Thanks,
Umesh
[13 May 2016 5:18] MySQL Verification Team
-- 5.7.12 debug/release not affected with the provided test case
[31 Jan 2020 13:32] Erlend Dahl
This was fixed in 5.7.12. We will not backport the fix to 5.6.

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

Page generated in 0.060 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.