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

blob_lseek callback not available in UDF...exception due to blob type ("stream only" allowed for this callback fxn) [CORE2466] #2879

Closed
firebird-automations opened this issue May 18, 2009 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Steven Rosenberg (rosenbsn)

When trying to call blob_lseek in a UDF fxn an exception is thrown and the UDF exits without crashing the server. When stepping through the code I noticed that only stream type blobs are allowed to use this function which explains why the exception is caught and thrown. However it would be very useful to be able to seek through the byte buffer in a blob instead of having to read all the way to the point where you want to start copying data.

I am not sure why this functionality is blocked but maybe a special condition can be put into the fun.cpp call when a UDF library is loaded. For example if a method that uses blobs is called the blob structure that is passed to the UDF function is given an address to a different callback fxn for blob_lseek or a flag can be added to the blob that allows a seek to occur correctly within the current blob_lseek callback fxn.

Any thoughts or suggestions?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

AFAIU, this issue has nothing to do with UDFs. The "seek" functionality is available in the public API as well and it has been always (read: by design) limited to stream blobs. If you want to read/write in the middle of the blob, just create stream blobs instead of segmented ones. They exist exactly for that purpose.

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

This is AS DESIGNED.
:-)

@firebird-automations
Copy link
Collaborator Author

Modified by: Claudio Valderrama C. (robocop)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

1 participant