diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index 6f456d4c4ad..b488b21c768 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,19 +1,20 @@ +2009-08-26 The InnoDB Team + + * handler/ha_innodb.cc, os/os0file.c: + Fix Bug#42885 buf_read_ahead_random, buf_read_ahead_linear counters, + thread wakeups + 2009-08-20 The InnoDB Team * lock/lock0lock.c: - Fix Bug#46650 InnoDB plugin: We only store the autoinc locks that are - granted in the transaction's autoinc lock vector. A transacton, that - has been rolled back due to a deadlock because of an AUTOINC lock - attempt, will not have added that lock to the vector. We need to check - for that when we remove that lock. + Fix Bug#46650 Innodb assertion autoinc_lock == lock in + lock_table_remove_low on INSERT SELECT 2009-08-13 The InnoDB Team * handler/handler0alter.cc: Fix Bug#46657 InnoDB plugin: invalid read in index_merge_innodb test - On a successful CREATE INDEX, diagnostic code read the table flags - from a recently freed table object. Read them from the newly - created object instead. + (Valgrind) 2009-07-20 The InnoDB Team diff --git a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc index 682004407c7..616c227ae0c 100644 --- a/storage/innodb_plugin/handler/ha_innodb.cc +++ b/storage/innodb_plugin/handler/ha_innodb.cc @@ -166,9 +166,7 @@ file formats in the configuration file, but can only be set to any of the supported file formats during runtime. */ static char* innobase_file_format_check = NULL; -/* The following has a misleading name: starting from 4.0.5, this also -affects Windows: */ -static char* innobase_unix_file_flush_method = NULL; +static char* innobase_file_flush_method = NULL; /* Below we have boolean-valued start-up parameters, and their default values */ @@ -2151,7 +2149,7 @@ innobase_change_buffering_inited_ok: /* --------------------------------------------------*/ - srv_file_flush_method_str = innobase_unix_file_flush_method; + srv_file_flush_method_str = innobase_file_flush_method; srv_n_log_groups = (ulint) innobase_mirrored_log_groups; srv_n_log_files = (ulint) innobase_log_files_in_group; @@ -9753,7 +9751,7 @@ static MYSQL_SYSVAR_ULONG(flush_log_at_trx_commit, srv_flush_log_at_trx_commit, " or 2 (write at commit, flush once per second).", NULL, NULL, 1, 0, 2, 0); -static MYSQL_SYSVAR_STR(flush_method, innobase_unix_file_flush_method, +static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "With which method to flush data.", NULL, NULL, NULL); diff --git a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc index 524fe696de2..c0d488d1c49 100644 --- a/storage/innodb_plugin/handler/i_s.cc +++ b/storage/innodb_plugin/handler/i_s.cc @@ -69,16 +69,14 @@ do { \ #define STRUCT_FLD(name, value) value #endif -/* Don't use a static const variable here, as some C++ compilers (notably -HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */ -#define END_OF_ST_FIELD_INFO \ - {STRUCT_FLD(field_name, NULL), \ - STRUCT_FLD(field_length, 0), \ - STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \ - STRUCT_FLD(value, 0), \ - STRUCT_FLD(field_flags, 0), \ - STRUCT_FLD(old_name, ""), \ - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)} +static const ST_FIELD_INFO END_OF_ST_FIELD_INFO = + {STRUCT_FLD(field_name, NULL), + STRUCT_FLD(field_length, 0), + STRUCT_FLD(field_type, MYSQL_TYPE_NULL), + STRUCT_FLD(value, 0), + STRUCT_FLD(field_flags, 0), + STRUCT_FLD(old_name, ""), + STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}; /* Use the following types mapping: diff --git a/storage/innodb_plugin/include/buf0buf.h b/storage/innodb_plugin/include/buf0buf.h index 65ad42c895a..a24fc4cdbbb 100644 --- a/storage/innodb_plugin/include/buf0buf.h +++ b/storage/innodb_plugin/include/buf0buf.h @@ -1103,7 +1103,16 @@ struct buf_page_struct{ - BUF_BLOCK_FILE_PAGE: flush_list - BUF_BLOCK_ZIP_DIRTY: flush_list - BUF_BLOCK_ZIP_PAGE: zip_clean - - BUF_BLOCK_ZIP_FREE: zip_free[] */ + - BUF_BLOCK_ZIP_FREE: zip_free[] + + The contents of the list node + is undefined if !in_flush_list + && state == BUF_BLOCK_FILE_PAGE, + or if state is one of + BUF_BLOCK_MEMORY, + BUF_BLOCK_REMOVE_HASH or + BUF_BLOCK_READY_IN_USE. */ + #ifdef UNIV_DEBUG ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list; when buf_pool_mutex is free, the diff --git a/storage/innodb_plugin/include/univ.i b/storage/innodb_plugin/include/univ.i index 35e609a78e5..aa01f072b1d 100644 --- a/storage/innodb_plugin/include/univ.i +++ b/storage/innodb_plugin/include/univ.i @@ -196,6 +196,9 @@ command. Not tested on Windows. */ debugging without UNIV_DEBUG */ #define UNIV_DEBUG /* Enable ut_ad() assertions and disable UNIV_INLINE */ +#define UNIV_DEBUG_LOCK_VALIDATE /* Enable + ut_ad(lock_rec_validate_page()) + assertions. */ #define UNIV_DEBUG_FILE_ACCESSES /* Debug .ibd file access (field file_page_was_freed in buf_page_t) */ diff --git a/storage/innodb_plugin/lock/lock0lock.c b/storage/innodb_plugin/lock/lock0lock.c index 5ec9cdbf4dd..41805b58e0b 100644 --- a/storage/innodb_plugin/lock/lock0lock.c +++ b/storage/innodb_plugin/lock/lock0lock.c @@ -363,9 +363,6 @@ lock_rec_validate_page( ulint zip_size,/*!< in: compressed page size in bytes or 0 for uncompressed pages */ ulint page_no);/*!< in: page number */ - -/* Define the following in order to enable lock_rec_validate_page() checks. */ -# undef UNIV_DEBUG_LOCK_VALIDATE #endif /* UNIV_DEBUG */ /* The lock system */ diff --git a/storage/innodb_plugin/os/os0file.c b/storage/innodb_plugin/os/os0file.c index d3bd6465f5f..dc25d55f818 100644 --- a/storage/innodb_plugin/os/os0file.c +++ b/storage/innodb_plugin/os/os0file.c @@ -3371,9 +3371,21 @@ void os_aio_simulated_put_read_threads_to_sleep(void) /*============================================*/ { + +/* The idea of putting background IO threads to sleep is only for +Windows when using simulated AIO. Windows XP seems to schedule +background threads too eagerly to allow for coalescing during +readahead requests. */ +#ifdef __WIN__ os_aio_array_t* array; ulint g; + if (os_aio_use_native_aio) { + /* We do not use simulated aio: do nothing */ + + return; + } + os_aio_recommend_sleep_for_read_threads = TRUE; for (g = 0; g < os_aio_n_segments; g++) { @@ -3384,6 +3396,7 @@ os_aio_simulated_put_read_threads_to_sleep(void) os_event_reset(os_aio_segment_wait_events[g]); } } +#endif /* __WIN__ */ } /*******************************************************************//** diff --git a/storage/innodb_plugin/plug.in b/storage/innodb_plugin/plug.in index 6daa6c5daed..a620f10a0da 100644 --- a/storage/innodb_plugin/plug.in +++ b/storage/innodb_plugin/plug.in @@ -103,7 +103,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ AC_CHECK_DECLS( [HAVE_SOLARIS_ATOMICS], [ - AC_MSG_CHECKING(checking if pthread_t size is integral) + AC_MSG_CHECKING(checking if pthread_t type is integral) AC_TRY_RUN( [ #include