From: Date: November 9 2005 4:54pm Subject: bk commit into 5.0 tree (pem:1.1957) BUG#14719 List-Archive: http://lists.mysql.com/internals/32111 X-Bug: 14719 Message-Id: <200511091554.jA9FsKc8011256@mail.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of pem. When pem does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1957 05/11/09 16:51:00 pem@stripped +3 -0 Fixed BUG#14719: Views DEFINER grammar is incorrect Corrected the syntax for the current_user() case. (It's "definer = current_user[()]", not just "current_user[()]".) sql/sql_yacc.yy 1.439 05/11/09 16:50:53 pem@stripped +1 -1 Corrected the CREATE VIEW syntax for the current_user() DEFINER case. (It's "definer = current_user[()]", not just "current_user[()]".) mysql-test/t/view.test 1.121 05/11/09 16:50:52 pem@stripped +13 -0 New test case for BUG#14719 mysql-test/r/view.result 1.131 05/11/09 16:50:52 pem@stripped +10 -0 New test case for BUG#14719 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: pem # Host: mysql.comhem.se # Root: /usr/home/pem/bug14719/mysql-5.0 --- 1.438/sql/sql_yacc.yy 2005-10-28 12:11:24 +02:00 +++ 1.439/sql/sql_yacc.yy 2005-11-09 16:50:53 +01:00 @@ -9008,7 +9008,7 @@ thd->lex->create_view_definer)) YYABORT; } - | CURRENT_USER optional_braces + | DEFINER_SYM EQ CURRENT_USER optional_braces { THD *thd= YYTHD; if (!(thd->lex->create_view_definer= --- 1.130/mysql-test/r/view.result 2005-11-06 07:45:49 +01:00 +++ 1.131/mysql-test/r/view.result 2005-11-09 16:50:52 +01:00 @@ -2375,3 +2375,13 @@ Error 1146 Table 'test.t1' doesn't exist Error 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them DROP VIEW v1; +create definer = current_user() sql security invoker view v1 as select 1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` +drop view v1; +create definer = current_user sql security invoker view v1 as select 1; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` +drop view v1; --- 1.120/mysql-test/t/view.test 2005-11-06 07:45:49 +01:00 +++ 1.121/mysql-test/t/view.test 2005-11-09 16:50:52 +01:00 @@ -2240,3 +2240,16 @@ OPTIMIZE TABLE v1; DROP VIEW v1; + + +# +# BUG#14719: Views DEFINER grammar is incorrect +# + +create definer = current_user() sql security invoker view v1 as select 1; +show create view v1; +drop view v1; + +create definer = current_user sql security invoker view v1 as select 1; +show create view v1; +drop view v1;