1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fix for BUG#16266: Definer is not fully qualified error during replication.

The idea of the fix is to extend support of non-SUID triggers for backward
compatibility. Formerly non-SUID triggers were appeared when "new" server
is being started against "old" database. Now, they are also created when
"new" slave receives updates from "old" master.
This commit is contained in:
anozdrin@mysql.com
2006-03-01 14:13:07 +03:00
parent db1ecaa1a2
commit e03e522201
8 changed files with 264 additions and 52 deletions

View File

@ -7206,6 +7206,34 @@ bool get_default_definer(THD *thd, LEX_USER *definer)
}
/*
Create default definer for the specified THD. Also check that the current
user is conformed to the definers requirements.
SYNOPSIS
create_default_definer()
thd [in] thread handler
RETURN
On success, return a valid pointer to the created and initialized
LEX_USER, which contains definer information.
On error, return 0.
*/
LEX_USER *create_default_definer(THD *thd)
{
LEX_USER *definer;
if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER))))
return 0;
if (get_default_definer(thd, definer))
return 0;
return definer;
}
/*
Create definer with the given user and host names. Also check that the user
and host names satisfy definers requirements.
@ -7218,7 +7246,7 @@ bool get_default_definer(THD *thd, LEX_USER *definer)
RETURN
On success, return a valid pointer to the created and initialized
LEX_STRING, which contains definer information.
LEX_USER, which contains definer information.
On error, return 0.
*/