New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating table with computed fields containing "SELECT FIRST" produces corrupted result [CORE4027] #4357
Comments
Modified by: Hanno Nagland (hanno)description: Creating table with computed fields that are containing "SELECT FIRST" produces corrupted result: Sample (using Firebird sale database EMPLOYEE.FDB): CREATE TABLE TEST ( Resulting table DLL (first computed column source contains all following definitions, second computed column source contains ";"): CREATE TABLE TEST ( => Creating table with computed fields that are containing "SELECT FIRST" produces corrupted result: Sample (using Firebird sample database EMPLOYEE.FDB): CREATE TABLE TEST ( Resulting table DLL (first computed column source contains all following definitions, second computed column source contains ";"): CREATE TABLE TEST ( |
Modified by: Hanno Nagland (hanno)description: Creating table with computed fields that are containing "SELECT FIRST" produces corrupted result: Sample (using Firebird sample database EMPLOYEE.FDB): CREATE TABLE TEST ( Resulting table DLL (first computed column source contains all following definitions, second computed column source contains ";"): CREATE TABLE TEST ( => Creating table with computed fields that are containing "SELECT FIRST" produces corrupted result: Sample (using Firebird sample database EMPLOYEE.FDB): CREATE TABLE TEST ( Resulting table DLL (first computed column source contains all following definitions, second computed column source contains ";"): CREATE TABLE TEST ( |
Commented by: Sean Leyne (seanleyne) Did you use ISQL to apply the script to the database? Perhaps the problem is with the tool which applied the script. Did you try to add the second COMPUTED BY using an ALTER ADD script? |
Commented by: @mrotteveel (removed comment) |
Commented by: Hanno Nagland (hanno) Tested with IBExpert, UIB Interbase library and ISQL. Same result with all of them: RDB$FIELDS.RDB$COMPUTED_SOURCE will corrupted, but looks like RDB$COMPUTED_BLR is ok, as resulting table works as expected. Adding both computed fields at same time also produces corrupted result: Adding these computed fields separately works ok: |
Commented by: @asfernandes Please test FB 3, which migh have this problem fixed. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: Hanno Nagland (hanno) Tested this case with FB 3 current snapshot: worked ok. |
Commented by: @asfernandes I may be wrong, but I think the fix depends on large changes in the parser, so no. |
Commented by: Hanno Nagland (hanno) Interestingly resulting BLR is correct, only RDB$FIELDS.RDB$COMPUTED_SOURCE is corrupted... |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Hanno Nagland (hanno)
Creating table with computed fields that are containing "SELECT FIRST" produces corrupted result:
Sample (using Firebird sample database EMPLOYEE.FDB):
CREATE TABLE TEST (
CUST_NO INTEGER NOT NULL,
FIRST_PO_NUMBER COMPUTED BY ((SELECT FIRST 1 PO_NUMBER FROM FROM SALES WHERE SALES.CUST_NO=TEST.CUST_NO ORDER BY ORDER_DATE)),
CUSTOMER_NAME COMPUTED BY ((SELECT CUSTOMER FROM CUSTOMER WHERE CUSTOMER.CUST_NO = TEST.CUST_NO))
);
Resulting table DLL (first computed column source contains all following definitions, second computed column source contains ";"):
CREATE TABLE TEST (
CUST_NO INTEGER NOT NULL,
FIRST_PO_NUMBER COMPUTED BY ((SELECT FIRST 1 PO_NUMBER FROM SALES WHERE SALES.CUST_NO=TEST.CUST_NO ORDER BY ORDER_DATE)),
CUSTOMER_NAME COMPUTED BY ((SELECT CUSTOMER FROM CUSTOMER WHERE CUSTOMER.CUST_NO = TEST.CUST_NO))
);,
CUSTOMER_NAME COMPUTED BY ;
);
The text was updated successfully, but these errors were encountered: