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[()]".)
This commit is contained in:
parent
c669c38769
commit
b01e7393bf
@ -2375,3 +2375,13 @@ Warnings:
|
|||||||
Error 1146 Table 'test.t1' doesn't exist
|
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
|
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;
|
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;
|
||||||
|
@ -2240,3 +2240,16 @@ DROP TABLE t1;
|
|||||||
OPTIMIZE TABLE v1;
|
OPTIMIZE TABLE v1;
|
||||||
|
|
||||||
DROP VIEW 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;
|
||||||
|
@ -9008,7 +9008,7 @@ view_user:
|
|||||||
thd->lex->create_view_definer))
|
thd->lex->create_view_definer))
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
| CURRENT_USER optional_braces
|
| DEFINER_SYM EQ CURRENT_USER optional_braces
|
||||||
{
|
{
|
||||||
THD *thd= YYTHD;
|
THD *thd= YYTHD;
|
||||||
if (!(thd->lex->create_view_definer=
|
if (!(thd->lex->create_view_definer=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user