diff options
author | Sergei Golubchik <sergii@pisem.net> | 2015-02-18 20:31:40 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2015-02-18 20:31:40 +0100 |
commit | 174bccd3ff02b3d7c3957f56027b0956425cb31f (patch) | |
tree | 99f3490019cd5902f4ae7a5f66ab073127affd00 | |
parent | 6b05688f6d8920171fe14453082101316fa2dd8e (diff) | |
parent | dfb001edcd4b16bd4370b08b0176df78c4c5523f (diff) | |
download | mariadb-git-174bccd3ff02b3d7c3957f56027b0956425cb31f.tar.gz |
xtradb 5.6.22-72.0
-rw-r--r-- | mysql-test/suite/innodb/r/innodb_bug34300.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb_bug34300.test | 5 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0buf.cc | 11 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0flu.cc | 6 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0lru.cc | 2 | ||||
-rw-r--r-- | storage/xtradb/buf/buf0rea.cc | 8 | ||||
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 1 | ||||
-rw-r--r-- | storage/xtradb/handler/i_s.cc | 5 | ||||
-rw-r--r-- | storage/xtradb/include/buf0flu.h | 4 | ||||
-rw-r--r-- | storage/xtradb/include/sync0sync.h | 1 | ||||
-rw-r--r-- | storage/xtradb/include/univ.i | 2 | ||||
-rw-r--r-- | storage/xtradb/srv/srv0start.cc | 35 |
12 files changed, 44 insertions, 38 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_bug34300.result b/mysql-test/suite/innodb/r/innodb_bug34300.result index bf07febca73..09fc0b44579 100644 --- a/mysql-test/suite/innodb/r/innodb_bug34300.result +++ b/mysql-test/suite/innodb/r/innodb_bug34300.result @@ -1,3 +1,3 @@ -ERROR 42000: Row size too large (> ####). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size. f4 f8 f4 f8 diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test index 800f326707d..13c708b48d6 100644 --- a/mysql-test/suite/innodb/t/innodb_bug34300.test +++ b/mysql-test/suite/innodb/t/innodb_bug34300.test @@ -5,6 +5,11 @@ -- source include/have_innodb.inc +if (`select plugin_auth_version <= "5.6.22-MariaDB-72.0" from information_schema.plugins where plugin_name='innodb'`) +{ + --skip Not fixed in XtraDB as of 5.6.22-MariaDB-72.0 or earlier +} + -- disable_query_log -- disable_result_log diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index d6f210e1430..d38e080051c 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -294,7 +294,6 @@ UNIV_INTERN mysql_pfs_key_t buf_block_debug_latch_key; #ifdef UNIV_PFS_MUTEX UNIV_INTERN mysql_pfs_key_t buffer_block_mutex_key; -UNIV_INTERN mysql_pfs_key_t buf_pool_mutex_key; UNIV_INTERN mysql_pfs_key_t buf_pool_zip_mutex_key; UNIV_INTERN mysql_pfs_key_t buf_pool_flush_state_mutex_key; UNIV_INTERN mysql_pfs_key_t buf_pool_LRU_list_mutex_key; @@ -1777,16 +1776,12 @@ page_found: ut_ad(!bpage->in_page_hash); ut_ad(bpage->buf_fix_count == 0); - mutex_enter(&buf_pool->zip_mutex); - bpage->state = BUF_BLOCK_ZIP_PAGE; bpage->space = static_cast<ib_uint32_t>(space); bpage->offset = static_cast<ib_uint32_t>(offset); bpage->buf_fix_count = 1; bpage->buf_pool_index = buf_pool_index(buf_pool); - mutex_exit(&buf_pool->zip_mutex); - ut_d(bpage->in_page_hash = TRUE); HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, bpage); @@ -1838,7 +1833,6 @@ buf_pool_watch_remove( #endif /* UNIV_SYNC_DEBUG */ ut_ad(buf_page_get_state(watch) == BUF_BLOCK_ZIP_PAGE); - ut_ad(buf_own_zip_mutex_for_page(watch)); HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, watch); ut_d(watch->in_page_hash = FALSE); @@ -1881,9 +1875,7 @@ buf_pool_watch_unset( #endif /* PAGE_ATOMIC_REF_COUNT */ if (bpage->buf_fix_count == 0) { - mutex_enter(&buf_pool->zip_mutex); buf_pool_watch_remove(buf_pool, fold, bpage); - mutex_exit(&buf_pool->zip_mutex); } } @@ -4467,7 +4459,7 @@ corrupt: #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ buf_page_get_flush_type(bpage) == BUF_FLUSH_LRU)) { - have_LRU_mutex = TRUE; /* optimistic */ + have_LRU_mutex = true; /* optimistic */ } retry_mutex: if (have_LRU_mutex) { @@ -4487,6 +4479,7 @@ retry_mutex: && !have_LRU_mutex) { mutex_exit(block_mutex); + have_LRU_mutex = true; goto retry_mutex; } diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc index ab48e4523b3..0f39c5de2ca 100644 --- a/storage/xtradb/buf/buf0flu.cc +++ b/storage/xtradb/buf/buf0flu.cc @@ -1093,8 +1093,8 @@ buf_flush_page( # if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG /********************************************************************//** Writes a flushable page asynchronously from the buffer pool to a file. -NOTE: block->mutex must be held upon entering this function, and it will be -released by this function after flushing. This is loosely based on +NOTE: block and LRU list mutexes must be held upon entering this function, and +they will be released by this function after flushing. This is loosely based on buf_flush_batch() and buf_flush_page(). @return TRUE if the page was flushed and the mutexes released */ UNIV_INTERN @@ -1645,6 +1645,8 @@ buf_do_LRU_batch( flush_counters_t* n) /*!< out: flushed/evicted page counts */ { + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + if (buf_LRU_evict_from_unzip_LRU(buf_pool)) { n->unzip_LRU_evicted = buf_free_from_unzip_LRU_list_batch(buf_pool, max); diff --git a/storage/xtradb/buf/buf0lru.cc b/storage/xtradb/buf/buf0lru.cc index e9b6d8f3fb5..f2ce261c9df 100644 --- a/storage/xtradb/buf/buf0lru.cc +++ b/storage/xtradb/buf/buf0lru.cc @@ -526,7 +526,7 @@ buf_flush_or_remove_page( mutex_exit(block_mutex); - *must_restart = TRUE; + *must_restart = true; processed = false; } else if (!flush) { diff --git a/storage/xtradb/buf/buf0rea.cc b/storage/xtradb/buf/buf0rea.cc index 6e348bbf004..c28df72df92 100644 --- a/storage/xtradb/buf/buf0rea.cc +++ b/storage/xtradb/buf/buf0rea.cc @@ -640,9 +640,9 @@ buf_read_ahead_linear( fail_count = 0; - for (i = low; i < high; i++) { + prio_rw_lock_t* hash_lock; - prio_rw_lock_t* hash_lock; + for (i = low; i < high; i++) { bpage = buf_page_hash_get_s_locked(buf_pool, space, i, &hash_lock); @@ -691,7 +691,7 @@ buf_read_ahead_linear( /* If we got this far, we know that enough pages in the area have been accessed in the right order: linear read-ahead can be sensible */ - bpage = buf_page_hash_get(buf_pool, space, offset); + bpage = buf_page_hash_get_s_locked(buf_pool, space, offset, &hash_lock); if (bpage == NULL) { @@ -719,6 +719,8 @@ buf_read_ahead_linear( pred_offset = fil_page_get_prev(frame); succ_offset = fil_page_get_next(frame); + rw_lock_s_unlock(hash_lock); + if ((offset == low) && (succ_offset == offset + 1)) { /* This is ok, we can continue */ diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index ee9a0b80ade..b5e81b13d9c 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -354,7 +354,6 @@ static PSI_mutex_info all_innodb_mutexes[] = { # ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK {&buffer_block_mutex_key, "buffer_block_mutex", 0}, # endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */ - {&buf_pool_mutex_key, "buf_pool_mutex", 0}, {&buf_pool_zip_mutex_key, "buf_pool_zip_mutex", 0}, {&buf_pool_LRU_list_mutex_key, "buf_pool_LRU_list_mutex", 0}, {&buf_pool_free_list_mutex_key, "buf_pool_free_list_mutex", 0}, diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc index d7ab6628757..3a0c8576be6 100644 --- a/storage/xtradb/handler/i_s.cc +++ b/storage/xtradb/handler/i_s.cc @@ -5187,11 +5187,6 @@ i_s_innodb_fill_buffer_pool( info_buffer = (buf_page_info_t*) mem_heap_zalloc( heap, mem_size); - /* Obtain appropriate mutexes. Since this is diagnostic - buffer pool info printout, we are not required to - preserve the overall consistency, so we can - release mutex periodically */ - /* GO through each block in the chunk */ for (n_blocks = num_to_process; n_blocks--; block++) { i_s_innodb_buffer_page_get_info( diff --git a/storage/xtradb/include/buf0flu.h b/storage/xtradb/include/buf0flu.h index 7699e4fda67..56b0c314b5c 100644 --- a/storage/xtradb/include/buf0flu.h +++ b/storage/xtradb/include/buf0flu.h @@ -78,8 +78,8 @@ buf_flush_init_for_writing( # if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG /********************************************************************//** Writes a flushable page asynchronously from the buffer pool to a file. -NOTE: block->mutex must be held upon entering this function, and they will be -released by this function after flushing. This is loosely based on +NOTE: block and LRU list mutexes must be held upon entering this function, and +they will be released by this function after flushing. This is loosely based on buf_flush_batch() and buf_flush_page(). @return TRUE if the page was flushed and the mutexes released */ UNIV_INTERN diff --git a/storage/xtradb/include/sync0sync.h b/storage/xtradb/include/sync0sync.h index 788f765f919..ffe2d635fbd 100644 --- a/storage/xtradb/include/sync0sync.h +++ b/storage/xtradb/include/sync0sync.h @@ -69,7 +69,6 @@ instrumentation due to their large number of instances. */ /* Key defines to register InnoDB mutexes with performance schema */ extern mysql_pfs_key_t autoinc_mutex_key; extern mysql_pfs_key_t buffer_block_mutex_key; -extern mysql_pfs_key_t buf_pool_mutex_key; extern mysql_pfs_key_t buf_pool_zip_mutex_key; extern mysql_pfs_key_t buf_pool_LRU_list_mutex_key; extern mysql_pfs_key_t buf_pool_free_list_mutex_key; diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index ec2c321e272..f2ac976a4e5 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -47,7 +47,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_BUGFIX 22 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 71.0 +#define PERCONA_INNODB_VERSION 72.0 #endif /* Enable UNIV_LOG_ARCHIVE in XtraDB */ diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc index cb6d648722b..a53e22fa3f1 100644 --- a/storage/xtradb/srv/srv0start.cc +++ b/storage/xtradb/srv/srv0start.cc @@ -129,20 +129,30 @@ UNIV_INTERN enum srv_shutdown_state srv_shutdown_state = SRV_SHUTDOWN_NONE; static os_file_t files[1000]; /** io_handler_thread parameters for thread identification */ -static ulint n[SRV_MAX_N_IO_THREADS + 6]; -/** io_handler_thread identifiers, 32 is the maximum number of purge threads */ -static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6 +static ulint n[SRV_MAX_N_IO_THREADS]; +/** io_handler_thread identifiers, 32 is the maximum number of purge threads. +The extra elements at the end are allocated as follows: +SRV_MAX_N_IO_THREADS + 1: srv_master_thread +SRV_MAX_N_IO_THREADS + 2: lock_wait_timeout_thread +SRV_MAX_N_IO_THREADS + 3: srv_error_monitor_thread +SRV_MAX_N_IO_THREADS + 4: srv_monitor_thread +SRV_MAX_N_IO_THREADS + 5: srv_redo_log_follow_thread +SRV_MAX_N_IO_THREADS + 6: srv_purge_coordinator_thread +SRV_MAX_N_IO_THREADS + 7: srv_worker_thread +... +SRV_MAX_N_IO_THREADS + 7 + srv_n_purge_threads - 1: srv_worker_thread */ +static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 7 + SRV_MAX_N_PURGE_THREADS]; /** Thead handles */ -static os_thread_t thread_handles[SRV_MAX_N_IO_THREADS + 6 + SRV_MAX_N_PURGE_THREADS]; +static os_thread_t thread_handles[SRV_MAX_N_IO_THREADS + 7 + SRV_MAX_N_PURGE_THREADS]; static os_thread_t buf_flush_page_cleaner_thread_handle; static os_thread_t buf_dump_thread_handle; static os_thread_t dict_stats_thread_handle; static os_thread_t buf_flush_lru_manager_thread_handle; static os_thread_t srv_redo_log_follow_thread_handle; /** Status variables, is thread started ?*/ -static bool thread_started[SRV_MAX_N_IO_THREADS + 6 + SRV_MAX_N_PURGE_THREADS] = {false}; +static bool thread_started[SRV_MAX_N_IO_THREADS + 7 + SRV_MAX_N_PURGE_THREADS] = {false}; static bool buf_flush_page_cleaner_thread_started = false; static bool buf_dump_thread_started = false; static bool dict_stats_thread_started = false; @@ -1883,6 +1893,7 @@ innobase_start_or_create_for_mysql(void) + 1 /* srv_error_monitor_thread */ + 1 /* srv_monitor_thread */ + 1 /* srv_master_thread */ + + 1 /* srv_redo_log_follow_thread */ + 1 /* srv_purge_coordinator_thread */ + 1 /* buf_dump_thread */ + 1 /* dict_stats_thread */ @@ -2790,21 +2801,21 @@ files_checked: if (!srv_read_only_mode && srv_force_recovery < SRV_FORCE_NO_BACKGROUND) { - thread_handles[5 + SRV_MAX_N_IO_THREADS] = os_thread_create( + thread_handles[6 + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_purge_coordinator_thread, - NULL, thread_ids + 5 + SRV_MAX_N_IO_THREADS); + NULL, thread_ids + 6 + SRV_MAX_N_IO_THREADS); - thread_started[5 + SRV_MAX_N_IO_THREADS] = true; + thread_started[6 + SRV_MAX_N_IO_THREADS] = true; ut_a(UT_ARR_SIZE(thread_ids) - > 5 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS); + > 6 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS); /* We've already created the purge coordinator thread above. */ for (i = 1; i < srv_n_purge_threads; ++i) { - thread_handles[5 + i + SRV_MAX_N_IO_THREADS] = os_thread_create( + thread_handles[6 + i + SRV_MAX_N_IO_THREADS] = os_thread_create( srv_worker_thread, NULL, - thread_ids + 5 + i + SRV_MAX_N_IO_THREADS); - thread_started[5 + i + SRV_MAX_N_IO_THREADS] = true; + thread_ids + 6 + i + SRV_MAX_N_IO_THREADS); + thread_started[6 + i + SRV_MAX_N_IO_THREADS] = true; } srv_start_wait_for_purge_to_start(); |