Skip to content

statement "ALTER TABLE TABLE_NAME ADD FIELD_A BOOLEAN" leads in wrong error message "validation error for column TABLE_NAME.FIELD_B" on update statements #8960

@DanielBauten

Description

@DanielBauten

Initial situation

  • Server version: WI-V-6.3.3.3.1683 Firebird 5.0 (Firebird 5.0.3 @ Windows 11)
  • Client library: 5.0.3.1683

Problem

  • see attached database (password protected 7z-file; password via PM)
  • execute statement ALTER TABLE ED_PARAMETER ADD INDEXENABLED BOOLEAN
  • executing the statement update ED_PARAMETER set INDEXENABLED = true leads in wrong error message
    The insert failed because a column definition includes validation constraints.
    validation error for column "ED_PARAMETER"."MEMO", value "*** null ***".
    ------------------------------------------------------------------------------
    SQLCODE: -625
    SQLSTATE: 23000
    GDSCODE: 335544347
    
  • but select ID, INDEXENABLED, MEMO from ed_parameter where (MEMO is NULL) is empty
  • remark: even update ED_PARAMETER set ID = ID leads in above wrong error message

Workaround 1

  • backup and restore database

Workaround 2

  • the statement update ED_PARAMETER set MEMO = '' where (MEMO = '') or (MEMO is NULL) fixes the problem
  • i.e. update ED_PARAMETER set INDEXENABLED = true is working as expected (without wrong error message)

Firebird-Bug 'validation error for column'.7z.zip

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