aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:41:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-07-23 14:41:43 +0200
commit7de4ae99d764d3a5666dea36ae1e4b226be88595 (patch)
treec92087fbfbc21e0e13da57fe7890073259aecb70 /odb
parenta22d1206d3317a1afad35e93c21a566d3952d986 (diff)
Add check for MySQL version
Diffstat (limited to 'odb')
-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.
//