Description
Submitted by: Timo Partanen (partim)
Attachments:
callstack.txt
Preparing this query raises an error in Firebird 2.1 RC1:
UPDATE UserGroup SET
ACL = CASE WHEN ID IN ( 1, 2 ) THEN ? ELSE ? END
Prepare SQL statement failed.
SQL error code = -804
Data type unknown (0x80040E14)
Both of the parameters are BLOBs.
I will attach the call stack of the code place in Firebird where the exception is raised.
Comments by Adriano dos Santos Fernandes:
"No. And the problem has nothing to do with blobs.
This is a problem in the way data type of parameters are resolved. It
can't determine the parameters inside the case based on the ACL field.
The workaround is: SET ACL = CASE WHEN ID IN ( 1, 2 ) THEN CAST(? AS
BLOB) ELSE ? END.
Please register this on the tracker."
According to him, the problem appears with FB 2.1 RC2, too.