Commit 266c7cd6 authored by Satya B's avatar Satya B

Applying InnoDB Plugin 1.0.5 snapshot, part 3

From revision r5686 to r5702
r5696 is already applied

Detailed revision comments:

r5686 | vasil | 2009-08-20 04:15:05 -0500 (Thu, 20 Aug 2009) | 4 lines
branches/zip:

White-space fixup.

r5687 | vasil | 2009-08-20 04:20:22 -0500 (Thu, 20 Aug 2009) | 8 lines
branches/zip:

ChangeLog:
Follow the convention from the rest of the ChangeLog: for bugfixes from
bugs.mysql.com only the bug number and title goes in the ChangeLog. Detailed
explanation on what is the problem and how it was fixed is present in
the bugs database.

r5694 | marko | 2009-08-26 06:25:26 -0500 (Wed, 26 Aug 2009) | 2 lines
branches/zip: buf_page_t: Clarify that bpage->list may contain garbage.
This comment was provoked by Inaam.
r5695 | marko | 2009-08-26 08:14:59 -0500 (Wed, 26 Aug 2009) | 1 line
branches/zip: UNIV_DEBUG_LOCK_VALIDATE: Move the definition to univ.i.
r5697 | vasil | 2009-08-26 08:44:40 -0500 (Wed, 26 Aug 2009) | 4 lines
branches/zip:

Fix typo.

r5698 | inaam | 2009-08-26 09:34:35 -0500 (Wed, 26 Aug 2009) | 13 lines
branches/zip  bug#42885  rb://148

The call to put IO threads to sleep was most probably meant for Windows
only as the comment in buf0rea.c suggests. However it was enabled on
all platforms. This patch restricts the sleep call to windows. This
approach of not putting threads to sleep makes even more sense because
now we have multiple threads working in the background and it probably
is not a good idea to put all of them to sleep because a user thread
wants to post a batch for readahead.

Approved by: Marko


r5701 | marko | 2009-08-27 02:01:42 -0500 (Thu, 27 Aug 2009) | 1 line
branches/zip: Document r5698 in the ChangeLog.
r5702 | marko | 2009-08-27 02:03:15 -0500 (Thu, 27 Aug 2009) | 1 line
branches/zip: Document also the files affected by r5698 in the ChangeLog.
parent cf8c95e0
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 2009-08-20 The InnoDB Team
* lock/lock0lock.c: * lock/lock0lock.c:
Fix Bug#46650 InnoDB plugin: We only store the autoinc locks that are Fix Bug#46650 Innodb assertion autoinc_lock == lock in
granted in the transaction's autoinc lock vector. A transacton, that lock_table_remove_low on INSERT SELECT
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.
2009-08-13 The InnoDB Team 2009-08-13 The InnoDB Team
* handler/handler0alter.cc: * handler/handler0alter.cc:
Fix Bug#46657 InnoDB plugin: invalid read in index_merge_innodb test Fix Bug#46657 InnoDB plugin: invalid read in index_merge_innodb test
On a successful CREATE INDEX, diagnostic code read the table flags (Valgrind)
from a recently freed table object. Read them from the newly
created object instead.
2009-07-20 The InnoDB Team 2009-07-20 The InnoDB Team
......
...@@ -166,9 +166,7 @@ file formats in the configuration file, but can only be set to any ...@@ -166,9 +166,7 @@ file formats in the configuration file, but can only be set to any
of the supported file formats during runtime. */ of the supported file formats during runtime. */
static char* innobase_file_format_check = NULL; static char* innobase_file_format_check = NULL;
/* The following has a misleading name: starting from 4.0.5, this also static char* innobase_file_flush_method = NULL;
affects Windows: */
static char* innobase_unix_file_flush_method = NULL;
/* Below we have boolean-valued start-up parameters, and their default /* Below we have boolean-valued start-up parameters, and their default
values */ values */
...@@ -2151,7 +2149,7 @@ innobase_init( ...@@ -2151,7 +2149,7 @@ innobase_init(
/* --------------------------------------------------*/ /* --------------------------------------------------*/
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_groups = (ulint) innobase_mirrored_log_groups;
srv_n_log_files = (ulint) innobase_log_files_in_group; 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, ...@@ -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).", " or 2 (write at commit, flush once per second).",
NULL, NULL, 1, 0, 2, 0); 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, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
"With which method to flush data.", NULL, NULL, NULL); "With which method to flush data.", NULL, NULL, NULL);
......
...@@ -69,16 +69,14 @@ do { \ ...@@ -69,16 +69,14 @@ do { \
#define STRUCT_FLD(name, value) value #define STRUCT_FLD(name, value) value
#endif #endif
/* Don't use a static const variable here, as some C++ compilers (notably static const ST_FIELD_INFO END_OF_ST_FIELD_INFO =
HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */ {STRUCT_FLD(field_name, NULL),
#define END_OF_ST_FIELD_INFO \ STRUCT_FLD(field_length, 0),
{STRUCT_FLD(field_name, NULL), \ STRUCT_FLD(field_type, MYSQL_TYPE_NULL),
STRUCT_FLD(field_length, 0), \ STRUCT_FLD(value, 0),
STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \ STRUCT_FLD(field_flags, 0),
STRUCT_FLD(value, 0), \ STRUCT_FLD(old_name, ""),
STRUCT_FLD(field_flags, 0), \ STRUCT_FLD(open_method, SKIP_OPEN_TABLE)};
STRUCT_FLD(old_name, ""), \
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}
/* /*
Use the following types mapping: Use the following types mapping:
......
...@@ -1103,7 +1103,16 @@ struct buf_page_struct{ ...@@ -1103,7 +1103,16 @@ struct buf_page_struct{
- BUF_BLOCK_FILE_PAGE: flush_list - BUF_BLOCK_FILE_PAGE: flush_list
- BUF_BLOCK_ZIP_DIRTY: flush_list - BUF_BLOCK_ZIP_DIRTY: flush_list
- BUF_BLOCK_ZIP_PAGE: zip_clean - 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 #ifdef UNIV_DEBUG
ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list; ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list;
when buf_pool_mutex is free, the when buf_pool_mutex is free, the
......
...@@ -196,6 +196,9 @@ command. Not tested on Windows. */ ...@@ -196,6 +196,9 @@ command. Not tested on Windows. */
debugging without UNIV_DEBUG */ debugging without UNIV_DEBUG */
#define UNIV_DEBUG /* Enable ut_ad() assertions #define UNIV_DEBUG /* Enable ut_ad() assertions
and disable UNIV_INLINE */ 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 #define UNIV_DEBUG_FILE_ACCESSES /* Debug .ibd file access
(field file_page_was_freed (field file_page_was_freed
in buf_page_t) */ in buf_page_t) */
......
...@@ -363,9 +363,6 @@ lock_rec_validate_page( ...@@ -363,9 +363,6 @@ lock_rec_validate_page(
ulint zip_size,/*!< in: compressed page size in bytes ulint zip_size,/*!< in: compressed page size in bytes
or 0 for uncompressed pages */ or 0 for uncompressed pages */
ulint page_no);/*!< in: page number */ 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 */ #endif /* UNIV_DEBUG */
/* The lock system */ /* The lock system */
......
...@@ -3371,9 +3371,21 @@ void ...@@ -3371,9 +3371,21 @@ void
os_aio_simulated_put_read_threads_to_sleep(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; os_aio_array_t* array;
ulint g; 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; os_aio_recommend_sleep_for_read_threads = TRUE;
for (g = 0; g < os_aio_n_segments; g++) { for (g = 0; g < os_aio_n_segments; g++) {
...@@ -3384,6 +3396,7 @@ os_aio_simulated_put_read_threads_to_sleep(void) ...@@ -3384,6 +3396,7 @@ os_aio_simulated_put_read_threads_to_sleep(void)
os_event_reset(os_aio_segment_wait_events[g]); os_event_reset(os_aio_segment_wait_events[g]);
} }
} }
#endif /* __WIN__ */
} }
/*******************************************************************//** /*******************************************************************//**
......
...@@ -103,7 +103,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ ...@@ -103,7 +103,7 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
AC_CHECK_DECLS( AC_CHECK_DECLS(
[HAVE_SOLARIS_ATOMICS], [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( AC_TRY_RUN(
[ [
#include <pthread.h> #include <pthread.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment