Bug #40886 ALTER TABLE statements appear to randomly fail on Mac OS 10.4
Submitted: 20 Nov 2008 14:07 Modified: 12 Jul 2009 15:04
Reporter: Patrick Crews Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.1.28,5.1.29,5.1.30 OS:Mac OS X (10.4 (PowerPC and Intel))
Assigned to: CPU Architecture:Any
Tags: 10.4, ALTER TABLE, Mac OS, random failure, test failure

[20 Nov 2008 14:07] Patrick Crews
Description:
Various tests in the mysql test suite are failing due to ALTER TABLE statements not processing:

Could be related to Bug #39670  	Error on rename (errno: 121) from ALTER TABLE ADD KEY in concurrent test

main.innodb_mysql              [ fail ]

mysqltest: In included file "./include/mix1.inc": At line 1219: query 'alter table t1 change i c char(10) default "Two"' failed: 7: Error on rename of './test/#sql-5165_1.frm' to './test/t1.frm' (Errcode: 2)

This is random and has been observed about 30 times out of 230+ runs of a set of 12 suspect tests:
main.synchronization           
main.innodb_mysql              
main.index_merge_myisam        
main.symlink                   
main.warnings                  
main.mysql_upgrade             
binlog.binlog_stm_blackhole 'row' 
binlog.binlog_stm_blackhole 'stmt' 
binlog.binlog_stm_blackhole 'mix' 
rpl.rpl_blackhole 'row'        
rpl.rpl_blackhole 'stmt'       
rpl.rpl_blackhole 'mix'        

How to repeat:
Run the above listed tests repeatedly.  There doesn't appear to be a particular trigger or pattern to the failures, but all have been noted to have failing ALTER TABLE statements.

./mtr --force --timer rpl_blackhole synchronization innodb_mysql index_merge_myisam symlink warnings mysql_upgrade binlog_stm_blackhole

Suggested fix:
Unknown.  However, I would suggest by examining ALTER TABLE code.
[20 Nov 2008 15:34] Patrick Crews
NOTE:  Only Mac OSX 10.4.  Could not duplicate this on 10.5 under similar test conditions.