mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Additional fix for BUG#16777: Can not create trigger nor view
w/o definer if --skip-grant-tables specified. The previous patch does not allow to specify empty host name in DEFINER-clause explicitly. mysql-test/r/skip_grants.result: Updated the result file. mysql-test/r/view_grant.result: Updated the result file. mysql-test/t/skip_grants.test: Added test cases for BUG#16777; re-organized tests. mysql-test/t/view_grant.test: Updated after final fix of BUG#16777. sql/sql_parse.cc: The final part of fixing BUG#16777: allow empty host name in explicitly specified DEFINER-clause. sql/sql_show.cc: Quote an identifier if it is empty.
This commit is contained in:
@@ -7300,8 +7300,7 @@ LEX_USER *create_default_definer(THD *thd)
|
||||
|
||||
|
||||
/*
|
||||
Create definer with the given user and host names. Also check that the user
|
||||
and host names satisfy definers requirements.
|
||||
Create definer with the given user and host names.
|
||||
|
||||
SYNOPSIS
|
||||
create_definer()
|
||||
@@ -7319,14 +7318,6 @@ LEX_USER *create_definer(THD *thd, LEX_STRING *user_name, LEX_STRING *host_name)
|
||||
{
|
||||
LEX_USER *definer;
|
||||
|
||||
/* Check that specified host name is valid. */
|
||||
|
||||
if (host_name->length == 0)
|
||||
{
|
||||
my_error(ER_MALFORMED_DEFINER, MYF(0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Create and initialize. */
|
||||
|
||||
if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER))))
|
||||
|
||||
Reference in New Issue
Block a user