mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
A post-merge fix: fix the failing trigger-grant.test.
This commit is contained in:
@ -199,22 +199,6 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
|||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Check that the user has TRIGGER privilege on the subject table.
|
|
||||||
*/
|
|
||||||
{
|
|
||||||
bool err_status;
|
|
||||||
TABLE_LIST **save_query_tables_own_last= thd->lex->query_tables_own_last;
|
|
||||||
thd->lex->query_tables_own_last= 0;
|
|
||||||
|
|
||||||
err_status= check_table_access(thd, TRIGGER_ACL, tables, 0);
|
|
||||||
|
|
||||||
thd->lex->query_tables_own_last= save_query_tables_own_last;
|
|
||||||
|
|
||||||
if (err_status)
|
|
||||||
DBUG_RETURN(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
There is no DETERMINISTIC clause for triggers, so can't check it.
|
There is no DETERMINISTIC clause for triggers, so can't check it.
|
||||||
But a trigger can in theory be used to do nasty things (if it supported
|
But a trigger can in theory be used to do nasty things (if it supported
|
||||||
@ -268,6 +252,22 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Check that the user has TRIGGER privilege on the subject table.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
bool err_status;
|
||||||
|
TABLE_LIST **save_query_tables_own_last= thd->lex->query_tables_own_last;
|
||||||
|
thd->lex->query_tables_own_last= 0;
|
||||||
|
|
||||||
|
err_status= check_table_access(thd, TRIGGER_ACL, tables, 0);
|
||||||
|
|
||||||
|
thd->lex->query_tables_own_last= save_query_tables_own_last;
|
||||||
|
|
||||||
|
if (err_status)
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
/* We should have only one table in table list. */
|
/* We should have only one table in table list. */
|
||||||
DBUG_ASSERT(tables->next_global == 0);
|
DBUG_ASSERT(tables->next_global == 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user