Bug #121393 Trigger prevents GEOMETRY NOT NULL guard from working

Submitted: 29 Sep 8:03 Modified: 2 Oct 10:58
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:8.0.46, 8.4.11, 9.7.2, 26.07 OS:Any
Assigned to: CPU Architecture:Any

[29 Sep 8:03] Laurynas Biveinis
Description:
MTR:

CREATE TABLE t1 (id INT PRIMARY KEY, g GEOMETRY NOT NULL);
CREATE TRIGGER t1_insert BEFORE INSERT ON t1 FOR EACH ROW SET @x = 1;

# Succeeds even though should fail
INSERT IGNORE INTO t1 VALUES (1, NULL);
SELECT id, LENGTH(g) FROM t1;

DROP TRIGGER t1_insert;
TRUNCATE TABLE t1;

# Without the trigger, fails correctly 
--error ER_BAD_NULL_ERROR_NOT_IGNORED
INSERT IGNORE INTO t1 VALUES (1, NULL);

DROP TABLE t1;

How to repeat:
See above
[30 Sep 7:10] Chaithra Marsur Gopala Reddy
Hi Laurynas Biveinis,

Thank you for the test case. Verifies as described.
[2 Oct 10:58] Laurynas Biveinis
See also bug 121423

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.