summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSatya B <satya.bn@sun.com>2009-10-08 16:08:57 +0530
committerSatya B <satya.bn@sun.com>2009-10-08 16:08:57 +0530
commit76c1ae946f22da00a2de7b68ec5f3d794c80bb99 (patch)
tree5a9d0b447442bcdb857e616ca04b8932001788b3 /storage
parenta907756d212a847c6f63ec28028d6119669983c6 (diff)
downloadmariadb-git-76c1ae946f22da00a2de7b68ec5f3d794c80bb99.tar.gz
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.
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/ChangeLog17
-rw-r--r--storage/innodb_plugin/handler/ha_innodb.cc8
-rw-r--r--storage/innodb_plugin/handler/i_s.cc18
-rw-r--r--storage/innodb_plugin/include/buf0buf.h11
-rw-r--r--storage/innodb_plugin/include/univ.i3
-rw-r--r--storage/innodb_plugin/lock/lock0lock.c3
-rw-r--r--storage/innodb_plugin/os/os0file.c13
-rw-r--r--storage/innodb_plugin/plug.in2
8 files changed, 47 insertions, 28 deletions
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 <pthread.h>