diff --git a/.travis.yml b/.travis.yml index 5b8066dd..a01a75f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,14 +8,6 @@ env: matrix: include: - - os: linux - dist: trusty - sudo: false - service: mysql - addons: - apt: - packages: - - libmariadbclient-dev - os: linux dist: trusty sudo: false @@ -25,11 +17,6 @@ matrix: apt: packages: - libmysqlclient-dev - - os: osx - osx_image: xcode8.3 - before_install: - - brew install mariadb - - mysql.server start - os: osx osx_image: xcode8.3 before_install: diff --git a/configure b/configure index 0d915262..5f173736 100755 --- a/configure +++ b/configure @@ -17,14 +17,15 @@ PKG_LIBS="-lmysqlclient" PKG_LIBS_STATIC="-lmysqlclient -lssl -lcrypto -lz" # Use mysql_config (on Solaris /opt/csw/bin must be in PATH) -if [ $(command -v mariadb_config) ]; then - echo "Using mariadb_config" - PKGCONFIG_CFLAGS=$(mariadb_config --cflags) - PKGCONFIG_LIBS=$(mariadb_config --libs) -elif [ $(command -v mysql_config) ]; then +if [ $(command -v mysql_config) ]; then echo "Using mysql_config" PKGCONFIG_CFLAGS=$(mysql_config --cflags) PKGCONFIG_LIBS=$(mysql_config --libs) +elif [ $(command -v mariadb_config) ]; then + echo "Using mariadb_config" + echo "WARNING: Connector versions prior to 2.3.4/3.0.3 have a known problem with retrieving string and blob data. See https://github.com/rstats-db/RMariaDB/issues/53 for details." + PKGCONFIG_CFLAGS=$(mariadb_config --cflags) + PKGCONFIG_LIBS=$(mariadb_config --libs) fi # Note that cflags may be empty in case of success diff --git a/src/MariaResult.cpp b/src/MariaResult.cpp index aeac30ec..282b586a 100644 --- a/src/MariaResult.cpp +++ b/src/MariaResult.cpp @@ -71,11 +71,7 @@ void MariaResult::execute() { if (mysql_stmt_execute(pStatement_) != 0) throw_error(); - if (has_result()) { - // This is necessary for Connector/C, otherwise blobs and strings are unavailable - mysql_stmt_store_result(pStatement_); - } - else { + if (!has_result()) { rowsAffected_ += mysql_stmt_affected_rows(pStatement_); } }