From 7de4ae99d764d3a5666dea36ae1e4b226be88595 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 23 Jul 2010 14:41:43 +0200 Subject: Add check for MySQL version --- odb/mysql/version.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 + #include // 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. // -- cgit v1.1