summaryrefslogtreecommitdiff
path: root/mysql-test/r/warnings.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/warnings.result')
-rw-r--r--mysql-test/r/warnings.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 70b54ffceaf..4e706de382b 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -316,3 +316,25 @@ SHOW ERRORS;
Level Code Message
Error 1051 Unknown table 't1'
End of 5.0 tests
+
+-- Bug#55847
+
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+CREATE TABLE t1(a INT UNIQUE);
+CREATE FUNCTION f1(x INT) RETURNS INT
+BEGIN
+INSERT INTO t1 VALUES(x);
+INSERT INTO t1 VALUES(x);
+RETURN x;
+END|
+
+SHOW TABLES WHERE f1(11) = 11;
+ERROR 23000: Duplicate entry '11' for key 'a'
+
+SHOW WARNINGS;
+Level Code Message
+Error 1062 Duplicate entry '11' for key 'a'
+
+DROP TABLE t1;
+DROP FUNCTION f1;