Bug #42365 Double call defaultDatabase->getOpenConnection() in StorageHandler::initialize
Submitted: 27 Jan 2009 9:51 Modified: 7 May 2009 17:01
Reporter: Sveta Smirnova Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0 bzr OS:Any
Assigned to: Kevin Lewis CPU Architecture:Any

[27 Jan 2009 9:51] Sveta Smirnova
There are 2 calls of defaultDatabase->getOpenConnection() in StorageHandler::initialize. First seems to be unnecessary.

How to repeat:
$cat -n StorageHandler.cpp
 969 void StorageHandler::initialize(void)
    983         try
    984                 {
    985                 defaultDatabase->getOpenConnection();
    986                 dictionaryConnection = defaultDatabase->getOpenConnection();
    987                 dropTempTables();
[27 Jan 2009 14:55] Olav Sandstå
I do not know if two calls to getOpenConnection() is needed or not but at least Falcon seem to be consistent about this. In Connection::shutdownDatabases() we have two calls to database->shutdown():

	for (Database *database; (database = firstDatabase);)
[27 Jan 2009 16:56] Kevin Lewis
According to Jim Starkey;
The first call to defaultDatabase->getOpenConnection() is a memory leak.  It clones the master connection then drops it on the floor.  I suggest removing it.  Also the extra call to shutdown.
[27 Jan 2009 17:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


2977 Kevin Lewis	2009-01-27
      Bug#42365 - Delete redundant calls to 
      Database::getOpenConnection in StorageHandler::initialize()
      and database->shutdown in Connection::shutdownDatabases().
[13 Feb 2009 7:25] Bugs System
Pushed into 6.0.10-alpha (revid:alik@sun.com-20090211182317-uagkyj01fk30p1f8) (version source revid:vvaintroub@mysql.com-20090128001053-o8ifa0b1n9ugw307) (merge vers: 6.0.10-alpha) (pib:6)
[7 May 2009 17:01] MC Brown
Internal/test fix. No changelog entry required.