View Issue Details

IDProjectCategoryView StatusLast Update
0001147Database Workbench v5Firebird Modulepublic2015-01-22 13:24
ReporterWolfgang Rohdewald Assigned ToMartijn Tonies  
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformI86 32, VirtualboxOSWindowsOS VersionWindows 7 Pro
Product Version5.0.6 
Fixed in Version5.0.8 
Summary0001147: table editor: Changing computation of a computed field is not correctly completed
DescriptionTake the script below, create that table.
In the table editor, change (id+1) to (id+2)
Save the changes.

This has two unwanted effects:

1. the error message "Can't perform operation on inactive transaction"
2. The field DBW$$TEMP remains.

But because refreshing table list / column list does not work either, I have to disconnect and reconnect the database to see that DBW$$TEMP.

So I must
1. save the change
2. disconnect&reconnect
3. remove DBW$$TEMP
4. save the change
5. hope that everything else is OK which I can actually doubt because:

I wonder if this has to do with that COMMIT in the middle of the DDL modification script, see below. So the dependencies would not be updated either, I did not check that yet.
Steps To ReproduceCREATE TABLE T1
(
  ID BIGINT,
  COMPFIELD COMPUTED BY ( id+1 )
);
Additional Informationdelete from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'T1' and rf.rdb$field_name = 'COMPFIELD');
ALTER TABLE T1 ADD DBW$$TEMP COMPUTED BY ( id+2 );
UPDATE rdb$fields SET RDB$COMPUTED_BLR = (select RDB$COMPUTED_BLR from rdb$fields where rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$field_name = 'DBW$$TEMP' and rdb$relation_name = 'T1')),
    RDB$COMPUTED_SOURCE = (select RDB$COMPUTED_SOURCE from rdb$fields where rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$field_name = 'DBW$$TEMP' and rdb$relation_name = 'T1'))
WHERE rdb$field_name = (select rdb$field_source from rdb$relation_fields where rdb$relation_name = 'T1' and rdb$field_name = 'COMPFIELD');
COMMIT;
insert into rdb$dependencies
select * from rdb$dependencies
where rdb$dependent_name = (select f.rdb$field_name
from rdb$fields f
join rdb$relation_fields rf on rf.rdb$field_source = f.rdb$field_name
where rf.rdb$relation_name = 'T1' and rf.rdb$field_name = 'DBW$$TEMP');
ALTER TABLE T1 DROP DBW$$TEMP;
TagsNo tags attached.

Activities

Martijn Tonies

2015-01-19 09:36

administrator   ~0000335

Hello Wolfgang,

I've tried several times, but I cannot reproduce this issue.

Can you consistently reproduce it? Any other connections to the database?

Martijn Tonies

2015-01-19 16:27

administrator   ~0000342

I've been able to reproduce this on Firebird 2.1, version 2.5 introduces COMPUTED BY altering in normal DDL.

Issue History

Date Modified Username Field Change
2015-01-19 04:30 Wolfgang Rohdewald New Issue
2015-01-19 09:36 Martijn Tonies Note Added: 0000335
2015-01-19 09:36 Martijn Tonies Assigned To => Martijn Tonies
2015-01-19 09:36 Martijn Tonies Status new => feedback
2015-01-19 16:27 Martijn Tonies Note Added: 0000342
2015-01-19 16:27 Martijn Tonies Status feedback => assigned
2015-01-19 17:26 Martijn Tonies Status assigned => resolved
2015-01-19 17:26 Martijn Tonies Fixed in Version => 5.0.8
2015-01-19 17:26 Martijn Tonies Resolution open => fixed
2015-01-19 17:26 Martijn Tonies Issue cloned: 0001149
2015-01-22 13:24 Martijn Tonies Status resolved => closed