diff --git a/.travis.yml b/.travis.yml index 02a4f4a..0d0a7f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,12 @@ env: - OS=ubuntu DIST=yakkety - OS=debian DIST=wheezy - OS=debian DIST=jessie + - OS=ubuntu DIST=precise ARCH=i386 + - OS=ubuntu DIST=trusty ARCH=i386 + - OS=ubuntu DIST=xenial ARCH=i386 + - OS=ubuntu DIST=yakkety ARCH=i386 + - OS=debian DIST=wheezy ARCH=i386 + - OS=debian DIST=jessie ARCH=i386 matrix: exclude: @@ -60,6 +66,20 @@ matrix: compiler: clang - env: OS=debian DIST=stretch compiler: clang + - env: OS=ubuntu DIST=precise ARCH=i386 + compiler: clang + - env: OS=ubuntu DIST=trusty ARCH=i386 + compiler: clang + - env: OS=ubuntu DIST=xenial ARCH=i386 + compiler: clang + - env: OS=ubuntu DIST=yakkety ARCH=i386 + compiler: clang + - env: OS=debian DIST=wheezy ARCH=i386 + compiler: clang + - env: OS=debian DIST=jessie ARCH=i386 + compiler: clang + - env: OS=debian DIST=stretch ARCH=i386 + compiler: clang - env: OS=el DIST=6 os: osx - env: OS=el DIST=7 @@ -176,6 +196,15 @@ script: else git clone https://github.com/akopytov/packpack.git packpack packpack/packpack + + # To avoid name conflicts, deploy source packages only for + # "default", i.e. x86_64 architecture + if [[ -z "${ARCH}" ]]; then + PACKAGECLOUD_GLOB='build/*.{rpm,deb,dsc}' + else + # Exclude *.src.rpm and *.dsc + PACKAGECLOUD_GLOB='build/*{[^c].rpm,.deb}' + fi fi deploy: @@ -185,7 +214,7 @@ deploy: repository: "${PACKAGECLOUD_REPO}" token: "${PACKAGECLOUD_TOKEN}" dist: "${OS}/${DIST}" - package_glob: build/*.{rpm,deb,dsc} + package_glob: "${PACKAGECLOUD_GLOB}" skip_cleanup: true on: all_branches: true diff --git a/debian/control b/debian/control index 248d647..4d41fbc 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: sysbench Section: misc Priority: extra Maintainer: Alexey Kopytov -Build-Depends: debhelper, autoconf, automake, libtool, libmysqlclient-dev, pkg-config, vim-common, python-minimal +Build-Depends: debhelper, autoconf, automake, libtool, libmysqlclient-dev, libpq-dev, pkg-config, vim-common, python-minimal Standards-Version: 3.9.5 Homepage: https://github.com/akopytov/sysbench diff --git a/debian/rules b/debian/rules index af2cecd..8012a70 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ override_dh_auto_configure: dh_testdir autoreconf -vif - dh_auto_configure + dh_auto_configure -- --with-mysql --with-pgsql --without-gcc-arch override_dh_compress: dh_compress -X.lua diff --git a/m4/sb_concurrency_kit.m4 b/m4/sb_concurrency_kit.m4 index 661816e..bf318ad 100644 --- a/m4/sb_concurrency_kit.m4 +++ b/m4/sb_concurrency_kit.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2016 Alexey Kopytov +# Copyright (C) 2016-2017 Alexey Kopytov # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -43,11 +43,20 @@ AS_IF([test "x$sb_cv_lib_ck" = "xsystem"], CK_CFLAGS="-I\$(abs_top_builddir)/third_party/concurrency_kit/include" CK_LIBS="\$(abs_top_builddir)/third_party/concurrency_kit/lib/libck.a" - # Assume 128-byte cache line on AArch64 and PowerPC case $target_cpu in powerpc*|aarch64) + # Assume 128-byte cache line on AArch64 and PowerPC CPPFLAGS="${CPPFLAGS} -DCK_MD_CACHELINE=128" ;; + # Force --platform=i*86 for CK, otherwise its configure script + # autodetects target based on 'uname -m' which doesn't work for + # cross-compiliation + i486*|i586*) + CK_CONFIGURE_FLAGS="--platform=i586" + ;; + i686*) + CK_CONFIGURE_FLAGS="--platform=i686" + ;; esac # Add --enable-lse to CK build flags, if LSE instructions are supported by # the target architecture diff --git a/rpm/sysbench.spec b/rpm/sysbench.spec index 75c286d..2ca481d 100644 --- a/rpm/sysbench.spec +++ b/rpm/sysbench.spec @@ -54,6 +54,7 @@ export CFLAGS="%{optflags}" autoreconf -vif %configure --with-mysql \ --with-pgsql \ + --without-gcc-arch %if 0%{?el6} make -j2 diff --git a/src/drivers/mysql/drv_mysql.c b/src/drivers/mysql/drv_mysql.c index c9780f2..0617904 100644 --- a/src/drivers/mysql/drv_mysql.c +++ b/src/drivers/mysql/drv_mysql.c @@ -49,8 +49,9 @@ #define SAFESTR(s) ((s != NULL) ? (s) : "(null)") -/* FIXME */ -db_bind_t *gresults; +#if MYSQL_VERSION_ID >= 80001 +typedef bool my_bool; +#endif /* MySQL driver arguments */ @@ -651,9 +652,6 @@ int mysql_drv_bind_result(db_stmt_t *stmt, db_bind_t *params, size_t len) bind[i].is_null = params[i].is_null; } - /* FIXME */ - gresults = params; - rc = mysql_stmt_bind_result(stmt->ptr, bind); DEBUG("mysql_stmt_bind_result(%p, %p) = %d", stmt->ptr, bind, rc); if (rc)