Skip to content

Commit fb70eb7

Browse files
committed
MDEV-22878 galera.wsrep_strict_ddl hangs in 10.5 after merge
if mysql_create_view is aborted when `view` isn't unlinked, it should not be linked back on cleanup
1 parent efa67ee commit fb70eb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/sql_view.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
458458
if(!wsrep_should_replicate_ddl_iterate(thd, static_cast<const TABLE_LIST *>(tables)))
459459
{
460460
res= TRUE;
461-
goto err;
461+
goto err_no_relink;
462462
}
463463
#endif
464464

@@ -727,6 +727,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
727727

728728
err:
729729
lex->link_first_table_back(view, link_to_local);
730+
err_no_relink:
730731
unit->cleanup();
731732
DBUG_RETURN(res || thd->is_error());
732733
}

0 commit comments

Comments
 (0)