Skip to content

DROP SYNONYM isn't dropping the synonym right away #4133

@lukaseder

Description

@lukaseder

Consider this script:

CREATE TABLE t (i int);
INSERT INTO t VALUES (1);
CREATE SYNONYM s FOR t;
SELECT * FROM s;
DROP SYNONYM s;
SELECT * FROM s;

It works until the end, without error. The synonym S is still available right after dropping. I cannot drop it again, though:

DROP SYNONYM s;

This results in:

SQL Error [42102] [42S02]: Table "S" not found; SQL statement:
DROP synonym s [42102-232]

And now, as expected, I also cannot use it in the query anymore:

SELECT * FROM s;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions