Plugin 'MEMORY' has ref_count=1 after shutdown with materialization+semijoin

Description

In 5.3 and 5.5, it produces the error on shutdown:

In 10.0, it causes assertion failure:

Stack trace from:

Environment

None

Assignee

Sergei Petrunia

Reporter

Elena Stepanova

Labels

None

Fix versions

Affects versions

Priority

Major
Configure