We need to read the entire contents of the CLOB in Oracle backend and
not just the number of bytes corresponding to its length in characters
as returned by OCILobGetLength() because this may (and will) be strictly
less than its full size in bytes for any encoding using multiple bytes
per character, such as the de facto standard UTF-8.
Also make reading CLOBs more efficient by doing what Oracle
documentation suggests and using the LOB chunk size for reading.
Finally, add a unit test checking that using non-ASCII strings in UTF-8
(which had to be enabled for the CI) with CLOBs does work.
This commit is best viewed ignoring whitespace-only changes.
UBSAN gives nonsensical errors for the ODBC job running under Ubuntu
18.04, e.g. it complains that
src/core/session.cpp:246:16: runtime error: member call on address
0x607000000250 which does not point to an object of type
'session_backend'
1: 0x607000000250: note: object is of type 'soci::odbc_session_backend'
which doesn't make any sense because odbc_session_backend is an object
of type session_backend. But apparently something is broken in this
compiler version, so disable UBSAN for this job for now.
It used to be part of macos-12 image but is not present in the later
ones for whatever reason.
Installing postgresql formula using brew already initializes the
database cluster but does it in a non-default directory, so adjust
PGDATA definition accordingly and remove "pg_ctl init" which is not
needed any longer.
This hides any errors during download, making any issues difficult to
diagnose, so break the pipeline in parts in order to better see what is
going on.
The package already installed on the system results in build errors when
trying to use it:
In file included from /usr/include/sql.h:19:0,
from /usr/include/sqlext.h:43,
from /home/runner/work/soci/soci/include/soci/odbc/soci-odbc.h:25,
from /home/runner/work/soci/soci/src/backends/odbc/factory.cpp:9:
/usr/include/sqltypes.h:56:10: fatal error: unixodbc.h: No such file or directory
#include "unixodbc.h"
^~~~~~~~~~~~
so remove it before installing the Debian version.
See https://github.com/microsoft/linux-package-repositories/issues/36
Set Dpkg::Use-Pty=0 to avoid more useless output and use this function
in all CI scripts instead of specifying the same apt-get options in all
of them.
This script must be sourced from all the other ones, including
install.sh which is used to install bash under FreeBSD, so it can't rely
on bash being already available.
It doesn't make much sense to configure this outside of the installation
script when we can already just install it from the script itself.
No real changes.
Pass the option to CMake too, instead of just skipping Boost
installation in this case because this didn't prevent any Boost
libraries already available on the system from being used.
This was always the intention, but it wasn't actually done, resulting in
not enabling -Werror and, also, building static libraries which is more
or less useless.
Under FreeBSD, for example, bash is installed only in /usr/local/bin and
/bin/bash is not available, so use "/usr/bin/env bash" to find it any
location.
As there doesn't seem to be any portable way to pass "-e" option to bash
when using env ("env -S" doesn't work with older GNU coreutils used in
GitHub CI Linux builds), set this option in common.sh once now instead
of doing it on the shebang line of all the scripts.
It would be even better to rewrite the scripts to avoid requiring bash,
but this would require more effort.
This is simpler than parsing /sys/devices/system/cpu/online ourselves
and also works under macOS.
Reduce the number of jobs, 1.5*CPU number is too much, so use more
conservative +1 instead.
Also rename TCI_NUMTHREADS (which was another reference to Travis CI) to
just num_cpus.
Use python3-venv package which should work on all Ubuntu versions,
including Xenial where this script currently runs, and which doesn't
have python3.4-venv.