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

Oracle incorrect DDL handling #1087

Open
Sildra opened this issue Oct 11, 2023 · 2 comments
Open

Oracle incorrect DDL handling #1087

Sildra opened this issue Oct 11, 2023 · 2 comments
Labels

Comments

@Sildra
Copy link
Contributor

Sildra commented Oct 11, 2023

I sent a std::numeric_limits<long long>::max() in a table created with the ddl, type dt_long_long (value 9223372036854775807), in the database, the value is -9223372036854775808.

@Sildra Sildra changed the title Oracle doesn't support std::numeric_limits<long long>::max() in number Oracle incorrect DDL handling Oct 13, 2023
@Sildra
Copy link
Contributor Author

Sildra commented Oct 13, 2023

Proposal for the fix :
Sildra@63d20b5

SOCI may truncate integer with 10 digits.
SOCI may ignore the sign of unsigned long long (integer with 20 digits).
SOCI handle doubles perfectly.

@vadz
Copy link
Member

vadz commented Oct 15, 2023

Using binary_double for double columns looks like a good idea (as an aside, we should drop get_double_sql_type() and just use SQLT_BDOUBLE, it seems useless to keep compatibility with Oracle 9.x and earlier which is surely not used any more?) and so does using the correct precision for number, so please don't hesitate to make a PR with your changes.

If I could wish for something here, it would be to make the test code simpler to understand as it's really difficult to follow. Generally speaking, the more straightforward the testing code is, easier it is to fix any problems when it breaks, so it would be nice to keep it as simple as possible even at the price of making it less generic/complete.

TIA!

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

No branches or pull requests

2 participants