summaryrefslogtreecommitdiff
path: root/mysql-test/t/warnings.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/warnings.test')
-rw-r--r--mysql-test/t/warnings.test45
1 files changed, 40 insertions, 5 deletions
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 176f320e390..5569776904f 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -112,11 +112,6 @@ show variables like 'max_error_count';
drop table t1;
#
-# Test for deprecated table_type variable
-#
-set table_type=MYISAM;
-
-#
# Tests for show warnings limit a, b
#
create table t1 (a int);
@@ -233,3 +228,43 @@ DROP TABLE t1;
SHOW ERRORS;
--echo End of 5.0 tests
+
+#
+# Bug#55847: SHOW WARNINGS returns empty result set when SQLEXCEPTION is active
+#
+
+--echo
+--echo -- Bug#55847
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+CREATE TABLE t1(a INT UNIQUE);
+
+delimiter |;
+
+CREATE FUNCTION f1(x INT) RETURNS INT
+BEGIN
+ INSERT INTO t1 VALUES(x);
+ INSERT INTO t1 VALUES(x);
+ RETURN x;
+END|
+
+delimiter ;|
+
+--echo
+
+--error ER_DUP_ENTRY
+SHOW TABLES WHERE f1(11) = 11;
+
+--echo
+
+SHOW WARNINGS;
+
+--echo
+
+DROP TABLE t1;
+DROP FUNCTION f1;