|
The same also repeatable with sp:
CREATE TABLE t1 (a VARCHAR(8));
|
INSERT INTO t1 VALUES ('foo'),('bar');
|
CREATE VIEW v1 AS SELECT * FROM t1;
|
create procedure sp() SELECT NULLIF( a, CONVERT( 'qux' USING utf8 ) ) FROM v1;
|
call sp();
|
call sp();
|
|
10.1 de8c9b538f7e77f18470ccfcac
|
#7 0x00007f30c96dc102 in __GI___assert_fail (assertion=0x55d9e4868786 "fixed", file=0x55d9e48689b0 "/10.1/sql/item.cc", line=9806, function=0x55d9e486c620 <Item_direct_view_ref::used_tables() const::__PRETTY_FUNCTION__> "virtual table_map Item_direct_view_ref::used_tables() const") at assert.c:101
|
#8 0x000055d9e408d969 in Item_direct_view_ref::used_tables (this=0x7f30bd844c70) at /10.1/sql/item.cc:9806
|
#9 0x000055d9e3d628e5 in Used_tables_and_const_cache::used_tables_and_const_cache_join (this=0x7f30bd846938, item=0x7f30bd844c70) at /10.1/sql/item.h:3722
|
#10 0x000055d9e3d62970 in Used_tables_and_const_cache::used_tables_and_const_cache_update_and_join (this=0x7f30bd846938, item=0x7f30bd844c70) at /10.1/sql/item.h:3728
|
#11 0x000055d9e3d629ba in Used_tables_and_const_cache::used_tables_and_const_cache_update_and_join (this=0x7f30bd846938, argc=3, argv=0x7f30bd846a18) at /10.1/sql/item.h:3739
|
#12 0x000055d9e409be2b in Item_func_nullif::update_used_tables (this=0x7f30bd846890) at /10.1/sql/item_cmpfunc.cc:2620
|
#13 0x000055d9e3e1a138 in st_select_lex::update_used_tables (this=0x7f30bd843850) at /10.1/sql/sql_lex.cc:4183
|
#14 0x000055d9e3e61ff3 in JOIN::optimize_inner (this=0x7f30bdb97208) at /10.1/sql/sql_select.cc:1116
|
#15 0x000055d9e3e61d26 in JOIN::optimize (this=0x7f30bdb97208) at /10.1/sql/sql_select.cc:1059
|
#16 0x000055d9e3e6a5b9 in mysql_select (thd=0x7f30c298b630, rref_pointer_array=0x7f30bd843af8, tables=0x7f30bd846b00, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147749632, result=0x7f30bdb971e8, unit=0x7f30bd843148, select_lex=0x7f30bd843850) at /10.1/sql/sql_select.cc:3487
|
#17 0x000055d9e3e5fe0b in handle_select (thd=0x7f30c298b630, lex=0x7f30bd843088, result=0x7f30bdb971e8, setup_tables_done_option=0) at /10.1/sql/sql_select.cc:377
|
#18 0x000055d9e3e2fcbb in execute_sqlcom_select (thd=0x7f30c298b630, all_tables=0x7f30bd846b00) at /10.1/sql/sql_parse.cc:5691
|
#19 0x000055d9e3e269cf in mysql_execute_command (thd=0x7f30c298b630) at /10.1/sql/sql_parse.cc:3038
|
#20 0x000055d9e3d88380 in sp_instr_stmt::exec_core (this=0x7f30bd847108, thd=0x7f30c298b630, nextp=0x7f30c3bfae94) at /10.1/sql/sp_head.cc:3212
|
#21 0x000055d9e3d87a84 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f30bd847148, thd=0x7f30c298b630, nextp=0x7f30c3bfae94, open_tables=false, instr=0x7f30bd847108) at /10.1/sql/sp_head.cc:2978
|
#22 0x000055d9e3d8804c in sp_instr_stmt::execute (this=0x7f30bd847108, thd=0x7f30c298b630, nextp=0x7f30c3bfae94) at /10.1/sql/sp_head.cc:3128
|
#23 0x000055d9e3d8393d in sp_head::execute (this=0x7f30bd845888, thd=0x7f30c298b630, merge_da_on_success=true) at /10.1/sql/sp_head.cc:1309
|
#24 0x000055d9e3d857d8 in sp_head::execute_procedure (this=0x7f30bd845888, thd=0x7f30c298b630, args=0x7f30c298fe10) at /10.1/sql/sp_head.cc:2096
|
#25 0x000055d9e3e25037 in do_execute_sp (thd=0x7f30c298b630, sp=0x7f30bd845888) at /10.1/sql/sql_parse.cc:2464
|
#26 0x000055d9e3e2d66a in mysql_execute_command (thd=0x7f30c298b630) at /10.1/sql/sql_parse.cc:5042
|
#27 0x000055d9e3e337b6 in mysql_parse (thd=0x7f30c298b630, rawbuf=0x7f30bda1dfc8 "call sp()", length=9, parser_state=0x7f30c3bfbe20) at /10.1/sql/sql_parse.cc:7209
|
#28 0x000055d9e3e22a57 in dispatch_command (command=COM_QUERY, thd=0x7f30c298b630, packet=0x7f30c5b88cf1 "call sp()", packet_length=9) at /10.1/sql/sql_parse.cc:1499
|
#29 0x000055d9e3e21943 in do_command (thd=0x7f30c298b630) at /10.1/sql/sql_parse.cc:1131
|
#30 0x000055d9e3f5d62f in do_handle_one_connection (thd_arg=0x7f30c298b630) at /10.1/sql/sql_connect.cc:1331
|
#31 0x000055d9e3f5d36a in handle_one_connection (arg=0x7f30c298b630) at /10.1/sql/sql_connect.cc:1242
|
#32 0x000055d9e4375444 in pfs_spawn_thread (arg=0x7f30c2928470) at /10.1/storage/perfschema/pfs.cc:1868
|
#33 0x00007f30ca0e0fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
|
#34 0x00007f30c97a54cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
on non-debug version, (I tried 10.1.38)
|
10.1.38-MariaDB
|
Thread 1 (Thread 0x7f56fecfab00 (LWP 46955)):
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x00007f57012795fe in __GI_abort () at abort.c:100
|
#2 0x00007f5701629983 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
#3 0x00007f570162f8c6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
#4 0x00007f570162f901 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
#5 0x00007f570163063f in __cxa_pure_virtual () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
#6 0x00000000007be440 in Item_func_nullif::fix_length_and_dec (this=0x7f56d383efb8) at /home/buildbot/buildbot/build/sql/item_cmpfunc.cc:2783
|
#7 0x00000000007e972f in Item_func::fix_fields (this=0x7f56d383efb8, thd=0x7f5700bc8008, ref=<optimized out>) at /home/buildbot/buildbot/build/sql/item_func.cc:236
|
#8 0x0000000000567036 in setup_fields (thd=0x7f5700bc8008, ref_pointer_array=0x7f56d383fe00, fields=..., mark_used_columns=(MARK_COLUMNS_READ | MARK_COLUMNS_WRITE | unknown: 19457976), sum_func_list=0x7f56d382c510, pre_fix=0x7f56d3922918, allow_sum_func=true) at /home/buildbot/buildbot/build/sql/sql_base.cc:8057
|
#9 0x00000000005fed68 in JOIN::prepare (this=0x7f56d382c1a0, rref_pointer_array=0x7f56d3922a90, tables_init=<optimized out>, wild_num=0, conds_init=<optimized out>, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f56d39227e8, unit_arg=0x7f56d39220e8) at /home/buildbot/buildbot/build/sql/sql_select.cc:803
|
#10 0x000000000060ef66 in mysql_select (thd=0x7f5700bc8008, rref_pointer_array=0x7f56d3922a90, tables=0x7f56d383f1d0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147749632, result=0x7f56d382c180, unit=0x7f56d39220e8, select_lex=0x7f56d39227e8) at /home/buildbot/buildbot/build/sql/sql_select.cc:3477
|
#11 0x0000000000612438 in handle_select (thd=0x7f5700bc8008, lex=0x7f56d3922020, result=0x7f56d382c180, setup_tables_done_option=0) at /home/buildbot/buildbot/build/sql/sql_select.cc:388
|
#12 0x00000000005b2188 in execute_sqlcom_select (thd=0x7f5700bc8008, all_tables=0x7f56d383f1d0) at /home/buildbot/buildbot/build/sql/sql_parse.cc:5950
|
#13 0x00000000005b993a in mysql_execute_command (thd=0x7f5700bc8008) at /home/buildbot/buildbot/build/sql/sql_parse.cc:2995
|
#14 0x00000000008b0afe in sp_instr_stmt::exec_core (this=0x7f56d383f7d0, thd=0x7f56fecf5830, nextp=0x0) at /home/buildbot/buildbot/build/sql/sp_head.cc:3218
|
#15 0x00000000008b0c9c in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f56d383f810, thd=0x7f5700bc8008, nextp=0x7f56fecf7bd8, open_tables=false, instr=0x7f56d383f7d0) at /home/buildbot/buildbot/build/sql/sp_head.cc:2984
|
#16 0x00000000008b4382 in sp_instr_stmt::execute (this=0x7f56d383f7d0, thd=0x7f5700bc8008, nextp=0x7f56fecf7bd8) at /home/buildbot/buildbot/build/sql/sp_head.cc:3134
|
#17 0x00000000008b6202 in sp_head::execute (this=0x7f56d383e020, thd=0x7f5700bc8008, merge_da_on_success=true) at /home/buildbot/buildbot/build/sql/sp_head.cc:1315
|
#18 0x00000000008b7983 in sp_head::execute_procedure (this=0x7f56d383e020, thd=0x7f5700bc8008, args=0x7f5700bcc610) at /home/buildbot/buildbot/build/sql/sp_head.cc:2102
|
#19 0x00000000005b76b2 in do_execute_sp (sp=<optimized out>, thd=<optimized out>) at /home/buildbot/buildbot/build/sql/sql_parse.cc:2427
|
#20 mysql_execute_command (thd=0x7f5700bc8008) at /home/buildbot/buildbot/build/sql/sql_parse.cc:5301
|
#21 0x00000000005bfbbe in mysql_parse (thd=0x7f5700bc8008, rawbuf=<optimized out>, length=<optimized out>, parser_state=0x7f56fecf9440) at /home/buildbot/buildbot/build/sql/sql_parse.cc:7468
|
#22 0x00000000005c2c14 in dispatch_command (command=COM_QUERY, thd=0x7f5700bc8008, packet=0x7f56edbac009 "call sp()", packet_length=9) at /home/buildbot/buildbot/build/sql/sql_parse.cc:1496
|
#23 0x00000000005c3889 in do_command (thd=0x7f5700bc8008) at /home/buildbot/buildbot/build/sql/sql_parse.cc:1124
|
#24 0x0000000000699343 in do_handle_one_connection (thd_arg=<optimized out>) at /home/buildbot/buildbot/build/sql/sql_connect.cc:1330
|
#25 0x0000000000699552 in handle_one_connection (arg=0x7f5700bc8008) at /home/buildbot/buildbot/build/sql/sql_connect.cc:1242
|
#26 0x00007f5701776fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
|
#27 0x00007f57013504cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
|
I'm getting similar crash on 10.5-non-debug
[ERROR] mysqld got signal 11 ;
|
Server version: 10.5.5-MariaDB-log
|
|
??:0(__restore_rt)[0x7f7973e0f730]
|
sql/item_cmpfunc.cc:2723(Item_func_nullif::fix_length_and_dec())[0x563bf33fa224]
|
sql/item_func.cc:370(Item_func::fix_fields(THD*, Item**))[0x563bf31e1848]
|
sql/item.h:982(find_order_in_list(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, st_order*, List<Item>&, List<Item>&, bool, bool, bool))[0x563bf3202123]
|
sql/sql_select.cc:24566(setup_group(THD*, Bounds_checked_array<Item*>, TABLE_LIST*, List<Item>&, List<Item>&, st_order*, bool*, bool))[0x563bf3204810]
|
sql/sql_select.cc:713(setup_without_group)[0x563bf3213e98]
|
sql/sql_select.cc:4619(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x563bf321416e]
|
sql/sql_select.cc:417(handle_select(THD*, LEX*, select_result*, unsigned long))[0x563bf31c3889]
|
sql/sql_parse.cc:4698(mysql_execute_command(THD*))[0x563bf31d2875]
|
sql/sql_prepare.cc:4791(Prepared_statement::execute(String*, bool))[0x563bf31d2a2e]
|
sql/sql_prepare.cc:4280(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*))[0x563bf31d2d0b]
|
sql/sql_class.h:1464(mysql_sql_stmt_execute(THD*))[0x563bf31c0eb8]
|
sql/sql_parse.cc:3947(mysql_execute_command(THD*))[0x563bf31b2092]
|
sql/sql_parse.cc:8010(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x563bf31bcbf7]
|
sql/sql_parse.cc:1869(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x563bf31bdb4d]
|
sql/sql_parse.cc:1347(do_command(THD*))[0x563bf32a38f0]
|
sql/sql_connect.cc:1411(do_handle_one_connection(CONNECT*, bool))[0x563bf32a3cbd]
|
sql/sql_connect.cc:1313(handle_one_connection)[0x563bf35cd2db]
|
nptl/pthread_create.c:487(start_thread)[0x7f7973e04fa3]
|
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f797340d4cf]
|
|
|
non-debug is also affected:
|
Version: '10.3.38-MariaDB'
|
pure virtual method called
|
terminate called without an active exception
|
230302 10:41:35 [ERROR] mysqld got signal 6 ;
|
|
|
Server version: 10.3.38-MariaDB source revision: c73985f2ce8a391582787f3e310a011c1a712bec
|
|
sql/signal_handler.cc:233(handle_fatal_signal)[0x55cf16124657]
|
sigaction.c:0(__restore_rt)[0x7f44edcf8420]
|
sql/item.cc:621(Item::print(String*, enum_query_type))[0x55cf16136fd5]
|
sql/item.h:4701(Used_tables_and_const_cache::used_tables_and_const_cache_join(Item const*))[0x55cf1615b264]
|
sql/sql_lex.cc:4543(st_select_lex::update_used_tables())[0x55cf15f1d92c]
|
sql/sql_select.cc:1641(JOIN::optimize_inner())[0x55cf15f94c71]
|
sql/sql_select.cc:1544(JOIN::optimize())[0x55cf15f97587]
|
sql/sql_select.cc:4379(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55cf15f98e84]
|
sql/sql_select.cc:384(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55cf15f99a3c]
|
sql/sql_parse.cc:6341(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55cf15e45784]
|
sql/sql_parse.cc:3871(mysql_execute_command(THD*))[0x55cf15f41c0a]
|
sql/sp_head.cc:3710(sp_instr_stmt::exec_core(THD*, unsigned int*))[0x55cf15ea6cb5]
|
sql/sp_head.cc:3438(sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*))[0x55cf15eaea1b]
|
sql/sp_head.cc:3615(sp_instr_stmt::execute(THD*, unsigned int*))[0x55cf15eaf44c]
|
sql/sp_head.cc:1379(sp_head::execute(THD*, bool))[0x55cf15eaa8f7]
|
sql/sp_head.cc:2404(sp_head::execute_procedure(THD*, List<Item>*))[0x55cf15eabb6d]
|
sql/sql_parse.cc:3022(do_execute_sp(THD*, sp_head*))[0x55cf15f338d2]
|
sql/sql_parse.cc:3259(Sql_cmd_call::execute(THD*))[0x55cf15f35816]
|
sql/sql_parse.cc:3270(Sql_cmd_call::execute(THD*))[0x55cf15f36050]
|
sql/sql_parse.cc:6076(mysql_execute_command(THD*))[0x55cf15f3e338]
|
sql/sql_parse.cc:7855(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55cf15f4468c]
|
sql/sql_audit.h:169(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55cf15f45f19]
|
sql/sql_parse.cc:1401(do_command(THD*))[0x55cf15f481bb]
|
sql/sql_connect.cc:1404(do_handle_one_connection(CONNECT*))[0x55cf160213a6]
|
sql/sql_connect.cc:1311(handle_one_connection)[0x55cf160214bd]
|
nptl/pthread_create.c:478(start_thread)[0x7f44edcec609]
|
|
Query (0x7f447c05a410): SELECT NULLIF( a, CONVERT( 'qux' USING utf8 ) ) FROM v1
|
|