diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-30 15:51:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-30 15:51:23 +0200 |
commit | 1692b3e82521e7d73a908f532eced90491e1eded (patch) | |
tree | c45272faba67485f3702395f43282a81a981cf5f /odb/mysql/statement.cxx | |
parent | 4452be925b749572f0e3edcb21e9af818647eb55 (diff) |
Support for automake and VC++ builds
Diffstat (limited to 'odb/mysql/statement.cxx')
-rw-r--r-- | odb/mysql/statement.cxx | 27 |
1 files changed, 18 insertions, 9 deletions
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 <mysql/mysqld_error.h> // ER_DUP_ENTRY, ER_LOCK_DEADLOCK +#include <odb/mysql/details/config.hxx> + +#ifdef LIBODB_MYSQL_INCLUDE_SHORT +# ifdef _WIN32 +# include <winsock2.h> +# endif +# include <mysqld_error.h> // ER_DUP_ENTRY, ER_LOCK_DEADLOCK +#else +# include <mysql/mysqld_error.h> +#endif #include <odb/mysql/statement.hxx> #include <odb/mysql/connection.hxx> @@ -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_); + } } } |