summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authormalff/marcsql@weblab.(none) <>2006-10-19 11:39:51 -0700
committermalff/marcsql@weblab.(none) <>2006-10-19 11:39:51 -0700
commitea0998cacafce4e5efca6de8ccfd135b10adc5b3 (patch)
tree997ff98a25d591733b1ee8e0a441ad58f17eaaaa /mysql-test/include
parentdea0028cd951fc6fb2b898842e8f304bcfc6c532 (diff)
downloadmariadb-git-ea0998cacafce4e5efca6de8ccfd135b10adc5b3.tar.gz
Bug#20028 (Function with select return no data)
This patch reverts a change introduced by Bug 6951, which incorrectly set thd->abort_on_warning for stored procedures. As per internal discussions about the SQL_MODE=TRADITIONAL, the correct behavior is to *not* abort on warnings even inside an INSERT/UPDATE trigger. Tests for Stored Procedures, Stored Functions, Triggers involving SQL_MODE have been included or revised, to reflect the intended behavior. (reposting approved patch, to work around source control issues, no review needed)
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/sp-vars.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/include/sp-vars.inc b/mysql-test/include/sp-vars.inc
index 3e02c9d1709..4bac883ee0e 100644
--- a/mysql-test/include/sp-vars.inc
+++ b/mysql-test/include/sp-vars.inc
@@ -119,4 +119,13 @@ END|
---------------------------------------------------------------------------
+CREATE FUNCTION sp_vars_div_zero() RETURNS INTEGER
+BEGIN
+ DECLARE div_zero INTEGER;
+ SELECT 1/0 INTO div_zero;
+ RETURN div_zero;
+END|
+
+---------------------------------------------------------------------------
+
delimiter ;|