trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.3k stars 2.97k forks source link

DROP SCHEMA .. [RESTRICT] drops MySQL, MemSQL, ClickHouse schema even if there are relations inside #8634

Closed findepi closed 3 years ago

findepi commented 3 years ago

per https://github.com/trinodb/trino/discussions/8613, DROP SCHEMA .. and DROP SCHEMA .. RESTRICT should fail when schema contains tables.

This is not the case for MySQL connector. This may lead to an inadvertent data loss.

cc @wendigo @hashhar @kokosing

kokosing commented 3 years ago

I think we should check in DropSchemaTask if there are tables in the schema before dropping it.

haldes commented 3 years ago

@findepi @kokosing I can take a look. Can you please assign this to me.

findepi commented 3 years ago

same applies to MemSQL. Clickhouse

findepi commented 3 years ago

I did not verify Kudu

wendigo commented 3 years ago

Closed by https://github.com/trinodb/trino/pull/8660