|
CREATE TABLE t1 (k1 text DEFAULT 4);
|
CREATE TABLE t2 (i1 int);
|
ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT i1 FROM t2 WHERE i1 = 4 limit 1) ;
|
/git/10.2/sql/sql_base.cc:5661: Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, uint, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**): Assertion `table_list->table' failed.
|
|
#7 0x00007fbcc28efc82 in __GI___assert_fail (assertion=0x55720b77d68d "table_list->table", file=0x55720b77ca20 "/git/10.2/sql/sql_base.cc", line=5661, function=0x55720b77f280 <find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned int, char const*, char const*, char const*, Item**, bool, bool, unsigned int*, bool, TABLE_LIST**)::__PRETTY_FUNCTION__> "Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, uint, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**)") at assert.c:101
|
#8 0x000055720ac85a34 in find_field_in_table_ref (thd=0x7fbc70000b00, table_list=0x7fbc70034498, name=0x7fbc70091e58 "i1", length=2, item_name=0x7fbc70091e58 "i1", db_name=0x0, table_name=0x0, ref=0x7fbc70091f60, check_privileges=true, allow_rowid=true, cached_field_index_ptr=0x7fbc70091f24, register_tree_change=true, actual_table=0x7fbcb46f68a8) at /git/10.2/sql/sql_base.cc:5661
|
#9 0x000055720ac86592 in find_field_in_tables (thd=0x7fbc70000b00, item=0x7fbc70091e60, first_table=0x7fbc70034498, last_table=0x0, ref=0x7fbc70091f60, report_error=REPORT_ALL_ERRORS, check_privileges=true, register_tree_change=true) at /git/10.2/sql/sql_base.cc:5961
|
#10 0x000055720af8cc6f in Item_field::fix_fields (this=0x7fbc70091e60, thd=0x7fbc70000b00, reference=0x7fbc70091f60) at /git/10.2/sql/item.cc:5429
|
#11 0x000055720ac89330 in setup_fields (thd=0x7fbc70000b00, ref_pointer_array=..., fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0x7fbc70035818, pre_fix=0x7fbc70092ff8, allow_sum_func=true) at /git/10.2/sql/sql_base.cc:7160
|
#12 0x000055720ad30edb in JOIN::prepare (this=0x7fbc700354f8, tables_init=0x7fbc70034498, wild_num=0, conds_init=0x7fbc70034cc8, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fbc70092eb8, unit_arg=0x7fbc70093338) at /git/10.2/sql/sql_select.cc:814
|
#13 0x000055720b0391b0 in subselect_single_select_engine::prepare (this=0x7fbc70035018, thd=0x7fbc70000b00) at /git/10.2/sql/item_subselect.cc:3675
|
#14 0x000055720b02dae8 in Item_subselect::fix_fields (this=0x7fbc70034ec0, thd_param=0x7fbc70000b00, ref=0x7fbc70035068) at /git/10.2/sql/item_subselect.cc:269
|
#15 0x000055720adf4d7d in fix_vcol_expr (thd=0x7fbc70000b00, vcol=0x7fbc70035058) at /git/10.2/sql/table.cc:2752
|
#16 0x000055720adf517a in fix_and_check_vcol_expr (thd=0x7fbc70000b00, table=0x7fbc70091020, vcol=0x7fbc70035058) at /git/10.2/sql/table.cc:2837
|
#17 0x000055720adf55d9 in unpack_vcol_info_from_frm (thd=0x7fbc70000b00, mem_root=0x7fbc70091ad8, table=0x7fbc70091020, expr_str=0x7fbcb46f8da0, vcol_ptr=0x7fbc70091d18, error_reported=0x7fbcb46f9121) at /git/10.2/sql/table.cc:2956
|
#18 0x000055720adeed9a in parse_vcol_defs (thd=0x7fbc70000b00, mem_root=0x7fbc70091ad8, table=0x7fbc70091020, error_reported=0x7fbcb46f9121) at /git/10.2/sql/table.cc:1076
|
#19 0x000055720adf6313 in open_table_from_share (thd=0x7fbc70000b00, share=0x7fbc7008fe60, alias=0x7fbcb46fa100 "#sql-1ab6_9", db_stat=0, prgflag=8, ha_open_flags=16, outparam=0x7fbc70091020, is_create_table=true) at /git/10.2/sql/table.cc:3202
|
#20 0x000055720aee862c in THD::open_temporary_table (this=0x7fbc70000b00, share=0x7fbc7008fe60, alias=0x7fbcb46fa100 "#sql-1ab6_9", open_in_engine=false) at /git/10.2/sql/temporary_tables.cc:1091
|
#21 0x000055720aee660c in THD::create_and_open_tmp_table (this=0x7fbc70000b00, hton=0x55720e9e1460, frm=0x7fbcb46f9440, path=0x7fbcb46fa96c "./test/#sql-1ab6_9", db=0x7fbc70012bb0 "test", table_name=0x7fbcb46fa100 "#sql-1ab6_9", open_in_engine=false) at /git/10.2/sql/temporary_tables.cc:76
|
#22 0x000055720adc71d0 in mysql_alter_table (thd=0x7fbc70000b00, new_db=0x7fbc70012bb0 "test", new_name=0x0, create_info=0x7fbcb46facd0, table_list=0x7fbc700125a0, alter_info=0x7fbcb46fac20, order_num=0, order=0x0, ignore=false) at /git/10.2/sql/sql_table.cc:9295
|
#23 0x000055720ae427a4 in Sql_cmd_alter_table::execute (this=0x7fbc70014400, thd=0x7fbc70000b00) at /git/10.2/sql/sql_alter.cc:329
|
#24 0x000055720acf9d98 in mysql_execute_command (thd=0x7fbc70000b00) at /git/10.2/sql/sql_parse.cc:6228
|
#25 0x000055720acfee9f in mysql_parse (thd=0x7fbc70000b00, rawbuf=0x7fbc70012448 "ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT i1 FROM t2 WHERE i1 = 4 limit 1)", length=83, parser_state=0x7fbcb46fc080, is_com_multi=false, is_next_command=false) at /git/10.2/sql/sql_parse.cc:8015
|
#26 0x000055720acec4f0 in dispatch_command (command=COM_QUERY, thd=0x7fbc70000b00, packet=0x7fbc70095e21 "ALTER TABLE t1 ALTER COLUMN k1 SET DEFAULT (SELECT i1 FROM t2 WHERE i1 = 4 limit 1) ", packet_length=84, is_com_multi=false, is_next_command=false) at /git/10.2/sql/sql_parse.cc:1826
|
#27 0x000055720aceae40 in do_command (thd=0x7fbc70000b00) at /git/10.2/sql/sql_parse.cc:1379
|
#28 0x000055720ae3d47c in do_handle_one_connection (connect=0x55720eff6f40) at /git/10.2/sql/sql_connect.cc:1335
|
#29 0x000055720ae3d1fc in handle_one_connection (arg=0x55720eff6f40) at /git/10.2/sql/sql_connect.cc:1241
|
#30 0x000055720b66b066 in pfs_spawn_thread (arg=0x55720ef3d630) at /git/10.2/storage/perfschema/pfs.cc:1862
|
#31 0x00007fbcc35346ba in start_thread (arg=0x7fbcb46fd700) at pthread_create.c:333
|
#32 0x00007fbcc29c941d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
|
|
on non-debug build:
CREATE TABLE t1 ( c1 text);
ALTER TABLE t1 ALTER COLUMN c1 SET DEFAULT (with cte as (select 2) select * from cte);
|
10.4 ca7fbcea6c4fe13c295
|
Version: '10.4.5-MariaDB-log'
|
190425 16:30:12 [ERROR] mysqld got signal 11 ;
|
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fbf6bf3a390]
|
sql/sql_base.cc:5912(find_field_in_table(THD*, TABLE*, char const*, unsigned long, bool, unsigned int*))[0x55f08b9bd75c]
|
sql/sql_base.cc:6070(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned long, char const*, char const*, char const*, Item**, bool, bool, unsigned int*, bool, TABLE_LIST**))[0x55f08b755b70]
|
sql/sql_base.cc:6372(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, Item**, find_item_error_report_type, bool, bool))[0x55f08b7f226b]
|
sql/item.cc:5675(Item_field::fix_fields(THD*, Item**))[0x55f08ba3727d]
|
sql/item.h:961(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x55f08b850a52]
|
sql/sql_select.cc:1198(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x55f08b850f83]
|
sql/item_subselect.cc:3705(subselect_single_select_engine::prepare(THD*))[0x55f08b857366]
|
sql/item_subselect.cc:282(Item_subselect::fix_fields(THD*, Item**))[0x55f08b85c681]
|
sql/table.cc:3199(fix_vcol_expr(THD*, Virtual_column_info*) [clone .constprop.314])[0x55f08b83762f]
|
sql/table.cc:3280(fix_and_check_vcol_expr)[0x55f08b888af2]
|
sql/table.cc:1157(parse_vcol_defs(THD*, st_mem_root*, TABLE*, bool*))[0x55f08b7abe4e]
|
sql/table.cc:3763(open_table_from_share(THD*, TABLE_SHARE*, st_mysql_const_lex_string const*, unsigned int, unsigned int, unsigned int, TABLE*, bool, List<String>*))[0x55f08b7b3ab9]
|
sql/sql_table.cc:9190(create_table_for_inplace_alter)[0x55f08b7b5d56]
|
sql/sql_alter.cc:496(Sql_cmd_alter_table::execute(THD*))[0x55f08b7b7389]
|
sql/sql_parse.cc:6344(mysql_execute_command(THD*))[0x55f08b884754]
|
sql/sql_parse.cc:8154(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55f08b884874]
|
sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55f08be1b8b4]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fbf6bf306ba]
|
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fbf6b1c141d]
|
|
Query (0x7fbf1c011f60): ALTER TABLE t1 ALTER COLUMN c1 SET DEFAULT (with cte as (select 2) select * from cte)
|
|
|
create table t1 (k1 varchar(10) default 5);
|
insert into t1 values (1),(2);
|
create table t2 (i1 int);
|
insert into t2 values (1),(2);
|
alter table t1 alter column k1 set default (select i1 from t2 where i1=2);
|
|
10.2 cac14b92252b3e7b
|
/10.2/sql/sql_base.cc:5661: Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, uint, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**): Assertion `table_list->table' failed.
|
|
sql/handler.cc:2625(handler::ha_rnd_next(unsigned char*))[0x562e69995a26]
|
sql/records.cc:485(rr_sequential(READ_RECORD*))[0x562e69cfee42]
|
sql/sql_select.cc:19685(join_init_read_record(st_join_table*))[0x562e694d57e8]
|
sql/sql_select.cc:18755(sub_select(JOIN*, st_join_table*, bool))[0x562e694cf276]
|
sql/sql_select.cc:18302(do_select(JOIN*, Procedure*))[0x562e694cd900]
|
sql/sql_select.cc:3623(JOIN::exec_inner())[0x562e6947021e]
|
sql/sql_select.cc:3419(JOIN::exec())[0x562e6946df24]
|
sql/item_subselect.cc:3897(subselect_single_select_engine::exec())[0x562e69b71c6e]
|
sql/item_subselect.cc:722(Item_subselect::exec())[0x562e69b53960]
|
sql/item_subselect.cc:1329(Item_singlerow_subselect::val_int())[0x562e69b58bbd]
|
sql/item.cc:6412(Item::save_in_field(Field*, bool))[0x562e699e6583]
|
sql/unireg.cc:998(make_empty_rec(THD*, unsigned char*, unsigned int, List<Create_field>&, unsigned int, unsigned long))[0x562e6967dc08]
|
sql/unireg.cc:308(build_frm_image(THD*, char const*, HA_CREATE_INFO*, List<Create_field>&, unsigned int, st_key*, handler*))[0x562e6967762b]
|
sql/sql_table.cc:4658(mysql_create_frm_image(THD*, char const*, char const*, HA_CREATE_INFO*, Alter_info*, int, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*))[0x562e695b0559]
|
sql/sql_table.cc:4898(create_table_impl(THD*, char const*, char const*, char const*, char const*, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*))[0x562e695b17e3]
|
sql/sql_table.cc:9298(mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool))[0x562e695cc830]
|
sql/sql_alter.cc:329(Sql_cmd_alter_table::execute(THD*))[0x562e696ee591]
|
sql/sql_parse.cc:6231(mysql_execute_command(THD*))[0x562e693d5508]
|
sql/sql_parse.cc:8018(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x562e693dfd47]
|
sql/sql_parse.cc:1831(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x562e693bb233]
|
sql/sql_parse.cc:1379(do_command(THD*))[0x562e693b8362]
|
sql/sql_connect.cc:1336(do_handle_one_connection(CONNECT*))[0x562e696e096d]
|
sql/sql_connect.cc:1243(handle_one_connection)[0x562e696e0375]
|
perfschema/pfs.cc:1864(pfs_spawn_thread)[0x562e6a8905c8]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f220ac216ba]
|
x86_64/clone.S:111(clone)[0x7f220a0b641d]
|
|
|
|
from MDEV-19569:
--source include/have_partition.inc
|
create table t1 (i int);
|
create table t2 (i int);
|
|
ALTER TABLE t1 PARTITION BY system_time
|
INTERVAL (SELECT i FROM t2) DAY (PARTITION p1 HISTORY, PARTITION pn CURRENT) ;
|
|
10.3 490dcfd5d74ce45cbdd6105e
|
mysqld: /10.3/sql/sql_base.cc:5955: Field* find_field_in_table_ref(THD*, TABLE_LIST*, const char*, size_t, const char*, const char*, const char*, Item**, bool, bool, uint*, bool, TABLE_LIST**): Assertion `table_list->table' failed.
|
190611 13:28:47 [ERROR] mysqld got signal 6 ;
|
|
sql/sql_base.cc:5956(find_field_in_table_ref(THD*, TABLE_LIST*, char const*, unsigned long, char const*, char const*, char const*, Item**, bool, bool, unsigned int*, bool, TABLE_LIST**))[0x559e45c83a19]
|
sql/sql_base.cc:6257(find_field_in_tables(THD*, Item_ident*, TABLE_LIST*, TABLE_LIST*, Item**, find_item_error_report_type, bool, bool))[0x559e45c85251]
|
sql/item.cc:6053(Item_field::fix_fields(THD*, Item**))[0x559e46510719]
|
sql/item.h:825(Item::fix_fields_if_needed(THD*, Item**))[0x559e45b9746b]
|
sql/item.h:828(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x559e45b97499]
|
sql/sql_base.cc:7463(setup_fields(THD*, Bounds_checked_array<Item*>, List<Item>&, enum_column_usage, List<Item>*, List<Item>*, bool))[0x559e45c8b77e]
|
sql/sql_select.cc:1102(JOIN::prepare(TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, bool, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*))[0x559e45e51136]
|
sql/item_subselect.cc:3676(subselect_single_select_engine::prepare(THD*))[0x559e466a9396]
|
sql/item_subselect.cc:276(Item_subselect::fix_fields(THD*, Item**))[0x559e466893a1]
|
sql/item.h:825(Item::fix_fields_if_needed(THD*, Item**))[0x559e45b9746b]
|
sql/item.h:828(Item::fix_fields_if_needed_for_scalar(THD*, Item**))[0x559e45b97499]
|
sql/partition_info.h:404(partition_info::vers_set_interval(THD*, Item*, interval_type, long))[0x559e4634f307]
|
sql/sql_yacc.yy:6067(MYSQLparse(THD*))[0x559e462e3a23]
|
sql/sql_parse.cc:10100(parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool))[0x559e45de5f50]
|
sql/sql_parse.cc:8058(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x559e45dd9cac]
|
sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x559e45db4c1e]
|
sql/sql_parse.cc:1404(do_command(THD*))[0x559e45db1d82]
|
sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x559e46108cd0]
|
sql/sql_connect.cc:1309(handle_one_connection)[0x559e461086ad]
|
perfschema/pfs.cc:1864(pfs_spawn_thread)[0x559e47431827]
|
|