[MDEV-14871] Server crashes in fill_record / fill_record_n_invoke_before_triggers upon inserting into versioned table with trigger Created: 2018-01-05  Updated: 2020-08-24  Resolved: 2018-01-10

Status: Closed
Project: MariaDB Server
Component/s: Triggers, Versioned Tables
Affects Version/s: N/A
Fix Version/s: 10.3.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23467 SIGSEGV in fill_record/fill_record_n_... Closed

 Description   

CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY) WITH SYSTEM VERSIONING;
CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SELECT 1 INTO @a;
INSERT INTO t1 VALUES (1),(2);
 
# Cleanup
DROP TABLE t1;

bb-10.3-temporal daf883f95c93860a5b0af0ef47479c115aa30063

#3  <signal handler called>
#4  0x000056403b43b7a2 in fill_record (thd=0x7f21f8000b00, table=0x7f21f800c250, ptr=0x7f21f800d1e8, values=..., ignore_errors=false, use_value=false) at /data/src/bb-10.3-temporal/sql/sql_base.cc:8322
#5  0x000056403b43baea in fill_record_n_invoke_before_triggers (thd=0x7f21f8000b00, table=0x7f21f800c250, ptr=0x7f21f800d1d0, values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at /data/src/bb-10.3-temporal/sql/sql_base.cc:8392
#6  0x000056403b47e9d5 in mysql_insert (thd=0x7f21f8000b00, table_list=0x7f21f8014d30, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-temporal/sql/sql_insert.cc:1011
#7  0x000056403b4b4c9f in mysql_execute_command (thd=0x7f21f8000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:4706
#8  0x000056403b4bf3fa in mysql_parse (thd=0x7f21f8000b00, rawbuf=0x7f21f8014c48 "INSERT INTO t1 VALUES (1),(2)", length=29, parser_state=0x7f2209a485f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
#9  0x000056403b4acb9b in dispatch_command (command=COM_QUERY, thd=0x7f21f8000b00, packet=0x7f21f811eef1 "INSERT INTO t1 VALUES (1),(2)", packet_length=29, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
#10 0x000056403b4ab5cf in do_command (thd=0x7f21f8000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
#11 0x000056403b613352 in do_handle_one_connection (connect=0x56403d9b41d0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
#12 0x000056403b6130df in handle_one_connection (arg=0x56403d9b41d0) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
#13 0x000056403baaddfe in pfs_spawn_thread (arg=0x56403d9cfbd0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
#14 0x00007f22114b0494 in start_thread (arg=0x7f2209a49700) at pthread_create.c:333
#15 0x00007f220f89693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible with at least MyISAM and InnoDB.



 Comments   
Comment by Eugene Kosov (Inactive) [ 2018-01-10 ]

Fixed in https://github.com/MariaDB/server/commit/eedab70c1c14158f918a54ad70a51f57dabdc113

Generated at Thu Feb 08 08:16:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.