Date: Thursday, January 12, 2006 @ 17:35:44
Author: gilles
Path: /cvsroot/carob/libmysequoia/src
Modified: CarobMySQL.cpp (1.29 -> 1.30) CarobStmt.cpp (1.6 -> 1.7)
Updated destruction functions following carob Statements' destructor
protected-ing
----------------+
CarobMySQL.cpp | 3 ++-
CarobStmt.cpp | 5 ++---
2 files changed, 4 insertions(+), 4 deletions(-)
Index: libmysequoia/src/CarobMySQL.cpp
diff -u libmysequoia/src/CarobMySQL.cpp:1.29
libmysequoia/src/CarobMySQL.cpp:1.30
--- libmysequoia/src/CarobMySQL.cpp:1.29 Wed Jan 11 11:25:37 2006
+++ libmysequoia/src/CarobMySQL.cpp Thu Jan 12 17:35:44 2006
@@ -630,7 +630,8 @@
free_results(liveResultPtr);
FREE_AND_NULL(liveResultPtr);
}
- FREE_AND_NULL(stmtPtr);
+ //stmtPtr is freed by connection. just set our pointer to NULL
+ stmtPtr = NULL;
FREE_AND_NULL(connectionPtr);
LOG4CXX_DEBUG(logger, "Leaving delete_connection.");
}
Index: libmysequoia/src/CarobStmt.cpp
diff -u libmysequoia/src/CarobStmt.cpp:1.6 libmysequoia/src/CarobStmt.cpp:1.7
--- libmysequoia/src/CarobStmt.cpp:1.6 Wed Jan 11 12:51:42 2006
+++ libmysequoia/src/CarobStmt.cpp Thu Jan 12 17:35:44 2006
@@ -298,9 +298,8 @@
void
CarobStmt::clear()
{
- if (c_stmt)
- FREE_AND_NULL(c_stmt);
-
+ cmysql->connectionPtr->deleteStatement(c_stmt);
+ c_stmt = NULL;
FREE_AND_NULL_ARRAY(m_stmt->params);
FREE_AND_NULL_ARRAY(m_stmt->bind);
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits