mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15754 Server crashes in fill_record_n_invoke_before_triggers upon ...
insert into table with TIMESTAMP INVISIBLE Problem:- The segfault occurs because value is null but since timestamp field is VISIBLE it expects a value , and it tries to call value->save_in_field(.. Timestamp field should not be visible this is the problem. Solution:- While we clone field for record0_field we don't honor the field _visibility , this patch changes that.
This commit is contained in:
@ -238,3 +238,11 @@ insert t2 (a,b,d) values (1,2,4), (10, 30, 40);
|
||||
select * from t1 join t2 using (a);
|
||||
select * from t1 natural join t2;
|
||||
drop table t1, t2;
|
||||
## Triggers MDEV-15754
|
||||
CREATE TABLE t1 (c CHAR(3), t TIMESTAMP invisible);
|
||||
INSERT INTO t1 (c,t) VALUES ('foo','2000-01-01 00:00:00');
|
||||
|
||||
CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SET @a= 1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user