summaryrefslogtreecommitdiff
path: root/mysql-test/r/trigger.result
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-11-17 00:42:18 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2015-11-17 22:09:42 +0400
commit836275bb203a47104eb7f28aa409924b91abc801 (patch)
treeb7ce5ad7a0159c300290af5d3590861c76a9fe3d /mysql-test/r/trigger.result
parent905613f825f28f561072d6babd307a010de7cf86 (diff)
downloadmariadb-git-836275bb203a47104eb7f28aa409924b91abc801.tar.gz
MDEV-4829 BEFORE INSERT triggers dont issue 1406 error.
Turn the 'abort_on_warning' on for assigning value to fields.
Diffstat (limited to 'mysql-test/r/trigger.result')
-rw-r--r--mysql-test/r/trigger.result15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 9dfa5897af1..c1780819c68 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -2273,3 +2273,18 @@ SET optimizer_switch=@save_optimizer_switch;
DROP TRIGGER tr;
DROP TABLE t1, t2;
End of 5.3 tests.
+SET @@session.sql_mode = 'STRICT_ALL_TABLES,STRICT_TRANS_TABLES';
+CREATE TABLE t1 (c CHAR(1) NOT NULL);
+CREATE TRIGGER t1_bi
+BEFORE INSERT
+ON t1
+FOR EACH ROW
+BEGIN
+SET NEW.c = 'www';
+END;
+|
+SET @@session.sql_mode = default;
+INSERT INTO t1 VALUES ('a');
+ERROR 22001: Data too long for column 'c' at row 1
+DROP TRIGGER t1_bi;
+DROP TABLE t1;