summaryrefslogtreecommitdiff
path: root/mysql-test/t/show_check.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r--mysql-test/t/show_check.test51
1 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index af2c044ee10..bca2ce7101a 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -599,4 +599,55 @@ set names latin1;
--error ER_NO_SUCH_TABLE,ER_FILE_NOT_FOUND
show columns from `#mysql50#????????`;
+#
+# SHOW CREATE TRIGGER test.
+#
+
+# Prepare.
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+CREATE TABLE t1(c1 INT);
+
+CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1;
+
+# Test.
+
+SHOW CREATE TRIGGER t1_bi;
+
+CREATE PROCEDURE p1() SHOW CREATE TRIGGER t1_bi;
+
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+
+PREPARE stmt1 FROM 'SHOW CREATE TRIGGER t1_bi';
+
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+EXECUTE stmt1;
+
+# Cleanup.
+
+DROP TABLE t1;
+DROP PROCEDURE p1;
+DEALLOCATE PREPARE stmt1;
+
--echo End of 5.1 tests