summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-prelocking.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-08-10 19:19:05 +0200
committerSergei Golubchik <serg@mariadb.org>2016-08-10 19:19:05 +0200
commit309c08c17c56d35e5635a5874fb70719935e5f54 (patch)
treedb63b0f496364456789f390eb5f693dabf0f94a1 /mysql-test/r/sp-prelocking.result
parentc6fdb92ca829fed893d9e7324e80b1450de16087 (diff)
parent5ad02062d928cccbd29c0a2db6f0f7ceb33195d1 (diff)
downloadmariadb-git-309c08c17c56d35e5635a5874fb70719935e5f54.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'mysql-test/r/sp-prelocking.result')
-rw-r--r--mysql-test/r/sp-prelocking.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result
index 9e82a966268..5b594e9ea55 100644
--- a/mysql-test/r/sp-prelocking.result
+++ b/mysql-test/r/sp-prelocking.result
@@ -320,3 +320,23 @@ c2
DROP TRIGGER t1_ai;
DROP TABLE t1, t2;
End of 5.0 tests
+#
+# Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS
+#
+CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2;
+CREATE TABLE t2 (fld3 INT, fld4 CHAR(1));
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1
+FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2);
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+UPDATE v1 SET fld2='B' WHERE fld1=1;
+RETURN row_count();
+END !
+# Without the patch, an error was getting reported.
+SELECT f1();
+f1()
+1
+DROP FUNCTION f1;
+DROP VIEW v1;
+DROP TABLE t1,t2;