Skip to content

incorrect update of newly added column from older connection - column value is changed to null even if not included in update statement [CORE5113] #5397

Open
@firebird-automations

Description

@firebird-automations

Submitted by: tvr (tvr)

I tried it with to isql instances:
1. Open first instance
2. Open second instance, add new column to table and change its value
3. Return to first instance and change value of some old column. By this is value in new column is set to NULL, even though new column is not mentioned in update statement.

Steps to reproduce:
Create test table and fill one row:
CREATE TABLE FBTEST
(
CONE VARCHAR(10)
);

FIRST ISQL CONNECTION:
SQL> select * from fbtest; commit;

CONE

kuktest

SECOND ISQL CONNECTION:
SQL> select * from fbtest; commit;

CONE

kuktest

SQL> alter table fbtest add ctwo varchar(10); commit;
SQL> update fbtest set cone='kuk1', ctwo='kuk2'; commit;
SQL> select * from fbtest; commit;

CONE CTWO
========== ==========
kuk1 kuk2

FIRST ISQL CONNECTION:
SQL> update fbtest set cone='hi'; commit;
SQL>

SECOND ISQL CONNECTION:
SQL> select * from fbtest; commit;

CONE CTWO
========== ==========
hi <null> ---------------------------> expected to see hi kuk2

SQL>

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