summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 5c8b1d96646..7fe487c87cf 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -344,7 +344,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create)
need second part of condition below, since check_access() function also
checks that db is specified.
*/
- if (!thd->lex->spname->m_db.length || create && !tables->db_length)
+ if (!thd->lex->spname->m_db.length || (create && !tables->db_length))
{
my_error(ER_NO_DB_ERROR, MYF(0));
DBUG_RETURN(TRUE);