summaryrefslogtreecommitdiff
path: root/mysql-test/include/bug38347.inc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-10-22 16:51:51 +0400
committerAlexander Nozdrin <alik@sun.com>2009-10-22 16:51:51 +0400
commit720252532fb27dd8b3598ef739e4c0b75d7befea (patch)
treef16bfdb6da67f8216983923d7a15c8004ad4b1ab /mysql-test/include/bug38347.inc
parent481066db52cfaa406ea73812bc237513e0daa076 (diff)
downloadmariadb-git-720252532fb27dd8b3598ef739e4c0b75d7befea.tar.gz
Backporting patches for Bug#38347 (ALTER ROUTINE privilege
allows SHOW CREATE TABLE) from 6.0. Original revisions: ------------------------------------------------------------ revno: 2617.31.8 committer: Alexander Nozdrin <alik@sun.com> branch nick: 6.0-rt-bug38347 timestamp: Thu 2009-03-26 09:08:24 +0300 message: Patch for Bug#38347: ALTER ROUTINE privilege allows SHOW CREATE TABLE. If a user has any of the following privileges for a table (or the database if the table), he should be able to issue SHOW CREATE TABLE for the table: - CREATE - DROP - ALTER - DELETE - INDEX - INSERT - SELECT - UPDATE - TRIGGER - REFERENCES - GRANT OPTION - CREATE VIEW - SHOW VIEW Any other privilege (even SUPER) should not allow SHOW CREATE TABLE. ------------------------------------------------------------ revno: 2617.31.11 committer: Alexander Nozdrin <alik@sun.com> branch nick: 6.0-rt timestamp: Fri 2009-03-27 21:36:34 +0300 message: Additional patch for Bug#38347 (ALTER ROUTINE privilege allows SHOW CREATE TABLE). The problem was that information_schema.test, information_schema_parameters.test and information_schema_routines.test failed with the first patch. That happened due to limitation in check_access(): it allows only SELECT_ACL privilege for INFORMATION_SCHEMA tables. The patch is to request only SELECT_ACL privilege for INFORMATION_SCHEMA tables. ------------------------------------------------------------
Diffstat (limited to 'mysql-test/include/bug38347.inc')
-rw-r--r--mysql-test/include/bug38347.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/include/bug38347.inc b/mysql-test/include/bug38347.inc
new file mode 100644
index 00000000000..ca1dbfa1bd2
--- /dev/null
+++ b/mysql-test/include/bug38347.inc
@@ -0,0 +1,21 @@
+
+--echo
+SHOW GRANTS FOR mysqltest_u1@localhost;
+
+--echo
+--echo # connection: con1 (mysqltest_u1@mysqltest_db1)
+--connect (con1,localhost,mysqltest_u1,,mysqltest_db1)
+--connection con1
+
+--echo
+SHOW CREATE TABLE t1;
+
+--echo
+--echo # connection: default
+--connection default
+
+--disconnect con1
+
+--echo
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost;
+SHOW GRANTS FOR mysqltest_u1@localhost;