Skip to content
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

Incorrect record size when using computed fields [CORE3165] #3540

Open
firebird-automations opened this issue Oct 7, 2010 · 7 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Maxim Kuzmin (cybermax)

Is related to CORE374

CREATE TABLE TABLE1 (
ID INTEGER,
COMP1 COMPUTED BY (cast('' as varchar(25000))),
COMP2 COMPUTED BY (cast('' as varchar(25000))),
COMP3 COMPUTED BY (cast('' as varchar(25000)))
);

1. When "SELECT * FROM TABLE1", get error: "Implementation limit exceeded. block size exceeds implementation restriction".
2. Backup executed succesfully. But when restore database, get error:
gbak: committing metadata
gbak: ERROR:unsuccessful metadata update
gbak: ERROR: new record size of 75014 byte
gbak: ERROR: TABLE TABLE1
gbak:Exiting before completion due to errors

@firebird-automations
Copy link
Collaborator Author

Commented by: Smirnoff Serg (wildsery)

3. When "SELECT COMP1, COMP2 FROM TABLE1" then OK.

@firebird-automations
Copy link
Collaborator Author

Commented by: Bert Herngreen (bertherngreen)

The block size exceeds implementation restriction means in this case that the maximum rowsize has been exceeded.
3 x 25000 is larger than the Maximum row size of 64k, 2 x 25000 isn't.

So "SELECT COMP1, COMP2 FROM TABLE1" is OK, but "SELECT COMP1, COMP2, COMP3 FROM TABLE1" then fails.

See http://www.firebirdfaq.org/faq61/

@firebird-automations
Copy link
Collaborator Author

Commented by: Maxim Kuzmin (cybermax)

Bert Herngreen, i know the cause of the error. The idea is that Firebird allows to create such a situation, including unrestorable backup.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

summary: Inrorrect record size when using computed fields => Incorrect record size when using computed fields

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE374 [ CORE374 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

This is a regression introduced when fixing inability to restore computed fields based on other metadata. The solution was to restore computed fields as regular ones (just without data) and then alter them to be computed. Unfortunately, the record length check fires for the first table format because of that.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Initial [ 10301 ]

Version: 2.1.3 [ 10302 ]

Version: 2.1.2 [ 10270 ]

Version: 2.1.1 [ 10223 ]

Version: 2.1.0 [ 10041 ]

Component: GBAK [ 10006 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment