Skip to content

CREATE OR ALTER VIEW and column type (domain) bug [CORE4844] #5140

Open
@firebird-automations

Description

@firebird-automations

Submitted by: Attila Molnár (e_pluribus_unum)

Attachments:
HIBAS.ZIP

Votes: 1

running the next command throws error

EXECUTE BLOCK
AS
BEGIN
rdb$set_context('USER_SESSION', 'VIEW_CREATE_USER', 'SYSDBA');
rdb$set_context('USER_SESSION', 'VIEW_CREATE_PASSWORD', 'masterkey');
EXECUTE PROCEDURE fk_minosites_view_create('*');
END

"This operation is not defined for system tables.
unsuccessful metadata update.
cannot delete.
DOMAIN RDB$245643.
there are 2 dependencies.
At procedure 'FK_MINOSITES_VIEW_CREATE' line: 95, col: 1
At procedure 'FK_MINOSITES_VIEW_CREATE' line: 95, col: 1."

Where RDB$245643 domain comes from? If you see the view source you see specific domain definition, but the view was created with this generated domain.

SELECT *
FROM rdb$relation_fields f
where trim(f.rdb$relation_name) LIKE 'FK_MINOSITES_'

As I see there are two bugs :
#⁠1 : create/alter view not uses the specified domain, but generates a new one and uses that when null casted to domain.
#⁠2 : alter view should not fail ICO domain change (domain drop)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions