Comments (3)
So I've finally started working on this. The bad news is that actually no backend even sets the indicator correctly currently, here is the result of the tests:
- Firebird: indicator is
i_ok
(the value is, of course, still truncated). - MySQL: indicator is
i_ok
. - ODBC using PostgreSQL backend: exception thrown.
- PostgreSQL: exception thrown.
- SQLite: indicator is
i_ok
.
I can't test Oracle which is a pity because, looking at the code, this is the only backend which has some code for returning i_truncated
(ODBC backend also has it but clearly this doesn't work there).
Anyhow, I still think that the current situation is wrong, but it's even wronger than I thought and my changes will break the code for all backends (possibly excluding Oracle) as not only will the indicator be set now if available, but also the exception currently thrown by PostgreSQL backend will not be thrown any more. If anybody objects against changing this and sees some other way of fixing this in a more backward compatible manner, please comment.
from soci.
Update: I have now tested with Oracle too and it behaves as PostgreSQL, i.e. an exception is thrown.
So I actually have a new plan: just make all backends throw an exception on truncation except, perhaps, SQLite, which doesn't lose data (even though it doesn't truncate neither).
The main problem I have with this is that I don't know how to make MySQL generate an exception in non-strict mode, would anybody know how to do it? If not, I'll probably just leave MySQL alone.
from soci.
The new plan sounds good 👍
I don't know. @pfedor is our MySQL guru.
from soci.
Related Issues (20)
- MSVC: number of sections exceeded object file format limit
- Issue with Boost 1.84 HOT 6
- Incorrect query result with `use` and `into` into vector, at least for sqlite3. HOT 1
- Incorrect query result with `use` and `into` into vector, at least for sqlite3. HOT 2
- SOCI with MySQL on Linux (Ubuntu) - impossible to link static HOT 12
- Dates before year 1900 stored in Oracle as one hundred years earlier. HOT 1
- Win10, sqlite3 , MultiThread , Can not use into and use . HOT 2
- Getting Invalid Cursor State on mssql - complex queries - Urgent help needed HOT 3
- BLOB does not work in Oracle HOT 11
- Cant use sqlstate(). Undefined reference HOT 2
- Using `row::move_as` while iterating `rowset` yields segmentation fault HOT 3
- Question on how to convert empty std::tm to timestamp and convert back in a MySQL database HOT 2
- Memory Leak when trying to connect to Microsoft SQL Server HOT 3
- How to create database using soci in mysql? HOT 1
- MariaDB? HOT 1
- Query not working through freeTDS works in Microsoft ODBC Driver HOT 4
- fatal error: 'mysql.h' file not found HOT 3
- File "private/soci-trivial-blob-backend.h" missing HOT 4
- Metadata and schemas other than public HOT 2
- CMAKE_RUNTIME_OUTPUT_DIRECTORY Windows compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soci.