summaryrefslogtreecommitdiff
path: root/mysql-test/t/update.test
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2008-11-28 20:36:07 +0400
committerGleb Shchepa <gshchepa@mysql.com>2008-11-28 20:36:07 +0400
commitc762d934ccefad0a814ed97a9c6dce4339bc1d08 (patch)
tree1f89d58c9976e1a0a2e68e2b50def91f2842f801 /mysql-test/t/update.test
parent8479932c42ea6a9e3b50382c410696b8ad323440 (diff)
downloadmariadb-git-c762d934ccefad0a814ed97a9c6dce4339bc1d08.tar.gz
Bug #40745: Error during WHERE clause calculation in UPDATE
leads to an assertion failure Any run-time error in stored function (like recursive function call or update of table that is already updating by statement which invoked this stored function etc.) that was used in some expression of the single-table UPDATE statement caused an assertion failure. Multiple-table UPDATE (as well as INSERT and both single- and multiple-table DELETE) are not affected.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r--mysql-test/t/update.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index f79c9e773aa..7d56df259ba 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -430,4 +430,25 @@ drop table t1,t2;
connection default;
disconnect con1;
+#
+# Bug #40745: Error during WHERE clause calculation in UPDATE
+# leads to an assertion failure
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE FUNCTION f1() RETURNS INT RETURN f1();
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1);
+
+--error ER_SP_NO_RECURSION
+UPDATE t1 SET i = 3 WHERE f1();
+--error ER_SP_NO_RECURSION
+UPDATE t1 SET i = f1();
+
+DROP TABLE t1;
+DROP FUNCTION f1;
+
--echo End of 5.0 tests