Commit Graph

780 Commits

Author SHA1 Message Date
Günter Obiltschnig
3f1b1c8ee8 dependencies, DataTest 2024-02-19 15:15:48 +01:00
Friedrich Wilckens
a64e6cf2f6 Fixed transaction handling in MySQL test when SQL parser is switched off 2024-02-16 01:00:05 +01:00
Alex Fabijanic
137cd32183 fix(test): Disable SQL parsing by default #4462 2024-02-16 00:59:45 +01:00
Alex Fabijanic
2fe694e4d3 fix(SQLParser): Disable SQL parsing by default #4462 2024-02-16 00:59:31 +01:00
Alex Fabijanic
1a29ecde02 fix(SQLParser): remove fwd header #4453 2024-02-14 10:21:06 +01:00
Alex Fabijanic
e622b51d6b fix(SQLParser): remove leftover unnecessary includes 2024-02-14 09:53:52 +01:00
Aleksandar Fabijanic
499a7d35f9 fix(build): regenerate VS projects #4453 2024-02-14 00:25:14 +01:00
Alex Fabijanic
c990b9f890 fix(build): Data libs CMakeLists #4453 2024-02-14 00:24:57 +01:00
Alex Fabijanic
b82fca8337 fix(build): ODBC Makefile and Data libs CmakeLists #4453 2024-02-14 00:24:39 +01:00
Matej Kenda
0088334536 fix(Data): Make SQLParser internal 2024-02-14 00:24:19 +01:00
Alex Fabijanic
ee39b611f2 fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation 2024-02-14 00:23:38 +01:00
Aleksandar Fabijanic
5bdbab6c5c
enh(SQLite): SQLite FTS5 #4367 (#4433) 2024-02-01 09:53:06 +01:00
Aleksandar Fabijanic
c7d16b2a7e
4368 oracle odbc tests (#4410)
* feat(format): Add string_view format type spec #4409

* chore(Types): add demangle

* fix(Data): Oracle failing ODBC tests #4368

* fix some CQL and fuzz warnings; add Var::typeName()

* fix(build): -std=c++17 and c11

* fix windows build

* fix(Foundation): test apps vs projects c++17

* chore(build): remove uneeded compiler flag

* fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz)

* fix(test): CIFuzz

* fix(CIFuzz): another attempt

* fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects

* fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic

* enh(Var): silent loss of precision on int->float conversion #4423

* enh(Var): silent loss of precision on int->float conversion #4423

* chore(build): remove old build files

* chore: fix missing parens warning

* enh(Thread_POSIX): prevent double-joining; add error description to exceptions

* fix(Data): unresolved Column<long> linkage in test

* fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures

* chore(buildwin): remove old vs versions from build and progen scripts; update documentation

* chore(buildwin): remove leftover closing curly
2024-01-31 22:07:07 +01:00
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