Skip to content

Return byte array type for OCTETS fields - #1290

Open
alaricd wants to merge 1 commit into
FirebirdSQL:masterfrom
pengdows:fix/octets-field-type-contract
Open

alaricd wants to merge 1 commit into
FirebirdSQL:masterfrom
pengdows:fix/octets-field-type-contract

Conversation

@alaricd

@alaricd alaricd commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1286.

Root cause

GetFieldType mapped CHAR/VARCHAR fields to string regardless of charset. GetValue returns byte[] for fields using the OCTETS character set, so the two disagreed.

Change

GetFieldType returns byte[] for CHAR/VARCHAR fields using the OCTETS character set, matching GetValue. The existing Guid mapping is unchanged.

Tests

  • GetFieldTypeMatchesGetValueForOctetsTest: fails without the fix (Expected: byte[]).
  • Run locally against Firebird 5.0.2: all runnable variants pass. Embedded and wire-encryption variants could not run here.

Verification gaps

  • Firebird 3.0 and 4.0 not run locally.
  • Embedded and CryptRequired variants not run locally.

AI disclosure

This change was prepared with AI assistance (Claude Code).

🤖 Generated with Claude Code

@alaricd
alaricd force-pushed the fix/octets-field-type-contract branch from a62ee5b to 929cf74 Compare November 4, 2026 13:50
@alaricd
alaricd force-pushed the fix/octets-field-type-contract branch from 929cf74 to 651fa8b Compare November 5, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return byte[] from GetFieldType for OCTETS text fields

2 participants