Issue Details (XML | Word | Printable)

Key: CORE-4113
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Attila Molnár
Votes: 0
Watchers: 1

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

EXECUTE BLOCK prepare fails

Created: 07/Jun/13 06:30 AM   Updated: 25/Sep/15 01:07 PM
Component/s: Engine
Affects Version/s: 2.5.2
Fix Version/s: 2.5.3

File Attachments: 1. File execute block.sql (45 kB)
2. Zip Archive TEST.ZIP (50 kB)

Issue Links:

QA Status: Done successfully
Test Details:
Confirmed for 2.5.2: error raises, text:
Statement failed, SQLSTATE = 42000
attempted update of read-only column

 Description  « Hide

I get error when prepare an EXECUTE BLOCK :
"This column cannot be updated because it is derived from an SQL function or expression.
attempted update of read-only column."

sql and database files are attached

Note, when I pu t the last insert statement to first there is no error.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 07/Jun/13 09:46 AM
The problem is that length of the generated BLR oveflows the 64KB limit and some engine parts are not ready for that.

Attila Molnár added a comment - 07/Jun/13 09:49 AM
Again : Note, when I pu t the last insert statement to first there is no error.
The sql text has the same length, only command order changes and the BLR in 1st case is >64k in 2nd case smaller? That is strange.

How can I avoid this?

Dmitry Yemanov added a comment - 07/Jun/13 09:53 AM
v3 is not affected.

Dmitry Yemanov added a comment - 07/Jun/13 09:57 AM
I've committed a bugfix. But generally, I'd avoid such long blocks.

The issue is not that its BLR is bigger or smaller. It's about wrapping the BLR offset over the 64KB boundary (thus becoming kinda random) and either occasionally matching some value inside the debug info table or not. In other words, it's about pure luck.