From: Date: October 13 2008 11:03pm Subject: bzr commit into mysql-6.0-falcon-team branch (vvaintroub:2862) Bug#39951 List-Archive: http://lists.mysql.com/commits/56151 X-Bug: 39951 Message-Id: <200810132103.m9DL3C7j021586@mail.mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///G:/bzr/mysql-6.0-falcon-team/ 2862 Vladislav Vaintroub 2008-10-13 Bug#39951 Falcon: crash during crash recovery. The problem is that in Database destructor, tables are accessed deep in systemConnection->rollback(), at the time all Table objects have been freed. Crash reason is accessing freed memory. Solution is to cleanup system connection before Table objects are freed. modified: storage/falcon/Database.cpp === modified file 'storage/falcon/Database.cpp' --- a/storage/falcon/Database.cpp 2008-09-30 18:17:19 +0000 +++ b/storage/falcon/Database.cpp 2008-10-13 21:02:24 +0000 @@ -528,6 +528,13 @@ void Database::start() Database::~Database() { + + if (systemConnection) + { + systemConnection->rollback(); + systemConnection->close(); + } + for (Table *table; (table = tableList);) { tableList = table->next; @@ -549,12 +556,7 @@ Database::~Database() schemas [n] = schema->collision; delete schema; } - - if (systemConnection) - { - systemConnection->rollback(); - systemConnection->close(); - } + for (CompiledStatement *statement = compiledStatements; statement;) {