diff --git a/e2e_test/ddl/subscription.slt b/e2e_test/ddl/subscription.slt index 8afe2d69cffe0..ea60d5b98669e 100644 --- a/e2e_test/ddl/subscription.slt +++ b/e2e_test/ddl/subscription.slt @@ -38,4 +38,10 @@ statement ok drop subscription if exists ddl_subscription_table; statement ok -drop subscription if exists ddl_subscription_mv; \ No newline at end of file +drop subscription if exists ddl_subscription_mv; + +statement ok +drop materialized view ddl_mv; + +statement ok +drop table ddl_t; \ No newline at end of file diff --git a/src/meta/src/manager/catalog/user.rs b/src/meta/src/manager/catalog/user.rs index 456dd116b9daf..d148e4c591819 100644 --- a/src/meta/src/manager/catalog/user.rs +++ b/src/meta/src/manager/catalog/user.rs @@ -53,6 +53,12 @@ impl UserManager { .chain(database.sources.values().map(|source| source.owner)) .chain(database.sinks.values().map(|sink| sink.owner)) .chain(database.indexes.values().map(|index| index.owner)) + .chain( + database + .subscriptions + .values() + .map(|subscriptions| subscriptions.owner), + ) .chain( database .tables