This is extremely slow in GitHub Actions environment, resulting in the
"empty" backend test execution taking 814 seconds instead of 2 without
it, and all the other, non trivial, tests simply timing out.
We don't really need it anyhow an it got apparently enabled accidentally
due to DEBUGINFOD_URLS being set to https://debuginfod.ubuntu.com in the
latest GitHub runner Ubuntu images.
This was broken by c35b1b6a (Avoid disabling MSVC CRT security warnings
globally, 2025-06-08) which implicitly replaced std::strncpy() calls in
Oracle vector use type backend with the calls to soci::strncpy() which
doesn't behave in the same way as the standard function, e.g. it can't
be used with n==0 and it always NUL-terminates the destination buffer.
Restore the original strncpy() behaviour to fix this.
See #1268.
Don't redeclare the same variables or do redeclare it but reduce the
scope of a previously declared variable with the same name to avoid
shadowing.
No real changes.
This commit is best viewed ignoring whitespace-only changes.
The use of this function is discouraged but it may sometimes be
necessary and get_backend_name() is insufficient to determine the
database being used because ODBC backend can be used with any of them.
Set errno to 0 to avoid spurious errors if strto[u]ll() succeeded.
This corrects a regression introduced in 42c80b61 (Fix bug in
cstring_to_integer() for out of range inputs, 2026-04-28).
This operator needs to be defined to satisfy weakly_incrementable
concept required for input iterators, but it can be implemented to do
the same thing as pre-increment and, crucially, not return anything, as
doing this wouldn't make sense here because we can't preserve a copy of
the iterator before the increment.
See #1327.
Since private dependencies might also require propagating them to the
installed config file, we need to extend our dependency wrapper to deal
with it. It automatically checks whether propagation is required or not.
This avoids problems with dbgsym packages that regularly get out of sync
and should also be faster, as the debug symbols will only be retrieved
if necessary instead of being done every time the job runs.
This commit is best viewed ignoring whitespace-only changes.
See #1352.
This now avoids issues in case we search for a dependency more than once
and switches to creating imported targets instead of interface ones. The
former have the correct semantics when it comes to things like
installation etc. and also they will be scoped to the calling directory
or lower, avoiding clutter in unrelated (super) projects.
See #1351.
Use fmt::format() to build them directly instead, this is much simpler.
Also get rid of useless and trivial check_sqlite_err() function to
simplify the code a bit more.
We now only define our targets if they don't exist yet to avoid errors
due to redefining them if find_package(SOCI) is done more than once.
Note that multiple calls to find_package(SOCI) that specify different
components will cause all call-sides to use the superset of all
requested components as targets are global (and hence also their link
dependencies).
Fixes#1344.
See #1346.
Using header-only library for static build and building shared library
for shared build was inconsistent and the rationale given for avoiding
creating a separate library for the static build also applies in the
latter case too, so just always use header-only fmt variant to avoid
imposing extra linking requirements on SOCI users.
Originally, the indicator passed by the user was copied into a stored-for-later
variable. This value could have been overwritten during conversion of the bound
parameter to its base type.
Signed-off-by: Innokentiy Alaytsev <alaitsev@gmail.com>
The tests are expected to fail, because the value of an indicator, passed to the
soci::values::set() function is replaced with the value returned from the
type_conversion::to_base() function. Since it is possible that a valid value was
passed alongside the i_null indicator, e.g., for setting an integer field to
NULL, the type_conversion::to_base() function might return i_ok, as the default
implementation of the function does.
The problematic behaviour is not detected by the existing tests.
Signed-off-by: Innokentiy Alaytsev <alaitsev@gmail.com>
Provide soci_error constructors taking a format string and an argument
instead.
This is still unsafe, because we lose the compile-time check of the
format string, but is slightly less ugly than defining format() in our
own namespace.