mirror of
https://github.com/MariaDB/server.git
synced 2025-06-13 13:01:51 +03:00
s/TRUNCATE ... TO/DELETE HISTORY FROM ... BEFORE/
This commit is contained in:
committed by
Aleksey Midenkov
parent
ee68d019d1
commit
617e108fb6
@ -9409,10 +9409,18 @@ bool update_precheck(THD *thd, TABLE_LIST *tables)
|
||||
bool delete_precheck(THD *thd, TABLE_LIST *tables)
|
||||
{
|
||||
DBUG_ENTER("delete_precheck");
|
||||
if (check_one_table_access(thd, DELETE_ACL, tables))
|
||||
DBUG_RETURN(TRUE);
|
||||
/* Set privilege for the WHERE clause */
|
||||
tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege);
|
||||
if (tables->vers_conditions)
|
||||
{
|
||||
if (check_one_table_access(thd, DELETE_HISTORY_ACL, tables))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (check_one_table_access(thd, DELETE_ACL, tables))
|
||||
DBUG_RETURN(TRUE);
|
||||
/* Set privilege for the WHERE clause */
|
||||
tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege);
|
||||
}
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user