#At bzr+ssh://ahristov@stripped/bzrroot/public/connector-cpp-bzr/trunk/
274 andrey.hristov@stripped 2008-11-20
Fix build
modified:
driver/CMakeLists.txt
driver/mysql_connection.cpp
driver/mysql_prepared_statement.cpp
driver/mysql_public_iface.h
driver/mysql_res_wrapper.cpp
driver/mysql_res_wrapper.h
driver/mysql_statement.cpp
test/test_common.cpp
=== modified file 'driver/CMakeLists.txt'
--- a/driver/CMakeLists.txt 2008-11-20 12:24:33 +0000
+++ b/driver/CMakeLists.txt 2008-11-20 13:51:44 +0000
@@ -91,7 +91,6 @@ INSTALL(TARGETS mysqlcppconn mysqlcppcon
SET(MYSQLCPPCONN_SPECIFIC_INSTALL_HEADERS
mysql_connection.h
mysql_driver.h
- mysql_exception.h
mysql_util.h)
INSTALL(FILES ${MYSQLCPPCONN_SPECIFIC_INSTALL_HEADERS} DESTINATION include/cppconn)
=== modified file 'driver/mysql_connection.cpp'
--- a/driver/mysql_connection.cpp 2008-11-20 12:24:33 +0000
+++ b/driver/mysql_connection.cpp 2008-11-20 13:51:44 +0000
@@ -88,7 +88,6 @@ MySQL_Connection::MySQL_Connection(const
try {
if (!(mysql = mysql_init(NULL))) {
- logger->freeReference();
throw sql::SQLException("Insufficient memory: cannot create MySQL handle using mysql_init()", "HY000", 1000);
}
#ifndef CPPDBC_WIN32
@@ -123,7 +122,6 @@ MySQL_Connection::MySQL_Connection(const
sql::SQLException e(mysql_error(mysql), mysql_sqlstate(mysql), mysql_errno(mysql));
mysql_close(mysql);
mysql = NULL;
- logger->freeReference();
throw e;
}
mysql_set_server_option(mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF);
=== modified file 'driver/mysql_prepared_statement.cpp'
--- a/driver/mysql_prepared_statement.cpp 2008-11-20 12:24:33 +0000
+++ b/driver/mysql_prepared_statement.cpp 2008-11-20 13:51:44 +0000
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include <memory>
#include "mysql_connection.h"
-#include "mysql_exception.h"
#include "mysql_statement.h"
#include "mysql_prepared_statement.h"
#include "mysql_ps_resultset.h"
=== modified file 'driver/mysql_public_iface.h'
--- a/driver/mysql_public_iface.h 2008-11-12 13:15:56 +0000
+++ b/driver/mysql_public_iface.h 2008-11-20 13:51:44 +0000
@@ -24,7 +24,6 @@
#define MYSQL_PUBLIC_IFACE_H_
/*#include <cppconn/connection.h"*/
#include "mysql_connection.h"
-#include "mysql_exception.h"
#include <cppconn/driver.h>
/*#include <cppconn/exception.h"*/
#include <cppconn/warning.h>
=== modified file 'driver/mysql_res_wrapper.cpp'
--- a/driver/mysql_res_wrapper.cpp 2008-10-21 09:17:11 +0000
+++ b/driver/mysql_res_wrapper.cpp 2008-11-20 13:51:44 +0000
@@ -19,6 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <cppconn/exception.h>
#include "mysql_res_wrapper.h"
@@ -44,7 +45,7 @@ MYSQL_RES_Wrapper * MYSQL_RES_Wrapper::g
refcount++;
return this;
} else {
- throw sql::SQLException("Object is invalid");
+ throw sql::InvalidInstanceException("Object is invalid");
}
}
@@ -72,7 +73,7 @@ void MYSQL_RES_Wrapper::dispose() throw
MYSQL_RES * MYSQL_RES_Wrapper::get() const
{
if (!is_valid) {
- throw sql::SQLException("Object is invalid");
+ throw sql::InvalidInstanceException("Object is invalid");
}
return result;
}
=== modified file 'driver/mysql_res_wrapper.h'
--- a/driver/mysql_res_wrapper.h 2008-10-13 09:55:26 +0000
+++ b/driver/mysql_res_wrapper.h 2008-11-20 13:51:44 +0000
@@ -22,8 +22,6 @@
#ifndef _MYSQL_RES_WRAPPER_H_
#define _MYSQL_RES_WRAPPER_H_
-#include "mysql_exception.h"
-
#include "mysql_private_iface.h"
namespace sql
=== modified file 'driver/mysql_statement.cpp'
--- a/driver/mysql_statement.cpp 2008-11-20 12:24:33 +0000
+++ b/driver/mysql_statement.cpp 2008-11-20 13:51:44 +0000
@@ -22,7 +22,6 @@
#include <memory>
#include <algorithm>
#include "mysql_connection.h"
-#include "mysql_exception.h"
#include "mysql_statement.h"
#include "mysql_resultset.h"
#include "mysql_warning.h"
=== modified file 'test/test_common.cpp'
--- a/test/test_common.cpp 2008-11-19 12:23:01 +0000
+++ b/test/test_common.cpp 2008-11-20 13:51:44 +0000
@@ -2706,12 +2706,6 @@ int main(int argc, const char **argv)
try {
conn = get_connection(host, user, pass);
-#ifndef DRIVER_TEST
- } catch (sql::mysql::MySQL_SQLException &e) {
- printf("\n# ERR: Caught sql::mysql::SQLException at %s::%d %s\n", CPPCONN_FUNC, __LINE__, e.what());
- printf("not ok\n");
- return 1;
-#endif
} catch (sql::SQLException &e) {
printf("\n# ERR: Caught sql::SQLException at %s::%d %s (%d/%s)\n", CPPCONN_FUNC, __LINE__, e.what(), e.getErrorCode(), e.getSQLState().c_str());
printf("not ok\n");
@@ -2745,12 +2739,6 @@ int main(int argc, const char **argv)
}
stmt->execute("USE " + database);
-#ifndef DRIVER_TEST
- } catch (sql::mysql::MySQL_SQLException &e) {
- printf("\n# ERR: Caught sql::mysql::SQLException at %s::%d %s\n", CPPCONN_FUNC, __LINE__, e.what());
- printf("# ");
- return 1;
-#endif
} catch (sql::SQLException &e) {
printf("\n# ERR: Caught sql::SQLException at %s::%d %s (%d/%s)\n", CPPCONN_FUNC, __LINE__, e.what(), e.getErrorCode(), e.getSQLState().c_str());
printf("# ");
| Thread |
|---|
| • bzr commit into connector-cpp-bzr branch (andrey.hristov:274) | andrey.hristov | 20 Nov |