#
# We also divide the result by a factor, otherwise the travis VM gets
# overloaded (the amount of available swap is just TOOOO damn small)
-export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 ))"
+# Add one to make sure it doesn't go to zero
+export NUMTHREADS="$(( ( $(perl -0777 -n -e 'print (/ (?: .+ ^ processor \s+ : \s+ (\d+) ) (?! ^ processor ) /smx)' < /proc/cpuinfo) + 1 ) / 3 + 1))"
export CACHE_DIR="/tmp/poormanscache"
run_or_err "Fetching and building Firebird ODBC driver" '
cd "$(mktemp -d)"
- wget -O- http://sourceforge.net/projects/firebird/files/firebird-ODBC-driver/2.0.3-Release/OdbcJdbc-src-2.0.3.154.tar.gz/download | tar -xz
+ wget -O- https://downloads.sourceforge.net/project/firebird/firebird-ODBC-driver/2.0.5-Release/OdbcJdbc-src-2.0.5.156.tar.gz | tar -xz
cd OdbcJdbc/Builds/Gcc.lin
perl -p -i -e "s|/usr/lib64|/usr/lib/x86_64-linux-gnu|g" ../makefile.environ
+ # Fix illegal string concatenation error under C++11
+ perl -p -i -e "s|(\"\.\")| \$1 |g" ../../SetupAttributes.h
make -f makefile.linux
sudo make -f makefile.linux install
'
run_or_err "Create Oracle users" "ORACLE_SID=XE ORACLE_HOME=$SRV_ORA_HOME $SRV_ORA_HOME/bin/sqlplus -L -S system/adminpass @/dev/stdin <<< '
CREATE USER $DBICTEST_ORA_USER IDENTIFIED BY $DBICTEST_ORA_PASS;
- GRANT connect,resource TO $DBICTEST_ORA_USER;
+ GRANT create view,connect,resource TO $DBICTEST_ORA_USER;
CREATE USER $DBICTEST_ORA_EXTRAUSER_USER IDENTIFIED BY $DBICTEST_ORA_EXTRAUSER_PASS;
GRANT connect,resource TO $DBICTEST_ORA_EXTRAUSER_USER;
'"