Commit Graph

767 Commits

Author SHA1 Message Date
Günter Obiltschnig
d5a5ebc2d7 enh: #3890: Get rid of SingletonHolder 2024-01-30 09:56:27 +01:00
Matej Kenda
843ed4345e
gcc/clang (-fvisibility=hidden): corrections to compile and work properly (#4394)
* fix(ActiveRecord): missing ActiveRecordLib_API definitions for clang/gcc.

* fix(FPEnvironment): export FPEnvironmentImpl classes (#4393, #3331)

* fix(Crypto): export *Impl classes used from inlines (#4393, #3331)

* fix(Dynamic): explicitly instantiate and export Dynamic::Struct for string and int (-fvisibility=hidden) (#4393, #3331)

* fix(JSON): explicitly instantiate and export SharedPtr for JSON::Array and JSON::Object (-fvisibility=hidden) (#4393, #3331)

* enh(CMake): Set symbol visibility to hidden (#4393, #3331)

* enh(configure): user c++17 standard for iphone, Darwin and ARM-Linux.

* fix(UTF): explicitly instantiate and export 16 and 32-bit strings (-fvisibility=hidden) (#4393, #3331)

* fix(RecordSet): make Extraction.h internal and instantiate RecordsSet::column template functions only for supported types. (-fvisibility=hidden) (#4393, #3331)

* fix(UTF): fix explicitly instantiation on Windows (-fvisibility=hidden) (#4393, #3331)

* enh(CMake): Add github jobs for macOS with visibility set to hidden (#4393, #3331)

* fix(CppParser): Add missing declarations for CppParser_API (#4393, #3331)

* enh(CMake): Enable more options in github jobs for macOS with visibility set to hidden (#4393, #3331)

* fix(MongoDB): Add missing MongoDB_API (#4393, #3331)
2024-01-17 14:13:24 +01:00
Aleksandar Fabijanic
64dbfab0fa
4398 dont install cppunit (#4399)
* chore(SingleSocketPoller): spelling

* fix(CppUnit): do not install #4398

* fix(DataTest): do not install #4398
2024-01-16 00:03:33 +01:00
Alex Fabijanic
9c7cba6d6c backport leftover 1.12 changes 2023-12-22 20:22:33 +01:00
Aleksandar Fabijanic
86084cb7b2
feat(Data::AbstractSessionImpl): add autoCommit property and tests #4261 (#4262)
* fix(Data::AbstracSessionImpl): protect autocommit feature handlers #4261

* chore(CI): re-enable mysql

* MySQL SessionImpl: make sure autocommit mode is on when session is openend or reset.

* PostgreSQL SessionImpl: reuse autocommit flag of AbstractSessionImpl.

* Github workflow: re-activated linux-gcc-make-postgres

* Fixed indentation in ci.yml

* Fix for DataTest SQLExecutor: use connector

* Data::Session: when parser is not used and autocommit mode is off, assume any SQL statement begins a transaction.

* PostgreSQL: don't use SQL parser (it currently cannot handle placeholders).

* PostgreSQL: added test sessionTransactionNoAutoCommit

* PostgreSQL test suite: removed reference to generic SQLExecutor

* PostgreSQL: fixes for sessionTransactionNoAutoCommit.

* MySQL: added test sessionPoolAndUnicode (from #2801)

* Fixed #define in sql-parser

* Data generic testsuite: support numbered placeholders

* PostgreSQL test suite: added missing include directory to Makefile.

* Attempt to fix PostgreSQL Makefiles

* PostgreSQL testsuite: added include path to Makefile

* PostgreSQL testsuite: added PocoDataTest library to Makefile

* DataTest SQLExecutor::formatSQL: don't use string_view

* PostgreSQL test suite: delegated most tests to Poco::Data::Test

* Makefile: added dependencies on Data-Tests

* Weaken assumptions about async in generic transaction tests

* Makefile: added dependency for Prometheus samples

* Fix deadlock in DataTest SQLExecutor

* PostgreSQL tests SQLExecutor: cleanup

* feat(Data::AbstractSessionImpl): add autoCommit property and tests #4261

* Brought MySQL backend in line with _autoCommit flag of AbstractSessionImpl.

---------

Co-authored-by: Friedrich Wilckens <frwilckens@gmail.com>
Co-authored-by: Friedrich Wilckens <friedrich.wilckens@ingramcontent.com>
2023-12-22 09:27:34 +01:00
Kari Argillander
d1d557a4f7 Remove vs140 and vs150 project files
As we now only support C++17 these does not make much sense to keep.
2023-12-18 17:26:13 +01:00
Kari Argillander
bf3c519183
Fix some issues found with clang-tidy (#4353)
* directoryiterator: Fix missing inline

Add missing inline to inline function.

This was found with clang-tidy check:  misc-definitions-in-headers

* Convert deprecated throw() to noexcept

throw() has been deprecated in standar in C++17. It has been removed in
C++20. Code still compiles but let's just define these at those should
be.

These where found with clang-tidy check: modernize-use-noexcept

* Fix unnecessary copy initializations

Clang-tidy did find these with check:

  performance-unnecessary-copy-initialization

* Fix some strings not references

Looks like these are just missing reference marks.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-17 16:55:30 +01:00
Matej Kenda
214b54460e mingw 11: fixes to compile common libraries 2023-12-14 19:02:11 +01:00
Kari Argillander
708a5d8307
RFC: Remove Windows CE support (#4342)
* Remove _WIN32_WCE macro

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove WinCE support from build files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. Remove all
references from build systems / scripts.

* Remove Windows CE related source and header files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove wcelibcex folder

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove rest Windows CE mentions

There where some Windows CE mentions left. Remove those.

* Update Windows CE documentation

We should keep documentation some time so people can find reason for
remove.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-14 00:25:04 +01:00
Matej Kenda
54f0feb282 fix(ci): Partially revert "add sendfile method for streamsocket (#4007)"
This reverts commit 24b7122f43.
2023-12-12 22:13:00 +01:00
Alexander B
24b7122f43
add sendfile method for streamsocket (#4007)
* add sendfile method for streamsocket

* add mswsock.lib to the project files and templates

* remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build

* merge from upstream

* merge from upstream

* fix code stile
add NotImplemented exception for unsupported platforms
exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https://
github.com/emscripten-core/emscripten/pull/16234

* add iostream include for std::cout

* fix compilation for emscripten (wrap sendfile)
2023-12-11 10:47:03 +01:00
Owen Knight
9141368eca
Make Binding and CopyBinding specializations final (#4022)
The Binding specializations call it virtual functions numOfRowsHandled()
and reset() from their constructors. This is fine assuming virtual
function dispatch to a further derived class was not intended. In this
case the assumption is solid, however this triggers the Clang diagnostic
clang-analyzer-optin.cplusplus.VirtualCall

Adding the final specifyer to these specializations gives Clang enough
of a hint to silence
2023-11-27 03:52:37 +01:00
Pavle Dragisic
70bb3a40de
Add ProcessRunner and PIDFile (#4225)
* feat(Foundation): PIDFile and ProcessRunner #4064
* feat(Thread): optional signal blocking on POSIX #2978
* fix(ProcessRunner):remove logger, code enhancement #4225
* feat(Foundation): add PIDFile and ProcessRunner Tests #4064
* fix(Foundation): failing ProcessRunner Test #4064
* fix(PIDFile): remove append argument #4064
* remove Windows TODO from ProcessRunner #4064
* feat(ProcessRunnerTest): add line to checkTimeout #4064
* fix(ProcessRunner): add done flag to run() #4064
* fix(ProcessRunnerTest): add missing pidFile argument #4064
* chore(ProcessRunner): remove comments #4064
* fix(ProcessRunner): add runCount flag #4064
* fix(test): SharedLibrary and Class tests paths
* fix(ProcessRunner): thread sanitizer reported data races #4064
* fix(build): pass env var to testrunner #4064
* chore(PIDFile): remove ; in comments #4064
* feat(ProcessRunner): add Win argument format #4064
* fix(Tests): add ProcessRunnerTest to vcxproj #4064
* fix(Tests): change path to TestApp #4064
* feat(Tests): windows processrunner tests #4064
* fix(Tests): duplicate  ProcessRunnerTest in TestSuite vcxproj  #4064
* fix(CodeQL): sw declaration hides variable  #4064
* fix test binaries path for cmake
* fix(Build): missing include/PIDFile.h buildWin #4064
* fix(Build): add PocoFoundation depend in buildWin #4064
* feat(ProcessRunner): test process launching multiple threads #2976

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2023-11-24 20:22:01 +01:00
Aleksandar Fabijanic
54d3c7b351
SessionPool idle connections should behave as a FIFO queue (#3951) (#4264)
Co-authored-by: Friedrich Wilckens <friedrich.wilckens@ingramcontent.com>
2023-11-13 10:28:08 +01:00
Aleksandar Fabijanic
a9f889f5cf fix: misspelled define 2023-11-11 19:12:48 +01:00
Aleksandar Fabijanic
10ad89594a
Win build fix (#4260)
* fix(SQLParser): use Data_API if available

* fix(ProGen): wrong AdditionalOptions separator #4259

* fix(SQLParser): add default export define when embedded
2023-11-11 11:08:18 +01:00
Aleksandar Fabijanic
5fa1779f22
Merge pull request #4257 from pocoproject/4244-postgres-setAutoCommit-should-not-call-startTransaction
4244 postgres set auto commit should not call start transaction
2023-11-10 12:52:32 +01:00
Aleksandar Fabijanic
940c9b48ff
Merge pull request #4256 from pocoproject/4247-mysql-startTransaction
Implement MySQL::SessionHandle::startTransaction as submitting the SQL statement 'BEGIN'
2023-11-10 12:52:06 +01:00
Aleksandar Fabijanic
9e90fcbcea
Merge pull request #4239 from pocoproject/4231-PostgreSQL-leaks-memory-for-failed-connections
4231 postgre sql leaks memory for failed connections
2023-11-10 12:51:36 +01:00
Aleksandar Fabijanic
bda0cd1a07
Merge branch 'devel' into 4230-data-fixes-improvements 2023-11-10 12:18:25 +01:00
Aleksandar Fabijanic
f4ae6f66a6 fix(build): SQLite VS2019 projects 2023-11-10 10:54:56 +01:00
Aleksandar Fabijanic
1022d495b4 fix(build): regenerate vs160 Data-dependent projects; temporarily disable all CI jobs except VS2019 buildwin 2023-11-10 10:12:41 +01:00
Aleksandar Fabijanic
30006b4e20 enh(Data): regenerate VS projects; add DataTest VS projects 2023-11-10 02:19:29 +01:00
Aleksandar Fabijanic
be52ced34a fix(SQLParser): static linking error on windows 2023-11-10 02:15:34 +01:00
Pavle
56f6caf8cf fix(Data): Automatically link Data lib WIN 2023-11-09 17:02:35 +01:00
Nino Belušić
83d50284e0
4249 separate ci odbc tests into separate job (#4251)
* feat(CI): separate odbc tests into separate job #4249

* fix(CI): fix ODBC test server address #4249

* fix(CI): disable MySQL ODBC tests #4249

* chore(ci): remove unneeded sql server and oracle jobs #4249

* fix(CI): disable Oracle ODBC tests #4249

* fix(CI): disable Postgres ODBC tests #4249

* Update ci.yml (add newline)

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
2023-11-07 20:58:41 +01:00
Aleksandar Fabijanic
90f64af087 fix(build): update buildwin.ps1 script for ARM64; regenerate Data dependent VS2022 projects 2023-11-06 12:32:17 +01:00
Aleksandar Fabijanic
05645bff15 fix(cmake): add missing Data define 2023-11-06 11:00:07 +01:00
Aleksandar Fabijanic
78234857bf feat(ProGen): default to c++17 2023-11-05 23:40:47 +01:00
Alex Fabijanic
81d7307fa7 fix(Data):
adjust make and CMake for SQLParser and DataTest lib
separate samples from tests in CMake
remove unused StatementImpl from Data testsuite
2023-11-04 23:11:38 +01:00
Friedrich Wilckens
8baa2f9c34 Implement MySQL::SessionHandle::startTransaction as submitting the SQL statement 'BEGIN' 2023-11-03 20:15:12 -07:00
Friedrich Wilckens
8740816c78 PostgreSQL SessionHandle: const fixes. 2023-11-03 19:48:52 -07:00
Nino Belušić
90dd3821ed
CI improvements (#4236)
* feat(ci): run pull request runs only on pull request open #4205

* feat(ci): add retry action for tsan #4205

* feat(ci): use local action for retrying tsan #4205

* fix(ci): use correct version of retry action #4205

* fix: make POSIX event thread safe

* feat(ci): add info on retry action to ci.yml header #4205

* feat(ci): add linux mysql test #4205

* feat(ci): remove unused mysql containers from tests#4205

* feat(ci): add linux postgre test #4205

* feat(ci): add linux redis test #4205

* feat(ci): add linux mongodb tests #4205

* feat(ci): add mysql odbc test #4205

* chore(ci): rename tests #4205

* chore(ci): pin postgres and mysql versions #4205

* feat(ci): add odbc postgres tests #4205

* chore(ci): mysql odbc comment #4205

* chore(ci): disable windows 2019 job #4205

* feat(ci): add linux oracle tests #4205

* chore(ci): disable oracle tests #4205

* feat(ci): add sql server tests #4205

* chore(ci): disable postgres tests #4205

* chore(ci): add logging for task test #4205

* feat(ci): add local retry action #4205

* feat(ci): ignore process kill failure in action #4205

* feat(ci): send SIGKILL instead of SIGTERM in action #4205

* chore(ci): add updated action #4205

* chore(ci): reduce tsan timeout #4205

* feat(ci): kill process without children #4205

* feat(ci): send SIGTERM to child in action #4205

* feat(ci): prolong tsan timeout #4205

* chore(ci): add missing newlines #4205

* fix(ci): revert sql server test FreeTDS version #4205

* feat(ci): add retry to all jobs #4205

* feat(ci): setup python for codeQL #4205

* chore(ci): disable throwing on codeql error #4205
2023-11-03 14:34:31 +01:00
Friedrich Wilckens
6eec8adfcb PostgreSQL SessionHandle: don't call startTransaction in setAutoCommit 2023-11-02 19:45:28 -07:00
Aleksandar Fabijanic
5e6bb8e396 fix(ODBC): mac build and run #4230 2023-11-03 00:10:01 +01:00
Alex Fabijanic
73e191f185 chore: add missing header path, revert inadvertent db server address dev change 2023-11-02 22:29:27 +01:00
Alex Fabijanic
596bd0ef23 enh(Data): move SQLExecutor to a library in Poco::Data testsuite #4230 2023-11-02 22:27:17 +01:00
Alex Fabijanic
4f0315aeb0 feat(Data::Statement): make statementsCount() Optional 230 2023-11-02 00:28:18 +01:00
Alex Fabijanic
afd9c8c408 feat(Data::Session): add 'sqlParse' feature #4230 2023-11-02 00:04:10 +01:00
Alex Fabijanic
757fc32199 fix(build): add missing include path 2023-11-01 16:29:49 +01:00
Aleksandar Fabijanic
b1e7b9ff3b fix(Data::SQLChannel): remove SQLChannel::close() parameter (hides virtual from parent) #4230 2023-11-01 11:26:29 +01:00
Alex Fabijanic
6dad8502d3 fix(Data):
* make bool Session::isTransaction() return Poco::Optional
* move parsing to Statement
* SQLParser make build
* other fixes and improvemets #4230
2023-11-01 00:25:46 +01:00
Friedrich Wilckens
512e63915b PostgreSQL: when connecting, free old bad connection if there is one. 2023-10-30 14:00:15 -07:00
Friedrich Wilckens
9fcc2fd54d PostgresSQL: make sure session is freed when disconnecting even if its status is not OK. 2023-10-30 13:50:45 -07:00
Friedrich Wilckens
0024f3621b PostgreSQL failed connection test: cleanup. 2023-10-30 13:28:09 -07:00
Friedrich Wilckens
148affed30 PostgreSQL: added test case for failed connection attempt. 2023-10-30 13:23:18 -07:00
Friedrich Wilckens
c7b6fa17be Poco::Data::PostGreSQL::SessionHandle: free _pConnection when connection attempt fails. 2023-10-29 13:53:11 -07:00
Aleksandar Fabijanic
e174be8660 feat(SQLParser): add POCO::Data::SQLParser #4230 2023-10-29 15:03:26 +01:00
Alex Fabijanic
439acf1924 fix(Data): transactions are not handled properly #4230 2023-10-27 17:45:39 +02:00
Alex Fabijanic
efd9b2ca1d feat(Data::ODBC) add MARS support #4230 2023-10-27 16:01:33 +02:00