Issue Details (XML | Word | Printable)

Key: CORE-2362
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Andre van Zuydam
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Numeric or Decimal Computed Field SubType has Incorrect Value

Created: 10/Mar/09 03:47 PM   Updated: 28/Aug/15 06:05 PM
Component/s: API / Client Library
Affects Version/s: 2.1.1
Fix Version/s: None

Environment: Windows, Linux, Delphi, PHP


 Description  « Hide
Please run the following SQL and you will notice that the computed by field has a difference in the RDB$FIELD_SUB_TYPE & RDB$FIELD_PRECISION columns. Surely the computed field should inherit the properties of the fields it is using for its calculation.


create table example (
  field1 numeric (10,2) default 0,
  field2 numeric (10,2) default 0,
  total computed by (field1 + field2)
);

commit;

SELECT a.RDB$RELATION_NAME, a.RDB$FIELD_NAME, b. RDB$FIELD_LENGTH, b.RDB$FIELD_SCALE, c.RDB$TYPE_NAME, b.RDB$FIELD_TYPE, b.RDB$FIELD_SUB_TYPE, b.RDB$FIELD_PRECISION, b.RDB$COMPUTED_SOURCE
FROM RDB$RELATION_FIELDS a JOIN RDB$FIELDS b ON (b.RDB$FIELD_NAME = a.RDB$FIELD_SOURCE)
LEFT JOIN RDB$TYPES c ON (b.RDB$FIELD_TYPE = c.RDB$TYPE and c.RDB$FIELD_NAME = 'RDB$FIELD_TYPE')
WHERE a.RDB$RELATION_NAME = 'EXAMPLE' ORDER BY a.RDB$RELATION_NAME, a.RDB$FIELD_POSITION



 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.