diff -ur /tmp/orig/mysql-5.1.48/storage/innodb_plugin/fil/fil0fil.c /tmp/mysql-5.1.48/storage/innodb_plugin/fil/fil0fil.c --- /tmp/orig/mysql-5.1.48/storage/innodb_plugin/fil/fil0fil.c 2010-06-03 23:50:08.000000000 +0800 +++ /tmp/mysql-5.1.48/storage/innodb_plugin/fil/fil0fil.c 2011-08-19 17:31:46.000000000 +0800 @@ -903,6 +903,7 @@ ibool print_info = FALSE; ulint count = 0; ulint count2 = 0; + ulint retry_count = 0; retry: mutex_enter(&fil_system->mutex); @@ -938,7 +939,24 @@ mutex_exit(&fil_system->mutex); - os_thread_sleep(20000); + if (__sync_add_and_fetch(&retry_count, 1) > 20000) { + +#ifndef UNIV_HOTBACKUP + /* Wake the i/o-handler threads to make sure pending i/o's are + performed */ + os_aio_simulated_wake_handler_threads(); + + os_thread_sleep(20000); +#endif + /* Flush tablespaces so that we can close modified files in the LRU + list */ + + fil_flush_file_spaces(FIL_TABLESPACE); + + } else { + + os_thread_sleep(20000); + } count2++; @@ -2457,6 +2475,13 @@ fputs(" to ", stderr); ut_print_filename(stderr, new_name); fprintf(stderr, ", %lu iterations\n", (ulong) count); + + if (node) { + fprintf(stderr, "node info: n_pending=%lu, n_pending_flushes=%lu" + " modification_counter=%lu, flush_counter=%lu\n", + node->n_pending, node->n_pending_flushes, node->modification_counter, + node->flush_counter); + } } mutex_enter(&fil_system->mutex); diff -ur /tmp/orig/mysql-5.1.48/storage/innodb_plugin/handler/ha_innodb.cc /tmp/mysql-5.1.48/storage/innodb_plugin/handler/ha_innodb.cc --- /tmp/orig/mysql-5.1.48/storage/innodb_plugin/handler/ha_innodb.cc 2010-06-03 23:50:27.000000000 +0800 +++ /tmp/mysql-5.1.48/storage/innodb_plugin/handler/ha_innodb.cc 2011-08-19 18:35:55.000000000 +0800 @@ -10951,7 +10951,7 @@ &innobase_storage_engine, innobase_hton_name, "Innobase Oy", - "Supports transactions, row-level locking, and foreign keys", + "Supports transactions, row-level locking, and foreign keys (#62100)", PLUGIN_LICENSE_GPL, innobase_init, /* Plugin Init */ NULL, /* Plugin Deinit */ diff -ur /tmp/orig/mysql-5.1.48/storage/innodb_plugin/row/row0mysql.c /tmp/mysql-5.1.48/storage/innodb_plugin/row/row0mysql.c --- /tmp/orig/mysql-5.1.48/storage/innodb_plugin/row/row0mysql.c 2010-06-03 23:50:27.000000000 +0800 +++ /tmp/mysql-5.1.48/storage/innodb_plugin/row/row0mysql.c 2011-08-19 15:09:29.000000000 +0800 @@ -3907,6 +3907,7 @@ trx->error_state = DB_SUCCESS; trx_general_rollback_for_mysql(trx, NULL); trx->error_state = DB_SUCCESS; + err = DB_ERROR; goto funct_exit; }