aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/mysql/version.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/mysql/version.hxx b/odb/mysql/version.hxx
index 8072b9a..1abbb6c 100644
--- a/odb/mysql/version.hxx
+++ b/odb/mysql/version.hxx
@@ -6,6 +6,8 @@
#ifndef ODB_MYSQL_VERSION_HXX
#define ODB_MYSQL_VERSION_HXX
+#include <mysql/mysql_version.h>
+
#include <odb/version.hxx>
// Version format is AABBCCDD where
@@ -31,6 +33,12 @@
# error incompatible odb interface version detected
#endif
+// Check that we have a compatible MySQL version (5.0.3 or later).
+//
+#if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID < 50003
+# error incompatible MySQL version detected
+#endif
+
// libodb-mysql version: odb interface version plus the bugfix
// version.
//