|
I also see this bug in 10.6, build from today.
CREATE TABLE t2 (c INT,d INT);
|
CREATE TABLE t (c CHAR(1)KEY,c2 CHAR(1));
|
ALTER TABLE t ADD COLUMN b INT;
|
CREATE VIEW v2 AS SELECT b FROM t2 JOIN t ON t2.b=t.a;
|
Leads to:
|
10.6.0 2e31b2ffe9b443b029e51961ef6b0617df380388 (Debug)
|
Core was generated by `/test/MD230321-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
|
at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
[Current thread is 1 (Thread 0x15056c0a9700 (LWP 3201248))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
#1 0x0000555a3989fdd1 in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
|
#2 0x0000555a39040d31 in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:331
|
#3 <signal handler called>
|
#4 Item_field::fix_outer_field (this=this@entry=0x150520015848, thd=thd@entry=0x150520000db8, from_field=from_field@entry=0x15056c0a6f60, reference=reference@entry=0x150520015b70) at /test/10.6_dbg/sql/item.cc:5518
|
#5 0x0000555a3907c502 in Item_field::fix_fields (this=0x150520015848, thd=0x150520000db8, reference=0x150520015b70) at /test/10.6_dbg/sql/item.cc:5934
|
#6 0x0000555a390d5479 in Item::fix_fields_if_needed (ref=0x150520015b70, thd=0x150520000db8, this=0x150520015848) at /test/10.6_dbg/sql/item.h:988
|
#7 Item_func::fix_fields (this=0x150520015ad8, thd=0x150520000db8, ref=<optimized out>) at /test/10.6_dbg/sql/item_func.cc:352
|
#8 0x0000555a38cf5f40 in Item::fix_fields_if_needed (ref=0x150520015130, thd=0x150520000db8, this=0x150520015ad8) at /test/10.6_dbg/sql/item.h:996
|
#9 Item::fix_fields_if_needed_for_scalar (ref=0x150520015130, thd=0x150520000db8, this=0x150520015ad8) at /test/10.6_dbg/sql/item.h:992
|
#10 Item::fix_fields_if_needed_for_bool (ref=0x150520015130, thd=0x150520000db8, this=0x150520015ad8) at /test/10.6_dbg/sql/item.h:996
|
#11 setup_on_expr (thd=thd@entry=0x150520000db8, table=0x1505200150d0, table@entry=0x1505200149c0, is_update=is_update@entry=false) at /test/10.6_dbg/sql/sql_base.cc:8293
|
#12 0x0000555a38cf635d in setup_conds (thd=thd@entry=0x150520000db8, tables=tables@entry=0x1505200149c0, leaves=@0x1505200145e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150520017470, last = 0x150520017480, elements = 2}, <No data fields>}, conds=conds@entry=0x150520017308) at /test/10.6_dbg/sql/sql_base.cc:8410
|
#13 0x0000555a38de7558 in setup_without_group (reserved=0x1505200146b4, hidden_group_fields=0x1505200171df, win_funcs=@0x1505200147f0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555a3a348260 <end_of_list>, last = 0x1505200147f0, elements = 0}, <No data fields>}, win_specs=@0x1505200147d8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555a3a348260 <end_of_list>, last = 0x1505200147d8, elements = 0}, <No data fields>}, group=0x0, order=0x0, conds=0x150520017308, all_fields=@0x150520017220: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150520014978, last = 0x150520014978, elements = 1}, <No data fields>}, fields=@0x1505200144f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150520014978, last = 0x150520014978, elements = 1}, <No data fields>}, leaves=@0x1505200145e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150520017470, last = 0x150520017480, elements = 2}, <No data fields>}, tables=0x1505200149c0, ref_pointer_array=<optimized out>, thd=0x150520000db8) at /test/10.6_dbg/sql/sql_select.cc:696
|
#14 JOIN::prepare (this=this@entry=0x150520016ef8, tables_init=<optimized out>, conds_init=<optimized out>, og_num=<optimized out>, order_init=<optimized out>, skip_order_by=<optimized out>, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x1505200143a8, unit_arg=0x150520004f90) at /test/10.6_dbg/sql/sql_select.cc:1248
|
#15 0x0000555a38e6c8c4 in st_select_lex_unit::prepare_join (this=this@entry=0x150520004f90, thd_arg=0x150520000db8, sl=sl@entry=0x1505200143a8, tmp_result=tmp_result@entry=0x0, additional_options=additional_options@entry=0, is_union_select=is_union_select@entry=false) at /test/10.6_dbg/sql/sql_union.cc:1088
|
#16 0x0000555a38e70ed4 in st_select_lex_unit::prepare (this=this@entry=0x150520004f90, derived_arg=0x0, sel_result=sel_result@entry=0x0, additional_options=additional_options@entry=0) at /test/10.6_dbg/sql/sql_union.cc:1481
|
#17 0x0000555a38e7ef6d in mysql_create_view (thd=thd@entry=0x150520000db8, views=views@entry=0x150520013cd0, mode=VIEW_CREATE_NEW) at /test/10.6_dbg/sql/sql_view.cc:542
|
#18 0x0000555a38d860fe in mysql_execute_command (thd=thd@entry=0x150520000db8) at /test/10.6_dbg/sql/sql_parse.cc:5775
|
#19 0x0000555a38d6d264 in mysql_parse (thd=thd@entry=0x150520000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15056c0a8410) at /test/10.6_dbg/sql/sql_parse.cc:8004
|
#20 0x0000555a38d7be6a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150520000db8, packet=packet@entry=0x15052000b359 "CREATE VIEW v2 AS SELECT b FROM t2 JOIN t ON t2.b=t.a", packet_length=packet_length@entry=53, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
|
#21 0x0000555a38d7f245 in do_command (thd=0x150520000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
|
#22 0x0000555a38ed8466 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555a3c446838, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
|
#23 0x0000555a38ed8a6b in handle_one_connection (arg=arg@entry=0x555a3c446838) at /test/10.6_dbg/sql/sql_connect.cc:1312
|
#24 0x0000555a39382eb9 in pfs_spawn_thread (arg=0x555a3c35cd48) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
|
#25 0x0000150574a38609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#26 0x0000150574627293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.6.0 (dbg), 10.6.0 (opt)
|