diff options
Diffstat (limited to 'mysql-test/t/trigger.test')
-rw-r--r-- | mysql-test/t/trigger.test | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test index 46a013d1bc9..1557ef200e5 100644 --- a/mysql-test/t/trigger.test +++ b/mysql-test/t/trigger.test @@ -2702,7 +2702,6 @@ select trigger_name, action_order, created from information_schema.triggers drop table t1; set time_zone= @@global.time_zone; ---echo # --echo # MDEV-12992: Increasing memory consumption --echo with each invocation of trigger --echo # @@ -2725,3 +2724,27 @@ while ($n) --enable_query_log DROP TABLE t1,t2; + + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-12461 TYPE OF and ROW TYPE OF anchored data types +--echo # + +CREATE TABLE t1 (a INT, b INT, total INT); +DELIMITER $$; +CREATE TRIGGER tr1 BEFORE INSERT ON t1 +FOR EACH ROW +BEGIN + DECLARE va TYPE OF t1.a DEFAULT NEW.a; + DECLARE vb TYPE OF t1.b DEFAULT NEW.b; + SET NEW.total:= va + vb; +END; +$$ +DELIMITER ;$$ +INSERT INTO t1 (a,b) VALUES (10, 20); +SELECT * FROM t1; +DROP TABLE t1; |