diff options
author | Monty <monty@mariadb.org> | 2021-05-23 19:30:05 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2021-05-23 19:35:05 +0300 |
commit | 15214a4f11a4081dd716c60bc163eeddc2024149 (patch) | |
tree | b8b36c3ab9edd6c44c61e58910367ccad433574c /sql/sql_trigger.cc | |
parent | 2c90dc091c9ff4af88d4ac71670f0e720dc1ba5d (diff) | |
download | mariadb-git-15214a4f11a4081dd716c60bc163eeddc2024149.tar.gz |
MDEV-25708 THD::cleanup(): Assertion `!mdl_context.has_locks()' failed
The reason was that WSREP code in mysql_create_or_drop_trigge() did
jump to an exit label that did not do proper cleanup of state.
Fixed by ensuring that also WSREP code goes trough the cleanup process.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 19379d3f77a..b8042a90872 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -457,7 +457,6 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) thd->variables.lock_wait_timeout)) goto end; - if (!create) { bool if_exists= thd->lex->if_exists(); @@ -565,7 +564,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) #ifdef WITH_WSREP if (WSREP(thd) && !wsrep_should_replicate_ddl(thd, table->s->db_type()->db_type)) - goto wsrep_error_label; + goto end; #endif /* Later on we will need it to downgrade the lock */ @@ -652,9 +651,11 @@ end: thd->mdl_context.release_lock(mdl_request_for_trn.ticket); DBUG_RETURN(result); + #ifdef WITH_WSREP wsrep_error_label: - DBUG_RETURN(true); + DBUG_ASSERT(result == 1); + goto end; #endif } |