summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema_db.test
diff options
context:
space:
mode:
authorMartin Hansson <martin.hansson@sun.com>2009-09-28 13:25:47 +0200
committerMartin Hansson <martin.hansson@sun.com>2009-09-28 13:25:47 +0200
commitda8e69f1018443dce968cc98ceafe95d96f5dfa7 (patch)
tree5e183973a70bf08f6abae39dc182fcecd2bedeb2 /mysql-test/t/information_schema_db.test
parent3bc43205106e211df09e053c8840e8c946f57f78 (diff)
downloadmariadb-git-da8e69f1018443dce968cc98ceafe95d96f5dfa7.tar.gz
Bug#35996: SELECT + SHOW VIEW should be enough to display
view definition During SHOW CREATE VIEW there is no reason to 'anonymize' errors that name objects that a user does not have access to. Moreover it was inconsistently implemented. For example base tables being referenced from a view appear to be ok, but not views. The manual on the other hand is clear: If a user has the privileges SELECT and SHOW VIEW, the view definition is available to that user, period. The fix changes the behavior to support the manual. mysql-test/r/information_schema_db.result: Bug#35996: Changed warnings. mysql-test/r/view_grant.result: Bug#35996: Changed warnings, test result. mysql-test/t/information_schema_db.test: Bug#35996: Changed test case to reflect new behavior. mysql-test/t/view_grant.test: Bug#35996: Test case. sql/sql_acl.cc: Bug#35996: Code no longer necessary, we may as well exempt SHOW CREATE VIEW from this check. sql/sql_show.cc: Bug#35996: The fix: An Internal_error_handler that hides most errors raised by access checking as they are not relevant to SHOW CREATE VIEW. sql/table.cc: Bug#35996: Restricting this hack to act only when there is no Internal_error_handler.
Diffstat (limited to 'mysql-test/t/information_schema_db.test')
-rw-r--r--mysql-test/t/information_schema_db.test1
1 files changed, 0 insertions, 1 deletions
diff --git a/mysql-test/t/information_schema_db.test b/mysql-test/t/information_schema_db.test
index 0ff1d05f364..2f651057e5c 100644
--- a/mysql-test/t/information_schema_db.test
+++ b/mysql-test/t/information_schema_db.test
@@ -184,7 +184,6 @@ show fields from testdb_1.v7;
--error ER_TABLEACCESS_DENIED_ERROR
show create view testdb_1.v7;
---error ER_VIEW_NO_EXPLAIN
show create view v4;
#--error ER_VIEW_NO_EXPLAIN
show fields from v4;