Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.1(EOL), 10.4(EOL), 11.0(EOL)
-
None
Description
CREATE TABLE t3 (c1 INT(1)); |
CREATE VIEW t AS SELECT 1 a; |
CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t VALUES(); |
--ERROR ER_NON_INSERTABLE_TABLE
|
INSERT INTO t3 VALUES (1); |
DROP VIEW t; |
CREATE TABLE t (c1 int); |
INSERT INTO t3 VALUES (1),(2); |
Leads to:
10.6.18 567c0973591eb66797bb0f982f312b516f8fe82c (Optimized) |
Core was generated by `/test/MD060324-mariadb-10.6.18-linux-x86_64-opt/bin/mariadbd --no-defaults --ma'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 check_view_insertability (view=0x14dc10022c50, thd=0x14dc10000c58)
|
at /test/server_opt/sql/sql_insert.cc:1444
|
 |
warning: Source file is more recent than executable.
|
1444 */
|
[Current thread is 1 (Thread 0x14dc40472700 (LWP 299005))]
|
(gdb) bt
|
#0 check_view_insertability (view=0x152eb813ad70, thd=0x152eb8000c58) at /test/server_opt/sql/sql_insert.cc:1444
|
#1 check_insert_fields (thd=thd@entry=0x152eb8000c58, table_list=0x152eb813ad70, fields=@0x152eb80f3bb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3bb8, elements = 0}, <No data fields>}, values=@0x152eb813b940: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb813b940, elements = 0}, <No data fields>}, check_unique=check_unique@entry=false, fields_and_values_from_different_maps=fields_and_values_from_different_maps@entry=false, map=<optimized out>) at /test/server_opt/sql/sql_insert.cc:312
|
#2 0x000055dd96e45377 in mysql_prepare_insert (thd=thd@entry=0x152eb8000c58, table_list=table_list@entry=0x152eb813ad70, fields=@0x152eb80f3bb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3bb8, elements = 0}, <No data fields>}, values=values@entry=0x152eb813b940, update_fields=@0x152eb80f3be8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3be8, elements = 0}, <No data fields>}, update_values=@0x152eb80f3bd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3bd0, elements = 0}, <No data fields>}, duplic=<optimized out>, where=<optimized out>, select_insert=<optimized out>) at /test/server_opt/sql/sql_array.h:38
|
#3 0x000055dd96e4b79f in mysql_insert (thd=thd@entry=0x152eb8000c58, table_list=0x152eb813ad70, fields=@0x152eb80f3bb8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3bb8, elements = 0}, <No data fields>}, values_list=@0x152eb80f3c00: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152eb813b958, last = 0x152eb813b958, elements = 1}, <No data fields>}, update_fields=@0x152eb80f3be8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3be8, elements = 0}, <No data fields>}, update_values=@0x152eb80f3bd0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb80f3bd0, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /test/server_opt/sql/sql_insert.cc:773
|
#4 0x000055dd96e88876 in mysql_execute_command (thd=0x152eb8000c58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/server_opt/sql/sql_parse.cc:4601
|
#5 0x000055dd96dcad2b in sp_instr_stmt::exec_core (this=0x152eb813b9d8, thd=<optimized out>, nextp=0x152ec8f68264) at /test/server_opt/sql/sp_head.cc:3843
|
#6 0x000055dd96dd40c6 in sp_lex_keeper::reset_lex_and_exec_core (this=0x152eb813ba20, thd=0x152eb8000c58, nextp=<optimized out>, open_tables=<optimized out>, instr=0x152eb813b9d8) at /test/server_opt/sql/sp_head.cc:3568
|
#7 0x000055dd96dd4b17 in sp_instr_stmt::execute (this=0x152eb813b9d8, thd=0x152eb8000c58, nextp=0x152ec8f68264) at /test/server_opt/sql/sp_head.cc:3749
|
#8 0x000055dd96dce5d0 in sp_head::execute (this=0x152eb8139e50, thd=0x152eb8000c58, merge_da_on_success=false) at /test/server_opt/sql/sp_head.cc:1442
|
#9 0x000055dd96dcf693 in sp_head::execute_trigger (this=0x152eb8139e50, thd=thd@entry=0x152eb8000c58, db_name=<optimized out>, table_name=<optimized out>, grant_info=grant_info@entry=0x152eb81aff30) at /test/server_opt/sql/sp_head.cc:1952
|
#10 0x000055dd96f3d6b4 in Table_triggers_list::process_triggers (this=this@entry=0x152eb8139650, thd=thd@entry=0x152eb8000c58, event=event@entry=TRG_EVENT_INSERT, time_type=time_type@entry=TRG_ACTION_BEFORE, old_row_is_record1=old_row_is_record1@entry=true) at /test/server_opt/sql/sql_trigger.cc:2486
|
#11 0x000055dd96e1c106 in fill_record_n_invoke_before_triggers (thd=thd@entry=0x152eb8000c58, table=table@entry=0x152eb8137c08, ptr=0x152eb8139a68, values=@0x152eb8011748: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152eb80117e0, last = 0x152eb80117e0, elements = 1}, <No data fields>}, ignore_errors=ignore_errors@entry=false, event=event@entry=TRG_EVENT_INSERT) at /test/server_opt/sql/sql_base.cc:9044
|
#12 0x000055dd96e4c241 in mysql_insert (thd=thd@entry=0x152eb8000c58, table_list=<optimized out>, fields=@0x152eb8005d80: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb8005d80, elements = 0}, <No data fields>}, values_list=@0x152eb8005dc8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x152eb80117f0, last = 0x152eb80118a8, elements = 2}, <No data fields>}, update_fields=@0x152eb8005db0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb8005db0, elements = 0}, <No data fields>}, update_values=@0x152eb8005d98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55dd98083a20 <end_of_list>, last = 0x152eb8005d98, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /test/server_opt/sql/sql_insert.cc:1076
|
#13 0x000055dd96e88876 in mysql_execute_command (thd=0x152eb8000c58, is_called_from_prepared_stmt=<optimized out>) at /test/server_opt/sql/sql_parse.cc:4601
|
#14 0x000055dd96e77606 in mysql_parse (thd=0x152eb8000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/server_opt/sql/sql_parse.cc:8143
|
#15 0x000055dd96e840ad in dispatch_command (command=COM_QUERY, thd=0x152eb8000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/server_opt/sql/sql_class.h:1417
|
#16 0x000055dd96e863fe in do_command (thd=0x152eb8000c58, blocking=blocking@entry=true) at /test/server_opt/sql/sql_parse.cc:1409
|
#17 0x000055dd96f9f677 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/server_opt/sql/sql_connect.cc:1415
|
#18 0x000055dd96f9f9bd in handle_one_connection (arg=arg@entry=0x55dd99dd2278) at /test/server_opt/sql/sql_connect.cc:1317
|
#19 0x000055dd9735481c in pfs_spawn_thread (arg=0x55dd99d53a98) at /test/server_opt/storage/perfschema/pfs.cc:2201
|
#20 0x0000152ece66f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#21 0x0000152ece25b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
Bug confirmed present in:
MariaDB: 10.4.33 (dbg), 10.4.33 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.7 (dbg), 10.11.7 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.0.6 (dbg), 11.0.6 (opt), 11.1.4 (dbg), 11.1.4 (opt)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 11.2.4 (dbg), 11.2.4 (opt), 11.3.2 (dbg), 11.3.2 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.0 (dbg), 11.5.0 (opt)