Skip to content

Commit d57053c

Browse files
committed
Fix #8675 - fbclient incompatible to older ods
1 parent 7d16861 commit d57053c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/yvalve/blob.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,21 @@ void iscBlobLookupDescImpl(Why::YAttachment* attachment, Why::YTransaction* tran
245245
pp.rdb$package_name is null
246246
)""";
247247

248-
const auto sql = majorOdsVersion >= ODS_VERSION14 ? sqlSchemas : sqlNoSchemas;
248+
constexpr auto sqlNoSchemasNoPackages = R"""(
249+
select f.rdb$field_sub_type,
250+
f.rdb$segment_length,
251+
f.rdb$character_set_id
252+
from rdb$procedure_parameters pp
253+
join rdb$fields f
254+
on f.rdb$field_name = pp.rdb$field_source
255+
where pp.rdb$procedure_name = ? and
256+
pp.rdb$parameter_name = ?
257+
)""";
258+
259+
const auto sql =
260+
majorOdsVersion >= ODS_VERSION14 ? sqlSchemas :
261+
majorOdsVersion >= ODS_VERSION12 ? sqlNoSchemas :
262+
sqlNoSchemasNoPackages;
249263

250264
FB_MESSAGE(InputMessage, CheckStatusWrapper,
251265
(FB_VARCHAR(MAX_SQL_IDENTIFIER_LEN), procedureName)

0 commit comments

Comments
 (0)