From 1692b3e82521e7d73a908f532eced90491e1eded Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Aug 2010 15:51:23 +0200 Subject: Support for automake and VC++ builds --- odb/mysql/statement.cxx | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'odb/mysql/statement.cxx') diff --git a/odb/mysql/statement.cxx b/odb/mysql/statement.cxx index 14907a9..9cacc4f 100644 --- a/odb/mysql/statement.cxx +++ b/odb/mysql/statement.cxx @@ -3,7 +3,16 @@ // copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#include // ER_DUP_ENTRY, ER_LOCK_DEADLOCK +#include + +#ifdef LIBODB_MYSQL_INCLUDE_SHORT +# ifdef _WIN32 +# include +# endif +# include // ER_DUP_ENTRY, ER_LOCK_DEADLOCK +#else +# include +#endif #include #include @@ -117,10 +126,6 @@ namespace odb { return success; } - case 1: - { - throw database_exception (stmt_); - } case MYSQL_NO_DATA: { return no_data; @@ -129,6 +134,10 @@ namespace odb { return truncated; } + default: + { + throw database_exception (stmt_); + } } } @@ -296,10 +305,6 @@ namespace odb { return success; } - case 1: - { - throw database_exception (stmt_); - } case MYSQL_NO_DATA: { free_result (); @@ -309,6 +314,10 @@ namespace odb { return truncated; } + default: + { + throw database_exception (stmt_); + } } } -- cgit v1.1