Item_row::illegal_method_call | void Item_row::illegal_method_call(const char*): Assertion `0' failed.

Bug #1506697 reported by Roel Van de Paar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Triaged
High
Unassigned
5.7
Fix Released
High
Unassigned

Bug Description

This bug was seen 320 times in the first iteration of PS 5.7 debug.

Testcase:
DROP DATABASE test;CREATE DATABASE test;USE test;
SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0));

Results on various versions:

$ ~/percona-qa/multi_tester.sh /sda/002215/1001/pquery_thread-0.sql_out
======= PS-5.7-OPT (5.7)
ERROR 1241 (21000) at line 2: Operand should contain 1 column(s)
======= PS-5.7-DBG (5.7)
ERROR 2013 (HY000) at line 2: Lost connection to MySQL server during query
======= MS-5.7-OPT (5.7.8)
ERROR 1241 (21000) at line 2: Operand should contain 1 column(s)
======= MS-5.7-DBG (5.7.8)
ERROR 1241 (21000) at line 2: Operand should contain 1 column(s)
======= PS-5.6-DBG (5.6.25)
ERROR 2013 (HY000) at line 2: Lost connection to MySQL server during query
======= MS-5.6-DBG (5.6.23)
ERROR 2013 (HY000) at line 2: Lost connection to MySQL server during query

From PS-5.7-DBG (alpha):

+bt
#0 0x00007ffdd56fa771 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000ab0686 in my_write_core (sig=6) at /git/PS-5.7_dbg/mysys/stacktrace.c:422
#2 0x000000000072dfdf in handle_fatal_signal (sig=6) at /git/PS-5.7_dbg/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007ffdd42fe5d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007ffdd42ffcc8 in __GI_abort () at abort.c:90
#6 0x00007ffdd42f7546 in __assert_fail_base (fmt=0x7ffdd4447128 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xfc823b "0", file=file@entry=0xfc8308 "/git/PS-5.7_dbg/sql/item_row.cc", line=line@entry=87, function=function@entry=0xfc8460 <Item_row::illegal_method_call(char const*)::__PRETTY_FUNCTION__> "void Item_row::illegal_method_call(const char*)") at assert.c:92
#7 0x00007ffdd42f75f2 in __GI___assert_fail (assertion=0xfc823b "0", file=0xfc8308 "/git/PS-5.7_dbg/sql/item_row.cc", line=87, function=0xfc8460 <Item_row::illegal_method_call(char const*)::__PRETTY_FUNCTION__> "void Item_row::illegal_method_call(const char*)") at assert.c:101
#8 0x000000000094347f in Item_row::illegal_method_call (this=0x7ffd2201f3c0, method=0xfc82a5 "val_str") at /git/PS-5.7_dbg/sql/item_row.cc:87
#9 0x0000000000944095 in Item_row::val_str (this=0x7ffd2201f3c0) at /git/PS-5.7_dbg/sql/item_row.h:58
#10 0x000000000068a080 in Item_func_like::fix_fields (this=0x7ffd2201f480, thd=0x7ffd296af000, ref=0x7ffd2201f650) at /git/PS-5.7_dbg/sql/item_cmpfunc.cc:5336
#11 0x0000000000779418 in setup_fields (thd=0x7ffd296af000, ref_pointer_array=..., fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7ffd2201f990, allow_sum_func=true) at /git/PS-5.7_dbg/sql/sql_base.cc:8482
#12 0x00000000008094e4 in JOIN::prepare (this=0x7ffd2201f748, tables_init=0x0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, group_init=0x0, having_init=0x0, select_lex_arg=0x7ffd296b1c60, unit_arg=0x7ffd296b1618) at /git/PS-5.7_dbg/sql/sql_resolver.cc:168
#13 0x0000000000810ec1 in mysql_prepare_select (thd=0x7ffd296af000, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, select_options=2147748608, result=0x7ffd2201f720, unit=0x7ffd296b1618, select_lex=0x7ffd296b1c60, free_join=0x7ffdd5cf22d7) at /git/PS-5.7_dbg/sql/sql_select.cc:1054
#14 0x000000000081118f in mysql_select (thd=0x7ffd296af000, tables=0x0, wild_num=0, fields=..., conds=0x0, order=0x7ffd296b1e28, group=0x7ffd296b1d60, having=0x0, select_options=2147748608, result=0x7ffd2201f720, unit=0x7ffd296b1618, select_lex=0x7ffd296b1c60) at /git/PS-5.7_dbg/sql/sql_select.cc:1177
#15 0x000000000080f3e2 in handle_select (thd=0x7ffd296af000, result=0x7ffd2201f720, setup_tables_done_option=0) at /git/PS-5.7_dbg/sql/sql_select.cc:110
#16 0x00000000007e79e2 in execute_sqlcom_select (thd=0x7ffd296af000, all_tables=0x0) at /git/PS-5.7_dbg/sql/sql_parse.cc:5634
#17 0x00000000007dff82 in mysql_execute_command (thd=0x7ffd296af000) at /git/PS-5.7_dbg/sql/sql_parse.cc:2989
#18 0x00000000007ea6e5 in mysql_parse (thd=0x7ffd296af000, rawbuf=0x7ffd2201f010 "SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0))", length=38, parser_state=0x7ffdd5cf3620) at /git/PS-5.7_dbg/sql/sql_parse.cc:6922
#19 0x00000000007dc67d in dispatch_command (command=COM_QUERY, thd=0x7ffd296af000, packet=0x7ffd296c0001 "SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0))", packet_length=38) at /git/PS-5.7_dbg/sql/sql_parse.cc:1434
#20 0x00000000007db5af in do_command (thd=0x7ffd296af000) at /git/PS-5.7_dbg/sql/sql_parse.cc:1051
#21 0x00000000007a3b41 in do_handle_one_connection (thd_arg=0x7ffd296af000) at /git/PS-5.7_dbg/sql/sql_connect.cc:1532
#22 0x00000000007a3649 in handle_one_connection (arg=0x7ffd296af000) at /git/PS-5.7_dbg/sql/sql_connect.cc:1443
#23 0x0000000000b00f8c in pfs_spawn_thread (arg=0x7ffdd3bfe740) at /git/PS-5.7_dbg/storage/perfschema/pfs.cc:1860
#24 0x00007ffdd56f5df5 in start_thread (arg=0x7ffdd5cf4700) at pthread_create.c:308
#25 0x00007ffdd43bf1ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Tags: upstream qa57
description: updated
tags: removed: qablock
tags: added: qa57 qablock
Revision history for this message
Roel Van de Paar (roel11) wrote :

It's really an upstream bug that is apparently fixed in (later version of) MS 5.7
https://bugs.mysql.com/bug.php?id=78330
https://bugs.mysql.com/bug.php?id=57552

Revision history for this message
Roel Van de Paar (roel11) wrote :

It'd be good to have this bug fixed in PS 5.7 too (maybe by merge of latest 5.7?)

tags: added: upstream
Revision history for this message
Roel Van de Paar (roel11) wrote :

======= MS-5.7.5-OPT ()
ERROR 1241 (21000) at line 2: Operand should contain 1 column(s)
======= MS-5.7.5-DBG ()
ERROR 2013 (HY000) at line 2: Lost connection to MySQL server during query

Revision history for this message
Roel Van de Paar (roel11) wrote :

Thus, 5.7.8 merge ought to fix it. Hence, no qablock.

tags: removed: qablock
Revision history for this message
Roel Van de Paar (roel11) wrote :

Verified fixed in 5.7.9

mysql> SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0));
ERROR 1241 (21000): Operand should contain 1 column(s)

Revision history for this message
Roel Van de Paar (roel11) wrote :

PS-5.7.9-Beta that is

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Could reproduce with 5.6.27-75.0-debug:

mysql> SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0));
ERROR 2013 (HY000): Lost connection to MySQL server during query

But with optimized build 5.6.27-75.0:

mysql> SELECT('a%b' LIKE 'ax%b' ESCAPE (0,0));
ERROR 1241 (21000): Operand should contain 1 column(s)

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-930

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.