Details
Description
Run these queries in debug build:
CREATE TABLE t0 ( c51 INT , CONSTRAINT cc0 CHECK ( ~ + RPAD ( c51 , DEFAULT ( c45 ) , '^CafB' ) = 71 ) , c45 INT , CONSTRAINT cc1 UNIQUE i0 ( c45 ) , CONSTRAINT cc2 FOREIGN KEY i1 ( c51 ) REFERENCES t0 ( c45 ) ON UPDATE CASCADE ON DELETE CASCADE ) ; |
Will trigger Segmentation fault.
GDB info:
#0 0x0000555559023706 in my_strcasecmp_utf8mb3 (cs=0x55555b6b7780 <my_charset_utf8mb3_general_ci>, s=0x6290000f6b68 "c51", t=0x0) at /home/wx/mariadb-11.3.0/strings/ctype-utf8.c:831
|
#1 0x0000555557b6c388 in lex_string_cmp (charset=0x55555b6b7780 <my_charset_utf8mb3_general_ci>, a=0x6290000f6fd0, b=0x6290000f61b0) at /home/wx/mariadb-11.3.0/sql/lex_string.h:95
|
#2 0x0000555557b7a4c2 in Item_field::check_vcol_func_processor (this=0x6290000f60e0, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.cc:1574
|
#3 0x0000555557bd47c8 in Item_default_value::walk (this=0x6290000f60e0, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, args=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:6751
|
#4 0x0000555556ea6751 in Item_args::walk_args (this=0x6290000f63b8, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:2796
|
#5 0x0000555556ea77b5 in Item_func_or_sum::walk (this=0x6290000f6340, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:5496
|
#6 0x0000555556ea6751 in Item_args::walk_args (this=0x6290000f64d0, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:2796
|
#7 0x0000555556ea77b5 in Item_func_or_sum::walk (this=0x6290000f6458, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:5496
|
#8 0x0000555556ea6751 in Item_args::walk_args (this=0x6290000f6628, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:2796
|
#9 0x0000555556ea77b5 in Item_func_or_sum::walk (this=0x6290000f65b0, processor=&virtual Item::check_vcol_func_processor(void*), walk_subquery=false, arg=0x7fffd16290e0) at /home/wx/mariadb-11.3.0/sql/item.h:5496
|
#10 0x0000555557ad1f6c in check_expression (vcol=0x6290000f67e8, name=0x6290000f6800, type=VCOL_CHECK_TABLE, alter_info=0x7fffd162b310) at /home/wx/mariadb-11.3.0/sql/field.cc:10523
|
#11 0x00005555574a545f in mysql_prepare_create_table_finalize (thd=0x62c0001e0288, create_info=0x7fffd162b440, alter_info=0x7fffd162b310, db_options=0x7fffd1629840, file=0x6290000f7520, key_info_buffer=0x7fffd162ab50, key_count=0x7fffd162ab40, create_table_mode=0, db=..., table_name=...) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:3809
|
#12 0x00005555574a9d74 in mysql_create_frm_image (thd=0x62c0001e0288, db=..., table_name=..., create_info=0x7fffd162b440, alter_info=0x7fffd162b310, create_table_mode=0, key_info=0x7fffd162ab50, key_count=0x7fffd162ab40, frm=0x7fffd162ab90) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:4327
|
#13 0x00005555574abbe0 in create_table_impl (thd=0x62c0001e0288, ddl_log_state_create=0x7fffd162af50, ddl_log_state_rm=0x7fffd162af90, orig_db=..., orig_table_name=..., db=..., table_name=..., path=..., options=..., create_info=0x7fffd162b440, alter_info=0x7fffd162b310, create_table_mode=0, is_trans=0x7fffd162af40, key_info=0x7fffd162ab50, key_count=0x7fffd162ab40, frm=0x7fffd162ab90) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:4641
|
#14 0x00005555574aca00 in mysql_create_table_no_lock (thd=0x62c0001e0288, ddl_log_state_create=0x7fffd162af50, ddl_log_state_rm=0x7fffd162af90, db=0x6290000f55b0, table_name=0x6290000f55c0, create_info=0x7fffd162b440, alter_info=0x7fffd162b310, is_trans=0x7fffd162af40, create_table_mode=0, table_list=0x6290000f5598) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:4766
|
#15 0x00005555574ad80c in mysql_create_table (thd=0x62c0001e0288, create_table=0x6290000f5598, create_info=0x7fffd162b440, alter_info=0x7fffd162b310) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:4882
|
#16 0x00005555574ea318 in Sql_cmd_create_table_like::execute (this=0x6290000f5500, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_table.cc:12819
|
#17 0x00005555571cbfaa in mysql_execute_command (thd=0x62c0001e0288, is_called_from_prepared_stmt=false) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:5723
|
#18 0x00005555571d95e2 in mysql_parse (thd=0x62c0001e0288, rawbuf=0x6290000f52a8 "CREATE TABLE t0 ( c51 INT , CONSTRAINT cc0 CHECK ( ~ + RPAD ( c51 , DEFAULT ( c45 ) , '^CafB' ) = 71 ) , c45 INT , CONSTRAINT cc1 UNIQUE i0 ( c45 ) , CONSTRAINT cc2 FOREIGN KEY i1 ( c51 ) REFERENCES t"..., length=247, parser_state=0x7fffd162c870) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
|
#19 0x00005555571b1237 in dispatch_command (command=COM_QUERY, thd=0x62c0001e0288, packet=0x6290000fa289 "CREATE TABLE t0 ( c51 INT , CONSTRAINT cc0 CHECK ( ~ + RPAD ( c51 , DEFAULT ( c45 ) , '^CafB' ) = 71 ) , c45 INT , CONSTRAINT cc1 UNIQUE i0 ( c45 ) , CONSTRAINT cc2 FOREIGN KEY i1 ( c51 ) REFERENCES t"..., packet_length=250, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
|
#20 0x00005555571adf7c in do_command (thd=0x62c0001e0288, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
|
#21 0x000055555768e557 in do_handle_one_connection (connect=0x611000057dc8, put_in_cache=true) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
|
#22 0x000055555768deb4 in handle_one_connection (arg=0x611000057c88) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
|
#23 0x00005555582fa350 in pfs_spawn_thread (arg=0x618000005508) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
|
#24 0x00007ffff7115609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
|
#25 0x00007ffff6ce8133 in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Attachments
Issue Links
- is part of
-
MDEV-18114 Foreign Key Constraint actions don't affect Virtual Column
- Closed