Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.16.0, 1.17.0
Description
Issue Description
Currently, the drop catalog statement
DROP CATALOG my_cat
does not reset the current catalog. As a result, if dropping a catalog in use, then the following statements will yield different results.
SHOW CURRENT CATALOG SHOW CATALOGS
How to Reproduce
Proposed Fix Plan
The root cause is that `CatalogManager#unregisterCatalog` does not reset `currentCatalogName`.
Regarding this issue, I checked MySQL and PG's behavior.
For MySQL, it is allowed to drop a database current-in-use and set the current database to NULL.
For PG, it is not allowed to drop the database currently in use.
I think both behaviors are reasonable, while for simplicity I suggest adhering to PG, that throw an Exception when dropping the current catalog.
Attachments
Attachments
Issue Links
- is related to
-
FLINK-17357 add "DROP catalog" DDL to blink planner
- Closed
- links to