From f5d7efd5a8f925e5e6af5f8ca3b3cd9097a5ca99 Mon Sep 17 00:00:00 2001 From: kishoramballi Date: Tue, 3 Feb 2009 06:43:41 +0000 Subject: [PATCH] closeTable is made to delete the table Handle and in createTreeIndex closeTable was called twice. Made to call once. --- src/storage/DatabaseManagerImpl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage/DatabaseManagerImpl.cxx b/src/storage/DatabaseManagerImpl.cxx index 4a8f6d6c..f836fc15 100644 --- a/src/storage/DatabaseManagerImpl.cxx +++ b/src/storage/DatabaseManagerImpl.cxx @@ -711,7 +711,7 @@ Table* DatabaseManagerImpl::openTable(const char *name) logFinest(logger, "Opening Table %s" , name); tableHandleList.append(table); - + return table; } @@ -745,6 +745,7 @@ void DatabaseManagerImpl::closeTable(Table *table) if (NULL == table) return; //table->unlock(); tableHandleList.remove(table, false); + if (table) delete table; table = NULL; logFinest(logger, "Closing Table"); } @@ -1076,7 +1077,6 @@ DbRetVal DatabaseManagerImpl::createTreeIndex(const char *indName, const char *t while ((recPtr = chIter.nextElement()) != NULL) { rv = tbl->insertIndexNode(*tbl->trans, tupleptr, indxInfo, recPtr); if (rv == ErrUnique) { - closeTable(tbl); dropIndex(indName); closeTable(tbl); return rv; -- 2.11.4.GIT