Skip to content

fix(FB_MESSAGE): Use correct SQL types for FB_DATE and FB_TIME#9064

Open
TreeHunter9 wants to merge 1 commit into
FirebirdSQL:masterfrom
TreeHunter9:master_fb_message_incorrect_types
Open

fix(FB_MESSAGE): Use correct SQL types for FB_DATE and FB_TIME#9064
TreeHunter9 wants to merge 1 commit into
FirebirdSQL:masterfrom
TreeHunter9:master_fb_message_incorrect_types

Conversation

@TreeHunter9

Copy link
Copy Markdown
Contributor

I have accidentally found that FB_DATE is unfolding into:

                    builder->setType(status, index, 510);
                    builder->setLength(status, index,
                                       sizeof(::Firebird ::FbDate));

Where 510 is SQL_TIMESTAMP, and sizeof(::Firebird ::FbDate) is 4. It creates mismatch in offsets between metadata and data buffer (message buffer), that can lead to unpredictable result (I have seen a insert data has been corrupted and NULL was inserted instead of real data).

And FB_TIME uses a non-existent SQL type.

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.

1 participant