1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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.
This commit is contained in:
anozdrin@mysql.com
2006-03-10 14:40:15 +03:00
parent c5493b6316
commit 3b3cb95eb9
6 changed files with 135 additions and 57 deletions

View File

@ -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))))