summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/information_schema.test')
-rw-r--r--mysql-test/t/information_schema.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 1d06a155717..8a3d62ba91f 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -1047,6 +1047,31 @@ alter database;
--error ER_PARSE_ERROR
alter database test;
+#
+# Bug#27629 Possible security flaw in INFORMATION_SCHEMA and SHOW statements
+#
+
+create database mysqltest;
+create table mysqltest.t1(a int, b int, c int);
+create trigger mysqltest.t1_ai after insert on mysqltest.t1
+ for each row set @a = new.a + new.b + new.c;
+grant select(b) on mysqltest.t1 to mysqltest_1@localhost;
+
+select trigger_name from information_schema.triggers
+where event_object_table='t1';
+show triggers from mysqltest;
+
+connect (con27629,localhost,mysqltest_1,,mysqltest);
+show columns from t1;
+select column_name from information_schema.columns where table_name='t1';
+
+show triggers;
+select trigger_name from information_schema.triggers
+where event_object_table='t1';
+connection default;
+drop user mysqltest_1@localhost;
+drop database mysqltest;
+
--echo End of 5.0 tests.
#
# Show engines