Bug #2342 Running ANALYZE TABLE on bdb table inside a transaction hangs server thread
Submitted: 9 Jan 2004 20:23 Modified: 26 Mar 2004 10:51
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0-bk OS:Linux (Linux, win32)
Assigned to: Bugs System CPU Architecture:Any

[9 Jan 2004 20:23] Sergey Petrunya
Description:
Modifying a bdb table inside a transaction and then running ANALYZE TABLE on that table causes the server thread (and client) to hang forever: thread cannot be killed, server shutdown is delayed indefinitely.

The only way out is to kill mysqld after which the table may (or may not) become corrupted.

The problem was observed only with BDB tables, MyISAM and InnoDB tables seem to be OK.

How to repeat:
Run the following:
create table test (a int) engine=bdb;
set autocommit=0;
insert into test values(1);
analyze table test;

And watch the server to hang forever.

Suggested fix:
Fix BDB table handler.
[29 Jan 2004 6:52] Victor Vagin
subj "bk commit into 5.0 tree (vva:1.1649)"
on internals@lists.mysql.com
[26 Mar 2004 10:51] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

The bug was fixed in source repositories of mysql-4.0 and mysql-4.1 
(because of they have different versions of bdb)
and after merging will be in mysql-5.0