This prevents valgrind reports like:
==18426== Conditional jump or move depends on uninitialised value(s)
==18426== at 0x6423EB5: Poco::Data::StatementImpl::execute(bool const&) (in /usr/lib/libPocoDatad.so.46)
==18426== by 0x641DB5F: Poco::Data::Statement::execute(bool) (in /usr/lib/libPocoDatad.so.46)
==18426== by 0x632A0C: Poco::Data::Keywords::now(Poco::Data::Statement&) (Statement.h:443)
==18426== by 0x641C8E5: Poco::Data::Statement::operator,(void (*)(Poco::Data::Statement&)) (in /usr/lib/libPocoDatad.so.46)
...
==18426== Uninitialised value was created by a stack allocation
==18426== at 0x6A1A170: Poco::Data::ODBC::ODBCStatementImpl::affectedRowCount() const (in /usr/lib/libPocoDataODBCd.so.46)
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
This fixes problems when a project adds a directory to
CMAKE_PREFIX_PATH, then calls find_package(Poco ...) and afterwards
calls find_package() for another project located in one of the
directories of the original CMAKE_PREFIX_PATH variable.
This fixes a bug where Poco would return a string 1 character shorter than is actually in the DB (when the string in the DB uses the full length of a CHAR(N) or VARCHAR(N) column).
- Add missing CMakeLists.txt
- Use POCO_ macros to improve code structure in XCode/VisualStudio
- Better ODBC detection
- Remove unnecessary commented out code
The CMake documentation recommends explicitly listing source files, but because CMake is not the primary build system GLOB patterns are used for the moment.
The SQLGetConnectAttr() function can write up to 64-bit integers, as documented by MSDN here: http://msdn.microsoft.com/en-us/library/ms710297%28v=vs.85%29.aspx
This fix uses 64-bit integers instead of 32-bit ones, the original code corrupted the stack when used on win7-x64 with MSSQL 2008.
- explicitly list files
- use find_package for MySQL and ODBC
- remove unused code
- remove unnecessary include dirs
- support unbundled SQLite3
- replace tabs by spaces
Reviewed-by: Roger Meier <r.meier@siemens.com>
For a unix system, this commit implies no changes by default. However, the ${LIB_SUFFIX} convention was added so the build can be configured for a red-hat style installation which uses lib64 by specifying cmake -DLIB_SUFFIX=64
For a windows build (msvc), this commit will cause the .dll files to be installed in the bin/ path; import libraries .lib are still installed in the lib/ path. Installing dlls into the bin path is preferable because dlls must be in the executable %PATH% to be found at runtime, as there is not equivalent of a separate library path as there is on unix.
- removed naked pointers from Data interfaces
- fixed GH #82: name conflict in Data::Keywords::bind
- fixed GH #157: MySQL: cannot bind to 'long' data type on
Windows/Visual C++
- fixed GH #158: MySQL: MYSQL_BIND 'is_unsigned' member is not set