Skip to content

Commit

Permalink
A better version of the fix for #172.
Browse files Browse the repository at this point in the history
  • Loading branch information
akopytov committed Sep 17, 2017
1 parent cd13882 commit f5fa780
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
23 changes: 0 additions & 23 deletions m4/sb_check_mysql.m4
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,6 @@ AC_DEFINE([USE_MYSQL], 1,
USE_MYSQL=1
AC_SUBST([MYSQL_LIBS])
AC_SUBST([MYSQL_CFLAGS])
# Test if "#include <server/mysql_version.h>" works, see
# https://jira.mariadb.org/browse/MDEV-13773
AC_MSG_CHECKING([whether including <server/mysql_version.h> works])
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
AC_PREPROC_IFELSE(
[AC_LANG_SOURCE(
[[
#include <server/mysql_version.h>
]])],
[
AC_DEFINE([MARIADB_SERVER_INCLUDES_DIR], 1,
[Define to 1 if server/mysql_version.h exists (see MDEV-13773)])
AC_MSG_RESULT([yes])
],
[
AC_MSG_RESULT([no])
])
CPPFLAGS="$ac_save_CPPFLAGS"
])
AM_CONDITIONAL([USE_MYSQL], test "x$with_mysql" != xno)
Expand Down
11 changes: 2 additions & 9 deletions src/drivers/mysql/drv_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@
#include <stdio.h>

#include <mysql.h>

#ifdef MARIADB_SERVER_INCLUDES_DIR
# include <server/mysql_version.h>
#else
# include <mysql_version.h>
#endif

#include <mysqld_error.h>
#include <errmsg.h>

Expand All @@ -56,8 +49,8 @@

#define SAFESTR(s) ((s != NULL) ? (s) : "(null)")

#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80001 && \
MYSQL_VERSION_ID != 80002 /* see https://bugs.mysql.com/?id=87337 */
#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && \
MYSQL_VERSION_ID >= 80001 && MYSQL_VERSION_ID != 80002 /* see https://bugs.mysql.com/?id=87337 */
typedef bool my_bool;
#endif

Expand Down

0 comments on commit f5fa780

Please sign in to comment.