From b0d3898dc8cafcdae02481c5ac9986212278a61d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Nov 2010 13:04:12 +0100 Subject: [PATCH 1/6] Updated with changes from lp:percona-server/release-5.1.52-11 as of November 24, 2010 Merged: revid:oleg.tsarev@percona.com-20101118145125-wjhjrb5jwhi0g7sj --- ChangeLog | 19 +- btr/btr0btr.c | 9 +- btr/btr0cur.c | 10 +- btr/btr0pcur.c | 2 - btr/btr0sea.c | 3 +- buf/buf0buf.c | 457 -------------- buf/buf0flu.c | 14 +- dict/dict0crea.c | 2 - dict/dict0dict.c | 9 - eval/eval0eval.c | 7 +- ha/hash0hash.c | 64 -- handler/ha_innodb.cc | 24 +- handler/i_s.cc | 1 + handler/innodb_patch_info.h | 1 - include/buf0buf.h | 6 +- include/hash0hash.h | 49 -- include/os0proc.h | 28 - include/os0sync.h | 2 +- include/srv0srv.h | 4 - include/univ.i | 4 +- include/ut0lst.h | 43 -- include/ut0rnd.ic | 3 - log/log0recv.c | 7 +- os/os0file.c | 23 +- os/os0proc.c | 170 ------ .../percona_innodb_buffer_pool_shm-master.opt | 1 - .../percona_innodb_buffer_pool_shm.result | 6 - .../percona_innodb_buffer_pool_shm.test | 18 - .../percona_log_connection_error.result | 15 - .../percona_log_connection_error.test | 52 -- ...ona_query_response_time-replication.result | 60 -- ...rcona_query_response_time-replication.test | 52 -- .../percona_query_response_time-stored.result | 316 ---------- .../percona_query_response_time-stored.test | 87 --- .../percona_query_response_time.result | 570 ------------------ .../percona_query_response_time.test | 65 -- .../percona_query_response_time_flush.inc | 1 - .../percona_query_response_time_show.inc | 8 - .../percona_query_response_time_sleep.inc | 19 - percona-suite/percona_server_variables.result | 5 - ..._log-use_global_long_query_time-master.opt | 1 - percona-suite/percona_sql_no_fcache.result | 12 - percona-suite/percona_sql_no_fcache.test | 11 - .../percona_query_cache_with_comments.inc | 0 ...rcona_query_cache_with_comments.inc.backup | 0 .../percona_query_cache_with_comments.result | 0 .../percona_query_cache_with_comments.test | 1 + ...ercona_query_cache_with_comments_begin.inc | 0 ...ercona_query_cache_with_comments_clear.inc | 0 ...ona_query_cache_with_comments_crash.result | 0 ...rcona_query_cache_with_comments_crash.test | 0 ...a_query_cache_with_comments_disable.result | 0 ...ona_query_cache_with_comments_disable.test | 0 .../percona_query_cache_with_comments_end.inc | 0 ...percona_query_cache_with_comments_eval.inc | 0 ...e_with_comments_prepared_statements.result | 0 ...che_with_comments_prepared_statements.test | 0 ...percona_query_cache_with_comments_show.inc | 0 ...rcona_status_wait_query_cache_mutex.result | 0 ...percona_status_wait_query_cache_mutex.test | 0 ...w_extended-control_global_slow-master.opt} | 0 ..._slow_extended-control_global_slow.result} | 0 ...na_slow_extended-control_global_slow.test} | 0 ..._slow_extended-log_slow_filter-master.opt} | 0 ...cona_slow_extended-log_slow_filter.result} | 0 ...ercona_slow_extended-log_slow_filter.test} | 0 ...ow_extended-log_slow_verbosity-master.opt} | 0 ...a_slow_extended-log_slow_verbosity.result} | 0 ...ona_slow_extended-log_slow_verbosity.test} | 0 ..._slow_extended-long_query_time-master.opt} | 0 ...cona_slow_extended-long_query_time.result} | 0 ...ercona_slow_extended-long_query_time.test} | 0 ...-microseconds_in_slow_extended-master.opt} | 0 ...nded-microseconds_in_slow_extended.result} | 0 ...tended-microseconds_in_slow_extended.test} | 0 ...xtended-min_examined_row_limit-master.opt} | 0 ...ow_extended-min_examined_row_limit.result} | 0 ...slow_extended-min_examined_row_limit.test} | 0 ...ow_extended-slave_innodb_stats-master.opt} | 0 ...low_extended-slave_innodb_stats-slave.opt} | 0 ...a_slow_extended-slave_innodb_stats.result} | 0 ...ona_slow_extended-slave_innodb_stats.test} | 5 +- ...and-use_global_long_query_time-master.opt} | 0 ...-and-use_global_long_query_time-slave.opt} | 0 ...nts-and-use_global_long_query_time.result} | 12 - ...ments-and-use_global_long_query_time.test} | 44 +- ...slow_extended-slave_statements-master.opt} | 0 ..._slow_extended-slave_statements-slave.opt} | 0 ...ona_slow_extended-slave_statements.result} | 0 ...rcona_slow_extended-slave_statements.test} | 1 + ...nded-use_global_long_query_time-master.opt | 1 + ...xtended-use_global_long_query_time.result} | 2 +- ..._extended-use_global_long_query_time.test} | 2 +- .../percona_show_slave_status_nolock.result | 23 + .../percona_show_slave_status_nolock.test | 28 + que/que0que.c | 5 - row/row0mysql.c | 16 +- row/row0purge.c | 7 +- row/row0sel.c | 118 ++-- row/row0umod.c | 7 +- row/row0vers.c | 11 +- srv/srv0srv.c | 5 - srv/srv0start.c | 2 - trx/trx0purge.c | 12 +- trx/trx0roll.c | 5 - trx/trx0sys.c | 14 +- trx/trx0trx.c | 3 +- trx/trx0undo.c | 5 - 108 files changed, 233 insertions(+), 2356 deletions(-) delete mode 100644 percona-suite/percona_innodb_buffer_pool_shm-master.opt delete mode 100644 percona-suite/percona_innodb_buffer_pool_shm.result delete mode 100644 percona-suite/percona_innodb_buffer_pool_shm.test delete mode 100644 percona-suite/percona_log_connection_error.result delete mode 100644 percona-suite/percona_log_connection_error.test delete mode 100644 percona-suite/percona_query_response_time-replication.result delete mode 100644 percona-suite/percona_query_response_time-replication.test delete mode 100644 percona-suite/percona_query_response_time-stored.result delete mode 100644 percona-suite/percona_query_response_time-stored.test delete mode 100644 percona-suite/percona_query_response_time.result delete mode 100644 percona-suite/percona_query_response_time.test delete mode 100644 percona-suite/percona_query_response_time_flush.inc delete mode 100644 percona-suite/percona_query_response_time_show.inc delete mode 100644 percona-suite/percona_query_response_time_sleep.inc delete mode 100644 percona-suite/percona_slow_query_log-use_global_long_query_time-master.opt delete mode 100644 percona-suite/percona_sql_no_fcache.result delete mode 100644 percona-suite/percona_sql_no_fcache.test rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments.inc.backup (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments.result (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments.test (90%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_begin.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_clear.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_crash.result (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_crash.test (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_disable.result (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_disable.test (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_end.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_eval.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_prepared_statements.result (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_prepared_statements.test (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_query_cache_with_comments_show.inc (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_status_wait_query_cache_mutex.result (100%) rename percona-suite/{ => query_cache_enhance.patch}/percona_status_wait_query_cache_mutex.test (100%) rename percona-suite/{percona_slow_query_log-control_global_slow-master.opt => slow_extended.patch/percona_slow_extended-control_global_slow-master.opt} (100%) rename percona-suite/{percona_slow_query_log-control_global_slow.result => slow_extended.patch/percona_slow_extended-control_global_slow.result} (100%) rename percona-suite/{percona_slow_query_log-control_global_slow.test => slow_extended.patch/percona_slow_extended-control_global_slow.test} (100%) rename percona-suite/{percona_slow_query_log-log_slow_filter-master.opt => slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt} (100%) rename percona-suite/{percona_slow_query_log-log_slow_filter.result => slow_extended.patch/percona_slow_extended-log_slow_filter.result} (100%) rename percona-suite/{percona_slow_query_log-log_slow_filter.test => slow_extended.patch/percona_slow_extended-log_slow_filter.test} (100%) rename percona-suite/{percona_slow_query_log-log_slow_verbosity-master.opt => slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt} (100%) rename percona-suite/{percona_slow_query_log-log_slow_verbosity.result => slow_extended.patch/percona_slow_extended-log_slow_verbosity.result} (100%) rename percona-suite/{percona_slow_query_log-log_slow_verbosity.test => slow_extended.patch/percona_slow_extended-log_slow_verbosity.test} (100%) rename percona-suite/{percona_slow_query_log-long_query_time-master.opt => slow_extended.patch/percona_slow_extended-long_query_time-master.opt} (100%) rename percona-suite/{percona_slow_query_log-long_query_time.result => slow_extended.patch/percona_slow_extended-long_query_time.result} (100%) rename percona-suite/{percona_slow_query_log-long_query_time.test => slow_extended.patch/percona_slow_extended-long_query_time.test} (100%) rename percona-suite/{percona_slow_query_log-microseconds_in_slow_query_log-master.opt => slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt} (100%) rename percona-suite/{percona_slow_query_log-microseconds_in_slow_query_log.result => slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result} (100%) rename percona-suite/{percona_slow_query_log-microseconds_in_slow_query_log.test => slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test} (100%) rename percona-suite/{percona_slow_query_log-min_examined_row_limit-master.opt => slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt} (100%) rename percona-suite/{percona_slow_query_log-min_examined_row_limit.result => slow_extended.patch/percona_slow_extended-min_examined_row_limit.result} (100%) rename percona-suite/{percona_slow_query_log-min_examined_row_limit.test => slow_extended.patch/percona_slow_extended-min_examined_row_limit.test} (100%) rename percona-suite/{percona_slave_innodb_stats-master.opt => slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt} (100%) rename percona-suite/{percona_slave_innodb_stats-slave.opt => slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt} (100%) rename percona-suite/{percona_slave_innodb_stats.result => slow_extended.patch/percona_slow_extended-slave_innodb_stats.result} (100%) rename percona-suite/{percona_slave_innodb_stats.test => slow_extended.patch/percona_slow_extended-slave_innodb_stats.test} (89%) rename percona-suite/{percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt => slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt} (100%) rename percona-suite/{percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt => slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt} (100%) rename percona-suite/{percona_log_slow_slave_statements-and-use_global_long_query_time.result => slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result} (87%) rename percona-suite/{percona_log_slow_slave_statements-and-use_global_long_query_time.test => slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test} (60%) rename percona-suite/{percona_log_slow_slave_statements-master.opt => slow_extended.patch/percona_slow_extended-slave_statements-master.opt} (100%) rename percona-suite/{percona_log_slow_slave_statements-slave.opt => slow_extended.patch/percona_slow_extended-slave_statements-slave.opt} (100%) rename percona-suite/{percona_log_slow_slave_statements.result => slow_extended.patch/percona_slow_extended-slave_statements.result} (100%) rename percona-suite/{percona_log_slow_slave_statements.test => slow_extended.patch/percona_slow_extended-slave_statements.test} (98%) create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt rename percona-suite/{percona_slow_query_log-use_global_long_query_time.result => slow_extended.patch/percona_slow_extended-use_global_long_query_time.result} (96%) rename percona-suite/{percona_slow_query_log-use_global_long_query_time.test => slow_extended.patch/percona_slow_extended-use_global_long_query_time.test} (95%) create mode 100644 percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result create mode 100644 percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test diff --git a/ChangeLog b/ChangeLog index 43f87a1baf5..c185215e65f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2010-10-11 The InnoDB Team + * row/row0sel.c + Fix Bug #57345 btr_pcur_store_position abort for load with + concurrent lock/unlock tables + +2010-10-06 The InnoDB Team + * row/row0mysql.c, innodb_bug57255.result, innodb_bug57255.test + Fix Bug #Cascade Delete results in "Got error -1 from storage engine" + +2010-09-27 The InnoDB Team + + * row/row0sel.c, innodb_bug56716.result, innodb_bug56716.test: + Fix Bug #56716 InnoDB locks a record gap without locking the table + +2010-09-06 The InnoDB Team + * dict/dict0load.c, innodb_bug53756.test innodb_bug53756.result + Fix Bug #53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery + 2010-08-24 The InnoDB Team * handler/ha_innodb.c, dict/dict0dict.c: @@ -27,7 +45,6 @@ * handler/ha_innodb.cc Fix Bug #55382 Assignment with SELECT expressions takes unexpected S locks in READ COMMITTED ->>>>>>> MERGE-SOURCE 2010-07-27 The InnoDB Team diff --git a/btr/btr0btr.c b/btr/btr0btr.c index ff047095aa4..4d6cd8d80fc 100644 --- a/btr/btr0btr.c +++ b/btr/btr0btr.c @@ -1925,7 +1925,6 @@ btr_page_split_and_insert( buf_block_t* left_block; buf_block_t* right_block; buf_block_t* insert_block; - page_t* insert_page; page_cur_t* page_cursor; rec_t* first_rec; byte* buf = 0; /* remove warning */ @@ -2183,8 +2182,6 @@ insert_empty: insert_block = right_block; } - insert_page = buf_block_get_frame(insert_block); - /* 7. Reposition the cursor for insert and try insertion */ page_cursor = btr_cur_get_page_cur(cursor); @@ -2196,8 +2193,12 @@ insert_empty: #ifdef UNIV_ZIP_DEBUG { + page_t* insert_page + = buf_block_get_frame(insert_block); + page_zip_des_t* insert_page_zip = buf_block_get_page_zip(insert_block); + ut_a(!insert_page_zip || page_zip_validate(insert_page_zip, insert_page)); } @@ -2590,7 +2591,6 @@ btr_compress( ulint n_recs; ulint max_ins_size; ulint max_ins_size_reorg; - ulint level; block = btr_cur_get_block(cursor); page = btr_cur_get_page(cursor); @@ -2600,7 +2600,6 @@ btr_compress( ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - level = btr_page_get_level(page, mtr); space = dict_index_get_space(index); zip_size = dict_table_zip_size(index->table); diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 3fc2b48162a..267c4adea70 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -2013,7 +2013,6 @@ btr_cur_optimistic_update( page_t* page; page_zip_des_t* page_zip; rec_t* rec; - rec_t* orig_rec; ulint max_size; ulint new_rec_size; ulint old_rec_size; @@ -2027,7 +2026,7 @@ btr_cur_optimistic_update( block = btr_cur_get_block(cursor); page = buf_block_get_frame(block); - orig_rec = rec = btr_cur_get_rec(cursor); + rec = btr_cur_get_rec(cursor); index = cursor->index; ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); @@ -4673,12 +4672,17 @@ btr_free_externally_stored_field( } for (;;) { +#ifdef UNIV_SYNC_DEBUG buf_block_t* rec_block; +#endif /* UNIV_SYNC_DEBUG */ buf_block_t* ext_block; mtr_start(&mtr); - rec_block = buf_page_get(page_get_space_id( +#ifdef UNIV_SYNC_DEBUG + rec_block = +#endif /* UNIV_SYNC_DEBUG */ + buf_page_get(page_get_space_id( page_align(field_ref)), rec_zip_size, page_get_page_no( diff --git a/btr/btr0pcur.c b/btr/btr0pcur.c index 537c26f6bf2..f95a5487c94 100644 --- a/btr/btr0pcur.c +++ b/btr/btr0pcur.c @@ -467,7 +467,6 @@ btr_pcur_move_backward_from_page( mtr_t* mtr) /*!< in: mtr */ { ulint prev_page_no; - ulint space; page_t* page; buf_block_t* prev_block; ulint latch_mode; @@ -503,7 +502,6 @@ btr_pcur_move_backward_from_page( page = btr_pcur_get_page(cursor); prev_page_no = btr_page_get_prev(page, mtr); - space = buf_block_get_space(btr_pcur_get_block(cursor)); if (prev_page_no == FIL_NULL) { } else if (btr_pcur_is_before_first_on_page(cursor)) { diff --git a/btr/btr0sea.c b/btr/btr0sea.c index 6628333d32a..c78f791480c 100644 --- a/btr/btr0sea.c +++ b/btr/btr0sea.c @@ -1620,7 +1620,6 @@ btr_search_update_hash_on_delete( rec_t* rec; ulint fold; dulint index_id; - ibool found; ulint offsets_[REC_OFFS_NORMAL_SIZE]; mem_heap_t* heap = NULL; rec_offs_init(offsets_); @@ -1653,7 +1652,7 @@ btr_search_update_hash_on_delete( } rw_lock_x_lock(&btr_search_latch); - found = ha_search_and_delete_if_found(table, fold, rec); + ha_search_and_delete_if_found(table, fold, rec); rw_lock_x_unlock(&btr_search_latch); } diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 48f367f0957..952d1cf68be 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -53,10 +53,6 @@ Created 11/5/1995 Heikki Tuuri #include "page0zip.h" #include "trx0trx.h" #include "srv0start.h" -#include "que0que.h" -#include "read0read.h" -#include "row0row.h" -#include "ha_prototypes.h" /* prototypes for new functions added to ha_innodb.cc */ trx_t* innobase_get_trx(); @@ -314,30 +310,6 @@ read-ahead or flush occurs */ UNIV_INTERN ibool buf_debug_prints = FALSE; #endif /* UNIV_DEBUG */ -/* Buffer pool shared memory segment information */ -typedef struct buf_shm_info_struct buf_shm_info_t; - -struct buf_shm_info_struct { - char head_str[8]; - ulint binary_id; - ibool is_new; /* during initializing */ - ibool clean; /* clean shutdowned and free */ - ibool reusable; /* reusable */ - ulint buf_pool_size; /* backup value */ - ulint page_size; /* backup value */ - ulint frame_offset; /* offset of the first frame based on chunk->mem */ - ulint zip_hash_offset; - ulint zip_hash_n; - - ulint checksum; - - buf_pool_t buf_pool_backup; - buf_chunk_t chunk_backup; - - ib_uint64_t dummy; -}; - -#define BUF_SHM_INFO_HEAD "XTRA_SHM" #endif /* !UNIV_HOTBACKUP */ /********************************************************************//** @@ -784,45 +756,6 @@ buf_block_init( #endif /* UNIV_SYNC_DEBUG */ } -static -void -buf_block_reuse( -/*============*/ - buf_block_t* block, - ptrdiff_t frame_offset) -{ - /* block_init */ - block->frame += frame_offset; - - UNIV_MEM_DESC(block->frame, UNIV_PAGE_SIZE, block); - - block->index = NULL; - -#ifdef UNIV_DEBUG - /* recreate later */ - block->page.in_page_hash = FALSE; - block->page.in_zip_hash = FALSE; -#endif /* UNIV_DEBUG */ - -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG - block->n_pointers = 0; -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ - - if (block->page.zip.data) - block->page.zip.data += frame_offset; - - block->is_hashed = FALSE; - - mutex_create(&block->mutex, SYNC_BUF_BLOCK); - - rw_lock_create(&block->lock, SYNC_LEVEL_VARYING); - ut_ad(rw_lock_validate(&(block->lock))); - -#ifdef UNIV_SYNC_DEBUG - rw_lock_create(&block->debug_latch, SYNC_NO_ORDER_CHECK); -#endif /* UNIV_SYNC_DEBUG */ -} - /********************************************************************//** Allocates a chunk of buffer frames. @return chunk, or NULL on failure */ @@ -835,188 +768,26 @@ buf_chunk_init( { buf_block_t* block; byte* frame; - ulint zip_hash_n = 0; - ulint zip_hash_mem_size = 0; - hash_table_t* zip_hash_tmp = NULL; ulint i; - buf_shm_info_t* shm_info = NULL; /* Round down to a multiple of page size, although it already should be. */ mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE); - - srv_buffer_pool_shm_is_reused = FALSE; - - if (srv_buffer_pool_shm_key) { - /* zip_hash size */ - zip_hash_n = (mem_size / UNIV_PAGE_SIZE) * 2; - zip_hash_mem_size = ut_2pow_round(hash_create_needed(zip_hash_n) - + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - } - /* Reserve space for the block descriptors. */ mem_size += ut_2pow_round((mem_size / UNIV_PAGE_SIZE) * (sizeof *block) + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - if (srv_buffer_pool_shm_key) { - mem_size += ut_2pow_round(sizeof(buf_shm_info_t) - + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - mem_size += zip_hash_mem_size; - } chunk->mem_size = mem_size; - - if (srv_buffer_pool_shm_key) { - ulint binary_id; - ibool is_new; - - ut_a(buf_pool->n_chunks == 1); - - fprintf(stderr, - "InnoDB: Warning: The innodb_buffer_pool_shm_key option has been specified.\n" - "InnoDB: Do not change the following between restarts of the server while this option is being used:\n" - "InnoDB: * the mysqld executable between restarts of the server.\n" - "InnoDB: * the value of innodb_buffer_pool_size.\n" - "InnoDB: * the value of innodb_page_size.\n" - "InnoDB: * datafiles created by InnoDB during this session.\n" - "InnoDB: Otherwise, data corruption in datafiles may result.\n"); - - /* FIXME: This is vague id still */ - binary_id = (ulint) ((byte*)mtr_commit - (byte*)btr_root_get) - + (ulint) ((byte*)os_get_os_version - (byte*)buf_calc_page_new_checksum) - + (ulint) ((byte*)page_dir_find_owner_slot - (byte*)dfield_data_is_binary_equal) - + (ulint) ((byte*)que_graph_publish - (byte*)dict_casedn_str) - + (ulint) ((byte*)read_view_oldest_copy_or_open_new - (byte*)fil_space_get_version) - + (ulint) ((byte*)rec_get_n_extern_new - (byte*)fsp_get_size_low) - + (ulint) ((byte*)row_get_trx_id_offset - (byte*)ha_create_func) - + (ulint) ((byte*)srv_set_io_thread_op_info - (byte*)thd_is_replication_slave_thread) - + (ulint) ((byte*)mutex_create_func - (byte*)ibuf_inside) - + (ulint) ((byte*)trx_set_detailed_error - (byte*)lock_check_trx_id_sanity) - + (ulint) ((byte*)ut_time - (byte*)mem_heap_strdup); - - chunk->mem = os_shm_alloc(&chunk->mem_size, srv_buffer_pool_shm_key, &is_new); - - if (UNIV_UNLIKELY(chunk->mem == NULL)) { - return(NULL); - } -init_again: -#ifdef UNIV_SET_MEM_TO_ZERO - if (is_new) { - memset(chunk->mem, '\0', chunk->mem_size); - } -#endif - /* for ut_fold_binary_32(), these values should be 32-bit aligned */ - ut_a(sizeof(buf_shm_info_t) % 4 == 0); - ut_a((ulint)chunk->mem % 4 == 0); - ut_a(chunk->mem_size % 4 == 0); - - shm_info = chunk->mem; - - zip_hash_tmp = (hash_table_t*)((byte*)chunk->mem + chunk->mem_size - zip_hash_mem_size); - - if (is_new) { - strncpy(shm_info->head_str, BUF_SHM_INFO_HEAD, 8); - shm_info->binary_id = binary_id; - shm_info->is_new = TRUE; /* changed to FALSE when the initialization is finished */ - shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ - shm_info->reusable = FALSE; /* changed to TRUE when validation is finished. */ - shm_info->buf_pool_size = srv_buf_pool_size; - shm_info->page_size = srv_page_size; - shm_info->zip_hash_offset = chunk->mem_size - zip_hash_mem_size; - shm_info->zip_hash_n = zip_hash_n; - } else { - ulint checksum; - - if (strncmp(shm_info->head_str, BUF_SHM_INFO_HEAD, 8)) { - fprintf(stderr, - "InnoDB: Error: The shared memory segment seems not to be for buffer pool.\n"); - return(NULL); - } - if (shm_info->binary_id != binary_id) { - fprintf(stderr, - "InnoDB: Error: The shared memory segment seems not to be for this binary.\n"); - return(NULL); - } - if (shm_info->is_new) { - fprintf(stderr, - "InnoDB: Error: The shared memory was not initialized yet.\n"); - return(NULL); - } - if (shm_info->buf_pool_size != srv_buf_pool_size) { - fprintf(stderr, - "InnoDB: Error: srv_buf_pool_size is different (shm=%lu current=%lu).\n", - shm_info->buf_pool_size, srv_buf_pool_size); - return(NULL); - } - if (shm_info->page_size != srv_page_size) { - fprintf(stderr, - "InnoDB: Error: srv_page_size is different (shm=%lu current=%lu).\n", - shm_info->page_size, srv_page_size); - return(NULL); - } - if (!shm_info->reusable) { - fprintf(stderr, - "InnoDB: Warning: The shared memory has unrecoverable contents.\n" - "InnoDB: The shared memory segment is initialized.\n"); - is_new = TRUE; - goto init_again; - } - if (!shm_info->clean) { - fprintf(stderr, - "InnoDB: Warning: The shared memory was not shut down cleanly.\n" - "InnoDB: The shared memory segment is initialized.\n"); - is_new = TRUE; - goto init_again; - } - - ut_a(shm_info->zip_hash_offset == chunk->mem_size - zip_hash_mem_size); - ut_a(shm_info->zip_hash_n == zip_hash_n); - - /* check checksum */ - if (srv_buffer_pool_shm_checksum) { - checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), - chunk->mem_size - sizeof(buf_shm_info_t)); - } else { - checksum = BUF_NO_CHECKSUM_MAGIC; - } - - if (shm_info->checksum != BUF_NO_CHECKSUM_MAGIC - && shm_info->checksum != checksum) { - fprintf(stderr, - "InnoDB: Error: checksum of the shared memory is not match. " - "(stored=%lu calculated=%lu)\n", - shm_info->checksum, checksum); - return(NULL); - } - - /* flag to use the segment. */ - shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ - } - - /* init zip_hash contents */ - if (is_new) { - hash_create_init(zip_hash_tmp, zip_hash_n); - } else { - /* adjust offset is done later */ - hash_create_reuse(zip_hash_tmp); - - srv_buffer_pool_shm_is_reused = TRUE; - } - } else { chunk->mem = os_mem_alloc_large(&chunk->mem_size); if (UNIV_UNLIKELY(chunk->mem == NULL)) { return(NULL); } - } /* Allocate the block descriptors from the start of the memory block. */ - if (srv_buffer_pool_shm_key) { - chunk->blocks = (buf_block_t*)((byte*)chunk->mem + sizeof(buf_shm_info_t)); - } else { chunk->blocks = chunk->mem; - } /* Align a pointer to the first frame. Note that when os_large_page_size is smaller than UNIV_PAGE_SIZE, @@ -1024,13 +795,8 @@ init_again: it is bigger, we may allocate more blocks than requested. */ frame = ut_align(chunk->mem, UNIV_PAGE_SIZE); - if (srv_buffer_pool_shm_key) { - /* reserve zip_hash space and always -1 for reproductibity */ - chunk->size = (chunk->mem_size - zip_hash_mem_size) / UNIV_PAGE_SIZE - 1; - } else { chunk->size = chunk->mem_size / UNIV_PAGE_SIZE - (frame != chunk->mem); - } /* Subtract the space needed for block descriptors. */ { @@ -1044,98 +810,6 @@ init_again: chunk->size = size; } - if (shm_info && !(shm_info->is_new)) { - /* convert the shared memory segment for reuse */ - ptrdiff_t phys_offset; - ptrdiff_t logi_offset; - ptrdiff_t blocks_offset; - void* previous_frame_address; - - if (chunk->size < shm_info->chunk_backup.size) { - fprintf(stderr, - "InnoDB: Error: The buffer pool became smaller because of allocated address.\n" - "InnoDB: Retrying may avoid this situation.\n"); - shm_info->clean = TRUE; /* release the flag for retrying */ - return(NULL); - } - - chunk->size = shm_info->chunk_backup.size; - phys_offset = frame - ((byte*)chunk->mem + shm_info->frame_offset); - logi_offset = frame - chunk->blocks[0].frame; - previous_frame_address = chunk->blocks[0].frame; - blocks_offset = (byte*)chunk->blocks - (byte*)shm_info->chunk_backup.blocks; - - if (phys_offset || logi_offset || blocks_offset) { - fprintf(stderr, - "InnoDB: Buffer pool in the shared memory segment should be converted.\n" - "InnoDB: Previous frames in address : %p\n" - "InnoDB: Previous frames were located : %p\n" - "InnoDB: Current frames should be located: %p\n" - "InnoDB: Pysical offset : %ld (%#lx)\n" - "InnoDB: Logical offset (frames) : %ld (%#lx)\n" - "InnoDB: Logical offset (blocks) : %ld (%#lx)\n", - (byte*)chunk->mem + shm_info->frame_offset, - chunk->blocks[0].frame, frame, - phys_offset, phys_offset, logi_offset, logi_offset, - blocks_offset, blocks_offset); - } else { - fprintf(stderr, - "InnoDB: Buffer pool in the shared memory segment can be used as it is.\n"); - } - - if (phys_offset) { - fprintf(stderr, - "InnoDB: Aligning physical offset..."); - - memmove(frame, (byte*)chunk->mem + shm_info->frame_offset, - chunk->size * UNIV_PAGE_SIZE); - - fprintf(stderr, - " Done.\n"); - } - - /* buf_block_t */ - block = chunk->blocks; - for (i = chunk->size; i--; ) { - buf_block_reuse(block, logi_offset); - block++; - } - - if (logi_offset || blocks_offset) { - fprintf(stderr, - "InnoDB: Aligning logical offset..."); - - - /* buf_pool_t buf_pool_backup */ - UT_LIST_OFFSET(flush_list, buf_page_t, shm_info->buf_pool_backup.flush_list, - previous_frame_address, logi_offset, blocks_offset); - UT_LIST_OFFSET(free, buf_page_t, shm_info->buf_pool_backup.free, - previous_frame_address, logi_offset, blocks_offset); - UT_LIST_OFFSET(LRU, buf_page_t, shm_info->buf_pool_backup.LRU, - previous_frame_address, logi_offset, blocks_offset); - if (shm_info->buf_pool_backup.LRU_old) - shm_info->buf_pool_backup.LRU_old = - (buf_page_t*)((byte*)(shm_info->buf_pool_backup.LRU_old) - + (((void*)shm_info->buf_pool_backup.LRU_old > previous_frame_address) - ? logi_offset : blocks_offset)); - - UT_LIST_OFFSET(unzip_LRU, buf_block_t, shm_info->buf_pool_backup.unzip_LRU, - previous_frame_address, logi_offset, blocks_offset); - - UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_clean, - previous_frame_address, logi_offset, blocks_offset); - for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { - UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_free[i], - previous_frame_address, logi_offset, blocks_offset); - } - - HASH_OFFSET(zip_hash_tmp, buf_page_t, hash, - previous_frame_address, logi_offset, blocks_offset); - - fprintf(stderr, - " Done.\n"); - } - } else { /* Init block structs and assign frames for them. Then we assign the frames to the first blocks (we already mapped the memory above). */ @@ -1159,11 +833,6 @@ init_again: block++; frame += UNIV_PAGE_SIZE; } - } - - if (shm_info) { - shm_info->frame_offset = chunk->blocks[0].frame - (byte*)chunk->mem; - } return(chunk); } @@ -1345,8 +1014,6 @@ buf_chunk_free( UNIV_MEM_UNDESC(block); } - ut_a(!srv_buffer_pool_shm_key); - os_mem_free_large(chunk->mem, chunk->mem_size); } @@ -1396,10 +1063,7 @@ buf_pool_init(void) srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); - /* zip_hash is allocated to shm when srv_buffer_pool_shm_key is enabled */ - if (!srv_buffer_pool_shm_key) { buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size); - } buf_pool->last_printout_time = time(NULL); @@ -1414,86 +1078,6 @@ buf_pool_init(void) --------------------------- */ /* All fields are initialized by mem_zalloc(). */ - if (srv_buffer_pool_shm_key) { - buf_shm_info_t* shm_info; - - ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); - shm_info = chunk->mem; - - buf_pool->zip_hash = (hash_table_t*)((byte*)chunk->mem + shm_info->zip_hash_offset); - - if(shm_info->is_new) { - shm_info->is_new = FALSE; /* initialization was finished */ - } else { - buf_block_t* block = chunk->blocks; - buf_page_t* b; - - /* shm_info->buf_pool_backup should be converted */ - /* at buf_chunk_init(). So copy simply. */ - buf_pool->flush_list = shm_info->buf_pool_backup.flush_list; - buf_pool->freed_page_clock = shm_info->buf_pool_backup.freed_page_clock; - buf_pool->free = shm_info->buf_pool_backup.free; - buf_pool->LRU = shm_info->buf_pool_backup.LRU; - buf_pool->LRU_old = shm_info->buf_pool_backup.LRU_old; - buf_pool->LRU_old_len = shm_info->buf_pool_backup.LRU_old_len; - buf_pool->unzip_LRU = shm_info->buf_pool_backup.unzip_LRU; - buf_pool->zip_clean = shm_info->buf_pool_backup.zip_clean; - for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { - buf_pool->zip_free[i] = shm_info->buf_pool_backup.zip_free[i]; - } - - for (i = 0; i < chunk->size; i++, block++) { - if (buf_block_get_state(block) - == BUF_BLOCK_FILE_PAGE) { - ut_d(block->page.in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold( - block->page.space, - block->page.offset), - &block->page); - } - } - - for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; - b = UT_LIST_GET_NEXT(zip_list, b)) { - ut_ad(!b->in_flush_list); - ut_ad(b->in_LRU_list); - - ut_d(b->in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(b->space, b->offset), b); - } - - for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; - b = UT_LIST_GET_NEXT(flush_list, b)) { - ut_ad(b->in_flush_list); - ut_ad(b->in_LRU_list); - - switch (buf_page_get_state(b)) { - case BUF_BLOCK_ZIP_DIRTY: - ut_d(b->in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(b->space, - b->offset), b); - break; - case BUF_BLOCK_FILE_PAGE: - /* uncompressed page */ - break; - case BUF_BLOCK_ZIP_FREE: - case BUF_BLOCK_ZIP_PAGE: - case BUF_BLOCK_NOT_USED: - case BUF_BLOCK_READY_FOR_USE: - case BUF_BLOCK_MEMORY: - case BUF_BLOCK_REMOVE_HASH: - ut_error; - break; - } - } - - - } - } - mutex_exit(&LRU_list_mutex); rw_lock_x_unlock(&page_hash_latch); buf_pool_mutex_exit(); @@ -1518,34 +1102,6 @@ buf_pool_free(void) buf_chunk_t* chunk; buf_chunk_t* chunks; - if (srv_buffer_pool_shm_key) { - buf_shm_info_t* shm_info; - - ut_a(buf_pool->n_chunks == 1); - - chunk = buf_pool->chunks; - shm_info = chunk->mem; - ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); - - /* validation the shared memory segment doesn't have unrecoverable contents. */ - /* Currently, validation became not needed */ - shm_info->reusable = TRUE; - - memcpy(&(shm_info->buf_pool_backup), buf_pool, sizeof(buf_pool_t)); - memcpy(&(shm_info->chunk_backup), chunk, sizeof(buf_chunk_t)); - - if (srv_fast_shutdown < 2) { - if (srv_buffer_pool_shm_checksum) { - shm_info->checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), - chunk->mem_size - sizeof(buf_shm_info_t)); - } else { - shm_info->checksum = BUF_NO_CHECKSUM_MAGIC; - } - shm_info->clean = TRUE; - } - - os_shm_free(chunk->mem, chunk->mem_size); - } else { chunks = buf_pool->chunks; chunk = chunks + buf_pool->n_chunks; @@ -1554,13 +1110,10 @@ buf_pool_free(void) would fail at shutdown. */ os_mem_free_large(chunk->mem, chunk->mem_size); } - } mem_free(buf_pool->chunks); hash_table_free(buf_pool->page_hash); - if (!srv_buffer_pool_shm_key) { hash_table_free(buf_pool->zip_hash); - } mem_free(buf_pool); buf_pool = NULL; } @@ -1755,11 +1308,6 @@ try_again: //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); - if (srv_buffer_pool_shm_key) { - /* Cannot support shrink */ - goto func_done; - } - shrink_again: if (buf_pool->n_chunks <= 1) { @@ -2003,11 +1551,6 @@ void buf_pool_resize(void) /*=================*/ { - if (srv_buffer_pool_shm_key) { - /* Cannot support resize */ - return; - } - //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); diff --git a/buf/buf0flu.c b/buf/buf0flu.c index 0a03d583549..c1a1282fdef 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -129,11 +129,16 @@ buf_flush_delete_from_flush_rbt( buf_page_t* bpage) /*!< in: bpage to be removed. */ { +#ifdef UNIV_DEBUG ibool ret = FALSE; +#endif /* UNIV_DEBUG */ //ut_ad(buf_pool_mutex_own()); ut_ad(mutex_own(&flush_list_mutex)); - ret = rbt_delete(buf_pool->flush_rbt, &bpage); +#ifdef UNIV_DEBUG + ret = +#endif /* UNIV_DEBUG */ + rbt_delete(buf_pool->flush_rbt, &bpage); ut_ad(ret); } @@ -1303,7 +1308,6 @@ buf_flush_batch( buf_page_t* bpage; buf_page_t* prev_bpage = NULL; ulint page_count = 0; - ulint old_page_count; ulint space; ulint offset; ulint remaining = 0; @@ -1396,15 +1400,9 @@ flush_next: mutex_exit(&LRU_list_mutex); } - old_page_count = page_count; - /* Try to flush also all the neighbors */ page_count += buf_flush_try_neighbors( space, offset, flush_type, srv_flush_neighbor_pages); - /* fprintf(stderr, - "Flush type %lu, page no %lu, neighb %lu\n", - flush_type, offset, - page_count - old_page_count); */ //buf_pool_mutex_enter(); if (flush_type == BUF_FLUSH_LRU) { diff --git a/dict/dict0crea.c b/dict/dict0crea.c index 0dbbf96780f..aac215e0f3f 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -693,7 +693,6 @@ dict_create_index_tree_step( { dict_index_t* index; dict_table_t* sys_indexes; - dict_table_t* table; dtuple_t* search_tuple; ulint zip_size; btr_pcur_t pcur; @@ -702,7 +701,6 @@ dict_create_index_tree_step( ut_ad(mutex_own(&(dict_sys->mutex))); index = node->index; - table = node->table; sys_indexes = dict_sys->sys_indexes; diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 3db0b362a60..adaa87e43e9 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -4792,7 +4792,6 @@ dict_index_print_low( { ib_int64_t n_vals; ulint i; - const char* type_string; ut_ad(mutex_own(&(dict_sys->mutex))); @@ -4807,14 +4806,6 @@ dict_index_print_low( dict_index_stat_mutex_exit(index); - if (dict_index_is_clust(index)) { - type_string = "clustered index"; - } else if (dict_index_is_unique(index)) { - type_string = "unique index"; - } else { - type_string = "secondary index"; - } - fprintf(stderr, " INDEX: name %s, id %lu %lu, fields %lu/%lu," " uniq %lu, type %lu\n" diff --git a/eval/eval0eval.c b/eval/eval0eval.c index 589b0fa1576..dcd416adeee 100644 --- a/eval/eval0eval.c +++ b/eval/eval0eval.c @@ -384,18 +384,13 @@ eval_notfound( /*==========*/ func_node_t* func_node) /*!< in: function node */ { - que_node_t* arg1; - que_node_t* arg2; sym_node_t* cursor; sel_node_t* sel_node; ibool ibool_val; - arg1 = func_node->args; - arg2 = que_node_get_next(arg1); - ut_ad(func_node->func == PARS_NOTFOUND_TOKEN); - cursor = arg1; + cursor = func_node->args; ut_ad(que_node_get_type(cursor) == QUE_NODE_SYMBOL); diff --git a/ha/hash0hash.c b/ha/hash0hash.c index 0f4fc55d895..30c304dafcd 100644 --- a/ha/hash0hash.c +++ b/ha/hash0hash.c @@ -127,70 +127,6 @@ hash_create( return(table); } -/*************************************************************//** -*/ -UNIV_INTERN -ulint -hash_create_needed( -/*===============*/ - ulint n) -{ - ulint prime; - ulint offset; - - prime = ut_find_prime(n); - - offset = (sizeof(hash_table_t) + 7) / 8; - offset *= 8; - - return(offset + sizeof(hash_cell_t) * prime); -} - -UNIV_INTERN -void -hash_create_init( -/*=============*/ - hash_table_t* table, - ulint n) -{ - ulint prime; - ulint offset; - - prime = ut_find_prime(n); - - offset = (sizeof(hash_table_t) + 7) / 8; - offset *= 8; - - table->array = (hash_cell_t*)(((byte*)table) + offset); - table->n_cells = prime; -# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG - table->adaptive = FALSE; -# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ - table->n_mutexes = 0; - table->mutexes = NULL; - table->heaps = NULL; - table->heap = NULL; - ut_d(table->magic_n = HASH_TABLE_MAGIC_N); - - /* Initialize the cell array */ - hash_table_clear(table); -} - -UNIV_INTERN -void -hash_create_reuse( -/*==============*/ - hash_table_t* table) -{ - ulint offset; - - offset = (sizeof(hash_table_t) + 7) / 8; - offset *= 8; - - table->array = (hash_cell_t*)(((byte*)table) + offset); - ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); -} - /*************************************************************//** Frees a hash table. */ UNIV_INTERN diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 3b833537e18..7fed03c5d15 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -197,7 +197,6 @@ static my_bool innobase_rollback_on_timeout = FALSE; static my_bool innobase_create_status_file = FALSE; static my_bool innobase_stats_on_metadata = TRUE; static my_bool innobase_use_sys_stats_table = FALSE; -static my_bool innobase_buffer_pool_shm_checksum = TRUE; static char* internal_innobase_data_file_path = NULL; @@ -2431,7 +2430,6 @@ innobase_change_buffering_inited_ok: srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; srv_use_checksums = (ibool) innobase_use_checksums; srv_fast_checksum = (ibool) innobase_fast_checksum; - srv_buffer_pool_shm_checksum = (ibool) innobase_buffer_pool_shm_checksum; #ifdef HAVE_LARGE_PAGES if ((os_use_large_pages = (ibool) my_use_large_pages)) @@ -7420,7 +7418,6 @@ innobase_drop_database( ulint len = 0; trx_t* trx; char* ptr; - int error; char* namebuf; THD* thd = current_thd; @@ -7463,7 +7460,7 @@ innobase_drop_database( #else trx = innobase_trx_allocate(thd); #endif - error = row_drop_database_for_mysql(namebuf, trx); + row_drop_database_for_mysql(namebuf, trx); my_free(namebuf, MYF(0)); /* Flush the log to reduce probability that the .frm files and @@ -9329,12 +9326,9 @@ innodb_show_status( mutex_exit(&srv_monitor_file_mutex); - bool result = FALSE; + stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name), + STRING_WITH_LEN(""), str, flen); - if (stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name), - STRING_WITH_LEN(""), str, flen)) { - result= TRUE; - } my_free(str, MYF(0)); DBUG_RETURN(FALSE); @@ -11364,16 +11358,6 @@ static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", NULL, NULL, 128*1024*1024L, 32*1024*1024L, LONGLONG_MAX, 1024*1024L); -static MYSQL_SYSVAR_UINT(buffer_pool_shm_key, srv_buffer_pool_shm_key, - PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "[experimental] The key value of shared memory segment for the buffer pool. 0 (default) disables the feature.", - NULL, NULL, 0, 0, INT_MAX32, 0); - -static MYSQL_SYSVAR_BOOL(buffer_pool_shm_checksum, innobase_buffer_pool_shm_checksum, - PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, - "Enable buffer_pool_shm checksum validation (enabled by default).", - NULL, NULL, TRUE); - static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, PLUGIN_VAR_RQCMDARG, "Helps in performance tuning in heavily concurrent environments.", @@ -11639,8 +11623,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(autoextend_increment), MYSQL_SYSVAR(buffer_pool_size), - MYSQL_SYSVAR(buffer_pool_shm_key), - MYSQL_SYSVAR(buffer_pool_shm_checksum), MYSQL_SYSVAR(checksums), MYSQL_SYSVAR(fast_checksum), MYSQL_SYSVAR(commit_concurrency), diff --git a/handler/i_s.cc b/handler/i_s.cc index 06e1a4fd0ab..fa179c52f91 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -1876,6 +1876,7 @@ trx_i_s_common_fill_table( deadlock occurs between the mysqld server and mysql client, see http://bugs.mysql.com/29900 ; when that bug is resolved we can enable the DBUG_RETURN(ret) above */ + ret++; // silence a gcc46 warning DBUG_RETURN(0); #endif } diff --git a/handler/innodb_patch_info.h b/handler/innodb_patch_info.h index e68f12d0fec..38b97411340 100644 --- a/handler/innodb_patch_info.h +++ b/handler/innodb_patch_info.h @@ -47,6 +47,5 @@ struct innodb_enhancement { {"innodb_fast_checksum","Using the checksum on 32bit-unit calculation","incompatible for unpatched ver.","http://www.percona.com/docs/wiki/percona-xtradb"}, {"innodb_files_extend","allow >4GB transaction log files, and can vary universal page size of datafiles","incompatible for unpatched ver.","http://www.percona.com/docs/wiki/percona-xtradb"}, {"innodb_sys_tables_sys_indexes","Expose InnoDB SYS_TABLES and SYS_INDEXES schema tables","","http://www.percona.com/docs/wiki/percona-xtradb"}, -{"innodb_buffer_pool_shm","Put buffer pool contents to shared memory segment and reuse it at clean restart [experimental]","","http://www.percona.com/docs/wiki/percona-xtradb"}, {NULL, NULL, NULL, NULL} }; diff --git a/include/buf0buf.h b/include/buf0buf.h index e06927f42f0..d6cc63bb6af 100644 --- a/include/buf0buf.h +++ b/include/buf0buf.h @@ -36,7 +36,6 @@ Created 11/5/1995 Heikki Tuuri #include "ut0rbt.h" #ifndef UNIV_HOTBACKUP #include "os0proc.h" -#include "srv0srv.h" /** @name Modes for buf_page_get_gen */ /* @{ */ @@ -1302,10 +1301,7 @@ struct buf_block_struct{ /**********************************************************************//** Compute the hash fold value for blocks in buf_pool->zip_hash. */ /* @{ */ -/* the fold should be relative when srv_buffer_pool_shm_key is enabled */ -#define BUF_POOL_ZIP_FOLD_PTR(ptr) (!srv_buffer_pool_shm_key\ - ?((ulint) (ptr) / UNIV_PAGE_SIZE)\ - :((ulint) ((byte*)ptr - (byte*)(buf_pool->chunks->blocks->frame)) / UNIV_PAGE_SIZE)) +#define BUF_POOL_ZIP_FOLD_PTR(ptr) ((ulint) (ptr) / UNIV_PAGE_SIZE) #define BUF_POOL_ZIP_FOLD(b) BUF_POOL_ZIP_FOLD_PTR((b)->frame) #define BUF_POOL_ZIP_FOLD_BPAGE(b) BUF_POOL_ZIP_FOLD((buf_block_t*) (b)) /* @} */ diff --git a/include/hash0hash.h b/include/hash0hash.h index 492c767acc4..b17c21a45ef 100644 --- a/include/hash0hash.h +++ b/include/hash0hash.h @@ -49,28 +49,6 @@ hash_table_t* hash_create( /*========*/ ulint n); /*!< in: number of array cells */ - -/*************************************************************//** -*/ -UNIV_INTERN -ulint -hash_create_needed( -/*===============*/ - ulint n); - -UNIV_INTERN -void -hash_create_init( -/*=============*/ - hash_table_t* table, - ulint n); - -UNIV_INTERN -void -hash_create_reuse( -/*==============*/ - hash_table_t* table); - #ifndef UNIV_HOTBACKUP /*************************************************************//** Creates a mutex array to protect a hash table. */ @@ -350,33 +328,6 @@ do {\ }\ } while (0) -/********************************************************************//** -Align nodes with moving location.*/ -#define HASH_OFFSET(TABLE, NODE_TYPE, PTR_NAME, FADDR, FOFFSET, BOFFSET) \ -do {\ - ulint i2222;\ - ulint cell_count2222;\ -\ - cell_count2222 = hash_get_n_cells(TABLE);\ -\ - for (i2222 = 0; i2222 < cell_count2222; i2222++) {\ - NODE_TYPE* node2222;\ -\ - if ((TABLE)->array[i2222].node) \ - (TABLE)->array[i2222].node = (void*)((byte*)(TABLE)->array[i2222].node \ - + (((TABLE)->array[i2222].node > (void*)FADDR)?FOFFSET:BOFFSET));\ - node2222 = HASH_GET_FIRST((TABLE), i2222);\ -\ - while (node2222) {\ - if (node2222->PTR_NAME) \ - node2222->PTR_NAME = (void*)((byte*)(node2222->PTR_NAME) \ - + ((((void*)node2222->PTR_NAME) > (void*)FADDR)?FOFFSET:BOFFSET));\ -\ - node2222 = node2222->PTR_NAME;\ - }\ - }\ -} while (0) - /************************************************************//** Gets the mutex index for a fold value in a hash table. @return mutex number */ diff --git a/include/os0proc.h b/include/os0proc.h index 582cef6f803..fd46bd7db87 100644 --- a/include/os0proc.h +++ b/include/os0proc.h @@ -32,11 +32,6 @@ Created 9/30/1995 Heikki Tuuri #ifdef UNIV_LINUX #include #include -#else -# if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H -#include -#include -# endif #endif typedef void* os_process_t; @@ -75,29 +70,6 @@ os_mem_free_large( ulint size); /*!< in: size returned by os_mem_alloc_large() */ - -/****************************************************************//** -Allocates or attaches and reuses shared memory segment. -The content is not cleared automatically. -@return allocated memory */ -UNIV_INTERN -void* -os_shm_alloc( -/*=========*/ - ulint* n, /*!< in/out: number of bytes */ - uint key, - ibool* is_new); - -/****************************************************************//** -Detach shared memory segment. */ -UNIV_INTERN -void -os_shm_free( -/*========*/ - void *ptr, /*!< in: pointer returned by - os_shm_alloc() */ - ulint size); /*!< in: size returned by - os_shm_alloc() */ #ifndef UNIV_NONINL #include "os0proc.ic" #endif diff --git a/include/os0sync.h b/include/os0sync.h index 0c22162b900..f32e7ab710a 100644 --- a/include/os0sync.h +++ b/include/os0sync.h @@ -330,7 +330,7 @@ amount of increment. */ Returns the old value of *ptr, atomically sets *ptr to new_val */ # define os_atomic_test_and_set_byte(ptr, new_val) \ - __sync_lock_test_and_set(ptr, new_val) + __sync_lock_test_and_set(ptr, (byte) new_val) #elif defined(HAVE_IB_SOLARIS_ATOMICS) diff --git a/include/srv0srv.h b/include/srv0srv.h index 16a90fdc015..2fc5b76192b 100644 --- a/include/srv0srv.h +++ b/include/srv0srv.h @@ -156,10 +156,6 @@ extern ulint srv_buf_pool_curr_size; /*!< current size in bytes */ extern ulint srv_mem_pool_size; extern ulint srv_lock_table_size; -extern uint srv_buffer_pool_shm_key; -extern ibool srv_buffer_pool_shm_is_reused; -extern ibool srv_buffer_pool_shm_checksum; - extern ibool srv_thread_concurrency_timer_based; extern ulint srv_n_file_io_threads; diff --git a/include/univ.i b/include/univ.i index cdc1815de16..79d030d2bbb 100644 --- a/include/univ.i +++ b/include/univ.i @@ -46,10 +46,10 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MINOR 0 -#define INNODB_VERSION_BUGFIX 12 +#define INNODB_VERSION_BUGFIX 13 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 12.1 +#define PERCONA_INNODB_VERSION 11.6 #endif diff --git a/include/ut0lst.h b/include/ut0lst.h index a40c8054082..261d33963dc 100644 --- a/include/ut0lst.h +++ b/include/ut0lst.h @@ -257,48 +257,5 @@ do { \ ut_a(ut_list_node_313 == NULL); \ } while (0) -/********************************************************************//** -Align nodes with moving location. -@param NAME the name of the list -@param TYPE node type -@param BASE base node (not a pointer to it) -@param OFFSET offset moved */ -#define UT_LIST_OFFSET(NAME, TYPE, BASE, FADDR, FOFFSET, BOFFSET) \ -do { \ - ulint ut_list_i_313; \ - TYPE* ut_list_node_313; \ - \ - if ((BASE).start) \ - (BASE).start = (void*)((byte*)((BASE).start) \ - + (((void*)((BASE).start) > (void*)FADDR)?FOFFSET:BOFFSET));\ - if ((BASE).end) \ - (BASE).end = (void*)((byte*)((BASE).end) \ - + (((void*)((BASE).end) > (void*)FADDR)?FOFFSET:BOFFSET));\ - \ - ut_list_node_313 = (BASE).start; \ - \ - for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \ - ut_a(ut_list_node_313); \ - if ((ut_list_node_313->NAME).prev) \ - (ut_list_node_313->NAME).prev = (void*)((byte*)((ut_list_node_313->NAME).prev)\ - + (((void*)((ut_list_node_313->NAME).prev) > (void*)FADDR)?FOFFSET:BOFFSET));\ - if ((ut_list_node_313->NAME).next) \ - (ut_list_node_313->NAME).next = (void*)((byte*)((ut_list_node_313->NAME).next)\ - + (((void*)((ut_list_node_313->NAME).next)> (void*)FADDR)?FOFFSET:BOFFSET));\ - ut_list_node_313 = (ut_list_node_313->NAME).next; \ - } \ - \ - ut_a(ut_list_node_313 == NULL); \ - \ - ut_list_node_313 = (BASE).end; \ - \ - for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \ - ut_a(ut_list_node_313); \ - ut_list_node_313 = (ut_list_node_313->NAME).prev; \ - } \ - \ - ut_a(ut_list_node_313 == NULL); \ -} while (0) - #endif diff --git a/include/ut0rnd.ic b/include/ut0rnd.ic index c2043660efd..d17036d83fc 100644 --- a/include/ut0rnd.ic +++ b/include/ut0rnd.ic @@ -85,9 +85,6 @@ ut_rnd_gen_ulint(void) /*==================*/ { ulint rnd; - ulint n_bits; - - n_bits = 8 * sizeof(ulint); ut_rnd_ulint_counter = UT_RND1 * ut_rnd_ulint_counter + UT_RND2; diff --git a/log/log0recv.c b/log/log0recv.c index 200b3b088a7..2aaffe4c031 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -567,10 +567,8 @@ recv_synchronize_groups( ib_uint64_t start_lsn; ib_uint64_t end_lsn; ib_uint64_t recovered_lsn; - ib_uint64_t limit_lsn; recovered_lsn = recv_sys->recovered_lsn; - limit_lsn = recv_sys->limit_lsn; /* Read the last recovered log block to the recovery system buffer: the block is always incomplete */ @@ -2901,7 +2899,6 @@ recv_init_crash_recovery(void) /*==========================*/ { ut_a(!recv_needed_recovery); - ut_a(!srv_buffer_pool_shm_is_reused); recv_needed_recovery = TRUE; @@ -2964,7 +2961,9 @@ recv_recovery_from_checkpoint_start_func( ib_uint64_t old_scanned_lsn; ib_uint64_t group_scanned_lsn; ib_uint64_t contiguous_lsn; +#ifdef UNIV_LOG_ARCHIVE ib_uint64_t archived_lsn; +#endif /* UNIV_LOG_ARCHIVE */ byte* buf; byte* log_hdr_buf; byte log_hdr_buf_base[LOG_FILE_HDR_SIZE + OS_FILE_LOG_BLOCK_SIZE]; @@ -3022,7 +3021,9 @@ recv_recovery_from_checkpoint_start_func( checkpoint_lsn = mach_read_ull(buf + LOG_CHECKPOINT_LSN); checkpoint_no = mach_read_ull(buf + LOG_CHECKPOINT_NO); +#ifdef UNIV_LOG_ARCHIVE archived_lsn = mach_read_ull(buf + LOG_CHECKPOINT_ARCHIVED_LSN); +#endif /* UNIV_LOG_ARCHIVE */ /* Read the first log file header to print a note if this is a recovery from a restored InnoDB Hot Backup */ diff --git a/os/os0file.c b/os/os0file.c index 48d796c38e1..4d3f746099d 100644 --- a/os/os0file.c +++ b/os/os0file.c @@ -1407,8 +1407,6 @@ try_again: int create_flag; ibool retry; const char* mode_str = NULL; - const char* type_str = NULL; - const char* purpose_str = NULL; try_again: ut_a(name); @@ -1428,26 +1426,9 @@ try_again: ut_error; } - if (type == OS_LOG_FILE) { - type_str = "LOG"; - } else if (type == OS_DATA_FILE) { - type_str = "DATA"; - } else { - ut_error; - } + ut_a(type == OS_LOG_FILE || type == OS_DATA_FILE); + ut_a(purpose == OS_FILE_AIO || purpose == OS_FILE_NORMAL); - if (purpose == OS_FILE_AIO) { - purpose_str = "AIO"; - } else if (purpose == OS_FILE_NORMAL) { - purpose_str = "NORMAL"; - } else { - ut_error; - } - -#if 0 - fprintf(stderr, "Opening file %s, mode %s, type %s, purpose %s\n", - name, mode_str, type_str, purpose_str); -#endif #ifdef O_SYNC /* We let O_SYNC only affect log files; note that we map O_DSYNC to O_SYNC because the datasync options seemed to corrupt files in 2001 diff --git a/os/os0proc.c b/os/os0proc.c index 4567d96b6f4..48922886f23 100644 --- a/os/os0proc.c +++ b/os/os0proc.c @@ -229,173 +229,3 @@ os_mem_free_large( } #endif } - -/****************************************************************//** -Allocates or attaches and reuses shared memory segment. -The content is not cleared automatically. -@return allocated memory */ -UNIV_INTERN -void* -os_shm_alloc( -/*=========*/ - ulint* n, /*!< in/out: number of bytes */ - uint key, - ibool* is_new) -{ - void* ptr; -#if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H - ulint size; - int shmid; - - *is_new = FALSE; - fprintf(stderr, - "InnoDB: The shared memory segment containing the buffer pool is: key %#x (%d).\n", - key, key); -# if defined HAVE_LARGE_PAGES && defined UNIV_LINUX - if (!os_use_large_pages || !os_large_page_size) { - goto skip; - } - - /* Align block size to os_large_page_size */ - ut_ad(ut_is_2pow(os_large_page_size)); - size = ut_2pow_round(*n + (os_large_page_size - 1), - os_large_page_size); - - shmid = shmget((key_t)key, (size_t)size, - IPC_CREAT | IPC_EXCL | SHM_HUGETLB | SHM_R | SHM_W); - if (shmid < 0) { - if (errno == EEXIST) { - fprintf(stderr, - "InnoDB: HugeTLB: The shared memory segment exists.\n"); - shmid = shmget((key_t)key, (size_t)size, - SHM_HUGETLB | SHM_R | SHM_W); - if (shmid < 0) { - fprintf(stderr, - "InnoDB: HugeTLB: Warning: Failed to allocate %lu bytes. (reuse) errno %d\n", - size, errno); - goto skip; - } else { - fprintf(stderr, - "InnoDB: HugeTLB: The existent shared memory segment is used.\n"); - } - } else { - fprintf(stderr, - "InnoDB: HugeTLB: Warning: Failed to allocate %lu bytes. (new) errno %d\n", - size, errno); - goto skip; - } - } else { - *is_new = TRUE; - fprintf(stderr, - "InnoDB: HugeTLB: A new shared memory segment has been created .\n"); - } - - ptr = shmat(shmid, NULL, 0); - if (ptr == (void *)-1) { - fprintf(stderr, - "InnoDB: HugeTLB: Warning: Failed to attach shared memory segment, errno %d\n", - errno); - ptr = NULL; - } - - if (ptr) { - *n = size; - os_fast_mutex_lock(&ut_list_mutex); - ut_total_allocated_memory += size; - os_fast_mutex_unlock(&ut_list_mutex); - UNIV_MEM_ALLOC(ptr, size); - return(ptr); - } -skip: - *is_new = FALSE; -# endif /* HAVE_LARGE_PAGES && defined UNIV_LINUX */ -# ifdef HAVE_GETPAGESIZE - size = getpagesize(); -# else - size = UNIV_PAGE_SIZE; -# endif - /* Align block size to system page size */ - ut_ad(ut_is_2pow(size)); - size = *n = ut_2pow_round(*n + (size - 1), size); - - shmid = shmget((key_t)key, (size_t)size, - IPC_CREAT | IPC_EXCL | SHM_R | SHM_W); - if (shmid < 0) { - if (errno == EEXIST) { - fprintf(stderr, - "InnoDB: A shared memory segment containing the buffer pool seems to already exist.\n"); - shmid = shmget((key_t)key, (size_t)size, - SHM_R | SHM_W); - if (shmid < 0) { - fprintf(stderr, - "InnoDB: Warning: Failed to allocate %lu bytes. (reuse) errno %d\n", - size, errno); - ptr = NULL; - goto end; - } else { - fprintf(stderr, - "InnoDB: The existent shared memory segment is used.\n"); - } - } else { - fprintf(stderr, - "InnoDB: Warning: Failed to allocate %lu bytes. (new) errno %d\n", - size, errno); - ptr = NULL; - goto end; - } - } else { - *is_new = TRUE; - fprintf(stderr, - "InnoDB: A new shared memory segment has been created.\n"); - } - - ptr = shmat(shmid, NULL, 0); - if (ptr == (void *)-1) { - fprintf(stderr, - "InnoDB: Warning: Failed to attach shared memory segment, errno %d\n", - errno); - ptr = NULL; - } - - if (ptr) { - *n = size; - os_fast_mutex_lock(&ut_list_mutex); - ut_total_allocated_memory += size; - os_fast_mutex_unlock(&ut_list_mutex); - UNIV_MEM_ALLOC(ptr, size); - } -end: -#else /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ - fprintf(stderr, "InnoDB: shared memory segment is not supported.\n"); - ptr = NULL; -#endif /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ - return(ptr); -} - -/****************************************************************//** -Detach shared memory segment. */ -UNIV_INTERN -void -os_shm_free( -/*========*/ - void *ptr, /*!< in: pointer returned by - os_shm_alloc() */ - ulint size) /*!< in: size returned by - os_shm_alloc() */ -{ - os_fast_mutex_lock(&ut_list_mutex); - ut_a(ut_total_allocated_memory >= size); - os_fast_mutex_unlock(&ut_list_mutex); - -#if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H - if (!shmdt(ptr)) { - os_fast_mutex_lock(&ut_list_mutex); - ut_a(ut_total_allocated_memory >= size); - ut_total_allocated_memory -= size; - os_fast_mutex_unlock(&ut_list_mutex); - UNIV_MEM_FREE(ptr, size); - } -#else /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ - fprintf(stderr, "InnoDB: shared memory segment is not supported.\n"); -#endif /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ -} diff --git a/percona-suite/percona_innodb_buffer_pool_shm-master.opt b/percona-suite/percona_innodb_buffer_pool_shm-master.opt deleted file mode 100644 index 5974ef6e2be..00000000000 --- a/percona-suite/percona_innodb_buffer_pool_shm-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_buffer_pool_shm_key=123456 diff --git a/percona-suite/percona_innodb_buffer_pool_shm.result b/percona-suite/percona_innodb_buffer_pool_shm.result deleted file mode 100644 index 08ece8fb9a9..00000000000 --- a/percona-suite/percona_innodb_buffer_pool_shm.result +++ /dev/null @@ -1,6 +0,0 @@ -show variables like 'innodb_buffer_pool_shm%'; -Variable_name Value -innodb_buffer_pool_shm_key 123456 -show variables like 'innodb_buffer_pool_shm%'; -Variable_name Value -innodb_buffer_pool_shm_key 123456 diff --git a/percona-suite/percona_innodb_buffer_pool_shm.test b/percona-suite/percona_innodb_buffer_pool_shm.test deleted file mode 100644 index 7b81bb8d54b..00000000000 --- a/percona-suite/percona_innodb_buffer_pool_shm.test +++ /dev/null @@ -1,18 +0,0 @@ ---source include/have_innodb.inc -show variables like 'innodb_buffer_pool_shm%'; - -#clean shutdown (restart_mysqld.inc is not clean if over 10 sec...) ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF -shutdown_server 120; ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF ---enable_reconnect ---source include/wait_until_connected_again.inc ---disable_reconnect - -show variables like 'innodb_buffer_pool_shm%'; ---sleep 1 ---system ipcrm -M 123456 diff --git a/percona-suite/percona_log_connection_error.result b/percona-suite/percona_log_connection_error.result deleted file mode 100644 index 3c6c67f770c..00000000000 --- a/percona-suite/percona_log_connection_error.result +++ /dev/null @@ -1,15 +0,0 @@ -SET @old_max_connections = @@max_connections; -SET @old_log_warnings = @@log_warnings; -SET GLOBAL max_connections=2; -SET GLOBAL LOG_WARNINGS = 0; -connect(localhost,root,,test,port,socket); -ERROR HY000: Too many connections -SET GLOBAL LOG_WARNINGS = 1; -connect(localhost,root,,test,port,socket); -ERROR HY000: Too many connections -SET GLOBAL LOG_WARNINGS = 0; -connect(localhost,root,,test,port,socket); -ERROR HY000: Too many connections -SET GLOBAL max_connections = @old_max_connections; -SET GLOBAL log_warnings = @old_log_warnings; -1 diff --git a/percona-suite/percona_log_connection_error.test b/percona-suite/percona_log_connection_error.test deleted file mode 100644 index 57cd652bd24..00000000000 --- a/percona-suite/percona_log_connection_error.test +++ /dev/null @@ -1,52 +0,0 @@ ---source include/not_embedded.inc - -connect (main,localhost,root,,); -connection main; -SET @old_max_connections = @@max_connections; -SET @old_log_warnings = @@log_warnings; -SET GLOBAL max_connections=2; -let $port=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'port'`; -let $socket=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'socket'`; - -SET GLOBAL LOG_WARNINGS = 0; ---connect (conn0,localhost,root,,) -connection conn0; -replace_result $port port $socket socket; ---error 1040 ---connect(conn1,localhost,root,,) -disconnect conn0; -SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right - -connection main; -SET GLOBAL LOG_WARNINGS = 1; ---connect (conn1,localhost,root,,) -replace_result $port port $socket socket; ---error 1040 ---connect (conn0,localhost,root,,) -disconnect conn1; -SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right - -connection main; -SET GLOBAL LOG_WARNINGS = 0; ---connect (conn0,localhost,root,,) -replace_result $port port $socket socket; ---error 1040 ---connect(conn1,localhost,root,,) -disconnect conn0; -SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right - -connection main; -SET GLOBAL max_connections = @old_max_connections; -SET GLOBAL log_warnings = @old_log_warnings; -let $log_error_= `SELECT @@GLOBAL.log_error`; -if(!`select LENGTH('$log_error_')`) -{ - # MySQL Server on windows is started with --console and thus - # does not know the location of its .err log, use default location - let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err; -} -# Assign env variable LOG_ERROR -let LOG_ERROR=$log_error_; - -let cmd=cat $log_error | grep "Too many connections" | wc -l; -exec $cmd; diff --git a/percona-suite/percona_query_response_time-replication.result b/percona-suite/percona_query_response_time-replication.result deleted file mode 100644 index df5c73812df..00000000000 --- a/percona-suite/percona_query_response_time-replication.result +++ /dev/null @@ -1,60 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -SELECT * from t; -id -SELECT * from t; -id -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; -INSERT INTO t VALUES(0); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -0 -INSERT INTO t VALUES(1); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -0 -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -2 -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -3 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -FLUSH QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(0); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -0 -INSERT INTO t VALUES(1); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -0 -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -2 -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) -3 -DROP TABLE IF EXISTS t; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; diff --git a/percona-suite/percona_query_response_time-replication.test b/percona-suite/percona_query_response_time-replication.test deleted file mode 100644 index 4f674c2fd19..00000000000 --- a/percona-suite/percona_query_response_time-replication.test +++ /dev/null @@ -1,52 +0,0 @@ ---source include/master-slave.inc - -connection master; --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT); -SELECT * from t; - -sync_slave_with_master; - -connection slave; -SELECT * from t; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; - -connection master; -INSERT INTO t VALUES(0); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(1); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -sync_slave_with_master; - -connection slave; -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; - -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -source include/percona_query_response_time_flush.inc; - -connection master; -INSERT INTO t VALUES(0); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -INSERT INTO t VALUES(1); -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -sync_slave_with_master; - -connection slave; -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; - -connection master; -DROP TABLE IF EXISTS t; -sync_slave_with_master; -connection slave; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; diff --git a/percona-suite/percona_query_response_time-stored.result b/percona-suite/percona_query_response_time-stored.result deleted file mode 100644 index df51f2bfd58..00000000000 --- a/percona-suite/percona_query_response_time-stored.result +++ /dev/null @@ -1,316 +0,0 @@ -CREATE FUNCTION test_f() -RETURNS CHAR(30) DETERMINISTIC -BEGIN -DECLARE first VARCHAR(5); -DECLARE second VARCHAR(5); -DECLARE result VARCHAR(20); -SELECT SLEEP(1.11) INTO first; -SET first= 'Hello'; -SET second=', '; -SET result= CONCAT(first,second); -SET result= CONCAT(result,'world!'); -RETURN result; -END/ -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -FLUSH QUERY_RESPONSE_TIME; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -44 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000003 - 0.000007 - 0.000015 - 0.000030 - 0.000061 - 0.000122 - 0.000244 - 0.000488 - 0.000976 - 0.001953 - 0.003906 - 0.007812 - 0.015625 - 0.031250 - 0.062500 - 0.125000 - 0.250000 - 0.500000 - 1.000000 - 2.000000 - 4.000000 - 8.000000 - 16.000000 - 32.000000 - 64.000000 - 128.000000 - 256.000000 - 512.000000 - 1024.000000 - 2048.000000 - 4096.000000 - 8192.000000 - 16384.000000 - 32768.000000 - 65536.000000 - 131072.000000 - 262144.000000 - 524288.000000 - 1048576.00000 - 2097152.00000 - 4194304.00000 - 8388608.00000 -TOO LONG -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -test_f() -Hello, world! -SELECT test_f(); -test_f() -Hello, world! -SELECT test_f(); -test_f() -Hello, world! -SELECT test_f(); -test_f() -Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 5 4 2 44 -4 5 4 2 44 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -44 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000003 - 0.000007 - 0.000015 - 0.000030 - 0.000061 - 0.000122 - 0.000244 - 0.000488 - 0.000976 - 0.001953 - 0.003906 - 0.007812 - 0.015625 - 0.031250 - 0.062500 - 0.125000 - 0.250000 - 0.500000 - 1.000000 - 2.000000 - 4.000000 - 8.000000 - 16.000000 - 32.000000 - 64.000000 - 128.000000 - 256.000000 - 512.000000 - 1024.000000 - 2048.000000 - 4096.000000 - 8192.000000 - 16384.000000 - 32768.000000 - 65536.000000 - 131072.000000 - 262144.000000 - 524288.000000 - 1048576.00000 - 2097152.00000 - 4194304.00000 - 8388608.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -test_f() -Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 2 1 2 14 -1 2 1 2 14 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -14 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000010 - 0.000100 - 0.001000 - 0.010000 - 0.100000 - 1.000000 - 10.000000 - 100.000000 - 1000.000000 - 10000.000000 - 100000.000000 - 1000000.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -test_f() -Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 2 1 2 17 -1 2 1 2 17 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -17 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000008 - 0.000059 - 0.000416 - 0.002915 - 0.020408 - 0.142857 - 1.000000 - 7.000000 - 49.000000 - 343.000000 - 2401.000000 - 16807.000000 - 117649.000000 - 823543.000000 - 5764801.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -test_f() -Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 2 1 2 7 -1 2 1 2 7 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -7 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000041 - 0.006410 - 1.000000 - 156.000000 - 24336.000000 - 3796416.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -test_f() -Hello, world! -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 2 1 2 6 -1 2 1 2 6 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -6 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.001000 - 1.000000 - 1000.000000 - 1000000.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; -DROP FUNCTION test_f; diff --git a/percona-suite/percona_query_response_time-stored.test b/percona-suite/percona_query_response_time-stored.test deleted file mode 100644 index f761dd7d01c..00000000000 --- a/percona-suite/percona_query_response_time-stored.test +++ /dev/null @@ -1,87 +0,0 @@ -source include/have_innodb.inc; - -delimiter /; -CREATE FUNCTION test_f() -RETURNS CHAR(30) DETERMINISTIC -BEGIN - DECLARE first VARCHAR(5); - DECLARE second VARCHAR(5); - DECLARE result VARCHAR(20); - SELECT SLEEP(1.11) INTO first; - SET first= 'Hello'; - SET second=', '; - SET result= CONCAT(first,second); - SET result= CONCAT(result,'world!'); - RETURN result; -END/ -delimiter ;/ - -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -source include/percona_query_response_time_show.inc; - -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -SELECT test_f(); -SELECT test_f(); -SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT test_f(); -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; - -DROP FUNCTION test_f; \ No newline at end of file diff --git a/percona-suite/percona_query_response_time.result b/percona-suite/percona_query_response_time.result deleted file mode 100644 index 54657b6ca06..00000000000 --- a/percona-suite/percona_query_response_time.result +++ /dev/null @@ -1,570 +0,0 @@ -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -FLUSH QUERY_RESPONSE_TIME; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -44 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000003 - 0.000007 - 0.000015 - 0.000030 - 0.000061 - 0.000122 - 0.000244 - 0.000488 - 0.000976 - 0.001953 - 0.003906 - 0.007812 - 0.015625 - 0.031250 - 0.062500 - 0.125000 - 0.250000 - 0.500000 - 1.000000 - 2.000000 - 4.000000 - 8.000000 - 16.000000 - 32.000000 - 64.000000 - 128.000000 - 256.000000 - 512.000000 - 1024.000000 - 2048.000000 - 4096.000000 - 8192.000000 - 16384.000000 - 32768.000000 - 65536.000000 - 131072.000000 - 262144.000000 - 524288.000000 - 1048576.00000 - 2097152.00000 - 4194304.00000 - 8388608.00000 -TOO LONG -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 20 15 5 44 -10 20 15 5 44 -1 20 15 5 44 -5 20 15 5 44 -3 20 15 5 44 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -44 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000003 - 0.000007 - 0.000015 - 0.000030 - 0.000061 - 0.000122 - 0.000244 - 0.000488 - 0.000976 - 0.001953 - 0.003906 - 0.007812 - 0.015625 - 0.031250 - 0.062500 - 0.125000 - 0.250000 - 0.500000 - 1.000000 - 2.000000 - 4.000000 - 8.000000 - 16.000000 - 32.000000 - 64.000000 - 128.000000 - 256.000000 - 512.000000 - 1024.000000 - 2048.000000 - 4096.000000 - 8192.000000 - 16384.000000 - 32768.000000 - 65536.000000 - 131072.000000 - 262144.000000 - 524288.000000 - 1048576.00000 - 2097152.00000 - 4194304.00000 - 8388608.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 20 17 3 14 -11 20 17 3 14 -8 20 17 3 14 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -14 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000010 - 0.000100 - 0.001000 - 0.010000 - 0.100000 - 1.000000 - 10.000000 - 100.000000 - 1000.000000 - 10000.000000 - 100000.000000 - 1000000.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 20 17 3 17 -11 20 17 3 17 -8 20 17 3 17 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -17 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.000008 - 0.000059 - 0.000416 - 0.002915 - 0.020408 - 0.142857 - 1.000000 - 7.000000 - 49.000000 - 343.000000 - 2401.000000 - 16807.000000 - 117649.000000 - 823543.000000 - 5764801.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 20 17 3 7 -11 20 17 3 7 -8 20 17 3 7 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -7 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000041 - 0.006410 - 1.000000 - 156.000000 - 24336.000000 - 3796416.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -SELECT SLEEP(0.31); -SLEEP(0.31) -0 -SELECT SLEEP(0.32); -SLEEP(0.32) -0 -SELECT SLEEP(0.33); -SLEEP(0.33) -0 -SELECT SLEEP(0.34); -SLEEP(0.34) -0 -SELECT SLEEP(0.35); -SLEEP(0.35) -0 -SELECT SLEEP(0.36); -SLEEP(0.36) -0 -SELECT SLEEP(0.37); -SLEEP(0.37) -0 -SELECT SLEEP(0.38); -SLEEP(0.38) -0 -SELECT SLEEP(0.39); -SLEEP(0.39) -0 -SELECT SLEEP(0.40); -SLEEP(0.40) -0 -SELECT SLEEP(1.1); -SLEEP(1.1) -0 -SELECT SLEEP(1.2); -SLEEP(1.2) -0 -SELECT SLEEP(1.3); -SLEEP(1.3) -0 -SELECT SLEEP(1.5); -SLEEP(1.5) -0 -SELECT SLEEP(1.4); -SLEEP(1.4) -0 -SELECT SLEEP(0.5); -SLEEP(0.5) -0 -SELECT SLEEP(2.1); -SLEEP(2.1) -0 -SELECT SLEEP(2.3); -SLEEP(2.3) -0 -SELECT SLEEP(2.5); -SLEEP(2.5) -0 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -count query_count query_total not_zero_region_count region_count -1 20 17 3 6 -11 20 17 3 6 -8 20 17 3 6 -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -region_count -6 -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time - 0.000001 - 0.001000 - 1.000000 - 1000.000000 - 1000000.00000 -TOO LONG -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; diff --git a/percona-suite/percona_query_response_time.test b/percona-suite/percona_query_response_time.test deleted file mode 100644 index a58cafc8d01..00000000000 --- a/percona-suite/percona_query_response_time.test +++ /dev/null @@ -1,65 +0,0 @@ -source include/have_innodb.inc; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -source include/percona_query_response_time_show.inc; - -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -source include/percona_query_response_time_flush.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; -source include/percona_query_response_time_sleep.inc; -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; - -source include/percona_query_response_time_show.inc; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; - -SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; diff --git a/percona-suite/percona_query_response_time_flush.inc b/percona-suite/percona_query_response_time_flush.inc deleted file mode 100644 index 44bb320fe13..00000000000 --- a/percona-suite/percona_query_response_time_flush.inc +++ /dev/null @@ -1 +0,0 @@ -FLUSH QUERY_RESPONSE_TIME; diff --git a/percona-suite/percona_query_response_time_show.inc b/percona-suite/percona_query_response_time_show.inc deleted file mode 100644 index 709abf9872e..00000000000 --- a/percona-suite/percona_query_response_time_show.inc +++ /dev/null @@ -1,8 +0,0 @@ -SELECT d.count, -(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, -(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, -(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count -FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; -SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; diff --git a/percona-suite/percona_query_response_time_sleep.inc b/percona-suite/percona_query_response_time_sleep.inc deleted file mode 100644 index 40688b173b0..00000000000 --- a/percona-suite/percona_query_response_time_sleep.inc +++ /dev/null @@ -1,19 +0,0 @@ -SELECT SLEEP(0.31); -SELECT SLEEP(0.32); -SELECT SLEEP(0.33); -SELECT SLEEP(0.34); -SELECT SLEEP(0.35); -SELECT SLEEP(0.36); -SELECT SLEEP(0.37); -SELECT SLEEP(0.38); -SELECT SLEEP(0.39); -SELECT SLEEP(0.40); -SELECT SLEEP(1.1); -SELECT SLEEP(1.2); -SELECT SLEEP(1.3); -SELECT SLEEP(1.5); -SELECT SLEEP(1.4); -SELECT SLEEP(0.5); -SELECT SLEEP(2.1); -SELECT SLEEP(2.3); -SELECT SLEEP(2.5); diff --git a/percona-suite/percona_server_variables.result b/percona-suite/percona_server_variables.result index cb2af0d3d0e..6533829cfd9 100644 --- a/percona-suite/percona_server_variables.result +++ b/percona-suite/percona_server_variables.result @@ -36,12 +36,10 @@ delayed_insert_limit Value delayed_insert_timeout Value delayed_queue_size Value div_precision_increment Value -enable_query_response_time_stats Value engine_condition_pushdown Value error_count Value event_scheduler Value expire_logs_days Value -fast_index_creation Value flush Value flush_time Value foreign_key_checks Value @@ -80,8 +78,6 @@ innodb_additional_mem_pool_size Value innodb_auto_lru_dump Value innodb_autoextend_increment Value innodb_autoinc_lock_mode Value -innodb_buffer_pool_shm_checksum Value -innodb_buffer_pool_shm_key Value innodb_buffer_pool_size Value innodb_change_buffering Value innodb_checkpoint_age_target Value @@ -250,7 +246,6 @@ query_cache_strip_comments Value query_cache_type Value query_cache_wlock_invalidate Value query_prealloc_size Value -query_response_time_range_base Value rand_seed1 Value rand_seed2 Value range_alloc_block_size Value diff --git a/percona-suite/percona_slow_query_log-use_global_long_query_time-master.opt b/percona-suite/percona_slow_query_log-use_global_long_query_time-master.opt deleted file mode 100644 index e2f3b6f2041..00000000000 --- a/percona-suite/percona_slow_query_log-use_global_long_query_time-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 \ No newline at end of file diff --git a/percona-suite/percona_sql_no_fcache.result b/percona-suite/percona_sql_no_fcache.result deleted file mode 100644 index bc1413fb96d..00000000000 --- a/percona-suite/percona_sql_no_fcache.result +++ /dev/null @@ -1,12 +0,0 @@ -drop table if exists t1; -create table t (a int not null); -insert into t values (1),(2),(3); -SELECT SQL_NO_FCACHE SLEEP(0); -SLEEP(0) -0 -SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t; -a -1 -2 -3 -DROP TABLE t; diff --git a/percona-suite/percona_sql_no_fcache.test b/percona-suite/percona_sql_no_fcache.test deleted file mode 100644 index da0c2ecef7d..00000000000 --- a/percona-suite/percona_sql_no_fcache.test +++ /dev/null @@ -1,11 +0,0 @@ ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t (a int not null); -insert into t values (1),(2),(3); - -SELECT SQL_NO_FCACHE SLEEP(0); -SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t; - -DROP TABLE t; \ No newline at end of file diff --git a/percona-suite/percona_query_cache_with_comments.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.inc diff --git a/percona-suite/percona_query_cache_with_comments.inc.backup b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup similarity index 100% rename from percona-suite/percona_query_cache_with_comments.inc.backup rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup diff --git a/percona-suite/percona_query_cache_with_comments.result b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.result similarity index 100% rename from percona-suite/percona_query_cache_with_comments.result rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.result diff --git a/percona-suite/percona_query_cache_with_comments.test b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.test similarity index 90% rename from percona-suite/percona_query_cache_with_comments.test rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.test index 0190f54d104..0b93441f364 100644 --- a/percona-suite/percona_query_cache_with_comments.test +++ b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.test @@ -1,3 +1,4 @@ +--disable_ps_protocol set global query_cache_strip_comments=ON; -- source include/percona_query_cache_with_comments_begin.inc -- source include/percona_query_cache_with_comments.inc diff --git a/percona-suite/percona_query_cache_with_comments_begin.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments_begin.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_begin.inc diff --git a/percona-suite/percona_query_cache_with_comments_clear.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments_clear.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_clear.inc diff --git a/percona-suite/percona_query_cache_with_comments_crash.result b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result similarity index 100% rename from percona-suite/percona_query_cache_with_comments_crash.result rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_crash.result diff --git a/percona-suite/percona_query_cache_with_comments_crash.test b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test similarity index 100% rename from percona-suite/percona_query_cache_with_comments_crash.test rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_crash.test diff --git a/percona-suite/percona_query_cache_with_comments_disable.result b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result similarity index 100% rename from percona-suite/percona_query_cache_with_comments_disable.result rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_disable.result diff --git a/percona-suite/percona_query_cache_with_comments_disable.test b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test similarity index 100% rename from percona-suite/percona_query_cache_with_comments_disable.test rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_disable.test diff --git a/percona-suite/percona_query_cache_with_comments_end.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments_end.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_end.inc diff --git a/percona-suite/percona_query_cache_with_comments_eval.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments_eval.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_eval.inc diff --git a/percona-suite/percona_query_cache_with_comments_prepared_statements.result b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result similarity index 100% rename from percona-suite/percona_query_cache_with_comments_prepared_statements.result rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.result diff --git a/percona-suite/percona_query_cache_with_comments_prepared_statements.test b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.test similarity index 100% rename from percona-suite/percona_query_cache_with_comments_prepared_statements.test rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_prepared_statements.test diff --git a/percona-suite/percona_query_cache_with_comments_show.inc b/percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_show.inc similarity index 100% rename from percona-suite/percona_query_cache_with_comments_show.inc rename to percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments_show.inc diff --git a/percona-suite/percona_status_wait_query_cache_mutex.result b/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.result similarity index 100% rename from percona-suite/percona_status_wait_query_cache_mutex.result rename to percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.result diff --git a/percona-suite/percona_status_wait_query_cache_mutex.test b/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test similarity index 100% rename from percona-suite/percona_status_wait_query_cache_mutex.test rename to percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test diff --git a/percona-suite/percona_slow_query_log-control_global_slow-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-control_global_slow-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt diff --git a/percona-suite/percona_slow_query_log-control_global_slow.result b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result similarity index 100% rename from percona-suite/percona_slow_query_log-control_global_slow.result rename to percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result diff --git a/percona-suite/percona_slow_query_log-control_global_slow.test b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test similarity index 100% rename from percona-suite/percona_slow_query_log-control_global_slow.test rename to percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test diff --git a/percona-suite/percona_slow_query_log-log_slow_filter-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_filter-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt diff --git a/percona-suite/percona_slow_query_log-log_slow_filter.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_filter.result rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result diff --git a/percona-suite/percona_slow_query_log-log_slow_filter.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_filter.test rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test diff --git a/percona-suite/percona_slow_query_log-log_slow_verbosity-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_verbosity-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt diff --git a/percona-suite/percona_slow_query_log-log_slow_verbosity.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_verbosity.result rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result diff --git a/percona-suite/percona_slow_query_log-log_slow_verbosity.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test similarity index 100% rename from percona-suite/percona_slow_query_log-log_slow_verbosity.test rename to percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test diff --git a/percona-suite/percona_slow_query_log-long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-long_query_time-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt diff --git a/percona-suite/percona_slow_query_log-long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result similarity index 100% rename from percona-suite/percona_slow_query_log-long_query_time.result rename to percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result diff --git a/percona-suite/percona_slow_query_log-long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test similarity index 100% rename from percona-suite/percona_slow_query_log-long_query_time.test rename to percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test diff --git a/percona-suite/percona_slow_query_log-microseconds_in_slow_query_log-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-microseconds_in_slow_query_log-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt diff --git a/percona-suite/percona_slow_query_log-microseconds_in_slow_query_log.result b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result similarity index 100% rename from percona-suite/percona_slow_query_log-microseconds_in_slow_query_log.result rename to percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result diff --git a/percona-suite/percona_slow_query_log-microseconds_in_slow_query_log.test b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test similarity index 100% rename from percona-suite/percona_slow_query_log-microseconds_in_slow_query_log.test rename to percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test diff --git a/percona-suite/percona_slow_query_log-min_examined_row_limit-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt similarity index 100% rename from percona-suite/percona_slow_query_log-min_examined_row_limit-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt diff --git a/percona-suite/percona_slow_query_log-min_examined_row_limit.result b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result similarity index 100% rename from percona-suite/percona_slow_query_log-min_examined_row_limit.result rename to percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result diff --git a/percona-suite/percona_slow_query_log-min_examined_row_limit.test b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test similarity index 100% rename from percona-suite/percona_slow_query_log-min_examined_row_limit.test rename to percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test diff --git a/percona-suite/percona_slave_innodb_stats-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt similarity index 100% rename from percona-suite/percona_slave_innodb_stats-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats-master.opt diff --git a/percona-suite/percona_slave_innodb_stats-slave.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt similarity index 100% rename from percona-suite/percona_slave_innodb_stats-slave.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats-slave.opt diff --git a/percona-suite/percona_slave_innodb_stats.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result similarity index 100% rename from percona-suite/percona_slave_innodb_stats.result rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result diff --git a/percona-suite/percona_slave_innodb_stats.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test similarity index 89% rename from percona-suite/percona_slave_innodb_stats.test rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test index defcd1fc406..247a7028772 100644 --- a/percona-suite/percona_slave_innodb_stats.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test @@ -1,5 +1,6 @@ -source include/have_innodb.inc; -source include/master-slave.inc; +-- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_innodb.inc +-- source include/master-slave.inc connection master; -- disable_warnings diff --git a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt similarity index 100% rename from percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt diff --git a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt similarity index 100% rename from percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time-slave.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt diff --git a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result similarity index 87% rename from percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.result rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result index c17e7a3f508..8aed50caba2 100644 --- a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result @@ -11,8 +11,6 @@ CREATE TABLE t(id INT); # Start slave replication START SLAVE; INSERT INTO t VALUES (1); -# Read information about master binlog -# Sync(1) slave thread # Read and change log_slow_slave_statements to ON on slave show variables like 'log_slow_slave_statements'; Variable_name Value @@ -22,14 +20,10 @@ show variables like 'log_slow_slave_statements'; Variable_name Value log_slow_slave_statements ON INSERT INTO t VALUES (2); -# Read information about master binlog -# Sync slave(2) thread # Restart slave STOP SLAVE; START SLAVE; INSERT INTO t VALUES (3); -# Read information about master binlog -# Sync(3) slave thread show variables like 'long_query_time'; Variable_name Value long_query_time 1.000000 @@ -50,8 +44,6 @@ show global variables like 'use_global_long_query_time'; Variable_name Value use_global_long_query_time OFF INSERT INTO t VALUES (4); -# Read information about master binlog -# Sync slave(4) thread show variables like 'long_query_time'; Variable_name Value long_query_time 1.000000 @@ -72,8 +64,6 @@ show global variables like 'use_global_long_query_time'; Variable_name Value use_global_long_query_time ON INSERT INTO t VALUES (5); -# Read information about master binlog -# Sync slave(5) thread show variables like 'long_query_time'; Variable_name Value long_query_time 0.000000 @@ -99,5 +89,3 @@ set global use_global_long_query_time=0; 1 set global log_slow_slave_statements=OFF; DROP TABLE t; -# Read information about master binlog -# Sync slave(6) thread diff --git a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test similarity index 60% rename from percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.test rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test index 46548537853..6b7d2750e68 100644 --- a/percona-suite/percona_log_slow_slave_statements-and-use_global_long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test @@ -1,3 +1,4 @@ +-- source include/have_binlog_format_mixed_or_statement.inc -- echo # Activate master-slave replication -- source include/master-slave.inc @@ -19,14 +20,8 @@ START SLAVE; #-- echo # Make insert(1) on master connection master; INSERT INTO t VALUES (1); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(1) slave thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; - -- echo # Read and change log_slow_slave_statements to ON on slave show variables like 'log_slow_slave_statements'; set global log_slow_slave_statements=ON; @@ -35,13 +30,8 @@ show variables like 'log_slow_slave_statements'; #-- echo # Make insert(2) on master connection master; INSERT INTO t VALUES (2); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(2) thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; -- echo # Restart slave STOP SLAVE; -- source include/wait_for_slave_to_stop.inc @@ -51,13 +41,8 @@ START SLAVE; #-- echo # Make insert(3) on master connection master; INSERT INTO t VALUES (3); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync(3) slave thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; show variables like 'long_query_time'; show global variables like 'long_query_time'; show global variables like 'use_global_long_query_time'; @@ -69,13 +54,8 @@ show global variables like 'use_global_long_query_time'; #-- echo # Make insert(4) on master connection master; INSERT INTO t VALUES (4); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(4) thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; show variables like 'long_query_time'; show global variables like 'long_query_time'; show global variables like 'use_global_long_query_time'; @@ -87,13 +67,8 @@ show global variables like 'use_global_long_query_time'; #-- echo # Make insert(5) on master connection master; INSERT INTO t VALUES (5); --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(5) thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; show variables like 'long_query_time'; show global variables like 'long_query_time'; show global variables like 'use_global_long_query_time'; @@ -128,10 +103,5 @@ set global log_slow_slave_statements=OFF; connection master; DROP TABLE t; --- echo # Read information about master binlog -let $binlog_file = query_get_value(SHOW MASTER STATUS,File,1); -let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); - --- echo # Sync slave(6) thread +sync_slave_with_master; connection slave; -let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; diff --git a/percona-suite/percona_log_slow_slave_statements-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt similarity index 100% rename from percona-suite/percona_log_slow_slave_statements-master.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt diff --git a/percona-suite/percona_log_slow_slave_statements-slave.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt similarity index 100% rename from percona-suite/percona_log_slow_slave_statements-slave.opt rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt diff --git a/percona-suite/percona_log_slow_slave_statements.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result similarity index 100% rename from percona-suite/percona_log_slow_slave_statements.result rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result diff --git a/percona-suite/percona_log_slow_slave_statements.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test similarity index 98% rename from percona-suite/percona_log_slow_slave_statements.test rename to percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test index 93956bf7505..bb6e1c5f28a 100644 --- a/percona-suite/percona_log_slow_slave_statements.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test @@ -1,3 +1,4 @@ +-- source include/have_binlog_format_mixed_or_statement.inc -- echo # Activate master-slave replication -- source include/master-slave.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt new file mode 100644 index 00000000000..f2dbf2253f4 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt @@ -0,0 +1 @@ +--slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --use_global_log_slow_control=long_query_time --use_global_long_query_time=1 \ No newline at end of file diff --git a/percona-suite/percona_slow_query_log-use_global_long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result similarity index 96% rename from percona-suite/percona_slow_query_log-use_global_long_query_time.result rename to percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result index 5562c1543bd..e04762db9d1 100644 --- a/percona-suite/percona_slow_query_log-use_global_long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result @@ -56,4 +56,4 @@ use_global_log_slow_control log_slow_filter show global variables like 'use_global_long_query_time'; Variable_name Value use_global_long_query_time OFF -set global use_global_log_slow_control = none; +set global use_global_log_slow_control = long_query_time; diff --git a/percona-suite/percona_slow_query_log-use_global_long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test similarity index 95% rename from percona-suite/percona_slow_query_log-use_global_long_query_time.test rename to percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test index 95700c4289e..3582b13a3e9 100644 --- a/percona-suite/percona_slow_query_log-use_global_long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test @@ -37,4 +37,4 @@ set global use_global_long_query_time = OFF; show global variables like 'use_global_log_slow_control'; show global variables like 'use_global_long_query_time'; -set global use_global_log_slow_control = none; +set global use_global_log_slow_control = long_query_time; diff --git a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result new file mode 100644 index 00000000000..aa1717f9a18 --- /dev/null +++ b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result @@ -0,0 +1,23 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t; +CREATE TABLE t(id INT); +INSERT INTO t SELECT SLEEP(5); +STOP SLAVE; +select count(*) from t; +count(*) +0 +SHOW SLAVE STATUS NOLOCK; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error + host user port 1 master-bin.000001 276 slave-relay-bin.000003 422 master-bin.000001 No No 0 0 276 577 None 0 No NULL No 0 0 +select count(*) from t; +count(*) +0 +START SLAVE; +Warnings: +Note 1592 Statement may not be safe to log in statement format. +DROP TABLE t; diff --git a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test new file mode 100644 index 00000000000..03531db3b12 --- /dev/null +++ b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test @@ -0,0 +1,28 @@ +--source include/master-slave.inc + +connection master; +-- disable_warnings +DROP TABLE IF EXISTS t; +-- enable_warnings +CREATE TABLE t(id INT); +sync_slave_with_master; +connection master; +send INSERT INTO t SELECT SLEEP(5); +sleep 1; +connection slave; +send STOP SLAVE; +connection slave1; +select count(*) from t; +replace_column 2 host 3 user 4 port; +SHOW SLAVE STATUS NOLOCK; +select count(*) from t; + +connection slave; +reap; +--source include/wait_for_slave_to_stop.inc +START SLAVE; +--source include/wait_for_slave_to_start.inc +connection master; +reap; +DROP TABLE t; +sync_slave_with_master; diff --git a/que/que0que.c b/que/que0que.c index 5c85a04d139..9c1d61c1731 100644 --- a/que/que0que.c +++ b/que/que0que.c @@ -1298,18 +1298,13 @@ que_run_threads_low( que_thr_t* thr) /*!< in: query thread */ { que_thr_t* next_thr; - ulint cumul_resource; ulint loop_count; ut_ad(thr->state == QUE_THR_RUNNING); ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); ut_ad(!mutex_own(&kernel_mutex)); - /* cumul_resource counts how much resources the OS thread (NOT the - query thread) has spent in this function */ - loop_count = QUE_MAX_LOOPS_WITHOUT_CHECK; - cumul_resource = 0; loop: /* Check that there is enough space in the log to accommodate possible log entries by this query step; if the operation can touch diff --git a/row/row0mysql.c b/row/row0mysql.c index 1d8b4be1a25..16d3f6ae5b1 100644 --- a/row/row0mysql.c +++ b/row/row0mysql.c @@ -1443,7 +1443,12 @@ run_again: srv_n_rows_updated++; } - row_update_statistics_if_needed(prebuilt->table); + /* We update table statistics only if it is a DELETE or UPDATE + that changes indexed columns, UPDATEs that change only non-indexed + columns would not affect statistics. */ + if (node->is_delete || !(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) { + row_update_statistics_if_needed(prebuilt->table); + } trx->op_info = ""; @@ -1598,6 +1603,9 @@ row_update_cascade_for_mysql( trx = thr_get_trx(thr); + /* Increment fk_cascade_depth to record the recursive call depth on + a single update/delete that affects multiple tables chained + together with foreign key relations. */ thr->fk_cascade_depth++; if (thr->fk_cascade_depth > FK_MAX_CASCADE_DEL) { @@ -1609,6 +1617,12 @@ run_again: row_upd_step(thr); + /* The recursive call for cascading update/delete happens + in above row_upd_step(), reset the counter once we come + out of the recursive call, so it does not accumulate for + different row deletes */ + thr->fk_cascade_depth = 0; + err = trx->error_state; /* Note that the cascade node is a subnode of another InnoDB diff --git a/row/row0purge.c b/row/row0purge.c index 835af990672..31b255cf2d4 100644 --- a/row/row0purge.c +++ b/row/row0purge.c @@ -684,7 +684,9 @@ row_purge_step( que_thr_t* thr) /*!< in: query thread */ { purge_node_t* node; +#ifdef UNIV_DEBUG ulint err; +#endif /* UNIV_DEBUG */ ut_ad(thr); @@ -692,7 +694,10 @@ row_purge_step( ut_ad(que_node_get_type(node) == QUE_NODE_PURGE); - err = row_purge(node, thr); +#ifdef UNIV_DEBUG + err = +#endif /* UNIV_DEBUG */ + row_purge(node, thr); ut_ad(err == DB_SUCCESS); diff --git a/row/row0sel.c b/row/row0sel.c index a1511e35435..86bd663d89d 100644 --- a/row/row0sel.c +++ b/row/row0sel.c @@ -3356,6 +3356,7 @@ row_search_for_mysql( mem_heap_t* heap = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; ulint* offsets = offsets_; + ibool table_lock_waited = FALSE; ibool problematic_use = FALSE; rec_offs_init(offsets_); @@ -3720,6 +3721,61 @@ release_search_latch_if_needed: clust_index = dict_table_get_first_index(index->table); + /* Do some start-of-statement preparations */ + + if (!prebuilt->mysql_has_locked) { + fprintf(stderr, "InnoDB: Error: row_search_for_mysql() is called without ha_innobase::external_lock()\n"); + if (trx->mysql_thd != NULL) { + innobase_mysql_print_thd(stderr, trx->mysql_thd, 600); + } + problematic_use = TRUE; + } +retry_check: + + if (!prebuilt->sql_stat_start) { + /* No need to set an intention lock or assign a read view */ + + if (trx->read_view == NULL + && prebuilt->select_lock_type == LOCK_NONE) { + + fputs("InnoDB: Error: MySQL is trying to" + " perform a consistent read\n" + "InnoDB: but the read view is not assigned!\n", + stderr); + if (problematic_use) { + fprintf(stderr, "InnoDB: It may be caused by calling " + "without ha_innobase::external_lock()\n" + "InnoDB: For the first-aid, avoiding the crash. " + "But it should be fixed ASAP.\n"); + prebuilt->sql_stat_start = TRUE; + goto retry_check; + } + trx_print(stderr, trx, 600); + fputc('\n', stderr); + ut_error; + } + } else if (prebuilt->select_lock_type == LOCK_NONE) { + /* This is a consistent read */ + /* Assign a read view for the query */ + + trx_assign_read_view(trx); + prebuilt->sql_stat_start = FALSE; + } else { +wait_table_again: + err = lock_table(0, index->table, + prebuilt->select_lock_type == LOCK_S + ? LOCK_IS : LOCK_IX, thr); + + if (err != DB_SUCCESS) { + + table_lock_waited = TRUE; + goto lock_table_wait; + } + prebuilt->sql_stat_start = FALSE; + } + + /* Open or restore index cursor position */ + if (UNIV_LIKELY(direction != 0)) { ibool need_to_process = sel_restore_position_for_mysql( &same_user_rec, BTR_SEARCH_LEAF, @@ -3795,59 +3851,6 @@ release_search_latch_if_needed: } } - if (!prebuilt->mysql_has_locked) { - fprintf(stderr, "InnoDB: Error: row_search_for_mysql() is called without ha_innobase::external_lock()\n"); - if (trx->mysql_thd != NULL) { - innobase_mysql_print_thd(stderr, trx->mysql_thd, 600); - } - problematic_use = TRUE; - } -retry_check: - - if (!prebuilt->sql_stat_start) { - /* No need to set an intention lock or assign a read view */ - - if (trx->read_view == NULL - && prebuilt->select_lock_type == LOCK_NONE) { - - fputs("InnoDB: Error: MySQL is trying to" - " perform a consistent read\n" - "InnoDB: but the read view is not assigned!\n", - stderr); - if (problematic_use) { - fprintf(stderr, "InnoDB: It may be caused by calling " - "without ha_innobase::external_lock()\n" - "InnoDB: For the first-aid, avoiding the crash. " - "But it should be fixed ASAP.\n"); - prebuilt->sql_stat_start = TRUE; - goto retry_check; - } - trx_print(stderr, trx, 600); - fputc('\n', stderr); - ut_a(0); - } - } else if (prebuilt->select_lock_type == LOCK_NONE) { - /* This is a consistent read */ - /* Assign a read view for the query */ - - trx_assign_read_view(trx); - prebuilt->sql_stat_start = FALSE; - } else { - ulint lock_mode; - if (prebuilt->select_lock_type == LOCK_S) { - lock_mode = LOCK_IS; - } else { - lock_mode = LOCK_IX; - } - err = lock_table(0, index->table, lock_mode, thr); - - if (err != DB_SUCCESS) { - - goto lock_wait_or_error; - } - prebuilt->sql_stat_start = FALSE; - } - rec_loop: /*-------------------------------------------------------------*/ /* PHASE 4: Look for matching records in a loop */ @@ -4584,6 +4587,7 @@ lock_wait_or_error: btr_pcur_store_position(pcur, &mtr); +lock_table_wait: mtr_commit(&mtr); mtr_has_extra_clust_latch = FALSE; @@ -4601,6 +4605,14 @@ lock_wait_or_error: thr->lock_state = QUE_THR_LOCK_NOLOCK; mtr_start(&mtr); + /* Table lock waited, go try to obtain table lock + again */ + if (table_lock_waited) { + table_lock_waited = FALSE; + + goto wait_table_again; + } + sel_restore_position_for_mysql(&same_user_rec, BTR_SEARCH_LEAF, pcur, moves_up, &mtr); diff --git a/row/row0umod.c b/row/row0umod.c index 8464b0f95cc..5998dadd16d 100644 --- a/row/row0umod.c +++ b/row/row0umod.c @@ -114,12 +114,17 @@ row_undo_mod_clust_low( btr_pcur_t* pcur; btr_cur_t* btr_cur; ulint err; +#ifdef UNIV_DEBUG ibool success; +#endif /* UNIV_DEBUG */ pcur = &(node->pcur); btr_cur = btr_pcur_get_btr_cur(pcur); - success = btr_pcur_restore_position(mode, pcur, mtr); +#ifdef UNIV_DEBUG + success = +#endif /* UNIV_DEBUG */ + btr_pcur_restore_position(mode, pcur, mtr); ut_ad(success); diff --git a/row/row0vers.c b/row/row0vers.c index a4fbb5289aa..b6d35363f08 100644 --- a/row/row0vers.c +++ b/row/row0vers.c @@ -71,7 +71,9 @@ row_vers_impl_x_locked_off_kernel( warning */ trx_t* trx; ulint rec_del; +#ifdef UNIV_DEBUG ulint err; +#endif /* UNIV_DEBUG */ mtr_t mtr; ulint comp; @@ -169,9 +171,12 @@ row_vers_impl_x_locked_off_kernel( heap2 = heap; heap = mem_heap_create(1024); - err = trx_undo_prev_version_build(clust_rec, &mtr, version, - clust_index, clust_offsets, - heap, &prev_version); +#ifdef UNIV_DEBUG + err = +#endif /* UNIV_DEBUG */ + trx_undo_prev_version_build(clust_rec, &mtr, version, + clust_index, clust_offsets, + heap, &prev_version); mem_heap_free(heap2); /* free version and clust_offsets */ if (prev_version == NULL) { diff --git a/srv/srv0srv.c b/srv/srv0srv.c index d1a8d2c4dd9..6b6a56cf36a 100644 --- a/srv/srv0srv.c +++ b/srv/srv0srv.c @@ -211,11 +211,6 @@ UNIV_INTERN ulint srv_buf_pool_curr_size = 0; UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; -/* key value for shm */ -UNIV_INTERN uint srv_buffer_pool_shm_key = 0; -UNIV_INTERN ibool srv_buffer_pool_shm_is_reused = FALSE; -UNIV_INTERN ibool srv_buffer_pool_shm_checksum = TRUE; - /* This parameter is deprecated. Use srv_n_io_[read|write]_threads instead. */ UNIV_INTERN ulint srv_n_file_io_threads = ULINT_MAX; diff --git a/srv/srv0start.c b/srv/srv0start.c index b36faf2d2d7..efc7032aafe 100644 --- a/srv/srv0start.c +++ b/srv/srv0start.c @@ -1719,8 +1719,6 @@ innobase_start_or_create_for_mysql(void) Note that this is not as heavy weight as it seems. At this point there will be only ONE page in the buf_LRU and there must be no page in the buf_flush list. */ - /* buffer_pool_shm should not be reused when recovery was needed. */ - if (!srv_buffer_pool_shm_is_reused) buf_pool_invalidate(); /* We always try to do a recovery, even if the database had diff --git a/trx/trx0purge.c b/trx/trx0purge.c index 1c317665878..5a8b42af3af 100644 --- a/trx/trx0purge.c +++ b/trx/trx0purge.c @@ -330,9 +330,10 @@ trx_purge_add_update_undo_to_history( trx_undo_t* undo; trx_rseg_t* rseg; trx_rsegf_t* rseg_header; +#ifdef UNIV_DEBUG trx_usegf_t* seg_header; +#endif /* UNIV_DEBUG */ trx_ulogf_t* undo_header; - trx_upagef_t* page_header; ulint hist_size; undo = trx->update_undo; @@ -347,8 +348,9 @@ trx_purge_add_update_undo_to_history( rseg->page_no, mtr); undo_header = undo_page + undo->hdr_offset; +#ifdef UNIV_DEBUG seg_header = undo_page + TRX_UNDO_SEG_HDR; - page_header = undo_page + TRX_UNDO_PAGE_HDR; +#endif /* UNIV_DEBUG */ if (undo->state != TRX_UNDO_CACHED) { /* The undo log segment will not be reused */ @@ -681,7 +683,6 @@ trx_purge_rseg_get_next_history_log( { page_t* undo_page; trx_ulogf_t* log_hdr; - trx_usegf_t* seg_hdr; fil_addr_t prev_log_addr; trx_id_t trx_no; ibool del_marks; @@ -702,7 +703,6 @@ trx_purge_rseg_get_next_history_log( undo_page = trx_undo_page_get_s_latched(rseg->space, rseg->zip_size, rseg->last_page_no, &mtr); log_hdr = undo_page + rseg->last_offset; - seg_hdr = undo_page + TRX_UNDO_SEG_HDR; /* Increase the purge page count by one for every handled log */ @@ -1094,12 +1094,8 @@ trx_purge_rec_release( /*==================*/ trx_undo_inf_t* cell) /*!< in: storage cell */ { - trx_undo_arr_t* arr; - mutex_enter(&(purge_sys->mutex)); - arr = purge_sys->arr; - trx_purge_arr_remove_info(cell); mutex_exit(&(purge_sys->mutex)); diff --git a/trx/trx0roll.c b/trx/trx0roll.c index c925478cdf4..1a43e419214 100644 --- a/trx/trx0roll.c +++ b/trx/trx0roll.c @@ -740,13 +740,8 @@ trx_undo_arr_remove_info( undo_no_t undo_no)/*!< in: undo number */ { trx_undo_inf_t* cell; - ulint n_used; - ulint n; ulint i; - n_used = arr->n_used; - n = 0; - for (i = 0;; i++) { cell = trx_undo_arr_get_nth_info(arr, i); diff --git a/trx/trx0sys.c b/trx/trx0sys.c index 11581a3f2ae..566f7c95793 100644 --- a/trx/trx0sys.c +++ b/trx/trx0sys.c @@ -245,7 +245,9 @@ trx_sys_create_doublewrite_buf(void) { buf_block_t* block; buf_block_t* block2; +#ifdef UNIV_SYNC_DEBUG buf_block_t* new_block; +#endif /* UNIV_SYNC_DEBUG */ byte* doublewrite; byte* fseg_header; ulint page_no; @@ -348,8 +350,11 @@ start_again: the page position in the tablespace, then the page has not been written to in doublewrite. */ - new_block = buf_page_get(TRX_SYS_SPACE, 0, page_no, - RW_X_LATCH, &mtr); +#ifdef UNIV_SYNC_DEBUG + new_block = +#endif /* UNIV_SYNC_DEBUG */ + buf_page_get(TRX_SYS_SPACE, 0, page_no, + RW_X_LATCH, &mtr); buf_block_dbg_add_level(new_block, SYNC_NO_ORDER_CHECK); @@ -492,7 +497,10 @@ start_again: the page position in the tablespace, then the page has not been written to in doublewrite. */ - new_block = buf_page_get(TRX_DOUBLEWRITE_SPACE, 0, page_no, +#ifdef UNIV_SYNC_DEBUG + new_block = +#endif /* UNIV_SYNC_DEBUG */ + buf_page_get(TRX_DOUBLEWRITE_SPACE, 0, page_no, RW_X_LATCH, &mtr); buf_block_dbg_add_level(new_block, SYNC_NO_ORDER_CHECK); diff --git a/trx/trx0trx.c b/trx/trx0trx.c index 9584f0c4c46..75bbe1b342a 100644 --- a/trx/trx0trx.c +++ b/trx/trx0trx.c @@ -1893,7 +1893,6 @@ trx_prepare_off_kernel( /*===================*/ trx_t* trx) /*!< in: transaction */ { - page_t* update_hdr_page; trx_rseg_t* rseg; ib_uint64_t lsn = 0; mtr_t mtr; @@ -1926,7 +1925,7 @@ trx_prepare_off_kernel( } if (trx->update_undo) { - update_hdr_page = trx_undo_set_state_at_prepare( + trx_undo_set_state_at_prepare( trx, trx->update_undo, &mtr); } diff --git a/trx/trx0undo.c b/trx/trx0undo.c index ec4beb5660a..346e2116f06 100644 --- a/trx/trx0undo.c +++ b/trx/trx0undo.c @@ -1066,14 +1066,11 @@ trx_undo_truncate_end( ulint last_page_no; trx_undo_rec_t* rec; trx_undo_rec_t* trunc_here; - trx_rseg_t* rseg; mtr_t mtr; ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&(trx->rseg->mutex))); - rseg = trx->rseg; - for (;;) { mtr_start(&mtr); @@ -1906,7 +1903,6 @@ trx_undo_set_state_at_prepare( mtr_t* mtr) /*!< in: mtr */ { trx_usegf_t* seg_hdr; - trx_upagef_t* page_hdr; trx_ulogf_t* undo_header; page_t* undo_page; ulint offset; @@ -1924,7 +1920,6 @@ trx_undo_set_state_at_prepare( undo->hdr_page_no, mtr); seg_hdr = undo_page + TRX_UNDO_SEG_HDR; - page_hdr = undo_page + TRX_UNDO_PAGE_HDR; /*------------------------------*/ undo->state = TRX_UNDO_PREPARED; From 8e0ed9eebaf088a6b50925aba2724d0848066d4a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Feb 2011 11:25:08 +0100 Subject: [PATCH 2/6] Updated with changes from Percona Server 5.1.54-12.5, from lp:percona-server as of February 4, 2011/ Merged: revid:oleg.tsarev@percona.com-20110113143630-b9ojivymbiwe3y2i --- ChangeLog | 117 +++- Makefile.in | 4 - btr/btr0cur.c | 12 +- buf/buf0buf.c | 481 +++++++++++++++ buf/buf0flu.c | 80 ++- buf/buf0lru.c | 2 +- dict/dict0crea.c | 2 +- dict/dict0dict.c | 170 +++--- dict/dict0load.c | 9 +- fil/fil0fil.c | 108 +++- fsp/fsp0fsp.c | 50 ++ ha/hash0hash.c | 64 ++ handler/ha_innodb.cc | 472 +++++++++------ handler/ha_innodb.h | 1 + handler/handler0alter.cc | 11 +- handler/innodb_patch_info.h | 1 + ibuf/ibuf0ibuf.c | 207 +++++-- include/btr0btr.h | 49 +- include/btr0btr.ic | 38 +- include/btr0cur.h | 18 +- include/buf0buf.h | 6 +- include/buf0flu.h | 14 + include/dict0dict.h | 44 +- include/fil0fil.h | 9 + include/hash0hash.h | 49 ++ include/ibuf0ibuf.h | 5 + include/log0log.h | 3 + include/os0file.h | 4 +- include/os0proc.h | 28 + include/os0sync.h | 4 +- include/row0ins.h | 5 +- include/row0mysql.h | 4 + include/row0upd.h | 11 +- include/srv0srv.h | 7 + include/srv0start.h | 3 + include/trx0sys.h | 2 +- include/trx0sys.ic | 2 +- include/univ.i | 7 +- include/ut0lst.h | 43 ++ log/log0log.c | 8 +- log/log0recv.c | 16 + os/os0file.c | 38 +- os/os0proc.c | 170 ++++++ os/os0sync.c | 53 +- .../have_response_time_distribution.inc | 4 + .../have_response_time_distribution.require | 2 + .../percona_log_connection_error-master.opt | 1 + .../percona_log_connection_error.result | 15 + .../percona_log_connection_error.test | 52 ++ .../percona_innodb_buffer_pool_shm-master.opt | 2 + .../percona_innodb_buffer_pool_shm.result | 8 + .../percona_innodb_buffer_pool_shm.test | 19 + .../percona_log_connection_error-master.opt | 1 - percona-suite/percona_server_variables.result | 6 + percona-suite/percona_server_variables.test | 1 + .../percona_bug643149.result | 16 + .../percona_bug643149.test | 50 ++ ...percona_status_wait_query_cache_mutex.test | 2 +- ...ona_query_response_time-replication.result | 70 +++ ...rcona_query_response_time-replication.test | 57 ++ .../percona_query_response_time-stored.result | 313 ++++++++++ .../percona_query_response_time-stored.test | 90 +++ .../percona_query_response_time.result | 567 ++++++++++++++++++ .../percona_query_response_time.test | 68 +++ .../percona_query_response_time_flush.inc | 1 + .../percona_query_response_time_show.inc | 8 + .../percona_query_response_time_sleep.inc | 19 + .../percona_show_slave_status_nolock.result | 21 + .../percona_show_slave_status_nolock.test | 47 ++ percona-suite/slow_extended.patch/grep.inc | 16 + .../percona_slow_extended-combined-master.opt | 1 + .../percona_slow_extended-combined.result | 18 + .../percona_slow_extended-combined.test | 6 + ...percona_slow_extended-combined2-master.opt | 1 + .../percona_slow_extended-combined2.result | 12 + .../percona_slow_extended-combined2.test | 4 + ...ow_extended-control_global_slow-master.opt | 2 +- ...a_slow_extended-control_global_slow.result | 2 +- ...ona_slow_extended-control_global_slow.test | 8 +- ...a_slow_extended-log_slow_filter-master.opt | 2 +- ...rcona_slow_extended-log_slow_filter.result | 2 +- ...percona_slow_extended-log_slow_filter.test | 7 +- ...ended-log_slow_sp_statements-cl-master.opt | 1 + ..._extended-log_slow_sp_statements-cl.result | 3 + ...ow_extended-log_slow_sp_statements-cl.test | 1 + ...ded-log_slow_timestamp_every-cl-master.opt | 1 + ...xtended-log_slow_timestamp_every-cl.result | 3 + ..._extended-log_slow_timestamp_every-cl.test | 1 + ..._extended-log_slow_verbosity-cl-master.opt | 1 + ...slow_extended-log_slow_verbosity-cl.result | 9 + ...a_slow_extended-log_slow_verbosity-cl.test | 3 + ...low_extended-log_slow_verbosity-master.opt | 2 +- ...na_slow_extended-log_slow_verbosity.result | 2 +- ...cona_slow_extended-log_slow_verbosity.test | 7 +- ...a_slow_extended-long_query_time-master.opt | 2 +- ...rcona_slow_extended-long_query_time.result | 2 +- ...percona_slow_extended-long_query_time.test | 8 +- ...d-microseconds_in_slow_extended-master.opt | 2 +- ...ended-microseconds_in_slow_extended.result | 3 +- ...xtended-microseconds_in_slow_extended.test | 14 +- ...extended-min_examined_row_limit-master.opt | 2 +- ...low_extended-min_examined_row_limit.result | 2 +- ..._slow_extended-min_examined_row_limit.test | 7 +- ...na_slow_extended-slave_innodb_stats.result | 1 + ...cona_slow_extended-slave_innodb_stats.test | 6 +- ...-and-use_global_long_query_time-master.opt | 2 +- ...s-and-use_global_long_query_time-slave.opt | 2 +- ...ents-and-use_global_long_query_time.result | 2 + ...ements-and-use_global_long_query_time.test | 18 +- ..._slow_extended-slave_statements-master.opt | 2 +- ...a_slow_extended-slave_statements-slave.opt | 2 +- ...cona_slow_extended-slave_statements.result | 2 + ...ercona_slow_extended-slave_statements.test | 18 +- ...y_log_microseconds_timestamp-cl-master.opt | 1 + ...query_log_microseconds_timestamp-cl.result | 3 + ...w_query_log_microseconds_timestamp-cl.test | 1 + ...d-use_global_long_query_time-cl-master.opt | 1 + ...ended-use_global_long_query_time-cl.result | 3 + ...xtended-use_global_long_query_time-cl.test | 1 + ...nded-use_global_long_query_time-master.opt | 2 +- ...extended-use_global_long_query_time.result | 2 +- ...w_extended-use_global_long_query_time.test | 7 +- .../percona_show_slave_status_nolock.result | 23 - .../percona_show_slave_status_nolock.test | 28 - .../percona_sql_no_fcache.result | 12 + .../percona_sql_no_fcache.test | 11 + plug.in | 5 +- row/row0ins.c | 9 +- row/row0merge.c | 2 +- row/row0mysql.c | 45 +- row/row0sel.c | 117 ++-- row/row0upd.c | 15 +- srv/srv0srv.c | 160 ++++- srv/srv0start.c | 64 +- sync/sync0rw.c | 9 +- thr/thr0loc.c | 30 +- trx/trx0i_s.c | 87 ++- trx/trx0undo.c | 20 +- 138 files changed, 3982 insertions(+), 759 deletions(-) create mode 100644 percona-suite/have_response_time_distribution.inc create mode 100644 percona-suite/have_response_time_distribution.require create mode 100644 percona-suite/log_connection_error.patch/percona_log_connection_error-master.opt create mode 100644 percona-suite/log_connection_error.patch/percona_log_connection_error.result create mode 100644 percona-suite/log_connection_error.patch/percona_log_connection_error.test create mode 100644 percona-suite/percona_innodb_buffer_pool_shm-master.opt create mode 100644 percona-suite/percona_innodb_buffer_pool_shm.result create mode 100644 percona-suite/percona_innodb_buffer_pool_shm.test delete mode 100644 percona-suite/percona_log_connection_error-master.opt create mode 100644 percona-suite/profiling_slow.patch/percona_bug643149.result create mode 100644 percona-suite/profiling_slow.patch/percona_bug643149.test create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-replication.result create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-replication.test create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-stored.result create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-stored.test create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time.result create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time.test create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_flush.inc create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_show.inc create mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_sleep.inc create mode 100644 percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result create mode 100644 percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test create mode 100644 percona-suite/slow_extended.patch/grep.inc create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result create mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test delete mode 100644 percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result delete mode 100644 percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test create mode 100644 percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.result create mode 100644 percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.test diff --git a/ChangeLog b/ChangeLog index c185215e65f..5ca60eb73d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,30 +1,121 @@ +2010-11-11 The InnoDB Team + * thr/thr0loc.c, trx/trx0i_s.c: + Fix Bug#57802 Empty ASSERTION parameter passed to the HASH_SEARCH macro + +2010-11-10 The InnoDB Team + + * dict/dict0dict.c, handler/handler0alter.cc, include/dict0dict.h + row/row0merge.c: + Fix Bug#55084 InnoDB crash and corruption after ALTER TABLE + +2010-11-10 The InnoDB Team + + * srv/srv0start.c: + Fix Bug#48026 Log start and end of InnoDB buffer pool + initialization to the error log + +2010-11-03 The InnoDB Team + + * include/btr0btr.h, include/btr0btr.ic, dict/dict0crea.c: + Fix Bug#57947 InnoDB diagnostics shows btr_block_get calls + instead of real callers + +2010-11-03 The InnoDB Team + + * fil/fil0fil.c, fsp/fsp0fsp.c, handler/ha_innodb.cc, + include/fil0fil.h, include/univ.i: + Fix Bug #54538 - use of exclusive innodb dictionary lock limits + performance. + +2010-11-02 The InnoDB Team + + * btr/btr0cur.c, dict/dict0dict.c, dict/dict0load.c, + handler/ha_innodb.cc, include/dict0dict.h, row/row0mysql.c, + innodb_bug53046.result, innodb_bug53046.test: + Fix Bug#53046 dict_update_statistics_low can still be run + concurrently on same table + +2010-11-02 The InnoDB Team + + * row/row0sel.c: + Fix Bug#57799 READ UNCOMMITTED access failure of off-page + DYNAMIC or COMPRESSED columns again + +2010-10-24 The InnoDB Team + + * row/row0mysql.c + Fix Bug#57700 Latching order violation in + row_truncate_table_for_mysql() + +2010-10-20 The InnoDB Team + + * dict/dict0load.c + Fix Bug#57616 Sig 11 in dict_load_table() when failed to load + index or foreign key + +2010-10-19 The InnoDB Team + + * btr/btr0cur.c, buf/buf0buf.c, buf/buf0flu.c, handler/ha_innodb.cc, + ibuf/ibuf0ibuf.c, include/btr0cur.h, include/buf0flu.h, + include/ibuf0ibuf.h, include/row0mysql.h, + row/row0mysql.c, row/row0sel.c, + innodb_bug56680.test, innodb_bug56680.result: + Fix Bug#56680 InnoDB may return wrong results from a + case-insensitive covering index + +2010-10-18 The InnoDB Team + + * handler/ha_innodb.cc, handler/ha_innodb.h, innodb_bug57252.result, + innodb_bug57252.test: + Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE + +2010-10-14 The InnoDB Team + + * handler/ha_innodb.cc, innodb_bug56143.result, innodb_bug56143.test: + Fix Bug#56143 too many foreign keys causes output of show create + table to become invalid + +2010-10-14 The InnoDB Team + + * srv/srv0start.c: + Fix Bug#57397 io_handler_thread() will never cleanup + 2010-10-11 The InnoDB Team + * row/row0sel.c Fix Bug #57345 btr_pcur_store_position abort for load with concurrent lock/unlock tables +2010-10-11 The InnoDB Team + + * row/row0mysql.c, innodb_bug56947.result, innodb_bug56947.test: + Fix Bug #56947 InnoDB leaks memory when failing to create a table + 2010-10-06 The InnoDB Team + * row/row0mysql.c, innodb_bug57255.result, innodb_bug57255.test - Fix Bug #Cascade Delete results in "Got error -1 from storage engine" - + Fix Bug #57255 Cascade Delete results in "Got error -1 from + storage engine" + 2010-09-27 The InnoDB Team * row/row0sel.c, innodb_bug56716.result, innodb_bug56716.test: - Fix Bug #56716 InnoDB locks a record gap without locking the table + Fix Bug#56716 InnoDB locks a record gap without locking the table 2010-09-06 The InnoDB Team - * dict/dict0load.c, innodb_bug53756.test innodb_bug53756.result - Fix Bug #53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery + + * dict/dict0load.c, innodb_bug53756.test innodb_bug53756.result: + Fix Bug#53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery 2010-08-24 The InnoDB Team * handler/ha_innodb.c, dict/dict0dict.c: - Fix Bug #55832 selects crash too easily when innodb_force_recovery>3 + Fix Bug#55832 selects crash too easily when innodb_force_recovery>3 2010-08-03 The InnoDB Team * include/dict0dict.h, include/dict0dict.ic, row/row0mysql.c: - Fix bug #54678, InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock + Fix Bug#54678 InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock 2010-08-03 The InnoDB Team @@ -37,13 +128,13 @@ 2010-08-03 The InnoDB Team * include/ut0mem.h, ut/ut0mem.c: - Fix Bug #55627 segv in ut_free pars_lexer_close innobase_shutdown + Fix Bug#55627 segv in ut_free pars_lexer_close innobase_shutdown innodb-use-sys-malloc=0 2010-08-01 The InnoDB Team - * handler/ha_innodb.cc - Fix Bug #55382 Assignment with SELECT expressions takes unexpected + * handler/ha_innodb.cc: + Fix Bug#55382 Assignment with SELECT expressions takes unexpected S locks in READ COMMITTED 2010-07-27 The InnoDB Team @@ -65,8 +156,8 @@ 2010-06-29 The InnoDB Team - * btr/btr0cur.c, include/btr0cur.h, - include/row0mysql.h, row/row0merge.c, row/row0sel.c: + * btr/btr0cur.c, include/btr0cur.h, include/row0mysql.h, + row/row0merge.c, row/row0sel.c: Fix Bug#54358 READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED columns @@ -98,7 +189,7 @@ * dict/dict0load.c, fil/fil0fil.c: Fix Bug#54658: InnoDB: Warning: allocated tablespace %lu, - old maximum was 0 (introduced in Bug #53578 fix) + old maximum was 0 (introduced in Bug#53578 fix) 2010-06-16 The InnoDB Team diff --git a/Makefile.in b/Makefile.in index f60347b7980..1b5ca3b7a8b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -529,8 +529,6 @@ plugin_ftexample_shared_target = @plugin_ftexample_shared_target@ plugin_ftexample_static_target = @plugin_ftexample_static_target@ plugin_heap_shared_target = @plugin_heap_shared_target@ plugin_heap_static_target = @plugin_heap_static_target@ -plugin_ibmdb2i_shared_target = @plugin_ibmdb2i_shared_target@ -plugin_ibmdb2i_static_target = @plugin_ibmdb2i_static_target@ plugin_innobase_shared_target = @plugin_innobase_shared_target@ plugin_innobase_static_target = @plugin_innobase_static_target@ plugin_innodb_plugin_shared_target = @plugin_innodb_plugin_shared_target@ @@ -546,8 +544,6 @@ plugin_partition_static_target = @plugin_partition_static_target@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -pstack_dir = @pstack_dir@ -pstack_libs = @pstack_libs@ readline_basedir = @readline_basedir@ readline_dir = @readline_dir@ readline_h_ln_cmd = @readline_h_ln_cmd@ diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 267c4adea70..25bdd176880 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -1124,7 +1124,7 @@ btr_cur_ins_lock_and_undo( not zero, the parameters index and thr should be specified */ btr_cur_t* cursor, /*!< in: cursor on page after which to insert */ - const dtuple_t* entry, /*!< in: entry to insert */ + dtuple_t* entry, /*!< in/out: entry to insert */ que_thr_t* thr, /*!< in: query thread or NULL */ mtr_t* mtr, /*!< in/out: mini-transaction */ ibool* inherit)/*!< out: TRUE if the inserted new record maybe @@ -1803,7 +1803,7 @@ func_exit: See if there is enough place in the page modification log to log an update-in-place. @return TRUE if enough place */ -static +UNIV_INTERN ibool btr_cur_update_alloc_zip( /*=====================*/ @@ -3582,11 +3582,9 @@ btr_estimate_number_of_different_key_vals( effective_pages = btr_estimate_n_pages_not_null(index, 1 /*k*/, first_rec_path); if (!effective_pages) { - dict_index_stat_mutex_enter(index); for (j = 0; j <= n_cols; j++) { index->stat_n_diff_key_vals[j] = (ib_int64_t)index->stat_n_leaf_pages; } - dict_index_stat_mutex_exit(index); return; } else if (effective_pages > index->stat_n_leaf_pages) { effective_pages = index->stat_n_leaf_pages; @@ -3728,8 +3726,6 @@ btr_estimate_number_of_different_key_vals( also the pages used for external storage of fields (those pages are included in index->stat_n_leaf_pages) */ - dict_index_stat_mutex_enter(index); - for (j = 0; j <= n_cols; j++) { index->stat_n_diff_key_vals[j] = ((n_diff[j] @@ -3768,8 +3764,6 @@ btr_estimate_number_of_different_key_vals( } } - dict_index_stat_mutex_exit(index); - mem_free(n_diff); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); @@ -4182,7 +4176,7 @@ Stores the fields in big_rec_vec to the tablespace and puts pointers to them in rec. The extern flags in rec will have to be set beforehand. The fields are stored on pages allocated from leaf node file segment of the index tree. -@return DB_SUCCESS or error */ +@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ UNIV_INTERN ulint btr_store_big_rec_extern_fields( diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 952d1cf68be..175e460753b 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -53,6 +53,10 @@ Created 11/5/1995 Heikki Tuuri #include "page0zip.h" #include "trx0trx.h" #include "srv0start.h" +#include "que0que.h" +#include "read0read.h" +#include "row0row.h" +#include "ha_prototypes.h" /* prototypes for new functions added to ha_innodb.cc */ trx_t* innobase_get_trx(); @@ -310,6 +314,30 @@ read-ahead or flush occurs */ UNIV_INTERN ibool buf_debug_prints = FALSE; #endif /* UNIV_DEBUG */ +/* Buffer pool shared memory segment information */ +typedef struct buf_shm_info_struct buf_shm_info_t; + +struct buf_shm_info_struct { + char head_str[8]; + ulint binary_id; + ibool is_new; /* during initializing */ + ibool clean; /* clean shutdowned and free */ + ibool reusable; /* reusable */ + ulint buf_pool_size; /* backup value */ + ulint page_size; /* backup value */ + ulint frame_offset; /* offset of the first frame based on chunk->mem */ + ulint zip_hash_offset; + ulint zip_hash_n; + + ulint checksum; + + buf_pool_t buf_pool_backup; + buf_chunk_t chunk_backup; + + ib_uint64_t dummy; +}; + +#define BUF_SHM_INFO_HEAD "XTRA_SHM" #endif /* !UNIV_HOTBACKUP */ /********************************************************************//** @@ -756,6 +784,45 @@ buf_block_init( #endif /* UNIV_SYNC_DEBUG */ } +static +void +buf_block_reuse( +/*============*/ + buf_block_t* block, + ptrdiff_t frame_offset) +{ + /* block_init */ + block->frame += frame_offset; + + UNIV_MEM_DESC(block->frame, UNIV_PAGE_SIZE, block); + + block->index = NULL; + +#ifdef UNIV_DEBUG + /* recreate later */ + block->page.in_page_hash = FALSE; + block->page.in_zip_hash = FALSE; +#endif /* UNIV_DEBUG */ + +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + block->n_pointers = 0; +#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ + + if (block->page.zip.data) + block->page.zip.data += frame_offset; + + block->is_hashed = FALSE; + + mutex_create(&block->mutex, SYNC_BUF_BLOCK); + + rw_lock_create(&block->lock, SYNC_LEVEL_VARYING); + ut_ad(rw_lock_validate(&(block->lock))); + +#ifdef UNIV_SYNC_DEBUG + rw_lock_create(&block->debug_latch, SYNC_NO_ORDER_CHECK); +#endif /* UNIV_SYNC_DEBUG */ +} + /********************************************************************//** Allocates a chunk of buffer frames. @return chunk, or NULL on failure */ @@ -768,26 +835,188 @@ buf_chunk_init( { buf_block_t* block; byte* frame; + ulint zip_hash_n = 0; + ulint zip_hash_mem_size = 0; + hash_table_t* zip_hash_tmp = NULL; ulint i; + buf_shm_info_t* shm_info = NULL; /* Round down to a multiple of page size, although it already should be. */ mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE); + + srv_buffer_pool_shm_is_reused = FALSE; + + if (srv_buffer_pool_shm_key) { + /* zip_hash size */ + zip_hash_n = (mem_size / UNIV_PAGE_SIZE) * 2; + zip_hash_mem_size = ut_2pow_round(hash_create_needed(zip_hash_n) + + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); + } + /* Reserve space for the block descriptors. */ mem_size += ut_2pow_round((mem_size / UNIV_PAGE_SIZE) * (sizeof *block) + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); + if (srv_buffer_pool_shm_key) { + mem_size += ut_2pow_round(sizeof(buf_shm_info_t) + + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); + mem_size += zip_hash_mem_size; + } chunk->mem_size = mem_size; + + if (srv_buffer_pool_shm_key) { + ulint binary_id; + ibool is_new; + + ut_a(buf_pool->n_chunks == 1); + + fprintf(stderr, + "InnoDB: Warning: The innodb_buffer_pool_shm_key option has been specified.\n" + "InnoDB: Do not change the following between restarts of the server while this option is being used:\n" + "InnoDB: * the mysqld executable between restarts of the server.\n" + "InnoDB: * the value of innodb_buffer_pool_size.\n" + "InnoDB: * the value of innodb_page_size.\n" + "InnoDB: * datafiles created by InnoDB during this session.\n" + "InnoDB: Otherwise, data corruption in datafiles may result.\n"); + + /* FIXME: This is vague id still */ + binary_id = (ulint) ((byte*)mtr_commit - (byte*)btr_root_get) + + (ulint) ((byte*)os_get_os_version - (byte*)buf_calc_page_new_checksum) + + (ulint) ((byte*)page_dir_find_owner_slot - (byte*)dfield_data_is_binary_equal) + + (ulint) ((byte*)que_graph_publish - (byte*)dict_casedn_str) + + (ulint) ((byte*)read_view_oldest_copy_or_open_new - (byte*)fil_space_get_version) + + (ulint) ((byte*)rec_get_n_extern_new - (byte*)fsp_get_size_low) + + (ulint) ((byte*)row_get_trx_id_offset - (byte*)ha_create_func) + + (ulint) ((byte*)srv_set_io_thread_op_info - (byte*)thd_is_replication_slave_thread) + + (ulint) ((byte*)mutex_create_func - (byte*)ibuf_inside) + + (ulint) ((byte*)trx_set_detailed_error - (byte*)lock_check_trx_id_sanity) + + (ulint) ((byte*)ut_time - (byte*)mem_heap_strdup); + + chunk->mem = os_shm_alloc(&chunk->mem_size, srv_buffer_pool_shm_key, &is_new); + + if (UNIV_UNLIKELY(chunk->mem == NULL)) { + return(NULL); + } +init_again: +#ifdef UNIV_SET_MEM_TO_ZERO + if (is_new) { + memset(chunk->mem, '\0', chunk->mem_size); + } +#endif + /* for ut_fold_binary_32(), these values should be 32-bit aligned */ + ut_a(sizeof(buf_shm_info_t) % 4 == 0); + ut_a((ulint)chunk->mem % 4 == 0); + ut_a(chunk->mem_size % 4 == 0); + + shm_info = chunk->mem; + + zip_hash_tmp = (hash_table_t*)((byte*)chunk->mem + chunk->mem_size - zip_hash_mem_size); + + if (is_new) { + strncpy(shm_info->head_str, BUF_SHM_INFO_HEAD, 8); + shm_info->binary_id = binary_id; + shm_info->is_new = TRUE; /* changed to FALSE when the initialization is finished */ + shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ + shm_info->reusable = FALSE; /* changed to TRUE when validation is finished. */ + shm_info->buf_pool_size = srv_buf_pool_size; + shm_info->page_size = srv_page_size; + shm_info->zip_hash_offset = chunk->mem_size - zip_hash_mem_size; + shm_info->zip_hash_n = zip_hash_n; + } else { + ulint checksum; + + if (strncmp(shm_info->head_str, BUF_SHM_INFO_HEAD, 8)) { + fprintf(stderr, + "InnoDB: Error: The shared memory segment seems not to be for buffer pool.\n"); + return(NULL); + } + if (shm_info->binary_id != binary_id) { + fprintf(stderr, + "InnoDB: Error: The shared memory segment seems not to be for this binary.\n"); + return(NULL); + } + if (shm_info->is_new) { + fprintf(stderr, + "InnoDB: Error: The shared memory was not initialized yet.\n"); + return(NULL); + } + if (shm_info->buf_pool_size != srv_buf_pool_size) { + fprintf(stderr, + "InnoDB: Error: srv_buf_pool_size is different (shm=%lu current=%lu).\n", + shm_info->buf_pool_size, srv_buf_pool_size); + return(NULL); + } + if (shm_info->page_size != srv_page_size) { + fprintf(stderr, + "InnoDB: Error: srv_page_size is different (shm=%lu current=%lu).\n", + shm_info->page_size, srv_page_size); + return(NULL); + } + if (!shm_info->reusable) { + fprintf(stderr, + "InnoDB: Warning: The shared memory has unrecoverable contents.\n" + "InnoDB: The shared memory segment is initialized.\n"); + is_new = TRUE; + goto init_again; + } + if (!shm_info->clean) { + fprintf(stderr, + "InnoDB: Warning: The shared memory was not shut down cleanly.\n" + "InnoDB: The shared memory segment is initialized.\n"); + is_new = TRUE; + goto init_again; + } + + ut_a(shm_info->zip_hash_offset == chunk->mem_size - zip_hash_mem_size); + ut_a(shm_info->zip_hash_n == zip_hash_n); + + /* check checksum */ + if (srv_buffer_pool_shm_checksum) { + checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), + chunk->mem_size - sizeof(buf_shm_info_t)); + } else { + checksum = BUF_NO_CHECKSUM_MAGIC; + } + + if (shm_info->checksum != BUF_NO_CHECKSUM_MAGIC + && shm_info->checksum != checksum) { + fprintf(stderr, + "InnoDB: Error: checksum of the shared memory is not match. " + "(stored=%lu calculated=%lu)\n", + shm_info->checksum, checksum); + return(NULL); + } + + /* flag to use the segment. */ + shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ + } + + /* init zip_hash contents */ + if (is_new) { + hash_create_init(zip_hash_tmp, zip_hash_n); + } else { + /* adjust offset is done later */ + hash_create_reuse(zip_hash_tmp); + + srv_buffer_pool_shm_is_reused = TRUE; + } + } else { chunk->mem = os_mem_alloc_large(&chunk->mem_size); if (UNIV_UNLIKELY(chunk->mem == NULL)) { return(NULL); } + } /* Allocate the block descriptors from the start of the memory block. */ + if (srv_buffer_pool_shm_key) { + chunk->blocks = (buf_block_t*)((byte*)chunk->mem + sizeof(buf_shm_info_t)); + } else { chunk->blocks = chunk->mem; + } /* Align a pointer to the first frame. Note that when os_large_page_size is smaller than UNIV_PAGE_SIZE, @@ -795,8 +1024,13 @@ buf_chunk_init( it is bigger, we may allocate more blocks than requested. */ frame = ut_align(chunk->mem, UNIV_PAGE_SIZE); + if (srv_buffer_pool_shm_key) { + /* reserve zip_hash space and always -1 for reproductibity */ + chunk->size = (chunk->mem_size - zip_hash_mem_size) / UNIV_PAGE_SIZE - 1; + } else { chunk->size = chunk->mem_size / UNIV_PAGE_SIZE - (frame != chunk->mem); + } /* Subtract the space needed for block descriptors. */ { @@ -810,6 +1044,98 @@ buf_chunk_init( chunk->size = size; } + if (shm_info && !(shm_info->is_new)) { + /* convert the shared memory segment for reuse */ + ptrdiff_t phys_offset; + ptrdiff_t logi_offset; + ptrdiff_t blocks_offset; + void* previous_frame_address; + + if (chunk->size < shm_info->chunk_backup.size) { + fprintf(stderr, + "InnoDB: Error: The buffer pool became smaller because of allocated address.\n" + "InnoDB: Retrying may avoid this situation.\n"); + shm_info->clean = TRUE; /* release the flag for retrying */ + return(NULL); + } + + chunk->size = shm_info->chunk_backup.size; + phys_offset = frame - ((byte*)chunk->mem + shm_info->frame_offset); + logi_offset = frame - chunk->blocks[0].frame; + previous_frame_address = chunk->blocks[0].frame; + blocks_offset = (byte*)chunk->blocks - (byte*)shm_info->chunk_backup.blocks; + + if (phys_offset || logi_offset || blocks_offset) { + fprintf(stderr, + "InnoDB: Buffer pool in the shared memory segment should be converted.\n" + "InnoDB: Previous frames in address : %p\n" + "InnoDB: Previous frames were located : %p\n" + "InnoDB: Current frames should be located: %p\n" + "InnoDB: Pysical offset : %ld (%#lx)\n" + "InnoDB: Logical offset (frames) : %ld (%#lx)\n" + "InnoDB: Logical offset (blocks) : %ld (%#lx)\n", + (byte*)chunk->mem + shm_info->frame_offset, + chunk->blocks[0].frame, frame, + phys_offset, phys_offset, logi_offset, logi_offset, + blocks_offset, blocks_offset); + } else { + fprintf(stderr, + "InnoDB: Buffer pool in the shared memory segment can be used as it is.\n"); + } + + if (phys_offset) { + fprintf(stderr, + "InnoDB: Aligning physical offset..."); + + memmove(frame, (byte*)chunk->mem + shm_info->frame_offset, + chunk->size * UNIV_PAGE_SIZE); + + fprintf(stderr, + " Done.\n"); + } + + /* buf_block_t */ + block = chunk->blocks; + for (i = chunk->size; i--; ) { + buf_block_reuse(block, logi_offset); + block++; + } + + if (logi_offset || blocks_offset) { + fprintf(stderr, + "InnoDB: Aligning logical offset..."); + + + /* buf_pool_t buf_pool_backup */ + UT_LIST_OFFSET(flush_list, buf_page_t, shm_info->buf_pool_backup.flush_list, + previous_frame_address, logi_offset, blocks_offset); + UT_LIST_OFFSET(free, buf_page_t, shm_info->buf_pool_backup.free, + previous_frame_address, logi_offset, blocks_offset); + UT_LIST_OFFSET(LRU, buf_page_t, shm_info->buf_pool_backup.LRU, + previous_frame_address, logi_offset, blocks_offset); + if (shm_info->buf_pool_backup.LRU_old) + shm_info->buf_pool_backup.LRU_old = + (buf_page_t*)((byte*)(shm_info->buf_pool_backup.LRU_old) + + (((void*)shm_info->buf_pool_backup.LRU_old > previous_frame_address) + ? logi_offset : blocks_offset)); + + UT_LIST_OFFSET(unzip_LRU, buf_block_t, shm_info->buf_pool_backup.unzip_LRU, + previous_frame_address, logi_offset, blocks_offset); + + UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_clean, + previous_frame_address, logi_offset, blocks_offset); + for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { + UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_free[i], + previous_frame_address, logi_offset, blocks_offset); + } + + HASH_OFFSET(zip_hash_tmp, buf_page_t, hash, + previous_frame_address, logi_offset, blocks_offset); + + fprintf(stderr, + " Done.\n"); + } + } else { /* Init block structs and assign frames for them. Then we assign the frames to the first blocks (we already mapped the memory above). */ @@ -833,6 +1159,11 @@ buf_chunk_init( block++; frame += UNIV_PAGE_SIZE; } + } + + if (shm_info) { + shm_info->frame_offset = chunk->blocks[0].frame - (byte*)chunk->mem; + } return(chunk); } @@ -1014,6 +1345,8 @@ buf_chunk_free( UNIV_MEM_UNDESC(block); } + ut_a(!srv_buffer_pool_shm_key); + os_mem_free_large(chunk->mem, chunk->mem_size); } @@ -1063,7 +1396,10 @@ buf_pool_init(void) srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); + /* zip_hash is allocated to shm when srv_buffer_pool_shm_key is enabled */ + if (!srv_buffer_pool_shm_key) { buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size); + } buf_pool->last_printout_time = time(NULL); @@ -1078,6 +1414,86 @@ buf_pool_init(void) --------------------------- */ /* All fields are initialized by mem_zalloc(). */ + if (srv_buffer_pool_shm_key) { + buf_shm_info_t* shm_info; + + ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); + shm_info = chunk->mem; + + buf_pool->zip_hash = (hash_table_t*)((byte*)chunk->mem + shm_info->zip_hash_offset); + + if(shm_info->is_new) { + shm_info->is_new = FALSE; /* initialization was finished */ + } else { + buf_block_t* block = chunk->blocks; + buf_page_t* b; + + /* shm_info->buf_pool_backup should be converted */ + /* at buf_chunk_init(). So copy simply. */ + buf_pool->flush_list = shm_info->buf_pool_backup.flush_list; + buf_pool->freed_page_clock = shm_info->buf_pool_backup.freed_page_clock; + buf_pool->free = shm_info->buf_pool_backup.free; + buf_pool->LRU = shm_info->buf_pool_backup.LRU; + buf_pool->LRU_old = shm_info->buf_pool_backup.LRU_old; + buf_pool->LRU_old_len = shm_info->buf_pool_backup.LRU_old_len; + buf_pool->unzip_LRU = shm_info->buf_pool_backup.unzip_LRU; + buf_pool->zip_clean = shm_info->buf_pool_backup.zip_clean; + for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { + buf_pool->zip_free[i] = shm_info->buf_pool_backup.zip_free[i]; + } + + for (i = 0; i < chunk->size; i++, block++) { + if (buf_block_get_state(block) + == BUF_BLOCK_FILE_PAGE) { + ut_d(block->page.in_page_hash = TRUE); + HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, + buf_page_address_fold( + block->page.space, + block->page.offset), + &block->page); + } + } + + for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; + b = UT_LIST_GET_NEXT(zip_list, b)) { + ut_ad(!b->in_flush_list); + ut_ad(b->in_LRU_list); + + ut_d(b->in_page_hash = TRUE); + HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, + buf_page_address_fold(b->space, b->offset), b); + } + + for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; + b = UT_LIST_GET_NEXT(flush_list, b)) { + ut_ad(b->in_flush_list); + ut_ad(b->in_LRU_list); + + switch (buf_page_get_state(b)) { + case BUF_BLOCK_ZIP_DIRTY: + ut_d(b->in_page_hash = TRUE); + HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, + buf_page_address_fold(b->space, + b->offset), b); + break; + case BUF_BLOCK_FILE_PAGE: + /* uncompressed page */ + break; + case BUF_BLOCK_ZIP_FREE: + case BUF_BLOCK_ZIP_PAGE: + case BUF_BLOCK_NOT_USED: + case BUF_BLOCK_READY_FOR_USE: + case BUF_BLOCK_MEMORY: + case BUF_BLOCK_REMOVE_HASH: + ut_error; + break; + } + } + + + } + } + mutex_exit(&LRU_list_mutex); rw_lock_x_unlock(&page_hash_latch); buf_pool_mutex_exit(); @@ -1102,6 +1518,34 @@ buf_pool_free(void) buf_chunk_t* chunk; buf_chunk_t* chunks; + if (srv_buffer_pool_shm_key) { + buf_shm_info_t* shm_info; + + ut_a(buf_pool->n_chunks == 1); + + chunk = buf_pool->chunks; + shm_info = chunk->mem; + ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); + + /* validation the shared memory segment doesn't have unrecoverable contents. */ + /* Currently, validation became not needed */ + shm_info->reusable = TRUE; + + memcpy(&(shm_info->buf_pool_backup), buf_pool, sizeof(buf_pool_t)); + memcpy(&(shm_info->chunk_backup), chunk, sizeof(buf_chunk_t)); + + if (srv_fast_shutdown < 2) { + if (srv_buffer_pool_shm_checksum) { + shm_info->checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), + chunk->mem_size - sizeof(buf_shm_info_t)); + } else { + shm_info->checksum = BUF_NO_CHECKSUM_MAGIC; + } + shm_info->clean = TRUE; + } + + os_shm_free(chunk->mem, chunk->mem_size); + } else { chunks = buf_pool->chunks; chunk = chunks + buf_pool->n_chunks; @@ -1110,10 +1554,13 @@ buf_pool_free(void) would fail at shutdown. */ os_mem_free_large(chunk->mem, chunk->mem_size); } + } mem_free(buf_pool->chunks); hash_table_free(buf_pool->page_hash); + if (!srv_buffer_pool_shm_key) { hash_table_free(buf_pool->zip_hash); + } mem_free(buf_pool); buf_pool = NULL; } @@ -1308,6 +1755,11 @@ try_again: //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); + if (srv_buffer_pool_shm_key) { + /* Cannot support shrink */ + goto func_done; + } + shrink_again: if (buf_pool->n_chunks <= 1) { @@ -1551,6 +2003,11 @@ void buf_pool_resize(void) /*=================*/ { + if (srv_buffer_pool_shm_key) { + /* Cannot support resize */ + return; + } + //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); @@ -2511,6 +2968,30 @@ wait_until_unfixed: bytes. */ UNIV_MEM_ASSERT_RW(&block->page, sizeof block->page); #endif +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + if (mode == BUF_GET_IF_IN_POOL && ibuf_debug) { + /* Try to evict the block from the buffer pool, to use the + insert buffer as much as possible. */ + + if (buf_LRU_free_block(&block->page, TRUE, NULL) + == BUF_LRU_FREED) { + buf_pool_mutex_exit(); + mutex_exit(&block->mutex); + fprintf(stderr, + "innodb_change_buffering_debug evict %u %u\n", + (unsigned) space, (unsigned) offset); + return(NULL); + } else if (buf_flush_page_try(block)) { + fprintf(stderr, + "innodb_change_buffering_debug flush %u %u\n", + (unsigned) space, (unsigned) offset); + guess = block; + goto loop; + } + + /* Failed to evict the page; change it directly */ + } +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ buf_block_buf_fix_inc(block, file, line); diff --git a/buf/buf0flu.c b/buf/buf0flu.c index c1a1282fdef..5db6f816aab 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -1064,6 +1064,82 @@ buf_flush_write_block_low( } } +# if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/********************************************************************//** +Writes a flushable page asynchronously from the buffer pool to a file. +NOTE: buf_pool_mutex and block->mutex 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 +ibool +buf_flush_page_try( +/*===============*/ + buf_block_t* block) /*!< in/out: buffer control block */ +{ + ut_ad(buf_pool_mutex_own()); + ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); + ut_ad(mutex_own(&block->mutex)); + + if (!buf_flush_ready_for_flush(&block->page, BUF_FLUSH_LRU)) { + return(FALSE); + } + + if (buf_pool->n_flush[BUF_FLUSH_LRU] > 0 + || buf_pool->init_flush[BUF_FLUSH_LRU]) { + /* There is already a flush batch of the same type running */ + return(FALSE); + } + + buf_pool->init_flush[BUF_FLUSH_LRU] = TRUE; + + buf_page_set_io_fix(&block->page, BUF_IO_WRITE); + + buf_page_set_flush_type(&block->page, BUF_FLUSH_LRU); + + if (buf_pool->n_flush[BUF_FLUSH_LRU]++ == 0) { + + os_event_reset(buf_pool->no_flush[BUF_FLUSH_LRU]); + } + + /* VERY IMPORTANT: + Because any thread may call the LRU flush, even when owning + locks on pages, to avoid deadlocks, we must make sure that the + s-lock is acquired on the page without waiting: this is + accomplished because buf_flush_ready_for_flush() must hold, + and that requires the page not to be bufferfixed. */ + + rw_lock_s_lock_gen(&block->lock, BUF_IO_WRITE); + + /* Note that the s-latch is acquired before releasing the + buf_pool mutex: this ensures that the latch is acquired + immediately. */ + + mutex_exit(&block->mutex); + buf_pool_mutex_exit(); + + /* Even though block is not protected by any mutex at this + point, it is safe to access block, because it is io_fixed and + oldest_modification != 0. Thus, it cannot be relocated in the + buffer pool or removed from flush_list or LRU_list. */ + + buf_flush_write_block_low(&block->page); + + buf_pool_mutex_enter(); + buf_pool->init_flush[BUF_FLUSH_LRU] = FALSE; + + if (buf_pool->n_flush[BUF_FLUSH_LRU] == 0) { + /* The running flush batch has ended */ + os_event_set(buf_pool->no_flush[BUF_FLUSH_LRU]); + } + + buf_pool_mutex_exit(); + buf_flush_buffered_writes(); + + return(TRUE); +} +# endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + /********************************************************************//** Writes a flushable page asynchronously from the buffer pool to a file. NOTE: in simulated aio we must call @@ -1735,9 +1811,9 @@ buf_flush_validate_low(void) ut_a(om > 0); if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) { + buf_page_t* rpage; ut_a(rnode); - buf_page_t* rpage = *rbt_value(buf_page_t*, - rnode); + rpage = *rbt_value(buf_page_t*, rnode); ut_a(rpage); ut_a(rpage == bpage); rnode = rbt_next(buf_pool->flush_rbt, rnode); diff --git a/buf/buf0lru.c b/buf/buf0lru.c index c82a2d545d5..1c2c3d7f04f 100644 --- a/buf/buf0lru.c +++ b/buf/buf0lru.c @@ -2265,7 +2265,7 @@ buf_LRU_file_restore(void) ulint req = 0; ibool terminated = FALSE; ibool ret = FALSE; - dump_record_t* records; + dump_record_t* records = NULL; ulint size; ulint size_high; ulint length; diff --git a/dict/dict0crea.c b/dict/dict0crea.c index aac215e0f3f..45765949496 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -894,7 +894,7 @@ dict_truncate_index_tree( appropriate field in the SYS_INDEXES record: this mini-transaction marks the B-tree totally truncated */ - btr_page_get(space, zip_size, root_page_no, RW_X_LATCH, mtr); + btr_block_get(space, zip_size, root_page_no, RW_X_LATCH, mtr); btr_free_root(space, zip_size, root_page_no, mtr); create: diff --git a/dict/dict0dict.c b/dict/dict0dict.c index adaa87e43e9..4d99907f093 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -81,9 +81,18 @@ UNIV_INTERN rw_lock_t dict_operation_lock; /** Identifies generated InnoDB foreign key names */ static char dict_ibfk[] = "_ibfk_"; -/** array of mutexes protecting dict_index_t::stat_n_diff_key_vals[] */ -#define DICT_INDEX_STAT_MUTEX_SIZE 32 -static mutex_t dict_index_stat_mutex[DICT_INDEX_STAT_MUTEX_SIZE]; +/** array of rw locks protecting +dict_table_t::stat_initialized +dict_table_t::stat_n_rows (*) +dict_table_t::stat_clustered_index_size +dict_table_t::stat_sum_of_other_index_sizes +dict_table_t::stat_modified_counter (*) +dict_table_t::indexes*::stat_n_diff_key_vals[] +dict_table_t::indexes*::stat_index_size +dict_table_t::indexes*::stat_n_leaf_pages +(*) those are not always protected for performance reasons */ +#define DICT_TABLE_STATS_LATCHES_SIZE 64 +static rw_lock_t dict_table_stats_latches[DICT_TABLE_STATS_LATCHES_SIZE]; /*******************************************************************//** Tries to find column names for the index and sets the col field of the @@ -244,43 +253,65 @@ dict_mutex_exit_for_mysql(void) mutex_exit(&(dict_sys->mutex)); } -/** Get the mutex that protects index->stat_n_diff_key_vals[] */ -#define GET_INDEX_STAT_MUTEX(index) \ - (&dict_index_stat_mutex[ut_fold_dulint(index->id) \ - % DICT_INDEX_STAT_MUTEX_SIZE]) +/** Get the latch that protects the stats of a given table */ +#define GET_TABLE_STATS_LATCH(table) \ + (&dict_table_stats_latches[ut_fold_dulint(table->id) \ + % DICT_TABLE_STATS_LATCHES_SIZE]) /**********************************************************************//** -Lock the appropriate mutex to protect index->stat_n_diff_key_vals[]. -index->id is used to pick the right mutex and it should not change -before dict_index_stat_mutex_exit() is called on this index. */ +Lock the appropriate latch to protect a given table's statistics. +table->id is used to pick the corresponding latch from a global array of +latches. */ UNIV_INTERN void -dict_index_stat_mutex_enter( -/*========================*/ - const dict_index_t* index) /*!< in: index */ +dict_table_stats_lock( +/*==================*/ + const dict_table_t* table, /*!< in: table */ + ulint latch_mode) /*!< in: RW_S_LATCH or + RW_X_LATCH */ { - ut_ad(index != NULL); - ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); - ut_ad(index->cached); - ut_ad(!index->to_be_dropped); + ut_ad(table != NULL); + ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - mutex_enter(GET_INDEX_STAT_MUTEX(index)); + switch (latch_mode) { + case RW_S_LATCH: + rw_lock_s_lock(GET_TABLE_STATS_LATCH(table)); + break; + case RW_X_LATCH: + rw_lock_x_lock(GET_TABLE_STATS_LATCH(table)); + break; + case RW_NO_LATCH: + /* fall through */ + default: + ut_error; + } } /**********************************************************************//** -Unlock the appropriate mutex that protects index->stat_n_diff_key_vals[]. */ +Unlock the latch that has been locked by dict_table_stats_lock() */ UNIV_INTERN void -dict_index_stat_mutex_exit( -/*=======================*/ - const dict_index_t* index) /*!< in: index */ +dict_table_stats_unlock( +/*====================*/ + const dict_table_t* table, /*!< in: table */ + ulint latch_mode) /*!< in: RW_S_LATCH or + RW_X_LATCH */ { - ut_ad(index != NULL); - ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); - ut_ad(index->cached); - ut_ad(!index->to_be_dropped); + ut_ad(table != NULL); + ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - mutex_exit(GET_INDEX_STAT_MUTEX(index)); + switch (latch_mode) { + case RW_S_LATCH: + rw_lock_s_unlock(GET_TABLE_STATS_LATCH(table)); + break; + case RW_X_LATCH: + rw_lock_x_unlock(GET_TABLE_STATS_LATCH(table)); + break; + case RW_NO_LATCH: + /* fall through */ + default: + ut_error; + } } /********************************************************************//** @@ -671,8 +702,8 @@ dict_init(void) mutex_create(&dict_foreign_err_mutex, SYNC_ANY_LATCH); - for (i = 0; i < DICT_INDEX_STAT_MUTEX_SIZE; i++) { - mutex_create(&dict_index_stat_mutex[i], SYNC_INDEX_TREE); + for (i = 0; i < DICT_TABLE_STATS_LATCHES_SIZE; i++) { + rw_lock_create(&dict_table_stats_latches[i], SYNC_INDEX_TREE); } } @@ -704,13 +735,12 @@ dict_table_get( mutex_exit(&(dict_sys->mutex)); - if (table != NULL) { - if (!table->stat_initialized && !table->is_corrupt) { - /* If table->ibd_file_missing == TRUE, this will - print an error message and return without doing - anything. */ - dict_update_statistics(table, FALSE); - } + if (table != NULL && !table->is_corrupt) { + /* If table->ibd_file_missing == TRUE, this will + print an error message and return without doing + anything. */ + dict_update_statistics(table, TRUE /* only update stats + if they have not been initialized */, FALSE); } return(table); @@ -4366,11 +4396,9 @@ next_rec: btr_pcur_close(&pcur); mtr_commit(&mtr); - dict_index_stat_mutex_enter(index); for (i = 0; i <= n_cols; i++) { index->stat_n_diff_key_vals[i] = stat_n_diff_key_vals_tmp[i]; } - dict_index_stat_mutex_exit(index); } /*===========================================*/ @@ -4424,11 +4452,9 @@ dict_store_statistics( n_cols = dict_index_get_n_unique(index); stat_n_diff_key_vals_tmp = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); - dict_index_stat_mutex_enter(index); for (i = 0; i <= n_cols; i++) { stat_n_diff_key_vals_tmp[i] = index->stat_n_diff_key_vals[i]; } - dict_index_stat_mutex_exit(index); sys_stats = dict_sys->sys_stats; sys_index = UT_LIST_GET_FIRST(sys_stats->indexes); @@ -4504,12 +4530,13 @@ Calculates new estimates for table and index statistics. The statistics are used in query optimization. */ UNIV_INTERN void -dict_update_statistics_low( -/*=======================*/ +dict_update_statistics( +/*===================*/ dict_table_t* table, /*!< in/out: table */ - ibool has_dict_mutex __attribute__((unused)), - /*!< in: TRUE if the caller has the - dictionary mutex */ + ibool only_calc_if_missing_stats, /*!< in: only + update/recalc the stats if they have + not been initialized yet, otherwise + do nothing */ ibool sync) /*!< in: TRUE if must update SYS_STATS */ { dict_index_t* index; @@ -4528,6 +4555,8 @@ dict_update_statistics_low( } if (srv_use_sys_stats_table && !((table->flags >> DICT_TF2_SHIFT) & DICT_TF2_TEMPORARY) && !sync) { + dict_table_stats_lock(table, RW_X_LATCH); + /* reload statistics from SYS_STATS table */ if (dict_reload_statistics(table, &sum_of_index_sizes)) { /* success */ @@ -4537,6 +4566,8 @@ dict_update_statistics_low( #endif goto end; } + + dict_table_stats_unlock(table, RW_X_LATCH); } #ifdef UNIV_DEBUG fprintf(stderr, "InnoDB: DEBUG: update_statistics for %s.\n", @@ -4555,6 +4586,12 @@ dict_update_statistics_low( return; } + dict_table_stats_lock(table, RW_X_LATCH); + + if (only_calc_if_missing_stats && table->stat_initialized) { + dict_table_stats_unlock(table, RW_X_LATCH); + return; + } do { if (table->is_corrupt) { @@ -4610,13 +4647,9 @@ dict_update_statistics_low( end: index = dict_table_get_first_index(table); - dict_index_stat_mutex_enter(index); - table->stat_n_rows = index->stat_n_diff_key_vals[ dict_index_get_n_unique(index)]; - dict_index_stat_mutex_exit(index); - table->stat_clustered_index_size = index->stat_index_size; table->stat_sum_of_other_index_sizes = sum_of_index_sizes @@ -4625,19 +4658,8 @@ end: table->stat_initialized = TRUE; table->stat_modified_counter = 0; -} -/*********************************************************************//** -Calculates new estimates for table and index statistics. The statistics -are used in query optimization. */ -UNIV_INTERN -void -dict_update_statistics( -/*===================*/ - dict_table_t* table, /*!< in/out: table */ - ibool sync) -{ - dict_update_statistics_low(table, FALSE, sync); + dict_table_stats_unlock(table, RW_X_LATCH); } /**********************************************************************//** @@ -4717,8 +4739,9 @@ dict_table_print_low( ut_ad(mutex_own(&(dict_sys->mutex))); - if (srv_stats_auto_update) - dict_update_statistics_low(table, TRUE, FALSE); + dict_update_statistics(table, FALSE /* update even if initialized */, FALSE); + + dict_table_stats_lock(table, RW_S_LATCH); fprintf(stderr, "--------------------------------------\n" @@ -4747,6 +4770,8 @@ dict_table_print_low( index = UT_LIST_GET_NEXT(indexes, index); } + dict_table_stats_unlock(table, RW_S_LATCH); + foreign = UT_LIST_GET_FIRST(table->foreign_list); while (foreign != NULL) { @@ -4795,8 +4820,6 @@ dict_index_print_low( ut_ad(mutex_own(&(dict_sys->mutex))); - dict_index_stat_mutex_enter(index); - if (index->n_user_defined_cols > 0) { n_vals = index->stat_n_diff_key_vals[ index->n_user_defined_cols]; @@ -4804,8 +4827,6 @@ dict_index_print_low( n_vals = index->stat_n_diff_key_vals[1]; } - dict_index_stat_mutex_exit(index); - fprintf(stderr, " INDEX: name %s, id %lu %lu, fields %lu/%lu," " uniq %lu, type %lu\n" @@ -5149,7 +5170,8 @@ void dict_table_replace_index_in_foreign_list( /*=====================================*/ dict_table_t* table, /*!< in/out: table */ - dict_index_t* index) /*!< in: index to be replaced */ + dict_index_t* index, /*!< in: index to be replaced */ + const trx_t* trx) /*!< in: transaction handle */ { dict_foreign_t* foreign; @@ -5160,7 +5182,13 @@ dict_table_replace_index_in_foreign_list( if (foreign->foreign_index == index) { dict_index_t* new_index = dict_foreign_find_equiv_index(foreign); - ut_a(new_index); + + /* There must exist an alternative index if + check_foreigns (FOREIGN_KEY_CHECKS) is on, + since ha_innobase::prepare_drop_index had done + the check before we reach here. */ + + ut_a(new_index || !trx->check_foreigns); foreign->foreign_index = new_index; } @@ -5294,8 +5322,8 @@ dict_close(void) mem_free(dict_sys); dict_sys = NULL; - for (i = 0; i < DICT_INDEX_STAT_MUTEX_SIZE; i++) { - mutex_free(&dict_index_stat_mutex[i]); + for (i = 0; i < DICT_TABLE_STATS_LATCHES_SIZE; i++) { + rw_lock_free(&dict_table_stats_latches[i]); } } diff --git a/dict/dict0load.c b/dict/dict0load.c index bc05282668e..758ee8b4969 100644 --- a/dict/dict0load.c +++ b/dict/dict0load.c @@ -221,8 +221,9 @@ loop: /* The table definition was corrupt if there is no index */ - if (srv_stats_auto_update && dict_table_get_first_index(table)) { - dict_update_statistics_low(table, TRUE, FALSE); + if (dict_table_get_first_index(table)) { + dict_update_statistics(table, FALSE /* update + even if initialized */, FALSE); } dict_table_print_low(table); @@ -1023,13 +1024,13 @@ err_exit: if (err != DB_SUCCESS) { dict_table_remove_from_cache(table); table = NULL; + } else { + table->fk_max_recusive_level = 0; } } else if (!srv_force_recovery) { dict_table_remove_from_cache(table); table = NULL; } - - table->fk_max_recusive_level = 0; #if 0 if (err != DB_SUCCESS && table != NULL) { diff --git a/fil/fil0fil.c b/fil/fil0fil.c index 3193fb661f1..52af7d45f25 100644 --- a/fil/fil0fil.c +++ b/fil/fil0fil.c @@ -336,14 +336,15 @@ fil_get_space_id_for_table( /*******************************************************************//** Frees a space object from the tablespace memory cache. Closes the files in the chain but does not delete them. There must not be any pending i/o's or -flushes on the files. */ +flushes on the files. +@return TRUE on success */ static ibool fil_space_free( /*===========*/ - /* out: TRUE if success */ - ulint id, /* in: space id */ - ibool own_mutex);/* in: TRUE if own system->mutex */ + ulint id, /* in: space id */ + ibool x_latched); /* in: TRUE if caller has space->latch + in X mode */ /********************************************************************//** Reads data from a space to a buffer. Remember that the possible incomplete blocks at the end of file are ignored: they are not taken into account when @@ -617,7 +618,7 @@ fil_node_create( UT_LIST_ADD_LAST(chain, space->chain, node); - if (id < SRV_LOG_SPACE_FIRST_ID && fil_system->max_assigned_id < id) { + if (id < SRV_EXTRA_SYS_SPACE_FIRST_ID && fil_system->max_assigned_id < id) { fil_system->max_assigned_id = id; } @@ -1130,6 +1131,7 @@ try_again: space = fil_space_get_by_name(name); if (UNIV_LIKELY_NULL(space)) { + ibool success; ulint namesake_id; ut_print_timestamp(stderr); @@ -1168,9 +1170,10 @@ try_again: namesake_id = space->id; - mutex_exit(&fil_system->mutex); + success = fil_space_free(namesake_id, FALSE); + ut_a(success); - fil_space_free(namesake_id, FALSE); + mutex_exit(&fil_system->mutex); goto try_again; } @@ -1205,6 +1208,7 @@ try_again: space->mark = FALSE; if (UNIV_LIKELY(purpose == FIL_TABLESPACE && !recv_recovery_on) + && UNIV_UNLIKELY(id < SRV_EXTRA_SYS_SPACE_FIRST_ID) && UNIV_UNLIKELY(id > fil_system->max_assigned_id)) { if (!fil_system->space_id_reuse_warned) { fil_system->space_id_reuse_warned = TRUE; @@ -1290,7 +1294,7 @@ fil_assign_new_space_id( (ulong) SRV_LOG_SPACE_FIRST_ID); } - success = (id < SRV_LOG_SPACE_FIRST_ID); + success = (id < SRV_EXTRA_SYS_SPACE_FIRST_ID); if (success) { *space_id = fil_system->max_assigned_id = id; @@ -1323,15 +1327,14 @@ fil_space_free( /*===========*/ /* out: TRUE if success */ ulint id, /* in: space id */ - ibool own_mutex) /* in: TRUE if own system->mutex */ + ibool x_latched) /* in: TRUE if caller has space->latch + in X mode */ { fil_space_t* space; fil_space_t* namespace; fil_node_t* fil_node; - if (!own_mutex) { - mutex_enter(&fil_system->mutex); - } + ut_ad(mutex_own(&fil_system->mutex)); space = fil_space_get_by_id(id); @@ -1342,8 +1345,6 @@ fil_space_free( " from the cache but\n" "InnoDB: it is not there.\n", (ulong) id); - mutex_exit(&fil_system->mutex); - return(FALSE); } @@ -1378,8 +1379,8 @@ fil_space_free( ut_a(0 == UT_LIST_GET_LEN(space->chain)); - if (!own_mutex) { - mutex_exit(&fil_system->mutex); + if (x_latched) { + rw_lock_x_unlock(&space->latch); } rw_lock_free(&(space->latch)); @@ -1626,25 +1627,27 @@ fil_close_all_files(void) /*=====================*/ { fil_space_t* space; - fil_node_t* node; mutex_enter(&fil_system->mutex); space = UT_LIST_GET_FIRST(fil_system->space_list); while (space != NULL) { + fil_node_t* node; fil_space_t* prev_space = space; - node = UT_LIST_GET_FIRST(space->chain); + for (node = UT_LIST_GET_FIRST(space->chain); + node != NULL; + node = UT_LIST_GET_NEXT(chain, node)) { - while (node != NULL) { if (node->open) { fil_node_close_file(node, fil_system); } - node = UT_LIST_GET_NEXT(chain, node); } + space = UT_LIST_GET_NEXT(space_list, space); - fil_space_free(prev_space->id, TRUE); + + fil_space_free(prev_space->id, FALSE); } mutex_exit(&fil_system->mutex); @@ -1666,6 +1669,10 @@ fil_set_max_space_id_if_bigger( ut_error; } + if (max_id >= SRV_EXTRA_SYS_SPACE_FIRST_ID) { + return; + } + mutex_enter(&fil_system->mutex); if (fil_system->max_assigned_id < max_id) { @@ -1684,6 +1691,7 @@ static ulint fil_write_lsn_and_arch_no_to_file( /*==============================*/ + ulint space_id, ulint sum_of_sizes, /*!< in: combined size of previous files in space, in database pages */ ib_uint64_t lsn, /*!< in: lsn to write */ @@ -1693,14 +1701,16 @@ fil_write_lsn_and_arch_no_to_file( byte* buf1; byte* buf; + ut_a(trx_sys_sys_space(space_id)); + buf1 = mem_alloc(2 * UNIV_PAGE_SIZE); buf = ut_align(buf1, UNIV_PAGE_SIZE); - fil_read(TRUE, 0, 0, sum_of_sizes, 0, UNIV_PAGE_SIZE, buf, NULL); + fil_read(TRUE, space_id, 0, sum_of_sizes, 0, UNIV_PAGE_SIZE, buf, NULL); mach_write_ull(buf + FIL_PAGE_FILE_FLUSH_LSN, lsn); - fil_write(TRUE, 0, 0, sum_of_sizes, 0, UNIV_PAGE_SIZE, buf, NULL); + fil_write(TRUE, space_id, 0, sum_of_sizes, 0, UNIV_PAGE_SIZE, buf, NULL); mem_free(buf1); @@ -1736,7 +1746,7 @@ fil_write_flushed_lsn_to_data_files( always open. */ if (space->purpose == FIL_TABLESPACE - && space->id == 0) { + && trx_sys_sys_space(space->id)) { sum_of_sizes = 0; node = UT_LIST_GET_FIRST(space->chain); @@ -1744,7 +1754,7 @@ fil_write_flushed_lsn_to_data_files( mutex_exit(&fil_system->mutex); err = fil_write_lsn_and_arch_no_to_file( - sum_of_sizes, lsn, arch_log_no); + space->id, sum_of_sizes, lsn, arch_log_no); if (err != DB_SUCCESS) { return(err); @@ -2264,6 +2274,19 @@ try_again: path = mem_strdup(space->name); mutex_exit(&fil_system->mutex); + + /* Important: We rely on the data dictionary mutex to ensure + that a race is not possible here. It should serialize the tablespace + drop/free. We acquire an X latch only to avoid a race condition + when accessing the tablespace instance via: + + fsp_get_available_space_in_free_extents(). + + There our main motivation is to reduce the contention on the + dictionary mutex. */ + + rw_lock_x_lock(&space->latch); + #ifndef UNIV_HOTBACKUP /* Invalidate in the buffer pool all pages belonging to the tablespace. Since we have set space->is_being_deleted = TRUE, readahead @@ -2276,7 +2299,11 @@ try_again: #endif /* printf("Deleting tablespace %s id %lu\n", space->name, id); */ - success = fil_space_free(id, FALSE); + mutex_enter(&fil_system->mutex); + + success = fil_space_free(id, TRUE); + + mutex_exit(&fil_system->mutex); if (success) { success = os_file_delete(path); @@ -2284,6 +2311,8 @@ try_again: if (!success) { success = os_file_delete_if_exists(path); } + } else { + rw_lock_x_unlock(&space->latch); } if (success) { @@ -2311,6 +2340,31 @@ try_again: return(FALSE); } +/*******************************************************************//** +Returns TRUE if a single-table tablespace is being deleted. +@return TRUE if being deleted */ +UNIV_INTERN +ibool +fil_tablespace_is_being_deleted( +/*============================*/ + ulint id) /*!< in: space id */ +{ + fil_space_t* space; + ibool is_being_deleted; + + mutex_enter(&fil_system->mutex); + + space = fil_space_get_by_id(id); + + ut_a(space != NULL); + + is_being_deleted = space->is_being_deleted; + + mutex_exit(&fil_system->mutex); + + return(is_being_deleted); +} + #ifndef UNIV_HOTBACKUP /*******************************************************************//** Discards a single-table tablespace. The tablespace must be cached in the @@ -5339,7 +5393,7 @@ fil_page_get_type( return(mach_read_from_2(page + FIL_PAGE_TYPE)); } -/******************************************************************** +/****************************************************************//** Initializes the tablespace memory cache. */ UNIV_INTERN void diff --git a/fsp/fsp0fsp.c b/fsp/fsp0fsp.c index f6ff47aa7d5..c5a28d60880 100644 --- a/fsp/fsp0fsp.c +++ b/fsp/fsp0fsp.c @@ -3130,13 +3130,63 @@ fsp_get_available_space_in_free_extents( ut_ad(!mutex_own(&kernel_mutex)); + /* The convoluted mutex acquire is to overcome latching order + issues: The problem is that the fil_mutex is at a lower level + than the tablespace latch and the buffer pool mutex. We have to + first prevent any operations on the file system by acquiring the + dictionary mutex. Then acquire the tablespace latch to obey the + latching order and then release the dictionary mutex. That way we + ensure that the tablespace instance can't be freed while we are + examining its contents (see fil_space_free()). + + However, there is one further complication, we release the fil_mutex + when we need to invalidate the the pages in the buffer pool and we + reacquire the fil_mutex when deleting and freeing the tablespace + instance in fil0fil.c. Here we need to account for that situation + too. */ + + mutex_enter(&dict_sys->mutex); + + /* At this stage there is no guarantee that the tablespace even + exists in the cache. */ + + if (fil_tablespace_deleted_or_being_deleted_in_mem(space, -1)) { + + mutex_exit(&dict_sys->mutex); + + return(ULLINT_UNDEFINED); + } + mtr_start(&mtr); latch = fil_space_get_latch(space, &flags); + + /* This should ensure that the tablespace instance can't be freed + by another thread. However, the tablespace pages can still be freed + from the buffer pool. We need to check for that again. */ + zip_size = dict_table_flags_to_zip_size(flags); mtr_x_lock(latch, &mtr); + mutex_exit(&dict_sys->mutex); + + /* At this point it is possible for the tablespace to be deleted and + its pages removed from the buffer pool. We need to check for that + situation. However, the tablespace instance can't be deleted because + our latching above should ensure that. */ + + if (fil_tablespace_is_being_deleted(space)) { + + mtr_commit(&mtr); + + return(ULLINT_UNDEFINED); + } + + /* From here on even if the user has dropped the tablespace, the + pages _must_ still exist in the buffer pool and the tablespace + instance _must_ be in the file system hash table. */ + space_header = fsp_get_space_header(space, zip_size, &mtr); size = mtr_read_ulint(space_header + FSP_SIZE, MLOG_4BYTES, &mtr); diff --git a/ha/hash0hash.c b/ha/hash0hash.c index 30c304dafcd..0f4fc55d895 100644 --- a/ha/hash0hash.c +++ b/ha/hash0hash.c @@ -127,6 +127,70 @@ hash_create( return(table); } +/*************************************************************//** +*/ +UNIV_INTERN +ulint +hash_create_needed( +/*===============*/ + ulint n) +{ + ulint prime; + ulint offset; + + prime = ut_find_prime(n); + + offset = (sizeof(hash_table_t) + 7) / 8; + offset *= 8; + + return(offset + sizeof(hash_cell_t) * prime); +} + +UNIV_INTERN +void +hash_create_init( +/*=============*/ + hash_table_t* table, + ulint n) +{ + ulint prime; + ulint offset; + + prime = ut_find_prime(n); + + offset = (sizeof(hash_table_t) + 7) / 8; + offset *= 8; + + table->array = (hash_cell_t*)(((byte*)table) + offset); + table->n_cells = prime; +# if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + table->adaptive = FALSE; +# endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ + table->n_mutexes = 0; + table->mutexes = NULL; + table->heaps = NULL; + table->heap = NULL; + ut_d(table->magic_n = HASH_TABLE_MAGIC_N); + + /* Initialize the cell array */ + hash_table_clear(table); +} + +UNIV_INTERN +void +hash_create_reuse( +/*==============*/ + hash_table_t* table) +{ + ulint offset; + + offset = (sizeof(hash_table_t) + 7) / 8; + offset *= 8; + + table->array = (hash_cell_t*)(((byte*)table) + offset); + ut_ad(table->magic_n == HASH_TABLE_MAGIC_N); +} + /*************************************************************//** Frees a hash table. */ UNIV_INTERN diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 7fed03c5d15..519984f2f73 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -152,6 +152,7 @@ static ulong innobase_read_io_threads; static ulong innobase_write_io_threads; static ulong innobase_page_size; +static ulong innobase_log_block_size; static my_bool innobase_thread_concurrency_timer_based; static long long innobase_buffer_pool_size, innobase_log_file_size; @@ -197,6 +198,7 @@ static my_bool innobase_rollback_on_timeout = FALSE; static my_bool innobase_create_status_file = FALSE; static my_bool innobase_stats_on_metadata = TRUE; static my_bool innobase_use_sys_stats_table = FALSE; +static my_bool innobase_buffer_pool_shm_checksum = TRUE; static char* internal_innobase_data_file_path = NULL; @@ -2118,6 +2120,32 @@ innobase_init( goto error; } + srv_log_block_size = 0; + if (innobase_log_block_size != (1 << 9)) { /*!=512*/ + uint n_shift; + + fprintf(stderr, + "InnoDB: Warning: innodb_log_block_size has been changed from default value 512. (###EXPERIMENTAL### operation)\n"); + for (n_shift = 9; n_shift <= UNIV_PAGE_SIZE_SHIFT_MAX; n_shift++) { + if (innobase_log_block_size == ((ulong)1 << n_shift)) { + srv_log_block_size = (1 << n_shift); + fprintf(stderr, + "InnoDB: The log block size is set to %lu.\n", + srv_log_block_size); + break; + } + } + } else { + srv_log_block_size = 512; + } + + if (!srv_log_block_size) { + fprintf(stderr, + "InnoDB: Error: %lu is not valid value for innodb_log_block_size.\n", + innobase_log_block_size); + goto error; + } + #ifndef MYSQL_SERVER innodb_overwrite_relay_log_info = FALSE; #endif @@ -2421,7 +2449,7 @@ innobase_change_buffering_inited_ok: srv_n_write_io_threads = (ulint) innobase_write_io_threads; srv_read_ahead &= 3; - srv_adaptive_checkpoint %= 3; + srv_adaptive_checkpoint %= 4; srv_force_recovery = (ulint) innobase_force_recovery; @@ -2430,6 +2458,7 @@ innobase_change_buffering_inited_ok: srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite; srv_use_checksums = (ibool) innobase_use_checksums; srv_fast_checksum = (ibool) innobase_fast_checksum; + srv_buffer_pool_shm_checksum = (ibool) innobase_buffer_pool_shm_checksum; #ifdef HAVE_LARGE_PAGES if ((os_use_large_pages = (ibool) my_use_large_pages)) @@ -4754,17 +4783,18 @@ include_field: n_requested_fields++; templ->col_no = i; + templ->clust_rec_field_no = dict_col_get_clust_pos( + &index->table->cols[i], clust_index); + ut_ad(templ->clust_rec_field_no != ULINT_UNDEFINED); if (index == clust_index) { - templ->rec_field_no = dict_col_get_clust_pos( - &index->table->cols[i], index); + templ->rec_field_no = templ->clust_rec_field_no; } else { templ->rec_field_no = dict_index_get_nth_col_pos( index, i); - } - - if (templ->rec_field_no == ULINT_UNDEFINED) { - prebuilt->need_to_access_clustered = TRUE; + if (templ->rec_field_no == ULINT_UNDEFINED) { + prebuilt->need_to_access_clustered = TRUE; + } } if (field->null_ptr) { @@ -4816,9 +4846,7 @@ skip_field: for (i = 0; i < n_requested_fields; i++) { templ = prebuilt->mysql_template + i; - templ->rec_field_no = dict_col_get_clust_pos( - &index->table->cols[templ->col_no], - clust_index); + templ->rec_field_no = templ->clust_rec_field_no; } } } @@ -6674,6 +6702,33 @@ create_clustered_index_when_no_primary( return(error); } +/*****************************************************************//** +Return a display name for the row format +@return row format name */ + +const char *get_row_format_name( +/*============================*/ +enum row_type row_format) /*!< in: Row Format */ +{ + switch (row_format) { + case ROW_TYPE_COMPACT: + return("COMPACT"); + case ROW_TYPE_COMPRESSED: + return("COMPRESSED"); + case ROW_TYPE_DYNAMIC: + return("DYNAMIC"); + case ROW_TYPE_REDUNDANT: + return("REDUNDANT"); + case ROW_TYPE_DEFAULT: + return("DEFAULT"); + case ROW_TYPE_FIXED: + return("FIXED"); + default: + break; + } + return("NOT USED"); +} + /*****************************************************************//** Validates the create options. We may build on this function in future. For now, it checks two specifiers: @@ -6689,9 +6744,9 @@ create_options_are_valid( columns and indexes */ HA_CREATE_INFO* create_info) /*!< in: create info. */ { - ibool kbs_specified = FALSE; + ibool kbs_specified = FALSE; ibool ret = TRUE; - + enum row_type row_type = form->s->row_type; ut_ad(thd != NULL); @@ -6700,13 +6755,28 @@ create_options_are_valid( return(TRUE); } + /* Check for a valid Innodb ROW_FORMAT specifier. For example, + ROW_TYPE_FIXED can be sent to Innodb */ + switch (row_type) { + case ROW_TYPE_COMPACT: + case ROW_TYPE_COMPRESSED: + case ROW_TYPE_DYNAMIC: + case ROW_TYPE_REDUNDANT: + case ROW_TYPE_DEFAULT: + break; + default: + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: invalid ROW_FORMAT specifier."); + ret = FALSE; + } + ut_ad(form != NULL); ut_ad(create_info != NULL); - /* First check if KEY_BLOCK_SIZE was specified. */ - if (create_info->key_block_size - || (create_info->used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE)) { - + /* First check if a non-zero KEY_BLOCK_SIZE was specified. */ + if (create_info->key_block_size) { kbs_specified = TRUE; switch (create_info->key_block_size) { case 1: @@ -6717,13 +6787,12 @@ create_options_are_valid( /* Valid value. */ break; default: - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: invalid" - " KEY_BLOCK_SIZE = %lu." - " Valid values are" - " [1, 2, 4, 8, 16]", - create_info->key_block_size); + push_warning_printf( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: invalid KEY_BLOCK_SIZE = %lu." + " Valid values are [1, 2, 4, 8, 16]", + create_info->key_block_size); ret = FALSE; } } @@ -6731,110 +6800,67 @@ create_options_are_valid( /* If KEY_BLOCK_SIZE was specified, check for its dependencies. */ if (kbs_specified && !srv_file_per_table) { - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_per_table."); + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE" + " requires innodb_file_per_table."); ret = FALSE; } if (kbs_specified && srv_file_format < DICT_TF_FORMAT_ZIP) { - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_format >" - " Antelope."); + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE requires" + " innodb_file_format > Antelope."); ret = FALSE; } - /* Now check for ROW_FORMAT specifier. */ - if (create_info->used_fields & HA_CREATE_USED_ROW_FORMAT) { - switch (form->s->row_type) { - const char* row_format_name; - case ROW_TYPE_COMPRESSED: - case ROW_TYPE_DYNAMIC: - row_format_name - = form->s->row_type == ROW_TYPE_COMPRESSED - ? "COMPRESSED" - : "DYNAMIC"; - - /* These two ROW_FORMATs require - srv_file_per_table and srv_file_format */ - if (!srv_file_per_table) { - push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s" - " requires innodb_file_per_table.", - row_format_name); - ret = FALSE; - - } - - if (srv_file_format < DICT_TF_FORMAT_ZIP) { - push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s" - " requires innodb_file_format >" - " Antelope.", - row_format_name); - ret = FALSE; - } - - /* Cannot specify KEY_BLOCK_SIZE with - ROW_FORMAT = DYNAMIC. - However, we do allow COMPRESSED to be - specified with KEY_BLOCK_SIZE. */ - if (kbs_specified - && form->s->row_type == ROW_TYPE_DYNAMIC) { - push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: cannot specify" - " ROW_FORMAT = DYNAMIC with" - " KEY_BLOCK_SIZE."); - ret = FALSE; - } - - break; - - case ROW_TYPE_REDUNDANT: - case ROW_TYPE_COMPACT: - case ROW_TYPE_DEFAULT: - /* Default is COMPACT. */ - row_format_name - = form->s->row_type == ROW_TYPE_REDUNDANT - ? "REDUNDANT" - : "COMPACT"; - - /* Cannot specify KEY_BLOCK_SIZE with these - format specifiers. */ - if (kbs_specified) { - push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: cannot specify" - " ROW_FORMAT = %s with" - " KEY_BLOCK_SIZE.", - row_format_name); - ret = FALSE; - } - - break; - - default: - push_warning(thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: invalid ROW_FORMAT specifier."); - ret = FALSE; - + switch (row_type) { + case ROW_TYPE_COMPRESSED: + case ROW_TYPE_DYNAMIC: + /* These two ROW_FORMATs require srv_file_per_table + and srv_file_format > Antelope */ + if (!srv_file_per_table) { + push_warning_printf( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s" + " requires innodb_file_per_table.", + get_row_format_name(row_type)); + ret = FALSE; } + + if (srv_file_format < DICT_TF_FORMAT_ZIP) { + push_warning_printf( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_format > Antelope.", + get_row_format_name(row_type)); + ret = FALSE; + } + default: + break; + } + + switch (row_type) { + case ROW_TYPE_REDUNDANT: + case ROW_TYPE_COMPACT: + case ROW_TYPE_DYNAMIC: + /* KEY_BLOCK_SIZE is only allowed with Compressed or Default */ + if (kbs_specified) { + push_warning_printf( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: cannot specify ROW_FORMAT = %s" + " with KEY_BLOCK_SIZE.", + get_row_format_name(row_type)); + ret = FALSE; + } + default: + break; } return(ret); @@ -6960,14 +6986,15 @@ ha_innobase::create( goto cleanup; } - if (create_info->key_block_size - || (create_info->used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE)) { + if (create_info->key_block_size) { /* Determine the page_zip.ssize corresponding to the requested page size (key_block_size) in kilobytes. */ ulint ssize, ksize; ulint key_block_size = create_info->key_block_size; + /* Set 'flags' to the correct key_block_size. + It will be zero if key_block_size is an invalid number.*/ for (ssize = ksize = 1; ssize <= DICT_TF_ZSSIZE_MAX; ssize++, ksize <<= 1) { if (key_block_size == ksize) { @@ -6980,38 +7007,39 @@ ha_innobase::create( } if (!srv_file_per_table) { - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_per_table."); + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE" + " requires innodb_file_per_table."); flags = 0; } if (file_format < DICT_TF_FORMAT_ZIP) { - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_format >" - " Antelope."); + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE requires" + " innodb_file_format > Antelope."); flags = 0; } if (!flags) { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ignoring" - " KEY_BLOCK_SIZE=%lu.", - create_info->key_block_size); + push_warning_printf( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: ignoring" + " KEY_BLOCK_SIZE=%lu.", + create_info->key_block_size); } } row_type = form->s->row_type; if (flags) { - /* KEY_BLOCK_SIZE was specified. */ - if (!(create_info->used_fields & HA_CREATE_USED_ROW_FORMAT)) { - /* ROW_FORMAT was not specified; - default to ROW_FORMAT=COMPRESSED */ + /* if ROW_FORMAT is set to default, + automatically change it to COMPRESSED.*/ + if (row_type == ROW_TYPE_DEFAULT) { row_type = ROW_TYPE_COMPRESSED; } else if (row_type != ROW_TYPE_COMPRESSED) { /* ROW_FORMAT other than COMPRESSED @@ -7021,8 +7049,7 @@ ha_innobase::create( such combinations can be obtained with ALTER TABLE anyway. */ push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, + thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: ignoring KEY_BLOCK_SIZE=%lu" " unless ROW_FORMAT=COMPRESSED.", @@ -7030,7 +7057,7 @@ ha_innobase::create( flags = 0; } } else { - /* No KEY_BLOCK_SIZE */ + /* flags == 0 means no KEY_BLOCK_SIZE.*/ if (row_type == ROW_TYPE_COMPRESSED) { /* ROW_FORMAT=COMPRESSED without KEY_BLOCK_SIZE implies half the @@ -7047,33 +7074,24 @@ ha_innobase::create( } switch (row_type) { - const char* row_format_name; case ROW_TYPE_REDUNDANT: break; case ROW_TYPE_COMPRESSED: case ROW_TYPE_DYNAMIC: - row_format_name - = row_type == ROW_TYPE_COMPRESSED - ? "COMPRESSED" - : "DYNAMIC"; - if (!srv_file_per_table) { push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, + thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s" - " requires innodb_file_per_table.", - row_format_name); + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_per_table.", + get_row_format_name(row_type)); } else if (file_format < DICT_TF_FORMAT_ZIP) { push_warning_printf( - thd, - MYSQL_ERROR::WARN_LEVEL_WARN, + thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s" - " requires innodb_file_format >" - " Antelope.", - row_format_name); + "InnoDB: ROW_FORMAT=%s requires" + " innodb_file_format > Antelope.", + get_row_format_name(row_type)); } else { flags |= DICT_TF_COMPACT | (DICT_TF_FORMAT_ZIP @@ -7085,10 +7103,10 @@ ha_innobase::create( case ROW_TYPE_NOT_USED: case ROW_TYPE_FIXED: default: - push_warning(thd, - MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: assuming ROW_FORMAT=COMPACT."); + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: assuming ROW_FORMAT=COMPACT."); case ROW_TYPE_DEFAULT: case ROW_TYPE_COMPACT: flags = DICT_TF_COMPACT; @@ -7271,6 +7289,14 @@ ha_innobase::discard_or_import_tablespace( err = row_discard_tablespace_for_mysql(dict_table->name, trx); } else { err = row_import_tablespace_for_mysql(dict_table->name, trx); + + /* in expanded import mode re-initialize auto_increment again */ + if ((err == DB_SUCCESS) && srv_expand_import && + (table->found_next_number_field != NULL)) { + dict_table_autoinc_lock(dict_table); + innobase_initialize_autoinc(); + dict_table_autoinc_unlock(dict_table); + } } err = convert_error_code_to_mysql(err, dict_table->flags, NULL); @@ -7734,6 +7760,7 @@ ha_innobase::estimate_rows_upper_bound(void) dict_index_t* index; ulonglong estimate; ulonglong local_data_file_length; + ulint stat_n_leaf_pages; DBUG_ENTER("estimate_rows_upper_bound"); @@ -7753,10 +7780,12 @@ ha_innobase::estimate_rows_upper_bound(void) index = dict_table_get_first_index(prebuilt->table); - ut_a(index->stat_n_leaf_pages > 0); + stat_n_leaf_pages = index->stat_n_leaf_pages; + + ut_a(stat_n_leaf_pages > 0); local_data_file_length = - ((ulonglong) index->stat_n_leaf_pages) * UNIV_PAGE_SIZE; + ((ulonglong) stat_n_leaf_pages) * UNIV_PAGE_SIZE; /* Calculate a minimum length for a clustered index record and from @@ -7923,9 +7952,12 @@ Returns statistics information of the table to the MySQL interpreter, in various fields of the handle object. */ UNIV_INTERN int -ha_innobase::info( -/*==============*/ - uint flag) /*!< in: what information MySQL requests */ +ha_innobase::info_low( +/*==================*/ + uint flag, /*!< in: what information MySQL + requests */ + bool called_from_analyze) /* in: TRUE if called from + ::analyze() */ { dict_table_t* ib_table; dict_index_t* index; @@ -7956,14 +7988,12 @@ ha_innobase::info( ib_table = prebuilt->table; if (flag & HA_STATUS_TIME) { - if ((innobase_stats_on_metadata - || thd_sql_command(user_thd) == SQLCOM_ANALYZE) - && !share->ib_table->is_corrupt) { + if ((called_from_analyze || innobase_stats_on_metadata) && !share->ib_table->is_corrupt) { /* In sql_show we call with this flag: update then statistics so that they are up-to-date */ if (srv_use_sys_stats_table && !((ib_table->flags >> DICT_TF2_SHIFT) & DICT_TF2_TEMPORARY) - && thd_sql_command(user_thd) == SQLCOM_ANALYZE) { + && called_from_analyze) { /* If the indexes on the table don't have enough rows in SYS_STATS system table, */ /* they need to be created. */ dict_index_t* index; @@ -7985,7 +8015,8 @@ ha_innobase::info( prebuilt->trx->op_info = "updating table statistics"; dict_update_statistics(ib_table, - (thd_sql_command(user_thd) == SQLCOM_ANALYZE)?TRUE:FALSE); + FALSE /* update even if stats + are initialized */, called_from_analyze); prebuilt->trx->op_info = "returning various info to MySQL"; } @@ -8004,6 +8035,9 @@ ha_innobase::info( } if (flag & HA_STATUS_VARIABLE) { + + dict_table_stats_lock(ib_table, RW_S_LATCH); + n_rows = ib_table->stat_n_rows; /* Because we do not protect stat_n_rows by any mutex in a @@ -8053,6 +8087,8 @@ ha_innobase::info( ib_table->stat_sum_of_other_index_sizes) * UNIV_PAGE_SIZE; + dict_table_stats_unlock(ib_table, RW_S_LATCH); + /* Since fsp_get_available_space_in_free_extents() is acquiring latches inside InnoDB, we do not call it if we are asked by MySQL to avoid locking. Another reason to @@ -8069,19 +8105,12 @@ ha_innobase::info( innodb_crash_recovery is set to a high value. */ stats.delete_length = 0; } else { - /* lock the data dictionary to avoid races with - ibd_file_missing and tablespace_discarded */ - row_mysql_lock_data_dictionary(prebuilt->trx); + ullint avail_space; - /* ib_table->space must be an existent tablespace */ - if (!ib_table->ibd_file_missing - && !ib_table->tablespace_discarded) { - - stats.delete_length = - fsp_get_available_space_in_free_extents( - ib_table->space) * 1024; - } else { + avail_space = fsp_get_available_space_in_free_extents( + ib_table->space); + if (avail_space == ULLINT_UNDEFINED) { THD* thd; thd = ha_thd(); @@ -8098,9 +8127,9 @@ ha_innobase::info( ib_table->name); stats.delete_length = 0; + } else { + stats.delete_length = avail_space * 1024; } - - row_mysql_unlock_data_dictionary(prebuilt->trx); } stats.check_time = 0; @@ -8129,6 +8158,8 @@ ha_innobase::info( table->s->keys); } + dict_table_stats_lock(ib_table, RW_S_LATCH); + for (i = 0; i < table->s->keys; i++) { ulong j; /* We could get index quickly through internal @@ -8166,8 +8197,6 @@ ha_innobase::info( break; } - dict_index_stat_mutex_enter(index); - if (index->stat_n_diff_key_vals[j + 1] == 0) { rec_per_key = stats.records; @@ -8176,8 +8205,6 @@ ha_innobase::info( index->stat_n_diff_key_vals[j + 1]); } - dict_index_stat_mutex_exit(index); - /* Since MySQL seems to favor table scans too much over index searches, we pretend index selectivity is 2 times better than @@ -8194,6 +8221,8 @@ ha_innobase::info( (ulong) rec_per_key; } } + + dict_table_stats_unlock(ib_table, RW_S_LATCH); } if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { @@ -8227,6 +8256,18 @@ func_exit: DBUG_RETURN(0); } +/*********************************************************************//** +Returns statistics information of the table to the MySQL interpreter, +in various fields of the handle object. */ +UNIV_INTERN +int +ha_innobase::info( +/*==============*/ + uint flag) /*!< in: what information MySQL requests */ +{ + return(info_low(flag, false /* not called from analyze */)); +} + /**********************************************************************//** Updates index cardinalities of the table, based on 8 random dives into each index tree. This does NOT calculate exact statistics on the table. @@ -8243,7 +8284,8 @@ ha_innobase::analyze( } /* Simply call ::info() with all the flags */ - info(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE); + info_low(HA_STATUS_TIME | HA_STATUS_CONST | HA_STATUS_VARIABLE, + true /* called from analyze */); if (share->ib_table->is_corrupt) { return(HA_ADMIN_CORRUPT); @@ -8552,8 +8594,6 @@ ha_innobase::get_foreign_key_create_info(void) flen = ftell(srv_dict_tmpfile); if (flen < 0) { flen = 0; - } else if (flen > 64000 - 1) { - flen = 64000 - 1; } /* allocate buffer for the string, and @@ -9866,7 +9906,11 @@ ha_innobase::innobase_peek_autoinc(void) auto_inc = dict_table_autoinc_read(innodb_table); - ut_a(auto_inc > 0); + if (auto_inc == 0) { + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: AUTOINC next value generation " + "is disabled for '%s'\n", innodb_table->name); + } dict_table_autoinc_unlock(innodb_table); @@ -11140,6 +11184,11 @@ static MYSQL_SYSVAR_ULONG(page_size, innobase_page_size, "###EXPERIMENTAL###: The universal page size of the database. Changing for created database is not supported. Use on your own risk!", NULL, NULL, (1 << 14), (1 << 12), (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0); +static MYSQL_SYSVAR_ULONG(log_block_size, innobase_log_block_size, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!", + NULL, NULL, (1 << 9)/*512*/, (1 << 9)/*512*/, (1 << UNIV_PAGE_SIZE_SHIFT_MAX), 0); + static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir, PLUGIN_VAR_READONLY, "The common part for InnoDB table spaces.", @@ -11358,6 +11407,16 @@ static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", NULL, NULL, 128*1024*1024L, 32*1024*1024L, LONGLONG_MAX, 1024*1024L); +static MYSQL_SYSVAR_UINT(buffer_pool_shm_key, srv_buffer_pool_shm_key, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "[experimental] The key value of shared memory segment for the buffer pool. 0 (default) disables the feature.", + NULL, NULL, 0, 0, INT_MAX32, 0); + +static MYSQL_SYSVAR_BOOL(buffer_pool_shm_checksum, innobase_buffer_pool_shm_checksum, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Enable buffer_pool_shm checksum validation (enabled by default).", + NULL, NULL, TRUE); + static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, PLUGIN_VAR_RQCMDARG, "Helps in performance tuning in heavily concurrent environments.", @@ -11489,6 +11548,13 @@ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering, innodb_change_buffering_validate, innodb_change_buffering_update, "inserts"); +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug, + PLUGIN_VAR_RQCMDARG, + "Debug flags for InnoDB change buffering (0=none)", + NULL, NULL, 0, 0, 1, 0); +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + static MYSQL_SYSVAR_ULONG(read_ahead_threshold, srv_read_ahead_threshold, PLUGIN_VAR_RQCMDARG, "Number of pages that must be accessed sequentially for InnoDB to " @@ -11561,17 +11627,19 @@ innodb_adaptive_checkpoint_update( void* var_ptr, const void* save) { - *(long *)var_ptr= (*(long *)save) % 3; + *(long *)var_ptr= (*(long *)save) % 4; } const char *adaptive_checkpoint_names[]= { "none", /* 0 */ "reflex", /* 1 */ "estimate", /* 2 */ + "keep_average", /* 3 */ /* For compatibility of the older patch */ - "0", /* 3 ("none" + 3) */ - "1", /* 4 ("reflex" + 3) */ - "2", /* 5 ("estimate" + 3) */ + "0", /* 4 ("none" + 3) */ + "1", /* 5 ("reflex" + 3) */ + "2", /* 6 ("estimate" + 3) */ + "3", /* 7 ("keep_average" + 4) */ NullS }; TYPELIB adaptive_checkpoint_typelib= @@ -11581,7 +11649,7 @@ TYPELIB adaptive_checkpoint_typelib= }; static MYSQL_SYSVAR_ENUM(adaptive_checkpoint, srv_adaptive_checkpoint, PLUGIN_VAR_RQCMDARG, - "Enable/Disable flushing along modified age. (none, reflex, [estimate])", + "Enable/Disable flushing along modified age. (none, reflex, [estimate], keep_average)", NULL, innodb_adaptive_checkpoint_update, 2, &adaptive_checkpoint_typelib); static MYSQL_SYSVAR_ULONG(enable_unsafe_group_commit, srv_enable_unsafe_group_commit, @@ -11620,9 +11688,12 @@ static MYSQL_SYSVAR_ULONG(pass_corrupt_table, srv_pass_corrupt_table, static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(page_size), + MYSQL_SYSVAR(log_block_size), MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(autoextend_increment), MYSQL_SYSVAR(buffer_pool_size), + MYSQL_SYSVAR(buffer_pool_shm_key), + MYSQL_SYSVAR(buffer_pool_shm_checksum), MYSQL_SYSVAR(checksums), MYSQL_SYSVAR(fast_checksum), MYSQL_SYSVAR(commit_concurrency), @@ -11698,6 +11769,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(dict_size_limit), MYSQL_SYSVAR(use_sys_malloc), MYSQL_SYSVAR(change_buffering), +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG + MYSQL_SYSVAR(change_buffering_debug), +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ MYSQL_SYSVAR(read_ahead_threshold), MYSQL_SYSVAR(io_capacity), MYSQL_SYSVAR(auto_lru_dump), diff --git a/handler/ha_innodb.h b/handler/ha_innodb.h index 04224277deb..c60a5eae19e 100644 --- a/handler/ha_innodb.h +++ b/handler/ha_innodb.h @@ -110,6 +110,7 @@ class ha_innobase: public handler ulint innobase_update_autoinc(ulonglong auto_inc); void innobase_initialize_autoinc(); dict_index_t* innobase_get_index(uint keynr); + int info_low(uint flag, bool called_from_analyze); /* Init values for the class: */ public: diff --git a/handler/handler0alter.cc b/handler/handler0alter.cc index e936bfafa0e..517445f7e69 100644 --- a/handler/handler0alter.cc +++ b/handler/handler0alter.cc @@ -1012,12 +1012,13 @@ ha_innobase::prepare_drop_index( index->to_be_dropped = TRUE; } - /* If FOREIGN_KEY_CHECK = 1 you may not drop an index defined + /* If FOREIGN_KEY_CHECKS = 1 you may not drop an index defined for a foreign key constraint because InnoDB requires that both - tables contain indexes for the constraint. Note that CREATE - INDEX id ON table does a CREATE INDEX and DROP INDEX, and we - can ignore here foreign keys because a new index for the - foreign key has already been created. + tables contain indexes for the constraint. Such index can + be dropped only if FOREIGN_KEY_CHECKS is set to 0. + Note that CREATE INDEX id ON table does a CREATE INDEX and + DROP INDEX, and we can ignore here foreign keys because a + new index for the foreign key has already been created. We check for the foreign key constraints after marking the candidate indexes for deletion, because when we check for an diff --git a/handler/innodb_patch_info.h b/handler/innodb_patch_info.h index 38b97411340..e68f12d0fec 100644 --- a/handler/innodb_patch_info.h +++ b/handler/innodb_patch_info.h @@ -47,5 +47,6 @@ struct innodb_enhancement { {"innodb_fast_checksum","Using the checksum on 32bit-unit calculation","incompatible for unpatched ver.","http://www.percona.com/docs/wiki/percona-xtradb"}, {"innodb_files_extend","allow >4GB transaction log files, and can vary universal page size of datafiles","incompatible for unpatched ver.","http://www.percona.com/docs/wiki/percona-xtradb"}, {"innodb_sys_tables_sys_indexes","Expose InnoDB SYS_TABLES and SYS_INDEXES schema tables","","http://www.percona.com/docs/wiki/percona-xtradb"}, +{"innodb_buffer_pool_shm","Put buffer pool contents to shared memory segment and reuse it at clean restart [experimental]","","http://www.percona.com/docs/wiki/percona-xtradb"}, {NULL, NULL, NULL, NULL} }; diff --git a/ibuf/ibuf0ibuf.c b/ibuf/ibuf0ibuf.c index e01c2d6b800..12dbc29be23 100644 --- a/ibuf/ibuf0ibuf.c +++ b/ibuf/ibuf0ibuf.c @@ -49,6 +49,7 @@ Created 7/19/1997 Heikki Tuuri #include "btr0cur.h" #include "btr0pcur.h" #include "btr0btr.h" +#include "row0upd.h" #include "sync0sync.h" #include "dict0boot.h" #include "fut0lst.h" @@ -170,6 +171,11 @@ access order rules. */ /** Operations that can currently be buffered. */ UNIV_INTERN ibuf_use_t ibuf_use = IBUF_USE_INSERT; +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/** Flag to control insert buffer debugging. */ +UNIV_INTERN uint ibuf_debug; +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + /** The insert buffer control structure */ UNIV_INTERN ibuf_t* ibuf = NULL; @@ -2886,9 +2892,80 @@ During merge, inserts to an index page a secondary index entry extracted from the insert buffer. */ static void +ibuf_insert_to_index_page_low( +/*==========================*/ + const dtuple_t* entry, /*!< in: buffered entry to insert */ + buf_block_t* block, /*!< in/out: index page where the buffered + entry should be placed */ + dict_index_t* index, /*!< in: record descriptor */ + mtr_t* mtr, /*!< in/out: mtr */ + page_cur_t* page_cur)/*!< in/out: cursor positioned on the record + after which to insert the buffered entry */ +{ + const page_t* page; + ulint space; + ulint page_no; + ulint zip_size; + const page_t* bitmap_page; + ulint old_bits; + + if (UNIV_LIKELY + (page_cur_tuple_insert(page_cur, entry, index, 0, mtr) != NULL)) { + return; + } + + /* If the record did not fit, reorganize */ + + btr_page_reorganize(block, index, mtr); + page_cur_search(block, index, entry, PAGE_CUR_LE, page_cur); + + /* This time the record must fit */ + + if (UNIV_LIKELY + (page_cur_tuple_insert(page_cur, entry, index, 0, mtr) != NULL)) { + return; + } + + page = buf_block_get_frame(block); + + ut_print_timestamp(stderr); + + fprintf(stderr, + " InnoDB: Error: Insert buffer insert fails;" + " page free %lu, dtuple size %lu\n", + (ulong) page_get_max_insert_size(page, 1), + (ulong) rec_get_converted_size(index, entry, 0)); + fputs("InnoDB: Cannot insert index record ", stderr); + dtuple_print(stderr, entry); + fputs("\nInnoDB: The table where this index record belongs\n" + "InnoDB: is now probably corrupt. Please run CHECK TABLE on\n" + "InnoDB: that table.\n", stderr); + + space = page_get_space_id(page); + zip_size = buf_block_get_zip_size(block); + page_no = page_get_page_no(page); + + bitmap_page = ibuf_bitmap_get_map_page(space, page_no, zip_size, mtr); + old_bits = ibuf_bitmap_page_get_bits(bitmap_page, page_no, zip_size, + IBUF_BITMAP_FREE, mtr); + + fprintf(stderr, + "InnoDB: space %lu, page %lu, zip_size %lu, bitmap bits %lu\n", + (ulong) space, (ulong) page_no, + (ulong) zip_size, (ulong) old_bits); + + fputs("InnoDB: Submit a detailed bug report" + " to http://bugs.mysql.com\n", stderr); +} + +/************************************************************************ +During merge, inserts to an index page a secondary index entry extracted +from the insert buffer. */ +static +void ibuf_insert_to_index_page( /*======================*/ - dtuple_t* entry, /*!< in: buffered entry to insert */ + const dtuple_t* entry, /*!< in: buffered entry to insert */ buf_block_t* block, /*!< in/out: index page where the buffered entry should be placed */ dict_index_t* index, /*!< in: record descriptor */ @@ -2898,11 +2975,10 @@ ibuf_insert_to_index_page( ulint low_match; page_t* page = buf_block_get_frame(block); rec_t* rec; - page_t* bitmap_page; - ulint old_bits; ut_ad(ibuf_inside()); ut_ad(dtuple_check_typed(entry)); + ut_ad(!buf_block_align(page)->is_hashed); if (UNIV_UNLIKELY(dict_table_is_comp(index->table) != (ibool)!!page_is_comp(page))) { @@ -2940,71 +3016,86 @@ dump: low_match = page_cur_search(block, index, entry, PAGE_CUR_LE, &page_cur); - if (low_match == dtuple_get_n_fields(entry)) { + if (UNIV_UNLIKELY(low_match == dtuple_get_n_fields(entry))) { + mem_heap_t* heap; + upd_t* update; + ulint* offsets; page_zip_des_t* page_zip; rec = page_cur_get_rec(&page_cur); + + /* This is based on + row_ins_sec_index_entry_by_modify(BTR_MODIFY_LEAF). */ + ut_ad(rec_get_deleted_flag(rec, page_is_comp(page))); + + heap = mem_heap_create(1024); + + offsets = rec_get_offsets(rec, index, NULL, ULINT_UNDEFINED, + &heap); + update = row_upd_build_sec_rec_difference_binary( + index, entry, rec, NULL, heap); + page_zip = buf_block_get_page_zip(block); - btr_cur_del_unmark_for_ibuf(rec, page_zip, mtr); - } else { - rec = page_cur_tuple_insert(&page_cur, entry, index, 0, mtr); - - if (UNIV_LIKELY(rec != NULL)) { + if (update->n_fields == 0) { + /* The records only differ in the delete-mark. + Clear the delete-mark, like we did before + Bug #56680 was fixed. */ + btr_cur_del_unmark_for_ibuf(rec, page_zip, mtr); +updated_in_place: + mem_heap_free(heap); return; } - /* If the record did not fit, reorganize */ + /* Copy the info bits. Clear the delete-mark. */ + update->info_bits = rec_get_info_bits(rec, page_is_comp(page)); + update->info_bits &= ~REC_INFO_DELETED_FLAG; - btr_page_reorganize(block, index, mtr); - page_cur_search(block, index, entry, PAGE_CUR_LE, &page_cur); - - /* This time the record must fit */ - if (UNIV_UNLIKELY - (!page_cur_tuple_insert(&page_cur, entry, index, - 0, mtr))) { - ulint space; - ulint page_no; - ulint zip_size; - - ut_print_timestamp(stderr); - - fprintf(stderr, - " InnoDB: Error: Insert buffer insert" - " fails; page free %lu," - " dtuple size %lu\n", - (ulong) page_get_max_insert_size( - page, 1), - (ulong) rec_get_converted_size( - index, entry, 0)); - fputs("InnoDB: Cannot insert index record ", - stderr); - dtuple_print(stderr, entry); - fputs("\nInnoDB: The table where" - " this index record belongs\n" - "InnoDB: is now probably corrupt." - " Please run CHECK TABLE on\n" - "InnoDB: that table.\n", stderr); - - space = page_get_space_id(page); - zip_size = buf_block_get_zip_size(block); - page_no = page_get_page_no(page); - - bitmap_page = ibuf_bitmap_get_map_page( - space, page_no, zip_size, mtr); - old_bits = ibuf_bitmap_page_get_bits( - bitmap_page, page_no, zip_size, - IBUF_BITMAP_FREE, mtr); - - fprintf(stderr, - "InnoDB: space %lu, page %lu," - " zip_size %lu, bitmap bits %lu\n", - (ulong) space, (ulong) page_no, - (ulong) zip_size, (ulong) old_bits); - - fputs("InnoDB: Submit a detailed bug report" - " to http://bugs.mysql.com\n", stderr); + /* We cannot invoke btr_cur_optimistic_update() here, + because we do not have a btr_cur_t or que_thr_t, + as the insert buffer merge occurs at a very low level. */ + if (!row_upd_changes_field_size_or_external(index, offsets, + update) + && (!page_zip || btr_cur_update_alloc_zip( + page_zip, block, index, + rec_offs_size(offsets), FALSE, mtr))) { + /* This is the easy case. Do something similar + to btr_cur_update_in_place(). */ + row_upd_rec_in_place(rec, index, offsets, + update, page_zip); + goto updated_in_place; } + + /* A collation may identify values that differ in + storage length. + Some examples (1 or 2 bytes): + utf8_turkish_ci: I = U+0131 LATIN SMALL LETTER DOTLESS I + utf8_general_ci: S = U+00DF LATIN SMALL LETTER SHARP S + utf8_general_ci: A = U+00E4 LATIN SMALL LETTER A WITH DIAERESIS + + latin1_german2_ci: SS = U+00DF LATIN SMALL LETTER SHARP S + + Examples of a character (3-byte UTF-8 sequence) + identified with 2 or 4 characters (1-byte UTF-8 sequences): + + utf8_unicode_ci: 'II' = U+2171 SMALL ROMAN NUMERAL TWO + utf8_unicode_ci: '(10)' = U+247D PARENTHESIZED NUMBER TEN + */ + + /* Delete the different-length record, and insert the + buffered one. */ + + lock_rec_store_on_page_infimum(block, rec); + page_cur_delete_rec(&page_cur, index, offsets, mtr); + page_cur_move_to_prev(&page_cur); + mem_heap_free(heap); + + ibuf_insert_to_index_page_low(entry, block, index, mtr, + &page_cur); + lock_rec_restore_from_page_infimum(block, rec, block); + } else { + ibuf_insert_to_index_page_low(entry, block, index, mtr, + &page_cur); } } diff --git a/include/btr0btr.h b/include/btr0btr.h index 5e6a76c7d21..dde3a0bab69 100644 --- a/include/btr0btr.h +++ b/include/btr0btr.h @@ -94,26 +94,35 @@ btr_root_get( Gets a buffer page and declares its latching order level. */ UNIV_INLINE buf_block_t* -btr_block_get( -/*==========*/ - ulint space, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - ulint mode, /*!< in: latch mode */ - mtr_t* mtr); /*!< in: mtr */ -/**************************************************************//** -Gets a buffer page and declares its latching order level. */ -UNIV_INLINE -page_t* -btr_page_get( -/*=========*/ - ulint space, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - ulint mode, /*!< in: latch mode */ - mtr_t* mtr); /*!< in: mtr */ +btr_block_get_func( +/*===============*/ + ulint space, /*!< in: space id */ + ulint zip_size, /*!< in: compressed page size in bytes + or 0 for uncompressed pages */ + ulint page_no, /*!< in: page number */ + ulint mode, /*!< in: latch mode */ + const char* file, /*!< in: file name */ + ulint line, /*!< in: line where called */ + mtr_t* mtr) /*!< in/out: mtr */ + __attribute__((nonnull)); +/** Gets a buffer page and declares its latching order level. +@param space tablespace identifier +@param zip_size compressed page size in bytes or 0 for uncompressed pages +@param page_no page number +@param mode latch mode +@param mtr mini-transaction handle +@return the block descriptor */ +# define btr_block_get(space,zip_size,page_no,mode,mtr) \ + btr_block_get_func(space,zip_size,page_no,mode,__FILE__,__LINE__,mtr) +/** Gets a buffer page and declares its latching order level. +@param space tablespace identifier +@param zip_size compressed page size in bytes or 0 for uncompressed pages +@param page_no page number +@param mode latch mode +@param mtr mini-transaction handle +@return the uncompressed page frame */ +# define btr_page_get(space,zip_size,page_no,mode,mtr) \ + buf_block_get_frame(btr_block_get(space,zip_size,page_no,mode,mtr)) #endif /* !UNIV_HOTBACKUP */ /**************************************************************//** Gets the index id field of a page. diff --git a/include/btr0btr.ic b/include/btr0btr.ic index c9c38f3c3b3..e19c863300a 100644 --- a/include/btr0btr.ic +++ b/include/btr0btr.ic @@ -39,18 +39,21 @@ Created 6/2/1994 Heikki Tuuri Gets a buffer page and declares its latching order level. */ UNIV_INLINE buf_block_t* -btr_block_get( -/*==========*/ - ulint space, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - ulint mode, /*!< in: latch mode */ - mtr_t* mtr) /*!< in: mtr */ +btr_block_get_func( +/*===============*/ + ulint space, /*!< in: space id */ + ulint zip_size, /*!< in: compressed page size in bytes + or 0 for uncompressed pages */ + ulint page_no, /*!< in: page number */ + ulint mode, /*!< in: latch mode */ + const char* file, /*!< in: file name */ + ulint line, /*!< in: line where called */ + mtr_t* mtr) /*!< in/out: mtr */ { buf_block_t* block; - block = buf_page_get(space, zip_size, page_no, mode, mtr); + block = buf_page_get_gen(space, zip_size, page_no, mode, + NULL, BUF_GET, file, line, mtr); ut_a(srv_pass_corrupt_table || block); @@ -62,23 +65,6 @@ btr_block_get( return(block); } -/**************************************************************//** -Gets a buffer page and declares its latching order level. */ -UNIV_INLINE -page_t* -btr_page_get( -/*=========*/ - ulint space, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes - or 0 for uncompressed pages */ - ulint page_no, /*!< in: page number */ - ulint mode, /*!< in: latch mode */ - mtr_t* mtr) /*!< in: mtr */ -{ - return(buf_block_get_frame(btr_block_get(space, zip_size, page_no, - mode, mtr))); -} - /**************************************************************//** Sets the index id field of a page. */ UNIV_INLINE diff --git a/include/btr0cur.h b/include/btr0cur.h index e151fdcb563..1e1dc0f580a 100644 --- a/include/btr0cur.h +++ b/include/btr0cur.h @@ -242,6 +242,22 @@ btr_cur_pessimistic_insert( que_thr_t* thr, /*!< in: query thread or NULL */ mtr_t* mtr); /*!< in: mtr */ /*************************************************************//** +See if there is enough place in the page modification log to log +an update-in-place. +@return TRUE if enough place */ +UNIV_INTERN +ibool +btr_cur_update_alloc_zip( +/*=====================*/ + page_zip_des_t* page_zip,/*!< in/out: compressed page */ + buf_block_t* block, /*!< in/out: buffer page */ + dict_index_t* index, /*!< in: the index corresponding to the block */ + ulint length, /*!< in: size needed */ + ibool create, /*!< in: TRUE=delete-and-insert, + FALSE=update-in-place */ + mtr_t* mtr) /*!< in: mini-transaction */ + __attribute__((nonnull, warn_unused_result)); +/*************************************************************//** Updates a record when the update causes no size changes in its fields. @return DB_SUCCESS or error number */ UNIV_INTERN @@ -504,7 +520,7 @@ Stores the fields in big_rec_vec to the tablespace and puts pointers to them in rec. The extern flags in rec will have to be set beforehand. The fields are stored on pages allocated from leaf node file segment of the index tree. -@return DB_SUCCESS or error */ +@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ UNIV_INTERN ulint btr_store_big_rec_extern_fields( diff --git a/include/buf0buf.h b/include/buf0buf.h index d6cc63bb6af..e06927f42f0 100644 --- a/include/buf0buf.h +++ b/include/buf0buf.h @@ -36,6 +36,7 @@ Created 11/5/1995 Heikki Tuuri #include "ut0rbt.h" #ifndef UNIV_HOTBACKUP #include "os0proc.h" +#include "srv0srv.h" /** @name Modes for buf_page_get_gen */ /* @{ */ @@ -1301,7 +1302,10 @@ struct buf_block_struct{ /**********************************************************************//** Compute the hash fold value for blocks in buf_pool->zip_hash. */ /* @{ */ -#define BUF_POOL_ZIP_FOLD_PTR(ptr) ((ulint) (ptr) / UNIV_PAGE_SIZE) +/* the fold should be relative when srv_buffer_pool_shm_key is enabled */ +#define BUF_POOL_ZIP_FOLD_PTR(ptr) (!srv_buffer_pool_shm_key\ + ?((ulint) (ptr) / UNIV_PAGE_SIZE)\ + :((ulint) ((byte*)ptr - (byte*)(buf_pool->chunks->blocks->frame)) / UNIV_PAGE_SIZE)) #define BUF_POOL_ZIP_FOLD(b) BUF_POOL_ZIP_FOLD_PTR((b)->frame) #define BUF_POOL_ZIP_FOLD_BPAGE(b) BUF_POOL_ZIP_FOLD((buf_block_t*) (b)) /* @} */ diff --git a/include/buf0flu.h b/include/buf0flu.h index 2f7108fda1b..85957f5c448 100644 --- a/include/buf0flu.h +++ b/include/buf0flu.h @@ -76,6 +76,20 @@ buf_flush_init_for_writing( ib_uint64_t newest_lsn); /*!< in: newest modification lsn to the page */ #ifndef UNIV_HOTBACKUP +# if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/********************************************************************//** +Writes a flushable page asynchronously from the buffer pool to a file. +NOTE: buf_pool_mutex and block->mutex 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 +ibool +buf_flush_page_try( +/*===============*/ + buf_block_t* block) /*!< in/out: buffer control block */ + __attribute__((nonnull, warn_unused_result)); +# endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ /*******************************************************************//** This utility flushes dirty blocks from the end of the LRU list or flush_list. NOTE 1: in the case of an LRU flush the calling thread may own latches to diff --git a/include/dict0dict.h b/include/dict0dict.h index d18b3ecb1b0..7baacdd6055 100644 --- a/include/dict0dict.h +++ b/include/dict0dict.h @@ -318,7 +318,8 @@ void dict_table_replace_index_in_foreign_list( /*=====================================*/ dict_table_t* table, /*!< in/out: table */ - dict_index_t* index); /*!< in: index to be replaced */ + dict_index_t* index, /*!< in: index to be replaced */ + const trx_t* trx); /*!< in: transaction handle */ /*********************************************************************//** Checks if a index is defined for a foreign key constraint. Index is a part of a foreign key constraint if the index is referenced by foreign key @@ -1053,20 +1054,13 @@ Calculates new estimates for table and index statistics. The statistics are used in query optimization. */ UNIV_INTERN void -dict_update_statistics_low( -/*=======================*/ - dict_table_t* table, /*!< in/out: table */ - ibool has_dict_mutex, /*!< in: TRUE if the caller has the - dictionary mutex */ - ibool sync); -/*********************************************************************//** -Calculates new estimates for table and index statistics. The statistics -are used in query optimization. */ -UNIV_INTERN -void dict_update_statistics( /*===================*/ - dict_table_t* table, /*!< in/out: table */ + dict_table_t* table, /*!< in/out: table */ + ibool only_calc_if_missing_stats, /*!< in: only + update/recalc the stats if they have + not been initialized yet, otherwise + do nothing */ ibool sync); /********************************************************************//** Reserves the dictionary system mutex for MySQL. */ @@ -1081,21 +1075,25 @@ void dict_mutex_exit_for_mysql(void); /*===========================*/ /**********************************************************************//** -Lock the appropriate mutex to protect index->stat_n_diff_key_vals[]. -index->id is used to pick the right mutex and it should not change -before dict_index_stat_mutex_exit() is called on this index. */ +Lock the appropriate latch to protect a given table's statistics. +table->id is used to pick the corresponding latch from a global array of +latches. */ UNIV_INTERN void -dict_index_stat_mutex_enter( -/*========================*/ - const dict_index_t* index); /*!< in: index */ +dict_table_stats_lock( +/*==================*/ + const dict_table_t* table, /*!< in: table */ + ulint latch_mode); /*!< in: RW_S_LATCH or + RW_X_LATCH */ /**********************************************************************//** -Unlock the appropriate mutex that protects index->stat_n_diff_key_vals[]. */ +Unlock the latch that has been locked by dict_table_stats_lock() */ UNIV_INTERN void -dict_index_stat_mutex_exit( -/*=======================*/ - const dict_index_t* index); /*!< in: index */ +dict_table_stats_unlock( +/*====================*/ + const dict_table_t* table, /*!< in: table */ + ulint latch_mode); /*!< in: RW_S_LATCH or + RW_X_LATCH */ /********************************************************************//** Checks if the database name in two table names is the same. @return TRUE if same db name */ diff --git a/include/fil0fil.h b/include/fil0fil.h index 07c80ef8609..a262ec8f9cc 100644 --- a/include/fil0fil.h +++ b/include/fil0fil.h @@ -737,6 +737,15 @@ fil_page_get_type( /*==============*/ const byte* page); /*!< in: file page */ +/*******************************************************************//** +Returns TRUE if a single-table tablespace is being deleted. +@return TRUE if being deleted */ +UNIV_INTERN +ibool +fil_tablespace_is_being_deleted( +/*============================*/ + ulint id); /*!< in: space id */ + /************************************************************************* Return local hash table informations. */ diff --git a/include/hash0hash.h b/include/hash0hash.h index b17c21a45ef..492c767acc4 100644 --- a/include/hash0hash.h +++ b/include/hash0hash.h @@ -49,6 +49,28 @@ hash_table_t* hash_create( /*========*/ ulint n); /*!< in: number of array cells */ + +/*************************************************************//** +*/ +UNIV_INTERN +ulint +hash_create_needed( +/*===============*/ + ulint n); + +UNIV_INTERN +void +hash_create_init( +/*=============*/ + hash_table_t* table, + ulint n); + +UNIV_INTERN +void +hash_create_reuse( +/*==============*/ + hash_table_t* table); + #ifndef UNIV_HOTBACKUP /*************************************************************//** Creates a mutex array to protect a hash table. */ @@ -328,6 +350,33 @@ do {\ }\ } while (0) +/********************************************************************//** +Align nodes with moving location.*/ +#define HASH_OFFSET(TABLE, NODE_TYPE, PTR_NAME, FADDR, FOFFSET, BOFFSET) \ +do {\ + ulint i2222;\ + ulint cell_count2222;\ +\ + cell_count2222 = hash_get_n_cells(TABLE);\ +\ + for (i2222 = 0; i2222 < cell_count2222; i2222++) {\ + NODE_TYPE* node2222;\ +\ + if ((TABLE)->array[i2222].node) \ + (TABLE)->array[i2222].node = (void*)((byte*)(TABLE)->array[i2222].node \ + + (((TABLE)->array[i2222].node > (void*)FADDR)?FOFFSET:BOFFSET));\ + node2222 = HASH_GET_FIRST((TABLE), i2222);\ +\ + while (node2222) {\ + if (node2222->PTR_NAME) \ + node2222->PTR_NAME = (void*)((byte*)(node2222->PTR_NAME) \ + + ((((void*)node2222->PTR_NAME) > (void*)FADDR)?FOFFSET:BOFFSET));\ +\ + node2222 = node2222->PTR_NAME;\ + }\ + }\ +} while (0) + /************************************************************//** Gets the mutex index for a fold value in a hash table. @return mutex number */ diff --git a/include/ibuf0ibuf.h b/include/ibuf0ibuf.h index 8aa21fb9d95..f8cc4471d43 100644 --- a/include/ibuf0ibuf.h +++ b/include/ibuf0ibuf.h @@ -48,6 +48,11 @@ typedef enum { /** Operations that can currently be buffered. */ extern ibuf_use_t ibuf_use; +#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG +/** Flag to control insert buffer debugging. */ +extern uint ibuf_debug; +#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */ + /** The insert buffer control structure */ extern ibuf_t* ibuf; diff --git a/include/log0log.h b/include/log0log.h index 8fce4ef96bc..2b4b34f2600 100644 --- a/include/log0log.h +++ b/include/log0log.h @@ -672,6 +672,9 @@ extern log_t* log_sys; when mysqld is first time started on the restored database, it can print helpful info for the user */ +#define LOG_FILE_OS_FILE_LOG_BLOCK_SIZE 64 + /* extend to record log_block_size + of XtraDB. 0 means default 512 */ #define LOG_FILE_ARCH_COMPLETED OS_FILE_LOG_BLOCK_SIZE /* this 4-byte field is TRUE when the writing of an archived log file diff --git a/include/os0file.h b/include/os0file.h index eeab8a2b5d9..cbbec2cf55e 100644 --- a/include/os0file.h +++ b/include/os0file.h @@ -107,7 +107,7 @@ whole block gets written. This should be true even in most cases of a crash: if this fails for a log block, then it is equivalent to a media failure in the log. */ -#define OS_FILE_LOG_BLOCK_SIZE 512 +#define OS_FILE_LOG_BLOCK_SIZE srv_log_block_size /** Options for file_create @{ */ #define OS_FILE_OPEN 51 @@ -188,6 +188,8 @@ extern ulint os_n_file_reads; extern ulint os_n_file_writes; extern ulint os_n_fsyncs; +extern ulint srv_log_block_size; + /* File types for directory entry data type */ enum os_file_type_enum{ diff --git a/include/os0proc.h b/include/os0proc.h index fd46bd7db87..582cef6f803 100644 --- a/include/os0proc.h +++ b/include/os0proc.h @@ -32,6 +32,11 @@ Created 9/30/1995 Heikki Tuuri #ifdef UNIV_LINUX #include #include +#else +# if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H +#include +#include +# endif #endif typedef void* os_process_t; @@ -70,6 +75,29 @@ os_mem_free_large( ulint size); /*!< in: size returned by os_mem_alloc_large() */ + +/****************************************************************//** +Allocates or attaches and reuses shared memory segment. +The content is not cleared automatically. +@return allocated memory */ +UNIV_INTERN +void* +os_shm_alloc( +/*=========*/ + ulint* n, /*!< in/out: number of bytes */ + uint key, + ibool* is_new); + +/****************************************************************//** +Detach shared memory segment. */ +UNIV_INTERN +void +os_shm_free( +/*========*/ + void *ptr, /*!< in: pointer returned by + os_shm_alloc() */ + ulint size); /*!< in: size returned by + os_shm_alloc() */ #ifndef UNIV_NONINL #include "os0proc.ic" #endif diff --git a/include/os0sync.h b/include/os0sync.h index f32e7ab710a..7366e2c3402 100644 --- a/include/os0sync.h +++ b/include/os0sync.h @@ -189,14 +189,14 @@ os_event_wait_low( /**********************************************************//** Waits for an event object until it is in the signaled state or -a timeout is exceeded. In Unix the timeout is always infinite. +a timeout is exceeded. @return 0 if success, OS_SYNC_TIME_EXCEEDED if timeout was exceeded */ UNIV_INTERN ulint os_event_wait_time( /*===============*/ os_event_t event, /*!< in: event to wait */ - ulint time); /*!< in: timeout in microseconds, or + ulint wtime); /*!< in: timeout in microseconds, or OS_SYNC_INFINITE_TIME */ #ifdef __WIN__ /**********************************************************//** diff --git a/include/row0ins.h b/include/row0ins.h index 9f93565ddb7..810973e61a7 100644 --- a/include/row0ins.h +++ b/include/row0ins.h @@ -84,9 +84,10 @@ ulint row_ins_index_entry( /*================*/ dict_index_t* index, /*!< in: index */ - dtuple_t* entry, /*!< in: index entry to insert */ + dtuple_t* entry, /*!< in/out: index entry to insert */ ulint n_ext, /*!< in: number of externally stored columns */ - ibool foreign,/*!< in: TRUE=check foreign key constraints */ + ibool foreign,/*!< in: TRUE=check foreign key constraints + (foreign=FALSE only during CREATE INDEX) */ que_thr_t* thr); /*!< in: query thread */ /***********************************************************//** Inserts a row to a table. This is a high-level function used in diff --git a/include/row0mysql.h b/include/row0mysql.h index f8fab59ef80..141f4beb81e 100644 --- a/include/row0mysql.h +++ b/include/row0mysql.h @@ -535,6 +535,10 @@ struct mysql_row_templ_struct { Innobase record in the current index; not defined if template_type is ROW_MYSQL_WHOLE_ROW */ + ulint clust_rec_field_no; /*!< field number of the column in an + Innobase record in the clustered index; + not defined if template_type is + ROW_MYSQL_WHOLE_ROW */ ulint mysql_col_offset; /*!< offset of the column in the MySQL row format */ ulint mysql_col_len; /*!< length of the column in the MySQL diff --git a/include/row0upd.h b/include/row0upd.h index 635d746d5a1..ea14cd64213 100644 --- a/include/row0upd.h +++ b/include/row0upd.h @@ -126,8 +126,8 @@ UNIV_INTERN void row_upd_index_entry_sys_field( /*==========================*/ - const dtuple_t* entry, /*!< in: index entry, where the memory buffers - for sys fields are already allocated: + dtuple_t* entry, /*!< in/out: index entry, where the memory + buffers for sys fields are already allocated: the function just copies the new values to them */ dict_index_t* index, /*!< in: clustered index */ @@ -167,8 +167,11 @@ row_upd_changes_field_size_or_external( const upd_t* update);/*!< in: update vector */ #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** -Replaces the new column values stored in the update vector to the record -given. No field size changes are allowed. */ +Replaces the new column values stored in the update vector to the +record given. No field size changes are allowed. This function is +usually invoked on a clustered index. The only use case for a +secondary index is row_ins_sec_index_entry_by_modify() or its +counterpart in ibuf_insert_to_index_page(). */ UNIV_INTERN void row_upd_rec_in_place( diff --git a/include/srv0srv.h b/include/srv0srv.h index 2fc5b76192b..9888c95fa66 100644 --- a/include/srv0srv.h +++ b/include/srv0srv.h @@ -57,6 +57,9 @@ extern const char srv_mysql50_table_name_prefix[9]; thread starts running */ extern os_event_t srv_lock_timeout_thread_event; +/* This event is set at shutdown to wakeup threads from sleep */ +extern os_event_t srv_shutdown_event; + /* If the last data file is auto-extended, we add this many pages to it at a time */ #define SRV_AUTO_EXTEND_INCREMENT \ @@ -156,6 +159,10 @@ extern ulint srv_buf_pool_curr_size; /*!< current size in bytes */ extern ulint srv_mem_pool_size; extern ulint srv_lock_table_size; +extern uint srv_buffer_pool_shm_key; +extern ibool srv_buffer_pool_shm_is_reused; +extern ibool srv_buffer_pool_shm_checksum; + extern ibool srv_thread_concurrency_timer_based; extern ulint srv_n_file_io_threads; diff --git a/include/srv0start.h b/include/srv0start.h index 8abf15da9c1..7eb7e96bd50 100644 --- a/include/srv0start.h +++ b/include/srv0start.h @@ -131,4 +131,7 @@ extern enum srv_shutdown_state srv_shutdown_state; /** Log 'spaces' have id's >= this */ #define SRV_LOG_SPACE_FIRST_ID 0xFFFFFFF0UL +/** reserved for extra system tables */ +#define SRV_EXTRA_SYS_SPACE_FIRST_ID 0xFFFFFFE0UL + #endif diff --git a/include/trx0sys.h b/include/trx0sys.h index 9ef9485b611..2637189f37e 100644 --- a/include/trx0sys.h +++ b/include/trx0sys.h @@ -470,7 +470,7 @@ trx_sys_file_format_id_to_name( /* Space id and page no where the trx system file copy resides */ #define TRX_SYS_SPACE 0 /* the SYSTEM tablespace */ -#define TRX_DOUBLEWRITE_SPACE 1 /* the doublewrite buffer tablespace if used */ +#define TRX_DOUBLEWRITE_SPACE 0xFFFFFFE0UL /* the doublewrite buffer tablespace if used */ #define TRX_SYS_SPACE_MAX 9 /* reserved max space id for system tablespaces */ #include "fsp0fsp.h" #define TRX_SYS_PAGE_NO FSP_TRX_SYS_PAGE_NO diff --git a/include/trx0sys.ic b/include/trx0sys.ic index c7b09d4aec2..5e0f07c8b9d 100644 --- a/include/trx0sys.ic +++ b/include/trx0sys.ic @@ -81,7 +81,7 @@ trx_sys_sys_space( { if (srv_doublewrite_file) { /* several spaces are reserved */ - return((ibool)(space <= TRX_SYS_SPACE_MAX)); + return((ibool)(space == TRX_SYS_SPACE || space == TRX_DOUBLEWRITE_SPACE)); } else { return((ibool)(space == TRX_SYS_SPACE)); } diff --git a/include/univ.i b/include/univ.i index 79d030d2bbb..14c89813cad 100644 --- a/include/univ.i +++ b/include/univ.i @@ -46,10 +46,10 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MINOR 0 -#define INNODB_VERSION_BUGFIX 13 +#define INNODB_VERSION_BUGFIX 14 #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 11.6 +#define PERCONA_INNODB_VERSION 12.5 #endif @@ -371,6 +371,9 @@ typedef unsigned long long int ullint; /* Maximum value for ib_uint64_t */ #define IB_ULONGLONG_MAX ((ib_uint64_t) (~0ULL)) +/* THe 'undefined' value for ullint */ +#define ULLINT_UNDEFINED ((ullint)(-1)) + /* This 'ibool' type is used within Innobase. Remember that different included headers may define 'bool' differently. Do not assume that 'bool' is a ulint! */ #define ibool ulint diff --git a/include/ut0lst.h b/include/ut0lst.h index 261d33963dc..a40c8054082 100644 --- a/include/ut0lst.h +++ b/include/ut0lst.h @@ -257,5 +257,48 @@ do { \ ut_a(ut_list_node_313 == NULL); \ } while (0) +/********************************************************************//** +Align nodes with moving location. +@param NAME the name of the list +@param TYPE node type +@param BASE base node (not a pointer to it) +@param OFFSET offset moved */ +#define UT_LIST_OFFSET(NAME, TYPE, BASE, FADDR, FOFFSET, BOFFSET) \ +do { \ + ulint ut_list_i_313; \ + TYPE* ut_list_node_313; \ + \ + if ((BASE).start) \ + (BASE).start = (void*)((byte*)((BASE).start) \ + + (((void*)((BASE).start) > (void*)FADDR)?FOFFSET:BOFFSET));\ + if ((BASE).end) \ + (BASE).end = (void*)((byte*)((BASE).end) \ + + (((void*)((BASE).end) > (void*)FADDR)?FOFFSET:BOFFSET));\ + \ + ut_list_node_313 = (BASE).start; \ + \ + for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \ + ut_a(ut_list_node_313); \ + if ((ut_list_node_313->NAME).prev) \ + (ut_list_node_313->NAME).prev = (void*)((byte*)((ut_list_node_313->NAME).prev)\ + + (((void*)((ut_list_node_313->NAME).prev) > (void*)FADDR)?FOFFSET:BOFFSET));\ + if ((ut_list_node_313->NAME).next) \ + (ut_list_node_313->NAME).next = (void*)((byte*)((ut_list_node_313->NAME).next)\ + + (((void*)((ut_list_node_313->NAME).next)> (void*)FADDR)?FOFFSET:BOFFSET));\ + ut_list_node_313 = (ut_list_node_313->NAME).next; \ + } \ + \ + ut_a(ut_list_node_313 == NULL); \ + \ + ut_list_node_313 = (BASE).end; \ + \ + for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \ + ut_a(ut_list_node_313); \ + ut_list_node_313 = (ut_list_node_313->NAME).prev; \ + } \ + \ + ut_a(ut_list_node_313 == NULL); \ +} while (0) + #endif diff --git a/log/log0log.c b/log/log0log.c index fade31037b5..c39f60bd4b9 100644 --- a/log/log0log.c +++ b/log/log0log.c @@ -1184,6 +1184,9 @@ log_group_file_header_flush( /* Wipe over possible label of ibbackup --restore */ memcpy(buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, " ", 4); + mach_write_to_4(buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE, + srv_log_block_size); + dest_offset = nth_file * group->file_size; #ifdef UNIV_DEBUG @@ -1777,9 +1780,7 @@ log_group_checkpoint( ulint i; ut_ad(mutex_own(&(log_sys->mutex))); -#if LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE -# error "LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE" -#endif + ut_a(LOG_CHECKPOINT_SIZE <= OS_FILE_LOG_BLOCK_SIZE); buf = group->checkpoint_buf; @@ -3102,6 +3103,7 @@ logs_empty_and_mark_files_at_shutdown(void) algorithm only works if the server is idle at shutdown */ srv_shutdown_state = SRV_SHUTDOWN_CLEANUP; + os_event_set(srv_shutdown_event); loop: os_thread_sleep(100000); diff --git a/log/log0recv.c b/log/log0recv.c index 2aaffe4c031..5702f47ad5f 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -2899,6 +2899,7 @@ recv_init_crash_recovery(void) /*==========================*/ { ut_a(!recv_needed_recovery); + ut_a(!srv_buffer_pool_shm_is_reused); recv_needed_recovery = TRUE; @@ -2956,6 +2957,7 @@ recv_recovery_from_checkpoint_start_func( log_group_t* max_cp_group; log_group_t* up_to_date_group; ulint max_cp_field; + ulint log_hdr_log_block_size; ib_uint64_t checkpoint_lsn; ib_uint64_t checkpoint_no; ib_uint64_t old_scanned_lsn; @@ -3057,6 +3059,20 @@ recv_recovery_from_checkpoint_start_func( log_hdr_buf, max_cp_group); } + log_hdr_log_block_size + = mach_read_from_4(log_hdr_buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE); + if (log_hdr_log_block_size == 0) { + /* 0 means default value */ + log_hdr_log_block_size = 512; + } + if (log_hdr_log_block_size != srv_log_block_size) { + fprintf(stderr, + "InnoDB: Error: The block size of ib_logfile (%lu) " + "is not equal to innodb_log_block_size.\n", + log_hdr_log_block_size); + return(DB_ERROR); + } + #ifdef UNIV_LOG_ARCHIVE group = UT_LIST_GET_FIRST(log_sys->log_groups); diff --git a/os/os0file.c b/os/os0file.c index 4d3f746099d..7bb9440b184 100644 --- a/os/os0file.c +++ b/os/os0file.c @@ -1222,10 +1222,12 @@ UNIV_INTERN void os_file_set_nocache( /*================*/ - int fd, /*!< in: file descriptor to alter */ - const char* file_name, /*!< in: file name, used in the - diagnostic message */ - const char* operation_name) /*!< in: "open" or "create"; used in the + int fd /*!< in: file descriptor to alter */ + __attribute__((unused)), + const char* file_name /*!< in: used in the diagnostic message */ + __attribute__((unused)), + const char* operation_name __attribute__((unused))) + /*!< in: "open" or "create"; used in the diagnostic message */ { /* some versions of Solaris may not have DIRECTIO_ON */ @@ -2355,7 +2357,10 @@ _os_file_read( ulint i; #endif /* !UNIV_HOTBACKUP */ + /* On 64-bit Windows, ulint is 64 bits. But offset and n should be + no more than 32 bits. */ ut_a((offset & 0xFFFFFFFFUL) == offset); + ut_a((n & 0xFFFFFFFFUL) == n); os_n_file_reads++; os_bytes_read_since_printout += n; @@ -2479,7 +2484,10 @@ os_file_read_no_error_handling( ulint i; #endif /* !UNIV_HOTBACKUP */ + /* On 64-bit Windows, ulint is 64 bits. But offset and n should be + no more than 32 bits. */ ut_a((offset & 0xFFFFFFFFUL) == offset); + ut_a((n & 0xFFFFFFFFUL) == n); os_n_file_reads++; os_bytes_read_since_printout += n; @@ -2609,7 +2617,10 @@ os_file_write( ulint i; #endif /* !UNIV_HOTBACKUP */ - ut_a((offset & 0xFFFFFFFF) == offset); + /* On 64-bit Windows, ulint is 64 bits. But offset and n should be + no more than 32 bits. */ + ut_a((offset & 0xFFFFFFFFUL) == offset); + ut_a((n & 0xFFFFFFFFUL) == n); os_n_file_writes++; @@ -3383,12 +3394,14 @@ os_aio_array_reserve_slot( trx_t* trx) { os_aio_slot_t* slot; -#ifdef WIN_ASYNC_IO - OVERLAPPED* control; -#endif ulint i; ulint slots_per_seg; ulint local_seg; +#ifdef WIN_ASYNC_IO + OVERLAPPED* control; + + ut_a((len & 0xFFFFFFFFUL) == len); +#endif /* No need of a mutex. Only reading constant fields */ slots_per_seg = array->n_slots / array->n_segments; @@ -3690,6 +3703,9 @@ os_aio( ut_ad(n % OS_FILE_LOG_BLOCK_SIZE == 0); ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0); ut_ad(os_aio_validate()); +#ifdef WIN_ASYNC_IO + ut_ad((n & 0xFFFFFFFFUL) == n); +#endif wake_later = mode & OS_AIO_SIMULATED_WAKE_LATER; mode = mode & (~OS_AIO_SIMULATED_WAKE_LATER); @@ -3935,16 +3951,18 @@ os_aio_windows_handle( /* retry failed read/write operation synchronously. No need to hold array->mutex. */ + ut_a((slot->len & 0xFFFFFFFFUL) == slot->len); + switch (slot->type) { case OS_FILE_WRITE: ret = WriteFile(slot->file, slot->buf, - slot->len, &len, + (DWORD) slot->len, &len, &(slot->control)); break; case OS_FILE_READ: ret = ReadFile(slot->file, slot->buf, - slot->len, &len, + (DWORD) slot->len, &len, &(slot->control)); break; diff --git a/os/os0proc.c b/os/os0proc.c index 48922886f23..4567d96b6f4 100644 --- a/os/os0proc.c +++ b/os/os0proc.c @@ -229,3 +229,173 @@ os_mem_free_large( } #endif } + +/****************************************************************//** +Allocates or attaches and reuses shared memory segment. +The content is not cleared automatically. +@return allocated memory */ +UNIV_INTERN +void* +os_shm_alloc( +/*=========*/ + ulint* n, /*!< in/out: number of bytes */ + uint key, + ibool* is_new) +{ + void* ptr; +#if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H + ulint size; + int shmid; + + *is_new = FALSE; + fprintf(stderr, + "InnoDB: The shared memory segment containing the buffer pool is: key %#x (%d).\n", + key, key); +# if defined HAVE_LARGE_PAGES && defined UNIV_LINUX + if (!os_use_large_pages || !os_large_page_size) { + goto skip; + } + + /* Align block size to os_large_page_size */ + ut_ad(ut_is_2pow(os_large_page_size)); + size = ut_2pow_round(*n + (os_large_page_size - 1), + os_large_page_size); + + shmid = shmget((key_t)key, (size_t)size, + IPC_CREAT | IPC_EXCL | SHM_HUGETLB | SHM_R | SHM_W); + if (shmid < 0) { + if (errno == EEXIST) { + fprintf(stderr, + "InnoDB: HugeTLB: The shared memory segment exists.\n"); + shmid = shmget((key_t)key, (size_t)size, + SHM_HUGETLB | SHM_R | SHM_W); + if (shmid < 0) { + fprintf(stderr, + "InnoDB: HugeTLB: Warning: Failed to allocate %lu bytes. (reuse) errno %d\n", + size, errno); + goto skip; + } else { + fprintf(stderr, + "InnoDB: HugeTLB: The existent shared memory segment is used.\n"); + } + } else { + fprintf(stderr, + "InnoDB: HugeTLB: Warning: Failed to allocate %lu bytes. (new) errno %d\n", + size, errno); + goto skip; + } + } else { + *is_new = TRUE; + fprintf(stderr, + "InnoDB: HugeTLB: A new shared memory segment has been created .\n"); + } + + ptr = shmat(shmid, NULL, 0); + if (ptr == (void *)-1) { + fprintf(stderr, + "InnoDB: HugeTLB: Warning: Failed to attach shared memory segment, errno %d\n", + errno); + ptr = NULL; + } + + if (ptr) { + *n = size; + os_fast_mutex_lock(&ut_list_mutex); + ut_total_allocated_memory += size; + os_fast_mutex_unlock(&ut_list_mutex); + UNIV_MEM_ALLOC(ptr, size); + return(ptr); + } +skip: + *is_new = FALSE; +# endif /* HAVE_LARGE_PAGES && defined UNIV_LINUX */ +# ifdef HAVE_GETPAGESIZE + size = getpagesize(); +# else + size = UNIV_PAGE_SIZE; +# endif + /* Align block size to system page size */ + ut_ad(ut_is_2pow(size)); + size = *n = ut_2pow_round(*n + (size - 1), size); + + shmid = shmget((key_t)key, (size_t)size, + IPC_CREAT | IPC_EXCL | SHM_R | SHM_W); + if (shmid < 0) { + if (errno == EEXIST) { + fprintf(stderr, + "InnoDB: A shared memory segment containing the buffer pool seems to already exist.\n"); + shmid = shmget((key_t)key, (size_t)size, + SHM_R | SHM_W); + if (shmid < 0) { + fprintf(stderr, + "InnoDB: Warning: Failed to allocate %lu bytes. (reuse) errno %d\n", + size, errno); + ptr = NULL; + goto end; + } else { + fprintf(stderr, + "InnoDB: The existent shared memory segment is used.\n"); + } + } else { + fprintf(stderr, + "InnoDB: Warning: Failed to allocate %lu bytes. (new) errno %d\n", + size, errno); + ptr = NULL; + goto end; + } + } else { + *is_new = TRUE; + fprintf(stderr, + "InnoDB: A new shared memory segment has been created.\n"); + } + + ptr = shmat(shmid, NULL, 0); + if (ptr == (void *)-1) { + fprintf(stderr, + "InnoDB: Warning: Failed to attach shared memory segment, errno %d\n", + errno); + ptr = NULL; + } + + if (ptr) { + *n = size; + os_fast_mutex_lock(&ut_list_mutex); + ut_total_allocated_memory += size; + os_fast_mutex_unlock(&ut_list_mutex); + UNIV_MEM_ALLOC(ptr, size); + } +end: +#else /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ + fprintf(stderr, "InnoDB: shared memory segment is not supported.\n"); + ptr = NULL; +#endif /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ + return(ptr); +} + +/****************************************************************//** +Detach shared memory segment. */ +UNIV_INTERN +void +os_shm_free( +/*========*/ + void *ptr, /*!< in: pointer returned by + os_shm_alloc() */ + ulint size) /*!< in: size returned by + os_shm_alloc() */ +{ + os_fast_mutex_lock(&ut_list_mutex); + ut_a(ut_total_allocated_memory >= size); + os_fast_mutex_unlock(&ut_list_mutex); + +#if defined HAVE_SYS_IPC_H && HAVE_SYS_SHM_H + if (!shmdt(ptr)) { + os_fast_mutex_lock(&ut_list_mutex); + ut_a(ut_total_allocated_memory >= size); + ut_total_allocated_memory -= size; + os_fast_mutex_unlock(&ut_list_mutex); + UNIV_MEM_FREE(ptr, size); + } +#else /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ + fprintf(stderr, "InnoDB: shared memory segment is not supported.\n"); +#endif /* HAVE_SYS_IPC_H && HAVE_SYS_SHM_H */ +} diff --git a/os/os0sync.c b/os/os0sync.c index 60467242e14..dba997927cb 100644 --- a/os/os0sync.c +++ b/os/os0sync.c @@ -31,6 +31,9 @@ Created 9/6/1995 Heikki Tuuri #ifdef __WIN__ #include +#else +#include +#include #endif #include "ut0mem.h" @@ -407,14 +410,14 @@ os_event_wait_low( /**********************************************************//** Waits for an event object until it is in the signaled state or -a timeout is exceeded. In Unix the timeout is always infinite. +a timeout is exceeded. @return 0 if success, OS_SYNC_TIME_EXCEEDED if timeout was exceeded */ UNIV_INTERN ulint os_event_wait_time( /*===============*/ os_event_t event, /*!< in: event to wait */ - ulint time) /*!< in: timeout in microseconds, or + ulint wtime) /*!< in: timeout in microseconds, or OS_SYNC_INFINITE_TIME */ { #ifdef __WIN__ @@ -422,8 +425,8 @@ os_event_wait_time( ut_a(event); - if (time != OS_SYNC_INFINITE_TIME) { - err = WaitForSingleObject(event->handle, (DWORD) time / 1000); + if (wtime != OS_SYNC_INFINITE_TIME) { + err = WaitForSingleObject(event->handle, (DWORD) wtime / 1000); } else { err = WaitForSingleObject(event->handle, INFINITE); } @@ -439,13 +442,47 @@ os_event_wait_time( return(1000000); /* dummy value to eliminate compiler warn. */ } #else - UT_NOT_USED(time); + int err; + int ret = 0; + ulint tmp; + ib_int64_t old_count; + struct timeval tv_start; + struct timespec timeout; - /* In Posix this is just an ordinary, infinite wait */ + if (wtime == OS_SYNC_INFINITE_TIME) { + os_event_wait(event); + return 0; + } - os_event_wait(event); + /* Compute the absolute point in time at which to time out. */ + gettimeofday(&tv_start, NULL); + tmp = tv_start.tv_usec + wtime; + timeout.tv_sec = tv_start.tv_sec + (tmp / 1000000); + timeout.tv_nsec = (tmp % 1000000) * 1000; - return(0); + os_fast_mutex_lock(&(event->os_mutex)); + old_count = event->signal_count; + + for (;;) { + if (event->is_set == TRUE || event->signal_count != old_count) + break; + + err = pthread_cond_timedwait(&(event->cond_var), + &(event->os_mutex), &timeout); + if (err == ETIMEDOUT) { + ret = OS_SYNC_TIME_EXCEEDED; + break; + } + } + + os_fast_mutex_unlock(&(event->os_mutex)); + + if (srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS) { + + os_thread_exit(NULL); + } + + return ret; #endif } diff --git a/percona-suite/have_response_time_distribution.inc b/percona-suite/have_response_time_distribution.inc new file mode 100644 index 00000000000..aa4bf40ce67 --- /dev/null +++ b/percona-suite/have_response_time_distribution.inc @@ -0,0 +1,4 @@ +-- require r/have_response_time_distribution.require +disable_query_log; +show variables like 'have_response_time_distribution'; +enable_query_log; diff --git a/percona-suite/have_response_time_distribution.require b/percona-suite/have_response_time_distribution.require new file mode 100644 index 00000000000..fd7196830ff --- /dev/null +++ b/percona-suite/have_response_time_distribution.require @@ -0,0 +1,2 @@ +Variable_name Value +have_response_time_distribution YES diff --git a/percona-suite/log_connection_error.patch/percona_log_connection_error-master.opt b/percona-suite/log_connection_error.patch/percona_log_connection_error-master.opt new file mode 100644 index 00000000000..4658d62af60 --- /dev/null +++ b/percona-suite/log_connection_error.patch/percona_log_connection_error-master.opt @@ -0,0 +1 @@ +--log-error diff --git a/percona-suite/log_connection_error.patch/percona_log_connection_error.result b/percona-suite/log_connection_error.patch/percona_log_connection_error.result new file mode 100644 index 00000000000..3c6c67f770c --- /dev/null +++ b/percona-suite/log_connection_error.patch/percona_log_connection_error.result @@ -0,0 +1,15 @@ +SET @old_max_connections = @@max_connections; +SET @old_log_warnings = @@log_warnings; +SET GLOBAL max_connections=2; +SET GLOBAL LOG_WARNINGS = 0; +connect(localhost,root,,test,port,socket); +ERROR HY000: Too many connections +SET GLOBAL LOG_WARNINGS = 1; +connect(localhost,root,,test,port,socket); +ERROR HY000: Too many connections +SET GLOBAL LOG_WARNINGS = 0; +connect(localhost,root,,test,port,socket); +ERROR HY000: Too many connections +SET GLOBAL max_connections = @old_max_connections; +SET GLOBAL log_warnings = @old_log_warnings; +1 diff --git a/percona-suite/log_connection_error.patch/percona_log_connection_error.test b/percona-suite/log_connection_error.patch/percona_log_connection_error.test new file mode 100644 index 00000000000..57cd652bd24 --- /dev/null +++ b/percona-suite/log_connection_error.patch/percona_log_connection_error.test @@ -0,0 +1,52 @@ +--source include/not_embedded.inc + +connect (main,localhost,root,,); +connection main; +SET @old_max_connections = @@max_connections; +SET @old_log_warnings = @@log_warnings; +SET GLOBAL max_connections=2; +let $port=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'port'`; +let $socket=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'socket'`; + +SET GLOBAL LOG_WARNINGS = 0; +--connect (conn0,localhost,root,,) +connection conn0; +replace_result $port port $socket socket; +--error 1040 +--connect(conn1,localhost,root,,) +disconnect conn0; +SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right + +connection main; +SET GLOBAL LOG_WARNINGS = 1; +--connect (conn1,localhost,root,,) +replace_result $port port $socket socket; +--error 1040 +--connect (conn0,localhost,root,,) +disconnect conn1; +SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right + +connection main; +SET GLOBAL LOG_WARNINGS = 0; +--connect (conn0,localhost,root,,) +replace_result $port port $socket socket; +--error 1040 +--connect(conn1,localhost,root,,) +disconnect conn0; +SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right + +connection main; +SET GLOBAL max_connections = @old_max_connections; +SET GLOBAL log_warnings = @old_log_warnings; +let $log_error_= `SELECT @@GLOBAL.log_error`; +if(!`select LENGTH('$log_error_')`) +{ + # MySQL Server on windows is started with --console and thus + # does not know the location of its .err log, use default location + let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err; +} +# Assign env variable LOG_ERROR +let LOG_ERROR=$log_error_; + +let cmd=cat $log_error | grep "Too many connections" | wc -l; +exec $cmd; diff --git a/percona-suite/percona_innodb_buffer_pool_shm-master.opt b/percona-suite/percona_innodb_buffer_pool_shm-master.opt new file mode 100644 index 00000000000..521fd9f459e --- /dev/null +++ b/percona-suite/percona_innodb_buffer_pool_shm-master.opt @@ -0,0 +1,2 @@ +--innodb_buffer_pool_shm_key=123456 +--innodb=FORCE diff --git a/percona-suite/percona_innodb_buffer_pool_shm.result b/percona-suite/percona_innodb_buffer_pool_shm.result new file mode 100644 index 00000000000..04ca5f4b877 --- /dev/null +++ b/percona-suite/percona_innodb_buffer_pool_shm.result @@ -0,0 +1,8 @@ +show variables like 'innodb_buffer_pool_shm%'; +Variable_name Value +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 123456 +show variables like 'innodb_buffer_pool_shm%'; +Variable_name Value +innodb_buffer_pool_shm_checksum ON +innodb_buffer_pool_shm_key 123456 diff --git a/percona-suite/percona_innodb_buffer_pool_shm.test b/percona-suite/percona_innodb_buffer_pool_shm.test new file mode 100644 index 00000000000..a7f9c8eb72f --- /dev/null +++ b/percona-suite/percona_innodb_buffer_pool_shm.test @@ -0,0 +1,19 @@ +--source include/big_test.inc +--source include/have_innodb.inc +show variables like 'innodb_buffer_pool_shm%'; + +#clean shutdown (restart_mysqld.inc is not clean if over 10 sec...) +--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +wait +EOF +shutdown_server 120; +--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +restart +EOF +--enable_reconnect +--source include/wait_until_connected_again.inc +--disable_reconnect + +show variables like 'innodb_buffer_pool_shm%'; +--sleep 1 +--system ipcrm -M 123456 diff --git a/percona-suite/percona_log_connection_error-master.opt b/percona-suite/percona_log_connection_error-master.opt deleted file mode 100644 index 32a891789f3..00000000000 --- a/percona-suite/percona_log_connection_error-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-error \ No newline at end of file diff --git a/percona-suite/percona_server_variables.result b/percona-suite/percona_server_variables.result index 6533829cfd9..9eeb1bd90e5 100644 --- a/percona-suite/percona_server_variables.result +++ b/percona-suite/percona_server_variables.result @@ -36,10 +36,12 @@ delayed_insert_limit Value delayed_insert_timeout Value delayed_queue_size Value div_precision_increment Value +enable_query_response_time_stats Value engine_condition_pushdown Value error_count Value event_scheduler Value expire_logs_days Value +fast_index_creation Value flush Value flush_time Value foreign_key_checks Value @@ -62,6 +64,7 @@ have_ndbcluster Value have_openssl Value have_partitioning Value have_query_cache Value +have_response_time_distribution Value have_rtree_keys Value have_ssl Value have_symlink Value @@ -78,6 +81,8 @@ innodb_additional_mem_pool_size Value innodb_auto_lru_dump Value innodb_autoextend_increment Value innodb_autoinc_lock_mode Value +innodb_buffer_pool_shm_checksum Value +innodb_buffer_pool_shm_key Value innodb_buffer_pool_size Value innodb_change_buffering Value innodb_checkpoint_age_target Value @@ -246,6 +251,7 @@ query_cache_strip_comments Value query_cache_type Value query_cache_wlock_invalidate Value query_prealloc_size Value +query_response_time_range_base Value rand_seed1 Value rand_seed2 Value range_alloc_block_size Value diff --git a/percona-suite/percona_server_variables.test b/percona-suite/percona_server_variables.test index 232cbb15e25..2e158ed2755 100644 --- a/percona-suite/percona_server_variables.test +++ b/percona-suite/percona_server_variables.test @@ -1,3 +1,4 @@ +--source include/have_response_time_distribution.inc --source include/have_innodb.inc --source include/have_debug.inc diff --git a/percona-suite/profiling_slow.patch/percona_bug643149.result b/percona-suite/profiling_slow.patch/percona_bug643149.result new file mode 100644 index 00000000000..c2a15c97e8c --- /dev/null +++ b/percona-suite/profiling_slow.patch/percona_bug643149.result @@ -0,0 +1,16 @@ +SET @old_slow_query_log_file=@@global.slow_query_log_file; +SET GLOBAL slow_query_log=on; +SET LOCAL profiling_server=on; +SET LOCAL long_query_time=1; +SET GLOBAL slow_query_log_file='MYSQLTEST_VARDIR/percona_bug643149_slow.log';; +SELECT SLEEP(2); +SLEEP(2) +0 +# Time: X X:X:X +# User@Host: root[root] @ localhost [] +# Thread_id: X Schema: test Last_errno: X Killed: X +# Query_time: X.X Lock_time: X.X Rows_sent: X Rows_examined: X Rows_affected: X Rows_read: X +# Bytes_sent: X Tmp_tables: X Tmp_disk_tables: X Tmp_table_sizes: X +# Profile_starting: X.X Profile_starting_cpu: X.X Profile_checking_permissions: X.X Profile_checking_permissions_cpu: X.X Profile_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_init: X.X Profile_init_cpu: X.X Profile_optimizing: X.X Profile_optimizing_cpu: X.X Profile_executing: X.X Profile_executing_cpu: X.X Profile_User_sleep: X.X Profile_User_sleep_cpu: X.X Profile_end: X.X Profile_end_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_freeing_items: X.X Profile_freeing_items_cpu: X.X Profile_logging_slow_query: X.X Profile_logging_slow_query_cpu: X.X +# Profile_total: X.X Profile_total_cpu: X.X +SET GLOBAL slow_query_log_file=@old_slow_query_log_file; diff --git a/percona-suite/profiling_slow.patch/percona_bug643149.test b/percona-suite/profiling_slow.patch/percona_bug643149.test new file mode 100644 index 00000000000..b4a9ac7bc65 --- /dev/null +++ b/percona-suite/profiling_slow.patch/percona_bug643149.test @@ -0,0 +1,50 @@ +# +# This test suffers from server +# Bug#38124 "general_log_file" variable silently unset when using expression +# In short: +# SET GLOBAL general_log_file = @ +# SET GLOBAL slow_query_log = @ +# cause that the value of these server system variables is set to default +# instead of the assigned values. There comes no error message or warning. +# If this bug is fixed please +# 1. try this test with "let $fixed_bug38124 = 0;" +# 2. remove all workarounds if 1. was successful. +let $fixed_bug38124 = 0; + +SET @old_slow_query_log_file=@@global.slow_query_log_file; +SET GLOBAL slow_query_log=on; +SET LOCAL profiling_server=on; +SET LOCAL long_query_time=1; + +let slogfile=$MYSQLTEST_VARDIR/percona_bug643149_slow.log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--eval SET GLOBAL slow_query_log_file='$slogfile'; + +--disable_ps_protocol +SELECT SLEEP(2); +--enable_ps_protocol + +perl; + $slogfile= $ENV{'slogfile'}; + + open(FILE, "$slogfile") or + die("Unable to read slow query log file $slogfile: $!\n"); + while() { + next if (!/^#/); + s/[0-9]+/X/g; + s/ +/ /g; + print; + } + + close(FILE); +EOF + +SET GLOBAL slow_query_log_file=@old_slow_query_log_file; + +if(!$fixed_bug38124) +{ + --disable_query_log + let $my_var = `SELECT @old_slow_query_log_file`; + eval SET @@global.slow_query_log_file = '$my_var'; + --enable_query_log +} diff --git a/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test b/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test index 64a9fe7db71..3bbfe0edca9 100644 --- a/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test +++ b/percona-suite/query_cache_enhance.patch/percona_status_wait_query_cache_mutex.test @@ -34,4 +34,4 @@ SET SESSION debug="+d,status_wait_query_cache_mutex_sleep"; SHOW PROCESSLIST; DROP TABLE t; -set GLOBAL query_cache_size=0; \ No newline at end of file +set GLOBAL query_cache_size=0; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.result b/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.result new file mode 100644 index 00000000000..950cdbf7532 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.result @@ -0,0 +1,70 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; +DROP TABLE IF EXISTS t; +CREATE TABLE t(id INT); +SELECT * from t; +id +SELECT * from t; +id +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +Warnings: +Warning 1292 Truncated incorrect query_response_time_range_base value: '1' +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 10 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Statement may not be safe to log in statement format. +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +0 +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Statement may not be safe to log in statement format. +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +0 +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +2 +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +3 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +FLUSH QUERY_RESPONSE_TIME; +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Statement may not be safe to log in statement format. +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +0 +INSERT INTO t SELECT SLEEP(0.4); +Warnings: +Note 1592 Statement may not be safe to log in statement format. +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +0 +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +2 +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) +3 +DROP TABLE IF EXISTS t; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.test b/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.test new file mode 100644 index 00000000000..b215d3b45b2 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time-replication.test @@ -0,0 +1,57 @@ +--source include/have_response_time_distribution.inc +--source include/master-slave.inc +--source include/have_binlog_format_statement.inc +--source include/have_debug.inc +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; + +connection master; +-- disable_warnings +DROP TABLE IF EXISTS t; +-- enable_warnings +CREATE TABLE t(id INT); +SELECT * from t; + +sync_slave_with_master; + +connection slave; +SELECT * from t; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON; + +connection master; +INSERT INTO t SELECT SLEEP(0.4); +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +INSERT INTO t SELECT SLEEP(0.4); +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +sync_slave_with_master; + +connection slave; +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; + +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +source include/percona_query_response_time_flush.inc; + +connection master; +INSERT INTO t SELECT SLEEP(0.4); +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +INSERT INTO t SELECT SLEEP(0.4); +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +sync_slave_with_master; + +connection slave; +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; + +connection master; +DROP TABLE IF EXISTS t; +sync_slave_with_master; +connection slave; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.result b/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.result new file mode 100644 index 00000000000..6ca471867ab --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.result @@ -0,0 +1,313 @@ +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; +CREATE FUNCTION test_f() +RETURNS CHAR(30) DETERMINISTIC +BEGIN +DECLARE first VARCHAR(5); +DECLARE second VARCHAR(5); +DECLARE result VARCHAR(20); +SELECT SLEEP(1.11) INTO first; +SET first= 'Hello'; +SET second=', '; +SET result= CONCAT(first,second); +SET result= CONCAT(result,'world!'); +RETURN result; +END/ +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +Warnings: +Warning 1292 Truncated incorrect query_response_time_range_base value: '1' +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +FLUSH QUERY_RESPONSE_TIME; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +44 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000003 + 0.000007 + 0.000015 + 0.000030 + 0.000061 + 0.000122 + 0.000244 + 0.000488 + 0.000976 + 0.001953 + 0.003906 + 0.007812 + 0.015625 + 0.031250 + 0.062500 + 0.125000 + 0.250000 + 0.500000 + 1.000000 + 2.000000 + 4.000000 + 8.000000 + 16.000000 + 32.000000 + 64.000000 + 128.000000 + 256.000000 + 512.000000 + 1024.000000 + 2048.000000 + 4096.000000 + 8192.000000 + 16384.000000 + 32768.000000 + 65536.000000 + 131072.000000 + 262144.000000 + 524288.000000 + 1048576.00000 + 2097152.00000 + 4194304.00000 + 8388608.00000 +TOO LONG +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +test_f() +Hello, world! +SELECT test_f(); +test_f() +Hello, world! +SELECT test_f(); +test_f() +Hello, world! +SELECT test_f(); +test_f() +Hello, world! +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +4 4 4 1 44 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +44 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000003 + 0.000007 + 0.000015 + 0.000030 + 0.000061 + 0.000122 + 0.000244 + 0.000488 + 0.000976 + 0.001953 + 0.003906 + 0.007812 + 0.015625 + 0.031250 + 0.062500 + 0.125000 + 0.250000 + 0.500000 + 1.000000 + 2.000000 + 4.000000 + 8.000000 + 16.000000 + 32.000000 + 64.000000 + 128.000000 + 256.000000 + 512.000000 + 1024.000000 + 2048.000000 + 4096.000000 + 8192.000000 + 16384.000000 + 32768.000000 + 65536.000000 + 131072.000000 + 262144.000000 + 524288.000000 + 1048576.00000 + 2097152.00000 + 4194304.00000 + 8388608.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 10 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +test_f() +Hello, world! +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +1 1 1 1 14 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +14 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000010 + 0.000100 + 0.001000 + 0.010000 + 0.100000 + 1.000000 + 10.000000 + 100.000000 + 1000.000000 + 10000.000000 + 100000.000000 + 1000000.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 10 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 7 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +test_f() +Hello, world! +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +1 1 1 1 17 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +17 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000008 + 0.000059 + 0.000416 + 0.002915 + 0.020408 + 0.142857 + 1.000000 + 7.000000 + 49.000000 + 343.000000 + 2401.000000 + 16807.000000 + 117649.000000 + 823543.000000 + 5764801.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 7 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 156 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +test_f() +Hello, world! +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +1 1 1 1 7 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +7 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000041 + 0.006410 + 1.000000 + 156.000000 + 24336.000000 + 3796416.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 156 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +test_f() +Hello, world! +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +1 1 1 1 6 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +6 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.001000 + 1.000000 + 1000.000000 + 1000000.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; +Warnings: +Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; +DROP FUNCTION test_f; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.test b/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.test new file mode 100644 index 00000000000..01651aae928 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time-stored.test @@ -0,0 +1,90 @@ +--source include/have_response_time_distribution.inc +--source include/have_debug.inc +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; + +delimiter /; +CREATE FUNCTION test_f() +RETURNS CHAR(30) DETERMINISTIC +BEGIN + DECLARE first VARCHAR(5); + DECLARE second VARCHAR(5); + DECLARE result VARCHAR(20); + SELECT SLEEP(1.11) INTO first; + SET first= 'Hello'; + SET second=', '; + SET result= CONCAT(first,second); + SET result= CONCAT(result,'world!'); + RETURN result; +END/ +delimiter ;/ + +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +source include/percona_query_response_time_show.inc; + +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +SELECT test_f(); +SELECT test_f(); +SELECT test_f(); +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT test_f(); +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; + +DROP FUNCTION test_f; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time.result b/percona-suite/response-time-distribution.patch/percona_query_response_time.result new file mode 100644 index 00000000000..7599c9f0263 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time.result @@ -0,0 +1,567 @@ +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +Warnings: +Warning 1292 Truncated incorrect query_response_time_range_base value: '1' +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +FLUSH QUERY_RESPONSE_TIME; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +44 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000003 + 0.000007 + 0.000015 + 0.000030 + 0.000061 + 0.000122 + 0.000244 + 0.000488 + 0.000976 + 0.001953 + 0.003906 + 0.007812 + 0.015625 + 0.031250 + 0.062500 + 0.125000 + 0.250000 + 0.500000 + 1.000000 + 2.000000 + 4.000000 + 8.000000 + 16.000000 + 32.000000 + 64.000000 + 128.000000 + 256.000000 + 512.000000 + 1024.000000 + 2048.000000 + 4096.000000 + 8192.000000 + 16384.000000 + 32768.000000 + 65536.000000 + 131072.000000 + 262144.000000 + 524288.000000 + 1048576.00000 + 2097152.00000 + 4194304.00000 + 8388608.00000 +TOO LONG +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT SLEEP(0.31); +SLEEP(0.31) +0 +SELECT SLEEP(0.32); +SLEEP(0.32) +0 +SELECT SLEEP(0.33); +SLEEP(0.33) +0 +SELECT SLEEP(0.34); +SLEEP(0.34) +0 +SELECT SLEEP(0.35); +SLEEP(0.35) +0 +SELECT SLEEP(0.36); +SLEEP(0.36) +0 +SELECT SLEEP(0.37); +SLEEP(0.37) +0 +SELECT SLEEP(0.38); +SLEEP(0.38) +0 +SELECT SLEEP(0.39); +SLEEP(0.39) +0 +SELECT SLEEP(0.40); +SLEEP(0.40) +0 +SELECT SLEEP(1.1); +SLEEP(1.1) +0 +SELECT SLEEP(1.2); +SLEEP(1.2) +0 +SELECT SLEEP(1.3); +SLEEP(1.3) +0 +SELECT SLEEP(1.5); +SLEEP(1.5) +0 +SELECT SLEEP(1.4); +SLEEP(1.4) +0 +SELECT SLEEP(0.5); +SLEEP(0.5) +0 +SELECT SLEEP(2.1); +SLEEP(2.1) +0 +SELECT SLEEP(2.3); +SLEEP(2.3) +0 +SELECT SLEEP(2.5); +SLEEP(2.5) +0 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +10 19 15 4 44 +1 19 15 4 44 +5 19 15 4 44 +3 19 15 4 44 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +44 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000003 + 0.000007 + 0.000015 + 0.000030 + 0.000061 + 0.000122 + 0.000244 + 0.000488 + 0.000976 + 0.001953 + 0.003906 + 0.007812 + 0.015625 + 0.031250 + 0.062500 + 0.125000 + 0.250000 + 0.500000 + 1.000000 + 2.000000 + 4.000000 + 8.000000 + 16.000000 + 32.000000 + 64.000000 + 128.000000 + 256.000000 + 512.000000 + 1024.000000 + 2048.000000 + 4096.000000 + 8192.000000 + 16384.000000 + 32768.000000 + 65536.000000 + 131072.000000 + 262144.000000 + 524288.000000 + 1048576.00000 + 2097152.00000 + 4194304.00000 + 8388608.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 2 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 10 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT SLEEP(0.31); +SLEEP(0.31) +0 +SELECT SLEEP(0.32); +SLEEP(0.32) +0 +SELECT SLEEP(0.33); +SLEEP(0.33) +0 +SELECT SLEEP(0.34); +SLEEP(0.34) +0 +SELECT SLEEP(0.35); +SLEEP(0.35) +0 +SELECT SLEEP(0.36); +SLEEP(0.36) +0 +SELECT SLEEP(0.37); +SLEEP(0.37) +0 +SELECT SLEEP(0.38); +SLEEP(0.38) +0 +SELECT SLEEP(0.39); +SLEEP(0.39) +0 +SELECT SLEEP(0.40); +SLEEP(0.40) +0 +SELECT SLEEP(1.1); +SLEEP(1.1) +0 +SELECT SLEEP(1.2); +SLEEP(1.2) +0 +SELECT SLEEP(1.3); +SLEEP(1.3) +0 +SELECT SLEEP(1.5); +SLEEP(1.5) +0 +SELECT SLEEP(1.4); +SLEEP(1.4) +0 +SELECT SLEEP(0.5); +SLEEP(0.5) +0 +SELECT SLEEP(2.1); +SLEEP(2.1) +0 +SELECT SLEEP(2.3); +SLEEP(2.3) +0 +SELECT SLEEP(2.5); +SLEEP(2.5) +0 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +11 19 17 2 14 +8 19 17 2 14 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +14 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000010 + 0.000100 + 0.001000 + 0.010000 + 0.100000 + 1.000000 + 10.000000 + 100.000000 + 1000.000000 + 10000.000000 + 100000.000000 + 1000000.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 10 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 7 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT SLEEP(0.31); +SLEEP(0.31) +0 +SELECT SLEEP(0.32); +SLEEP(0.32) +0 +SELECT SLEEP(0.33); +SLEEP(0.33) +0 +SELECT SLEEP(0.34); +SLEEP(0.34) +0 +SELECT SLEEP(0.35); +SLEEP(0.35) +0 +SELECT SLEEP(0.36); +SLEEP(0.36) +0 +SELECT SLEEP(0.37); +SLEEP(0.37) +0 +SELECT SLEEP(0.38); +SLEEP(0.38) +0 +SELECT SLEEP(0.39); +SLEEP(0.39) +0 +SELECT SLEEP(0.40); +SLEEP(0.40) +0 +SELECT SLEEP(1.1); +SLEEP(1.1) +0 +SELECT SLEEP(1.2); +SLEEP(1.2) +0 +SELECT SLEEP(1.3); +SLEEP(1.3) +0 +SELECT SLEEP(1.5); +SLEEP(1.5) +0 +SELECT SLEEP(1.4); +SLEEP(1.4) +0 +SELECT SLEEP(0.5); +SLEEP(0.5) +0 +SELECT SLEEP(2.1); +SLEEP(2.1) +0 +SELECT SLEEP(2.3); +SLEEP(2.3) +0 +SELECT SLEEP(2.5); +SLEEP(2.5) +0 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +11 19 17 2 17 +8 19 17 2 17 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +17 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.000008 + 0.000059 + 0.000416 + 0.002915 + 0.020408 + 0.142857 + 1.000000 + 7.000000 + 49.000000 + 343.000000 + 2401.000000 + 16807.000000 + 117649.000000 + 823543.000000 + 5764801.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 7 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 156 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT SLEEP(0.31); +SLEEP(0.31) +0 +SELECT SLEEP(0.32); +SLEEP(0.32) +0 +SELECT SLEEP(0.33); +SLEEP(0.33) +0 +SELECT SLEEP(0.34); +SLEEP(0.34) +0 +SELECT SLEEP(0.35); +SLEEP(0.35) +0 +SELECT SLEEP(0.36); +SLEEP(0.36) +0 +SELECT SLEEP(0.37); +SLEEP(0.37) +0 +SELECT SLEEP(0.38); +SLEEP(0.38) +0 +SELECT SLEEP(0.39); +SLEEP(0.39) +0 +SELECT SLEEP(0.40); +SLEEP(0.40) +0 +SELECT SLEEP(1.1); +SLEEP(1.1) +0 +SELECT SLEEP(1.2); +SLEEP(1.2) +0 +SELECT SLEEP(1.3); +SLEEP(1.3) +0 +SELECT SLEEP(1.5); +SLEEP(1.5) +0 +SELECT SLEEP(1.4); +SLEEP(1.4) +0 +SELECT SLEEP(0.5); +SLEEP(0.5) +0 +SELECT SLEEP(2.1); +SLEEP(2.1) +0 +SELECT SLEEP(2.3); +SLEEP(2.3) +0 +SELECT SLEEP(2.5); +SLEEP(2.5) +0 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +11 19 17 2 7 +8 19 17 2 7 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +7 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000041 + 0.006410 + 1.000000 + 156.000000 + 24336.000000 + 3796416.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 156 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +FLUSH QUERY_RESPONSE_TIME; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +SELECT SLEEP(0.31); +SLEEP(0.31) +0 +SELECT SLEEP(0.32); +SLEEP(0.32) +0 +SELECT SLEEP(0.33); +SLEEP(0.33) +0 +SELECT SLEEP(0.34); +SLEEP(0.34) +0 +SELECT SLEEP(0.35); +SLEEP(0.35) +0 +SELECT SLEEP(0.36); +SLEEP(0.36) +0 +SELECT SLEEP(0.37); +SLEEP(0.37) +0 +SELECT SLEEP(0.38); +SLEEP(0.38) +0 +SELECT SLEEP(0.39); +SLEEP(0.39) +0 +SELECT SLEEP(0.40); +SLEEP(0.40) +0 +SELECT SLEEP(1.1); +SLEEP(1.1) +0 +SELECT SLEEP(1.2); +SLEEP(1.2) +0 +SELECT SLEEP(1.3); +SLEEP(1.3) +0 +SELECT SLEEP(1.5); +SLEEP(1.5) +0 +SELECT SLEEP(1.4); +SLEEP(1.4) +0 +SELECT SLEEP(0.5); +SLEEP(0.5) +0 +SELECT SLEEP(2.1); +SLEEP(2.1) +0 +SELECT SLEEP(2.3); +SLEEP(2.3) +0 +SELECT SLEEP(2.5); +SLEEP(2.5) +0 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +count query_count query_total not_zero_region_count region_count +11 19 17 2 6 +8 19 17 2 6 +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +region_count +6 +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +time + 0.000001 + 0.001000 + 1.000000 + 1000.000000 + 1000000.00000 +TOO LONG +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; +Warnings: +Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +Variable_name Value +query_response_time_range_base 1000 +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time.test b/percona-suite/response-time-distribution.patch/percona_query_response_time.test new file mode 100644 index 00000000000..6dd0f54abf5 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time.test @@ -0,0 +1,68 @@ +--source include/have_response_time_distribution.inc +--source include/have_debug.inc +SET SESSION debug="+d,response_time_distribution_log_only_more_300_milliseconds"; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +source include/percona_query_response_time_show.inc; + +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +source include/percona_query_response_time_sleep.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +source include/percona_query_response_time_sleep.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +source include/percona_query_response_time_sleep.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +source include/percona_query_response_time_sleep.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +source include/percona_query_response_time_flush.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1; +source include/percona_query_response_time_sleep.inc; +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; + +source include/percona_query_response_time_show.inc; + +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001; +SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; + +SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0; +SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10; +SET SESSION debug="-d,response_time_distribution_log_only_more_300_milliseconds"; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time_flush.inc b/percona-suite/response-time-distribution.patch/percona_query_response_time_flush.inc new file mode 100644 index 00000000000..44bb320fe13 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time_flush.inc @@ -0,0 +1 @@ +FLUSH QUERY_RESPONSE_TIME; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time_show.inc b/percona-suite/response-time-distribution.patch/percona_query_response_time_show.inc new file mode 100644 index 00000000000..709abf9872e --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time_show.inc @@ -0,0 +1,8 @@ +SELECT d.count, +(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count, +(SELECT SUM((b.total * 1000000) DIV 1000000) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as query_total, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count != 0) as not_zero_region_count, +(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count +FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as d WHERE d.count > 0; +SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; +SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; diff --git a/percona-suite/response-time-distribution.patch/percona_query_response_time_sleep.inc b/percona-suite/response-time-distribution.patch/percona_query_response_time_sleep.inc new file mode 100644 index 00000000000..40688b173b0 --- /dev/null +++ b/percona-suite/response-time-distribution.patch/percona_query_response_time_sleep.inc @@ -0,0 +1,19 @@ +SELECT SLEEP(0.31); +SELECT SLEEP(0.32); +SELECT SLEEP(0.33); +SELECT SLEEP(0.34); +SELECT SLEEP(0.35); +SELECT SLEEP(0.36); +SELECT SLEEP(0.37); +SELECT SLEEP(0.38); +SELECT SLEEP(0.39); +SELECT SLEEP(0.40); +SELECT SLEEP(1.1); +SELECT SLEEP(1.2); +SELECT SLEEP(1.3); +SELECT SLEEP(1.5); +SELECT SLEEP(1.4); +SELECT SLEEP(0.5); +SELECT SLEEP(2.1); +SELECT SLEEP(2.3); +SELECT SLEEP(2.5); diff --git a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result new file mode 100644 index 00000000000..a028aeadde4 --- /dev/null +++ b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result @@ -0,0 +1,21 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +DROP TABLE IF EXISTS t; +CREATE TABLE t(id INT); +INSERT INTO t SELECT SLEEP(10); +STOP SLAVE; +Warnings: +Note 1592 Statement may not be safe to log in statement format. +master count(*) +master 1 +slave count(*) +slave 0 +SHOW SLAVE STATUS NOLOCK; +START SLAVE; +slave count(*) +slave 1 +DROP TABLE t; diff --git a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test new file mode 100644 index 00000000000..9e856d24956 --- /dev/null +++ b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test @@ -0,0 +1,47 @@ +--source include/master-slave.inc +--source include/have_binlog_format_statement.inc + +connection master; + --disable_warnings + DROP TABLE IF EXISTS t; + --enable_warnings + CREATE TABLE t(id INT); + sync_slave_with_master; + +connection master; + send INSERT INTO t SELECT SLEEP(10); + +connection slave; + sleep 15; + send STOP SLAVE; + +connection master; + reap; + + --disable_query_log + select "master",count(*) from t; + --enable_query_log + +connection slave1; + --disable_query_log + select "slave",count(*) from t; + --enable_query_log + + --disable_result_log + SHOW SLAVE STATUS NOLOCK; + --enable_result_log + +connection slave; + reap; + + --source include/wait_for_slave_to_stop.inc + START SLAVE; + --source include/wait_for_slave_to_start.inc + + --disable_query_log + select "slave",count(*) from t; + --enable_query_log + +connection master; + DROP TABLE t; +sync_slave_with_master; diff --git a/percona-suite/slow_extended.patch/grep.inc b/percona-suite/slow_extended.patch/grep.inc new file mode 100644 index 00000000000..c9c823fa695 --- /dev/null +++ b/percona-suite/slow_extended.patch/grep.inc @@ -0,0 +1,16 @@ +perl; + + $file = $ENV{'grep_file'}; + $pattern = $ENV{'grep_pattern'}; + + open(FILE, "$file") + or die("Cannot open file $file: $!\n"); + + $lines = 0; + while() { + $lines++ if (/$pattern/); + } + print "$lines\n"; + + close(FILE); +EOF diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-combined-master.opt new file mode 100644 index 00000000000..b6f54503c34 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined-master.opt @@ -0,0 +1 @@ +--use_global_long_query_time --log_slow_verbosity="full" diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined.result b/percona-suite/slow_extended.patch/percona_slow_extended-combined.result new file mode 100644 index 00000000000..d51e0722fa2 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined.result @@ -0,0 +1,18 @@ +show variables like 'use_global_long_query_time'; +Variable_name Value +use_global_long_query_time ON +show variables like 'use_global_log_slow_control'; +Variable_name Value +use_global_log_slow_control long_query_time +show variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +show global variables like 'use_global_long_query_time'; +Variable_name Value +use_global_long_query_time ON +show global variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +show global variables like 'use_global_log_slow_control'; +Variable_name Value +use_global_log_slow_control long_query_time diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined.test b/percona-suite/slow_extended.patch/percona_slow_extended-combined.test new file mode 100644 index 00000000000..9a4d57a3efc --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined.test @@ -0,0 +1,6 @@ +show variables like 'use_global_long_query_time'; +show variables like 'use_global_log_slow_control'; +show variables like 'log_slow_verbosity'; +show global variables like 'use_global_long_query_time'; +show global variables like 'log_slow_verbosity'; +show global variables like 'use_global_log_slow_control'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined2-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-combined2-master.opt new file mode 100644 index 00000000000..267fe17fabe --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined2-master.opt @@ -0,0 +1 @@ +--use_global_log_slow_control="long_query_time" diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined2.result b/percona-suite/slow_extended.patch/percona_slow_extended-combined2.result new file mode 100644 index 00000000000..e66a7dc1968 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined2.result @@ -0,0 +1,12 @@ +show variables like 'use_global_long_query_time'; +Variable_name Value +use_global_long_query_time ON +show variables like 'use_global_log_slow_control'; +Variable_name Value +use_global_log_slow_control long_query_time +show global variables like 'use_global_long_query_time'; +Variable_name Value +use_global_long_query_time ON +show global variables like 'use_global_log_slow_control'; +Variable_name Value +use_global_log_slow_control long_query_time diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-combined2.test b/percona-suite/slow_extended.patch/percona_slow_extended-combined2.test new file mode 100644 index 00000000000..2c79c137844 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-combined2.test @@ -0,0 +1,4 @@ +show variables like 'use_global_long_query_time'; +show variables like 'use_global_log_slow_control'; +show global variables like 'use_global_long_query_time'; +show global variables like 'use_global_log_slow_control'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt index 91dd41305cd..bd62c08c475 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result index 15463408878..f91d1af2fb3 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result @@ -8,5 +8,5 @@ sleep(2) 0 set global use_global_log_slow_control=none; set global log_slow_verbosity=microtime; -cat var/mysqld.1/data/percona_slow_query_log-control_global_slow.log | grep "No InnoDB statistics available for this query" | wc -l +FLUSH LOGS; 1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test index bfe49d09563..bbf90f8ec9b 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.test @@ -5,6 +5,8 @@ set global use_global_log_slow_control="log_slow_verbosity,long_query_time"; SELECT sleep(2); set global use_global_log_slow_control=none; set global log_slow_verbosity=microtime; -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-control_global_slow.log | grep "No InnoDB statistics available for this query" | wc -l; -echo $cmd; -exec $cmd; + +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-control_global_slow.log +--let grep_pattern = No InnoDB statistics available for this query +--source include/grep.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt index cb93f7abf05..660c51a0b7c 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result index 07c90fa05a3..19643db3819 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.result @@ -21,5 +21,5 @@ SELECT sleep(2); sleep(2) 0 drop table if exists t; -cat var/mysqld.1/data/percona_slow_query_log-log_slow_filter.log | grep Query_time | wc -l +FLUSH LOGS; 2 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test index bd903e88050..c9efa2d8a48 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_filter.test @@ -26,6 +26,7 @@ SELECT sleep(2); drop table if exists t; --enable_warnings -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-log_slow_filter.log | grep Query_time | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_filter.log +--let grep_pattern = Query_time +--source include/grep.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt new file mode 100644 index 00000000000..4368453928a --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl-master.opt @@ -0,0 +1 @@ +--log_slow_sp_statements diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result new file mode 100644 index 00000000000..c5653429327 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.result @@ -0,0 +1,3 @@ +show global variables like 'log_slow_sp_statements'; +Variable_name Value +log_slow_sp_statements ON diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test new file mode 100644 index 00000000000..47bd960feb5 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_sp_statements-cl.test @@ -0,0 +1 @@ +show global variables like 'log_slow_sp_statements'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt new file mode 100644 index 00000000000..8595eaf73d2 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt @@ -0,0 +1 @@ +--log_slow_timestamp_every diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result new file mode 100644 index 00000000000..119bc26a743 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result @@ -0,0 +1,3 @@ +show global variables like 'log_slow_timestamp_every'; +Variable_name Value +log_slow_timestamp_every ON diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test new file mode 100644 index 00000000000..f1d058b9ba4 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test @@ -0,0 +1 @@ +show global variables like 'log_slow_timestamp_every'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt new file mode 100644 index 00000000000..d8809c36981 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl-master.opt @@ -0,0 +1 @@ +--log_slow_verbosity="full" diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result new file mode 100644 index 00000000000..eb8228efb08 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.result @@ -0,0 +1,9 @@ +show global variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +show variables like 'log_slow_verbosity'; +Variable_name Value +log_slow_verbosity microtime,query_plan,innodb +select @@log_slow_verbosity; +@@log_slow_verbosity +microtime,query_plan,innodb diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test new file mode 100644 index 00000000000..740c4deaebd --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-cl.test @@ -0,0 +1,3 @@ +show global variables like 'log_slow_verbosity'; +show variables like 'log_slow_verbosity'; +select @@log_slow_verbosity; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt index 8d21f40a34f..19ae9c117f0 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result index 75f842f22a0..1e7db10c8bd 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.result @@ -5,5 +5,5 @@ set log_slow_verbosity=innodb; SELECT sleep(2); sleep(2) 0 -cat var/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log | grep "No InnoDB statistics available for this query" | wc -l +FLUSH LOGS; 1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test index 56d14e33513..4fb854d6de6 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-log_slow_verbosity.test @@ -6,6 +6,7 @@ set log_slow_verbosity=innodb; SELECT sleep(2); -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log | grep "No InnoDB statistics available for this query" | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-log_slow_verbosity.log +--let grep_pattern = No InnoDB statistics available for this query +--source include/grep.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt index 473323e0bd9..8064e04b846 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result index ed934610211..0b72a23dd1b 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.result @@ -18,5 +18,5 @@ SELECT sleep(5); sleep(5) 0 set long_query_time=2; -cat var/mysqld.1/data/percona_slow_query_log-long_query_time.log | grep Query_time | wc -l +FLUSH LOGS; 3 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test index 9954ef4ee40..1d4babd6402 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-long_query_time.test @@ -12,6 +12,8 @@ SELECT sleep(5); set long_query_time=2; -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-long_query_time.log | grep Query_time | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-long_query_time.log +--let grep_pattern = Query_time +--source include/grep.inc + diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt index 6433539d3d1..37a30b1384f 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result index 3cdab58aad0..7eb925618b7 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result @@ -6,7 +6,6 @@ SELECT sleep(2); sleep(2) 0 set global slow_query_log_microseconds_timestamp=OFF; -cat var/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+' | wc -l +FLUSH LOGS; 1 -cat var/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+' | wc -l 2 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test index 18eb6830405..80fa6834150 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.test @@ -8,10 +8,12 @@ SELECT sleep(2); set global slow_query_log_microseconds_timestamp=OFF; -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+' | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log +--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+.[0-9]+ +--source include/grep.inc + +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log +--let grep_pattern = # Time: [0-9]+[ ]+[0-9]+:[0-9]+:[0-9]+ +--source include/grep.inc -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+' | wc -l; -echo $cmd; -exec $cmd; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt index 6f82556fb0c..d3f4e7eeb03 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result index bf5a2131826..5c299bd3e5c 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.result @@ -21,5 +21,5 @@ SELECT sleep(2); sleep(2) 0 drop table if exists t; -cat var/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log | grep Query_time | wc -l +FLUSH LOGS; 2 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test index 83edb1c366f..861a8f17cce 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-min_examined_row_limit.test @@ -26,6 +26,7 @@ SELECT sleep(2); drop table if exists t; --enable_warnings -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log | grep Query_time | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-min_examined_row_limit.log +--let grep_pattern = Query_time +--source include/grep.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result index c2406bdfd85..162c92afbd9 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result @@ -18,4 +18,5 @@ STOP SLAVE; START SLAVE; INSERT INTO t SELECT t.id,t.data from t; DROP TABLE IF EXISTS t; +FLUSH LOGS; 4 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test index 247a7028772..27e34ec71ad 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.test @@ -41,4 +41,8 @@ connection master; DROP TABLE IF EXISTS t; sync_slave_with_master; -exec cat var/mysqld.2/mysqld-slow.log | grep InnoDB_IO_r_ops | wc -l; +connection slave; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.2/mysqld-slow.log +--let grep_pattern = InnoDB_IO_r_ops +--source include/grep.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt index d600400af08..49038530c56 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt index c79e637317b..648f309f744 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1 \ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result index 8aed50caba2..386faf225ec 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result @@ -75,12 +75,14 @@ Variable_name Value use_global_long_query_time ON set global long_query_time=1; set global use_global_long_query_time=0; +FLUSH LOGS; # Analyse master slow_query_log 0 0 0 0 0 +FLUSH LOGS; # Analyse slave slow_query_log 0 0 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test index 6b7d2750e68..b5a6154bbfc 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test @@ -75,26 +75,32 @@ show global variables like 'use_global_long_query_time'; set global long_query_time=1; set global use_global_long_query_time=0; +connection master; +FLUSH LOGS; + -- echo # Analyse master slow_query_log let $i=5; let $k=1; -let $cmd=cat ./var/mysqld.1/data/percona_log_slow_slave_statements-master.log | grep; while($i) { - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; + --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source include/grep.inc dec $i; inc $k; } +connection slave; +FLUSH LOGS; + -- echo # Analyse slave slow_query_log let $i=5; let $k=1; -let $cmd=cat ./var/mysqld.2/data/percona_log_slow_slave_statements-slave.log | grep; while($i) { - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; + --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source include/grep.inc dec $i; inc $k; } diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt index dd94fd90a57..ebf25ddd37d 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0 \ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt index e276b0bcfc8..96cd9004493 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-slave.opt @@ -1 +1 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0 \ No newline at end of file +--slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result index e3bf3e92c94..9f9085ff444 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result @@ -64,6 +64,7 @@ START SLAVE; INSERT INTO t VALUES (7); # Read information about master binlog # Sync slave(7) thread +FLUSH LOGS; # Analyse master slow_query_log 1 1 @@ -72,6 +73,7 @@ INSERT INTO t VALUES (7); 1 1 1 +FLUSH LOGS; # Analyse slave slow_query_log 0 0 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test index bb6e1c5f28a..bce7a5f0530 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test @@ -122,26 +122,32 @@ let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); connection slave; let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; +connection master; +FLUSH LOGS; + -- echo # Analyse master slow_query_log let $i=7; let $k=1; -let $cmd=cat ./var/mysqld.1/data/percona_log_slow_slave_statements-master.log | grep; while($i) { - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; + --let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_log_slow_slave_statements-master.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source include/grep.inc dec $i; inc $k; } +connection slave; +FLUSH LOGS; + -- echo # Analyse slave slow_query_log let $i=7; let $k=1; -let $cmd=cat ./var/mysqld.2/data/percona_log_slow_slave_statements-slave.log | grep; while($i) { - let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l; - exec $current_cmd; + --let grep_file = $MYSQLTEST_VARDIR/mysqld.2/data/percona_log_slow_slave_statements-slave.log + --let grep_pattern = INSERT INTO t VALUES \($k\) + --source include/grep.inc dec $i; inc $k; } diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt new file mode 100644 index 00000000000..597ad08f268 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt @@ -0,0 +1 @@ +--slow_query_log_microseconds_timestamp diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result new file mode 100644 index 00000000000..4f3357f95bb --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result @@ -0,0 +1,3 @@ +show global variables like 'slow_query_log_microseconds_timestamp'; +Variable_name Value +slow_query_log_microseconds_timestamp ON diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test new file mode 100644 index 00000000000..d568f4eb816 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test @@ -0,0 +1 @@ +show global variables like 'slow_query_log_microseconds_timestamp'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt new file mode 100644 index 00000000000..cf93591c365 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt @@ -0,0 +1 @@ +--use_global_long_query_time diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result new file mode 100644 index 00000000000..d554a64bdb4 --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result @@ -0,0 +1,3 @@ +show global variables like 'use_global_long_query_time'; +Variable_name Value +use_global_long_query_time ON diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test new file mode 100644 index 00000000000..662aee24ebe --- /dev/null +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test @@ -0,0 +1 @@ +show global variables like 'use_global_long_query_time'; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt index f2dbf2253f4..5e6a2405b02 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt @@ -1 +1 @@ ---slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --use_global_log_slow_control=long_query_time --use_global_long_query_time=1 \ No newline at end of file +--slow-query-log-file=percona_slow_query_log-use_global_long_query_time.log --long-query-time=2 --use_global_log_slow_control=long_query_time --use_global_long_query_time=1 diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result index e04762db9d1..c0333e4b59b 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result @@ -20,7 +20,7 @@ sleep(5) 0 set global long_query_time=2; set global use_global_long_query_time=0; -cat var/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log | grep Query_time | wc -l +FLUSH LOGS; 3 show global variables like 'use_global_log_slow_control'; Variable_name Value diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test index 3582b13a3e9..a3d74036bfe 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test @@ -14,9 +14,10 @@ SELECT sleep(5); set global long_query_time=2; set global use_global_long_query_time=0; -let $cmd = cat var/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log | grep Query_time | wc -l; -echo $cmd; -exec $cmd; +FLUSH LOGS; +--let grep_file = $MYSQLTEST_VARDIR/mysqld.1/data/percona_slow_query_log-use_global_long_query_time.log +--let grep_pattern = Query_time +--source include/grep.inc show global variables like 'use_global_log_slow_control'; show global variables like 'use_global_long_query_time'; diff --git a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result deleted file mode 100644 index aa1717f9a18..00000000000 --- a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result +++ /dev/null @@ -1,23 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -INSERT INTO t SELECT SLEEP(5); -STOP SLAVE; -select count(*) from t; -count(*) -0 -SHOW SLAVE STATUS NOLOCK; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error - host user port 1 master-bin.000001 276 slave-relay-bin.000003 422 master-bin.000001 No No 0 0 276 577 None 0 No NULL No 0 0 -select count(*) from t; -count(*) -0 -START SLAVE; -Warnings: -Note 1592 Statement may not be safe to log in statement format. -DROP TABLE t; diff --git a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test deleted file mode 100644 index 03531db3b12..00000000000 --- a/percona-suite/slow_extended.patch/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test +++ /dev/null @@ -1,28 +0,0 @@ ---source include/master-slave.inc - -connection master; --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT); -sync_slave_with_master; -connection master; -send INSERT INTO t SELECT SLEEP(5); -sleep 1; -connection slave; -send STOP SLAVE; -connection slave1; -select count(*) from t; -replace_column 2 host 3 user 4 port; -SHOW SLAVE STATUS NOLOCK; -select count(*) from t; - -connection slave; -reap; ---source include/wait_for_slave_to_stop.inc -START SLAVE; ---source include/wait_for_slave_to_start.inc -connection master; -reap; -DROP TABLE t; -sync_slave_with_master; diff --git a/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.result b/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.result new file mode 100644 index 00000000000..bc1413fb96d --- /dev/null +++ b/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.result @@ -0,0 +1,12 @@ +drop table if exists t1; +create table t (a int not null); +insert into t values (1),(2),(3); +SELECT SQL_NO_FCACHE SLEEP(0); +SLEEP(0) +0 +SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t; +a +1 +2 +3 +DROP TABLE t; diff --git a/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.test b/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.test new file mode 100644 index 00000000000..1ed8be2196b --- /dev/null +++ b/percona-suite/sql_no_fcache.patch/percona_sql_no_fcache.test @@ -0,0 +1,11 @@ +--disable_warnings +drop table if exists t1; +--enable_warnings + +create table t (a int not null); +insert into t values (1),(2),(3); + +SELECT SQL_NO_FCACHE SLEEP(0); +SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t; + +DROP TABLE t; diff --git a/plug.in b/plug.in index d5d4fa1d557..4a621361671 100644 --- a/plug.in +++ b/plug.in @@ -138,10 +138,11 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ AC_MSG_CHECKING(whether Solaris libc atomic functions are available) # either define HAVE_IB_SOLARIS_ATOMICS or not - AC_CHECK_FUNCS(atomic_add_long \ + AC_CHECK_FUNCS(atomic_cas_ulong \ atomic_cas_32 \ atomic_cas_64 \ - atomic_cas_ulong, + atomic_add_long_nv \ + atomic_swap_uchar, AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], [Define to 1 if Solaris libc atomic functions \ diff --git a/row/row0ins.c b/row/row0ins.c index d4925e46f97..3372e1480b5 100644 --- a/row/row0ins.c +++ b/row/row0ins.c @@ -1787,7 +1787,7 @@ ulint row_ins_duplicate_error_in_clust( /*=============================*/ btr_cur_t* cursor, /*!< in: B-tree cursor */ - dtuple_t* entry, /*!< in: entry to insert */ + const dtuple_t* entry, /*!< in: entry to insert */ que_thr_t* thr, /*!< in: query thread */ mtr_t* mtr) /*!< in: mtr */ { @@ -1983,7 +1983,7 @@ row_ins_index_entry_low( depending on whether we wish optimistic or pessimistic descent down the index tree */ dict_index_t* index, /*!< in: index */ - dtuple_t* entry, /*!< in: index entry to insert */ + dtuple_t* entry, /*!< in/out: index entry to insert */ ulint n_ext, /*!< in: number of externally stored columns */ que_thr_t* thr) /*!< in: query thread */ { @@ -2164,9 +2164,10 @@ ulint row_ins_index_entry( /*================*/ dict_index_t* index, /*!< in: index */ - dtuple_t* entry, /*!< in: index entry to insert */ + dtuple_t* entry, /*!< in/out: index entry to insert */ ulint n_ext, /*!< in: number of externally stored columns */ - ibool foreign,/*!< in: TRUE=check foreign key constraints */ + ibool foreign,/*!< in: TRUE=check foreign key constraints + (foreign=FALSE only during CREATE INDEX) */ que_thr_t* thr) /*!< in: query thread */ { ulint err; diff --git a/row/row0merge.c b/row/row0merge.c index 65102851bdf..402a168f5dd 100644 --- a/row/row0merge.c +++ b/row/row0merge.c @@ -2052,7 +2052,7 @@ row_merge_drop_index( /* Replace this index with another equivalent index for all foreign key constraints on this table where this index is used */ - dict_table_replace_index_in_foreign_list(table, index); + dict_table_replace_index_in_foreign_list(table, index, trx); dict_index_remove_from_cache(table, index); trx->op_info = ""; diff --git a/row/row0mysql.c b/row/row0mysql.c index 16d3f6ae5b1..4639dd4aaf7 100644 --- a/row/row0mysql.c +++ b/row/row0mysql.c @@ -444,7 +444,7 @@ row_mysql_convert_row_to_innobase( row is used, as row may contain pointers to this record! */ { - mysql_row_templ_t* templ; + const mysql_row_templ_t*templ; dfield_t* dfield; ulint i; @@ -874,7 +874,8 @@ row_update_statistics_if_needed( if (counter > 2000000000 || ((ib_int64_t)counter > 16 + table->stat_n_rows / 16)) { - dict_update_statistics(table, TRUE); + dict_update_statistics(table, FALSE /* update even if stats + are initialized */, TRUE); } } @@ -1889,15 +1890,13 @@ err_exit: err = trx->error_state; - if (UNIV_UNLIKELY(err != DB_SUCCESS)) { + switch (err) { + case DB_SUCCESS: + break; + case DB_OUT_OF_FILE_SPACE: trx->error_state = DB_SUCCESS; trx_general_rollback_for_mysql(trx, NULL); - /* TO DO: free table? The code below will dereference - table->name, though. */ - } - switch (err) { - case DB_OUT_OF_FILE_SPACE: ut_print_timestamp(stderr); fputs(" InnoDB: Warning: cannot create table ", stderr); @@ -1912,9 +1911,13 @@ err_exit: break; case DB_DUPLICATE_KEY: + default: /* We may also get err == DB_ERROR if the .ibd file for the table already exists */ + trx->error_state = DB_SUCCESS; + trx_general_rollback_for_mysql(trx, NULL); + dict_mem_table_free(table); break; } @@ -2829,15 +2832,6 @@ row_truncate_table_for_mysql( trx->table_id = table->id; - /* Lock all index trees for this table, as we will - truncate the table/index and possibly change their metadata. - All DML/DDL are blocked by table level lock, with - a few exceptions such as queries into information schema - about the table, MySQL could try to access index stats - for this kind of query, we need to use index locks to - sync up */ - dict_table_x_lock_indexes(table); - if (table->space && !table->dir_path_of_temp_table) { /* Discard and create the single-table tablespace. */ ulint space = table->space; @@ -2850,6 +2844,11 @@ row_truncate_table_for_mysql( dict_hdr_get_new_id(NULL, NULL, &space); + /* Lock all index trees for this table. We must + do so after dict_hdr_get_new_id() to preserve + the latch order */ + dict_table_x_lock_indexes(table); + if (space == ULINT_UNDEFINED || fil_create_new_single_table_tablespace( space, table->name, FALSE, flags, @@ -2883,6 +2882,15 @@ row_truncate_table_for_mysql( FIL_IBD_FILE_INITIAL_SIZE, &mtr); mtr_commit(&mtr); } + } else { + /* Lock all index trees for this table, as we will + truncate the table/index and possibly change their metadata. + All DML/DDL are blocked by table level lock, with + a few exceptions such as queries into information schema + about the table, MySQL could try to access index stats + for this kind of query, we need to use index locks to + sync up */ + dict_table_x_lock_indexes(table); } /* scan SYS_INDEXES for all indexes of the table */ @@ -3006,7 +3014,8 @@ next_rec: dict_table_autoinc_lock(table); dict_table_autoinc_initialize(table, 1); dict_table_autoinc_unlock(table); - dict_update_statistics(table, TRUE); + dict_update_statistics(table, FALSE /* update even if stats are + initialized */, TRUE); trx_commit_for_mysql(trx); diff --git a/row/row0sel.c b/row/row0sel.c index 86bd663d89d..d8fc99bd9fc 100644 --- a/row/row0sel.c +++ b/row/row0sel.c @@ -106,6 +106,18 @@ row_sel_sec_rec_is_for_blob( ulint len; byte buf[DICT_MAX_INDEX_COL_LEN]; + ut_a(clust_len >= BTR_EXTERN_FIELD_REF_SIZE); + + if (UNIV_UNLIKELY + (!memcmp(clust_field + clust_len - BTR_EXTERN_FIELD_REF_SIZE, + field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE))) { + /* The externally stored field was not written yet. + This record should only be seen by + recv_recovery_rollback_active() or any + TRX_ISO_READ_UNCOMMITTED transactions. */ + return(FALSE); + } + len = btr_copy_externally_stored_field_prefix(buf, sizeof buf, zip_size, clust_field, clust_len); @@ -2675,39 +2687,39 @@ row_sel_store_mysql_rec( row_prebuilt_t* prebuilt, /*!< in: prebuilt struct */ const rec_t* rec, /*!< in: Innobase record in the index which was described in prebuilt's - template; must be protected by - a page latch */ + template, or in the clustered index; + must be protected by a page latch */ + ibool rec_clust, /*!< in: TRUE if rec is in the + clustered index instead of + prebuilt->index */ const ulint* offsets) /*!< in: array returned by - rec_get_offsets() */ + rec_get_offsets(rec) */ { - mysql_row_templ_t* templ; - mem_heap_t* extern_field_heap = NULL; - mem_heap_t* heap; - const byte* data; - ulint len; - ulint i; + mem_heap_t* extern_field_heap = NULL; + mem_heap_t* heap; + ulint i; ut_ad(prebuilt->mysql_template); ut_ad(prebuilt->default_rec); ut_ad(rec_offs_validate(rec, NULL, offsets)); + ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); if (UNIV_LIKELY_NULL(prebuilt->blob_heap)) { mem_heap_free(prebuilt->blob_heap); prebuilt->blob_heap = NULL; } - /* init null bytes with default values as they might be - left uninitialized in some cases and these uninited bytes - might be copied into mysql record buffer that leads to - valgrind warnings */ - memcpy(mysql_rec, prebuilt->default_rec, prebuilt->null_bitmap_len); - for (i = 0; i < prebuilt->n_template; i++) { - templ = prebuilt->mysql_template + i; + const mysql_row_templ_t*templ = prebuilt->mysql_template + i; + const byte* data; + ulint len; + ulint field_no; - if (UNIV_UNLIKELY(rec_offs_nth_extern(offsets, - templ->rec_field_no))) { + field_no = rec_clust + ? templ->clust_rec_field_no : templ->rec_field_no; + + if (UNIV_UNLIKELY(rec_offs_nth_extern(offsets, field_no))) { /* Copy an externally stored field to the temporary heap */ @@ -2735,7 +2747,7 @@ row_sel_store_mysql_rec( data = btr_rec_copy_externally_stored_field( rec, offsets, dict_table_zip_size(prebuilt->table), - templ->rec_field_no, &len, heap); + field_no, &len, heap); if (UNIV_UNLIKELY(!data)) { /* The externally stored field @@ -2756,8 +2768,7 @@ row_sel_store_mysql_rec( } else { /* Field is stored in the row. */ - data = rec_get_nth_field(rec, offsets, - templ->rec_field_no, &len); + data = rec_get_nth_field(rec, offsets, field_no, &len); if (UNIV_UNLIKELY(templ->type == DATA_BLOB) && len != UNIV_SQL_NULL) { @@ -3119,7 +3130,7 @@ row_sel_pop_cached_row_for_mysql( row_prebuilt_t* prebuilt) /*!< in: prebuilt struct */ { ulint i; - mysql_row_templ_t* templ; + const mysql_row_templ_t*templ; byte* cached_rec; ut_ad(prebuilt->n_fetch_cached > 0); ut_ad(prebuilt->mysql_prefix_len <= prebuilt->mysql_row_len); @@ -3176,15 +3187,21 @@ ibool row_sel_push_cache_row_for_mysql( /*=============================*/ row_prebuilt_t* prebuilt, /*!< in: prebuilt struct */ - const rec_t* rec, /*!< in: record to push; must - be protected by a page latch */ - const ulint* offsets) /*!< in: rec_get_offsets() */ + const rec_t* rec, /*!< in: record to push, in the index + which was described in prebuilt's + template, or in the clustered index; + must be protected by a page latch */ + ibool rec_clust, /*!< in: TRUE if rec is in the + clustered index instead of + prebuilt->index */ + const ulint* offsets) /*!< in: rec_get_offsets(rec) */ { byte* buf; ulint i; ut_ad(prebuilt->n_fetch_cached < MYSQL_FETCH_CACHE_SIZE); ut_ad(rec_offs_validate(rec, NULL, offsets)); + ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); ut_a(!prebuilt->templ_contains_blob); if (prebuilt->fetch_cache[0] == NULL) { @@ -3213,7 +3230,7 @@ row_sel_push_cache_row_for_mysql( if (UNIV_UNLIKELY(!row_sel_store_mysql_rec( prebuilt->fetch_cache[ prebuilt->n_fetch_cached], - prebuilt, rec, offsets))) { + prebuilt, rec, rec_clust, offsets))) { return(FALSE); } @@ -3615,7 +3632,8 @@ row_search_for_mysql( ut_ad(!rec_get_deleted_flag(rec, comp)); if (!row_sel_store_mysql_rec(buf, prebuilt, - rec, offsets)) { + rec, FALSE, + offsets)) { /* Only fresh inserts may contain incomplete externally stored columns. Pretend that such @@ -4273,7 +4291,6 @@ no_gap_lock: is necessary, because we can only get the undo information via the clustered index record. */ - ut_ad(index != clust_index); ut_ad(!dict_index_is_clust(index)); if (!lock_sec_rec_cons_read_sees( @@ -4389,26 +4406,10 @@ requires_clust_rec: goto next_rec; } - if (prebuilt->need_to_access_clustered) { - - result_rec = clust_rec; - - ut_ad(rec_offs_validate(result_rec, clust_index, - offsets)); - } else { - /* We used 'offsets' for the clust rec, recalculate - them for 'rec' */ - offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); - result_rec = rec; - } - - /* result_rec can legitimately be delete-marked - now that it has been established that it points to a - clustered index record that exists in the read view. */ + result_rec = clust_rec; + ut_ad(rec_offs_validate(result_rec, clust_index, offsets)); } else { result_rec = rec; - ut_ad(!rec_get_deleted_flag(rec, comp)); } /* We found a qualifying record 'result_rec'. At this point, @@ -4417,6 +4418,7 @@ requires_clust_rec: ut_ad(rec_offs_validate(result_rec, result_rec != rec ? clust_index : index, offsets)); + ut_ad(!rec_get_deleted_flag(result_rec, comp)); /* At this point, the clustered index record is protected by a page latch that was acquired when pcur was positioned. @@ -4441,6 +4443,7 @@ requires_clust_rec: cursor. */ if (!row_sel_push_cache_row_for_mysql(prebuilt, result_rec, + result_rec != rec, offsets)) { /* Only fresh inserts may contain incomplete externally stored columns. Pretend that such @@ -4458,15 +4461,31 @@ requires_clust_rec: goto next_rec; } else { - if (prebuilt->template_type == ROW_MYSQL_DUMMY_TEMPLATE) { + if (UNIV_UNLIKELY + (prebuilt->template_type == ROW_MYSQL_DUMMY_TEMPLATE)) { + /* CHECK TABLE: fetch the row */ + + if (result_rec != rec + && !prebuilt->need_to_access_clustered) { + /* We used 'offsets' for the clust + rec, recalculate them for 'rec' */ + offsets = rec_get_offsets(rec, index, offsets, + ULINT_UNDEFINED, + &heap); + result_rec = rec; + } + memcpy(buf + 4, result_rec - rec_offs_extra_size(offsets), rec_offs_size(offsets)); mach_write_to_4(buf, rec_offs_extra_size(offsets) + 4); } else { - if (!row_sel_store_mysql_rec(buf, prebuilt, - result_rec, offsets)) { + /* Returning a row to MySQL */ + + if (!row_sel_store_mysql_rec(buf, prebuilt, result_rec, + result_rec != rec, + offsets)) { /* Only fresh inserts may contain incomplete externally stored columns. Pretend that such records do diff --git a/row/row0upd.c b/row/row0upd.c index 04c3139fcc7..0dc550b93f5 100644 --- a/row/row0upd.c +++ b/row/row0upd.c @@ -371,8 +371,8 @@ UNIV_INTERN void row_upd_index_entry_sys_field( /*==========================*/ - const dtuple_t* entry, /*!< in: index entry, where the memory buffers - for sys fields are already allocated: + dtuple_t* entry, /*!< in/out: index entry, where the memory + buffers for sys fields are already allocated: the function just copies the new values to them */ dict_index_t* index, /*!< in: clustered index */ @@ -466,8 +466,11 @@ row_upd_changes_field_size_or_external( #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** -Replaces the new column values stored in the update vector to the record -given. No field size changes are allowed. */ +Replaces the new column values stored in the update vector to the +record given. No field size changes are allowed. This function is +usually invoked on a clustered index. The only use case for a +secondary index is row_ins_sec_index_entry_by_modify() or its +counterpart in ibuf_insert_to_index_page(). */ UNIV_INTERN void row_upd_rec_in_place( @@ -1584,12 +1587,12 @@ static ulint row_upd_clust_rec_by_insert( /*========================*/ - upd_node_t* node, /*!< in: row update node */ + upd_node_t* node, /*!< in/out: row update node */ dict_index_t* index, /*!< in: clustered index of the record */ que_thr_t* thr, /*!< in: query thread */ ibool check_ref,/*!< in: TRUE if index may be referenced in a foreign key constraint */ - mtr_t* mtr) /*!< in: mtr; gets committed here */ + mtr_t* mtr) /*!< in/out: mtr; gets committed here */ { mem_heap_t* heap = NULL; btr_pcur_t* pcur; diff --git a/srv/srv0srv.c b/srv/srv0srv.c index 6b6a56cf36a..0a84d91e9af 100644 --- a/srv/srv0srv.c +++ b/srv/srv0srv.c @@ -211,6 +211,11 @@ UNIV_INTERN ulint srv_buf_pool_curr_size = 0; UNIV_INTERN ulint srv_mem_pool_size = ULINT_MAX; UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX; +/* key value for shm */ +UNIV_INTERN uint srv_buffer_pool_shm_key = 0; +UNIV_INTERN ibool srv_buffer_pool_shm_is_reused = FALSE; +UNIV_INTERN ibool srv_buffer_pool_shm_checksum = TRUE; + /* This parameter is deprecated. Use srv_n_io_[read|write]_threads instead. */ UNIV_INTERN ulint srv_n_file_io_threads = ULINT_MAX; @@ -221,6 +226,9 @@ UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX; UNIV_INTERN ulint srv_page_size_shift = 0; UNIV_INTERN ulint srv_page_size = 0; +/* The log block size */ +UNIV_INTERN ulint srv_log_block_size = 0; + /* User settable value of the number of pages that must be present in the buffer cache and accessed sequentially for InnoDB to trigger a readahead request. */ @@ -699,6 +707,8 @@ UNIV_INTERN srv_slot_t* srv_mysql_table = NULL; UNIV_INTERN os_event_t srv_lock_timeout_thread_event; +UNIV_INTERN os_event_t srv_shutdown_event; + UNIV_INTERN srv_sys_t* srv_sys = NULL; /* padding to prevent other memory update hotspots from residing on @@ -1004,6 +1014,7 @@ srv_init(void) } srv_lock_timeout_thread_event = os_event_create(NULL); + srv_shutdown_event = os_event_create(NULL); for (i = 0; i < SRV_MASTER + 1; i++) { srv_n_threads_active[i] = 0; @@ -2231,7 +2242,7 @@ loop: /* Wake up every 5 seconds to see if we need to print monitor information. */ - os_thread_sleep(5000000); + os_event_wait_time(srv_shutdown_event, 5000000); current_time = time(NULL); @@ -2373,7 +2384,7 @@ loop: /* When someone is waiting for a lock, we wake up every second and check if a timeout has passed for a lock wait */ - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, 1000000); srv_lock_timeout_active = TRUE; @@ -2538,7 +2549,7 @@ loop: fflush(stderr); - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, 1000000); if (srv_shutdown_state < SRV_SHUTDOWN_CLEANUP) { @@ -2582,7 +2593,7 @@ srv_LRU_dump_restore_thread( last_dump_time = time(NULL); loop: - os_thread_sleep(5000000); + os_event_wait_time(srv_shutdown_event, 5000000); if (srv_shutdown_state >= SRV_SHUTDOWN_CLEANUP) { goto exit_func; @@ -2680,15 +2691,26 @@ srv_master_thread( ulint n_pages_purged = 0; ulint n_bytes_merged; ulint n_pages_flushed; + ulint n_pages_flushed_prev = 0; ulint n_bytes_archived; ulint n_tables_to_drop; ulint n_ios; ulint n_ios_old; ulint n_ios_very_old; ulint n_pend_ios; + ulint next_itr_time; + ulint prev_adaptive_checkpoint = ULINT_UNDEFINED; + ulint inner_loop = 0; ibool skip_sleep = FALSE; ulint i; + struct t_prev_flush_info_struct { + ulint count; + unsigned space:32; + unsigned offset:32; + ib_uint64_t oldest_modification; + } prev_flush_info; + ib_uint64_t lsn_old; ib_uint64_t oldest_lsn; @@ -2738,15 +2760,20 @@ loop: srv_last_log_flush_time = time(NULL); skip_sleep = FALSE; + next_itr_time = ut_time_ms() + 1000; + for (i = 0; i < 10; i++) { + ulint cur_time = ut_time_ms(); + n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read + buf_pool->stat.n_pages_written; srv_main_thread_op_info = "sleeping"; srv_main_1_second_loops++; if (!skip_sleep) { + if (next_itr_time > cur_time) { - os_thread_sleep(1000000); + os_event_wait_time(srv_shutdown_event, ut_min(1000000, (next_itr_time - cur_time) * 1000)); srv_main_sleeps++; /* @@ -2763,6 +2790,10 @@ loop: */ } + /* Each iteration should happen at 1 second interval. */ + next_itr_time = ut_time_ms() + 1000; + } + skip_sleep = FALSE; /* ALTER TABLE in MySQL requires on Unix that the table handler @@ -2825,6 +2856,7 @@ loop: mutex_enter(&(log_sys->mutex)); lsn_old = log_sys->lsn; mutex_exit(&(log_sys->mutex)); + prev_adaptive_checkpoint = ULINT_UNDEFINED; } else if (srv_adaptive_flushing) { /* Try to keep the rate of flushing of dirty @@ -2850,6 +2882,7 @@ loop: mutex_enter(&(log_sys->mutex)); lsn_old = log_sys->lsn; mutex_exit(&(log_sys->mutex)); + prev_adaptive_checkpoint = ULINT_UNDEFINED; } else if (srv_adaptive_checkpoint == 1) { /* adaptive_flushing option is prior to adaptive_checkpoint option, for now */ @@ -2893,6 +2926,7 @@ loop: mutex_exit(&(log_sys->mutex)); } } + prev_adaptive_checkpoint = 1; } else if (srv_adaptive_checkpoint == 2) { /* Try to keep modified age not to exceed @@ -2975,11 +3009,124 @@ retry_flush_batch: mutex_exit(&(log_sys->mutex)); } } + prev_adaptive_checkpoint = 2; + } else if (srv_adaptive_checkpoint == 3) { + buf_page_t* bpage; + ib_uint64_t lsn; + mutex_enter(&(log_sys->mutex)); + oldest_lsn = buf_pool_get_oldest_modification(); + lsn = log_sys->lsn; + mutex_exit(&(log_sys->mutex)); + + /* upper loop/sec. (x10) */ + next_itr_time -= 900; /* 1000 - 900 == 100 */ + inner_loop++; + if (inner_loop < 10) { + i--; + } else { + inner_loop = 0; + } + + if (prev_adaptive_checkpoint == 3) { + lint n_flush; + lint blocks_sum, new_blocks_sum, flushed_blocks_sum; + + blocks_sum = new_blocks_sum = flushed_blocks_sum = 0; + + /* prev_flush_info should be the previous loop's */ + { + lint blocks_num, new_blocks_num, flushed_blocks_num; + ibool found; + + blocks_num = UT_LIST_GET_LEN(buf_pool->flush_list); + bpage = UT_LIST_GET_FIRST(buf_pool->flush_list); + new_blocks_num = 0; + + found = FALSE; + while (bpage != NULL) { + if (prev_flush_info.space == bpage->space + && prev_flush_info.offset == bpage->offset + && prev_flush_info.oldest_modification + == bpage->oldest_modification) { + found = TRUE; + break; + } + bpage = UT_LIST_GET_NEXT(flush_list, bpage); + new_blocks_num++; + } + if (!found) { + new_blocks_num = blocks_num; + } + + flushed_blocks_num = new_blocks_num + prev_flush_info.count + - blocks_num; + if (flushed_blocks_num < 0) { + flushed_blocks_num = 0; + } + + bpage = UT_LIST_GET_FIRST(buf_pool->flush_list); + + prev_flush_info.count = UT_LIST_GET_LEN(buf_pool->flush_list); + if (bpage) { + prev_flush_info.space = bpage->space; + prev_flush_info.offset = bpage->offset; + prev_flush_info.oldest_modification = bpage->oldest_modification; + } else { + prev_flush_info.space = 0; + prev_flush_info.offset = 0; + prev_flush_info.oldest_modification = 0; + } + + new_blocks_sum += new_blocks_num; + flushed_blocks_sum += flushed_blocks_num; + blocks_sum += blocks_num; + } + + n_flush = blocks_sum * (lsn - lsn_old) / log_sys->max_modified_age_async; + if (flushed_blocks_sum > n_pages_flushed_prev) { + n_flush -= (flushed_blocks_sum - n_pages_flushed_prev); + } + + if (n_flush > 0) { + n_flush++; + n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, n_flush, + oldest_lsn + (lsn - lsn_old)); + } else { + n_pages_flushed = 0; + } + } else { + /* store previous first pages of the flush_list */ + { + bpage = UT_LIST_GET_FIRST(buf_pool->flush_list); + + prev_flush_info.count = UT_LIST_GET_LEN(buf_pool->flush_list); + if (bpage) { + prev_flush_info.space = bpage->space; + prev_flush_info.offset = bpage->offset; + prev_flush_info.oldest_modification = bpage->oldest_modification; + } else { + prev_flush_info.space = 0; + prev_flush_info.offset = 0; + prev_flush_info.oldest_modification = 0; + } + } + n_pages_flushed = 0; + } + + lsn_old = lsn; + prev_adaptive_checkpoint = 3; } else { mutex_enter(&(log_sys->mutex)); lsn_old = log_sys->lsn; mutex_exit(&(log_sys->mutex)); + prev_adaptive_checkpoint = ULINT_UNDEFINED; + } + + if (n_pages_flushed == ULINT_UNDEFINED) { + n_pages_flushed_prev = 0; + } else { + n_pages_flushed_prev = n_pages_flushed; } if (srv_activity_count == old_activity_count) { @@ -3332,9 +3479,10 @@ loop: mutex_exit(&kernel_mutex); sleep_ms = 10; + os_event_reset(srv_shutdown_event); } - os_thread_sleep( sleep_ms * 1000 ); + os_event_wait_time(srv_shutdown_event, sleep_ms * 1000); history_len = trx_sys->rseg_history_len; if (history_len > 1000) diff --git a/srv/srv0start.c b/srv/srv0start.c index efc7032aafe..cef045d72e1 100644 --- a/srv/srv0start.c +++ b/srv/srv0start.c @@ -463,7 +463,6 @@ io_handler_thread( the aio array */ { ulint segment; - ulint i; segment = *((ulint*)arg); @@ -471,7 +470,7 @@ io_handler_thread( fprintf(stderr, "Io handler thread %lu starts, id %lu\n", segment, os_thread_pf(os_thread_get_curr_id())); #endif - for (i = 0;; i++) { + while (srv_shutdown_state != SRV_SHUTDOWN_EXIT_THREADS) { fil_aio_wait(segment); mutex_enter(&ios_mutex); @@ -479,8 +478,6 @@ io_handler_thread( mutex_exit(&ios_mutex); } - thr_local_free(os_thread_get_curr_id()); - /* We count the number of threads in os_thread_exit(). A created thread should always use that to exit and not use return() to exit. The thread actually never comes here because it is exited in an @@ -1442,8 +1439,25 @@ innobase_start_or_create_for_mysql(void) fil_init(srv_file_per_table ? 50000 : 5000, srv_max_n_open_files); + /* Print time to initialize the buffer pool */ + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Initializing buffer pool, size ="); + + if (srv_buf_pool_size >= 1024 * 1024 * 1024) { + fprintf(stderr, + " %.1fG\n", + ((double) srv_buf_pool_size) / (1024 * 1024 * 1024)); + } else { + fprintf(stderr, + " %.1fM\n", + ((double) srv_buf_pool_size) / (1024 * 1024)); + } + ret = buf_pool_init(); + ut_print_timestamp(stderr); + if (ret == NULL) { fprintf(stderr, "InnoDB: Fatal error: cannot allocate the memory" @@ -1452,6 +1466,9 @@ innobase_start_or_create_for_mysql(void) return(DB_ERROR); } + fprintf(stderr, + " InnoDB: Completed initialization of buffer pool\n"); + #ifdef UNIV_DEBUG /* We have observed deadlocks with a 5MB buffer pool but the actual lower limit could very well be a little higher. */ @@ -1642,14 +1659,6 @@ innobase_start_or_create_for_mysql(void) trx_sys_file_format_init(); - if (create_new_doublewrite_file) { - mtr_start(&mtr); - fsp_header_init(TRX_DOUBLEWRITE_SPACE, TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 9, &mtr); - mtr_commit(&mtr); - - trx_sys_dummy_create(TRX_DOUBLEWRITE_SPACE); - } - if (create_new_db) { mtr_start(&mtr); fsp_header_init(0, sum_of_new_sizes, &mtr); @@ -1657,6 +1666,15 @@ innobase_start_or_create_for_mysql(void) mtr_commit(&mtr); trx_sys_create(); + + if (create_new_doublewrite_file) { + mtr_start(&mtr); + fsp_header_init(TRX_DOUBLEWRITE_SPACE, TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 9, &mtr); + mtr_commit(&mtr); + + trx_sys_dummy_create(TRX_DOUBLEWRITE_SPACE); + } + dict_create(); srv_startup_is_before_trx_rollback_phase = FALSE; @@ -1694,6 +1712,13 @@ innobase_start_or_create_for_mysql(void) recv_recovery_from_archive_finish(); #endif /* UNIV_LOG_ARCHIVE */ } else { + char* save_srv_doublewrite_file = NULL; + + if (create_new_doublewrite_file) { + /* doublewrite_file cannot be used for recovery yet. */ + save_srv_doublewrite_file = srv_doublewrite_file; + srv_doublewrite_file = NULL; + } /* Check if we support the max format that is stamped on the system tablespace. @@ -1719,6 +1744,8 @@ innobase_start_or_create_for_mysql(void) Note that this is not as heavy weight as it seems. At this point there will be only ONE page in the buf_LRU and there must be no page in the buf_flush list. */ + /* buffer_pool_shm should not be reused when recovery was needed. */ + if (!srv_buffer_pool_shm_is_reused) buf_pool_invalidate(); /* We always try to do a recovery, even if the database had @@ -1780,6 +1807,17 @@ innobase_start_or_create_for_mysql(void) we have finished the recovery process so that the image of TRX_SYS_PAGE_NO is not stale. */ trx_sys_file_format_tag_init(); + + if (create_new_doublewrite_file) { + /* restore the value */ + srv_doublewrite_file = save_srv_doublewrite_file; + + mtr_start(&mtr); + fsp_header_init(TRX_DOUBLEWRITE_SPACE, TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 9, &mtr); + mtr_commit(&mtr); + + trx_sys_dummy_create(TRX_DOUBLEWRITE_SPACE); + } } if (!create_new_db && sum_of_new_sizes > 0) { @@ -2091,7 +2129,7 @@ innobase_shutdown_for_mysql(void) #ifdef __NETWARE__ if (!panic_shutdown) #endif - logs_empty_and_mark_files_at_shutdown(); + logs_empty_and_mark_files_at_shutdown(); if (srv_conc_n_threads != 0) { fprintf(stderr, diff --git a/sync/sync0rw.c b/sync/sync0rw.c index 9e10f6e943b..21e4b6b03bf 100644 --- a/sync/sync0rw.c +++ b/sync/sync0rw.c @@ -335,10 +335,13 @@ rw_lock_validate( /*=============*/ rw_lock_t* lock) /*!< in: rw-lock */ { + ulint waiters; + lint lock_word; + ut_a(lock); - ulint waiters = rw_lock_get_waiters(lock); - lint lock_word = lock->lock_word; + waiters = rw_lock_get_waiters(lock); + lock_word = lock->lock_word; ut_ad(lock->magic_n == RW_LOCK_MAGIC_N); ut_a(waiters == 0 || waiters == 1); @@ -987,7 +990,7 @@ rw_lock_debug_print( rwt = info->lock_type; - fprintf(stderr, "Locked: thread %ld file %s line %ld ", + fprintf(stderr, "Locked: thread %lu file %s line %lu ", (ulong) os_thread_pf(info->thread_id), info->file_name, (ulong) info->line); if (rwt == RW_LOCK_SHARED) { diff --git a/thr/thr0loc.c b/thr/thr0loc.c index 5b9e83be920..e702b37afb4 100644 --- a/thr/thr0loc.c +++ b/thr/thr0loc.c @@ -72,6 +72,24 @@ struct thr_local_struct{ /** The value of thr_local_struct::magic_n */ #define THR_LOCAL_MAGIC_N 1231234 +#ifdef UNIV_DEBUG +/*******************************************************************//** +Validates thread local data. +@return TRUE if valid */ +static +ibool +thr_local_validate( +/*===============*/ + const thr_local_t* local) /*!< in: data to validate */ +{ + ut_ad(local->magic_n == THR_LOCAL_MAGIC_N); + ut_ad(local->slot_no == ULINT_UNDEFINED + || local->slot_no < OS_THREAD_MAX_N); + ut_ad(local->in_ibuf == FALSE || local->in_ibuf == TRUE); + return(TRUE); +} +#endif /* UNIV_DEBUG */ + /*******************************************************************//** Returns the local storage struct for a thread. @return local storage */ @@ -92,7 +110,8 @@ try_again: local = NULL; HASH_SEARCH(hash, thr_local_hash, os_thread_pf(id), - thr_local_t*, local,, os_thread_eq(local->id, id)); + thr_local_t*, local, ut_ad(thr_local_validate(local)), + os_thread_eq(local->id, id)); if (local == NULL) { mutex_exit(&thr_local_mutex); @@ -103,7 +122,7 @@ try_again: goto try_again; } - ut_ad(local->magic_n == THR_LOCAL_MAGIC_N); + ut_ad(thr_local_validate(local)); return(local); } @@ -189,7 +208,7 @@ thr_local_create(void) local->id = os_thread_get_curr_id(); local->handle = os_thread_get_curr(); local->magic_n = THR_LOCAL_MAGIC_N; - + local->slot_no = ULINT_UNDEFINED; local->in_ibuf = FALSE; mutex_enter(&thr_local_mutex); @@ -217,7 +236,8 @@ thr_local_free( /* Look for the local struct in the hash table */ HASH_SEARCH(hash, thr_local_hash, os_thread_pf(id), - thr_local_t*, local,, os_thread_eq(local->id, id)); + thr_local_t*, local, ut_ad(thr_local_validate(local)), + os_thread_eq(local->id, id)); if (local == NULL) { mutex_exit(&thr_local_mutex); @@ -231,6 +251,7 @@ thr_local_free( mutex_exit(&thr_local_mutex); ut_a(local->magic_n == THR_LOCAL_MAGIC_N); + ut_ad(thr_local_validate(local)); mem_free(local); } @@ -273,6 +294,7 @@ thr_local_close(void) local = HASH_GET_NEXT(hash, prev_local); ut_a(prev_local->magic_n == THR_LOCAL_MAGIC_N); + ut_ad(thr_local_validate(prev_local)); mem_free(prev_local); } } diff --git a/trx/trx0i_s.c b/trx/trx0i_s.c index 5bc8302d0c0..c11ebb6397e 100644 --- a/trx/trx0i_s.c +++ b/trx/trx0i_s.c @@ -157,10 +157,6 @@ struct trx_i_s_cache_struct { ullint last_read; /*!< last time the cache was read; measured in microseconds since epoch */ - mutex_t last_read_mutex;/*!< mutex protecting the - last_read member - it is updated - inside a shared lock of the - rw_lock member */ i_s_table_cache_t innodb_trx; /*!< innodb_trx table */ i_s_table_cache_t innodb_locks; /*!< innodb_locks table */ i_s_table_cache_t innodb_lock_waits;/*!< innodb_lock_waits table */ @@ -408,6 +404,42 @@ table_cache_create_empty_row( return(row); } +#ifdef UNIV_DEBUG +/*******************************************************************//** +Validates a row in the locks cache. +@return TRUE if valid */ +static +ibool +i_s_locks_row_validate( +/*===================*/ + const i_s_locks_row_t* row) /*!< in: row to validate */ +{ + ut_ad(row->lock_trx_id != 0); + ut_ad(row->lock_mode != NULL); + ut_ad(row->lock_type != NULL); + ut_ad(row->lock_table != NULL); + ut_ad(row->lock_table_id != 0); + + if (row->lock_space == ULINT_UNDEFINED) { + /* table lock */ + ut_ad(!strcmp("TABLE", row->lock_type)); + ut_ad(row->lock_index == NULL); + ut_ad(row->lock_data == NULL); + ut_ad(row->lock_page == ULINT_UNDEFINED); + ut_ad(row->lock_rec == ULINT_UNDEFINED); + } else { + /* record lock */ + ut_ad(!strcmp("RECORD", row->lock_type)); + ut_ad(row->lock_index != NULL); + ut_ad(row->lock_data != NULL); + ut_ad(row->lock_page != ULINT_UNDEFINED); + ut_ad(row->lock_rec != ULINT_UNDEFINED); + } + + return(TRUE); +} +#endif /* UNIV_DEBUG */ + /*******************************************************************//** Fills i_s_trx_row_t object. If memory can not be allocated then FALSE is returned. @@ -435,18 +467,15 @@ fill_trx_row( row->trx_id = trx_get_id(trx); row->trx_started = (ib_time_t) trx->start_time; row->trx_state = trx_get_que_state_str(trx); + row->requested_lock_row = requested_lock_row; + ut_ad(requested_lock_row == NULL + || i_s_locks_row_validate(requested_lock_row)); if (trx->wait_lock != NULL) { - ut_a(requested_lock_row != NULL); - - row->requested_lock_row = requested_lock_row; row->trx_wait_started = (ib_time_t) trx->wait_started; } else { - ut_a(requested_lock_row == NULL); - - row->requested_lock_row = NULL; row->trx_wait_started = 0; } @@ -729,6 +758,7 @@ fill_locks_row( row->lock_table_id = lock_get_table_id(lock); row->hash_chain.value = row; + ut_ad(i_s_locks_row_validate(row)); return(TRUE); } @@ -749,6 +779,9 @@ fill_lock_waits_row( relevant blocking lock row in innodb_locks */ { + ut_ad(i_s_locks_row_validate(requested_lock_row)); + ut_ad(i_s_locks_row_validate(blocking_lock_row)); + row->requested_lock_row = requested_lock_row; row->blocking_lock_row = blocking_lock_row; @@ -820,6 +853,7 @@ locks_row_eq_lock( or ULINT_UNDEFINED if the lock is a table lock */ { + ut_ad(i_s_locks_row_validate(row)); #ifdef TEST_NO_LOCKS_ROW_IS_EVER_EQUAL_TO_LOCK_T return(0); #else @@ -877,7 +911,7 @@ search_innodb_locks( /* auxiliary variable */ hash_chain, /* assertion on every traversed item */ - , + ut_ad(i_s_locks_row_validate(hash_chain->value)), /* this determines if we have found the lock */ locks_row_eq_lock(hash_chain->value, lock, heap_no)); @@ -917,6 +951,7 @@ add_lock_to_cache( dst_row = search_innodb_locks(cache, lock, heap_no); if (dst_row != NULL) { + ut_ad(i_s_locks_row_validate(dst_row)); return(dst_row); } #endif @@ -954,6 +989,7 @@ add_lock_to_cache( } /* for()-loop */ #endif + ut_ad(i_s_locks_row_validate(dst_row)); return(dst_row); } @@ -1101,13 +1137,6 @@ can_cache_be_updated( { ullint now; - /* Here we read cache->last_read without acquiring its mutex - because last_read is only updated when a shared rw lock on the - whole cache is being held (see trx_i_s_cache_end_read()) and - we are currently holding an exclusive rw lock on the cache. - So it is not possible for last_read to be updated while we are - reading it. */ - #ifdef UNIV_SYNC_DEBUG ut_a(rw_lock_own(&cache->rw_lock, RW_LOCK_EX)); #endif @@ -1205,6 +1234,12 @@ trx_i_s_possibly_fetch_data_into_cache( /*===================================*/ trx_i_s_cache_t* cache) /*!< in/out: cache */ { + ullint now; + +#ifdef UNIV_SYNC_DEBUG + ut_a(rw_lock_own(&cache->rw_lock, RW_LOCK_EX)); +#endif + if (!can_cache_be_updated(cache)) { return(1); @@ -1217,6 +1252,10 @@ trx_i_s_possibly_fetch_data_into_cache( mutex_exit(&kernel_mutex); + /* update cache last read time */ + now = ut_time_us(NULL); + cache->last_read = now; + return(0); } @@ -1247,16 +1286,12 @@ trx_i_s_cache_init( release kernel_mutex release trx_i_s_cache_t::rw_lock acquire trx_i_s_cache_t::rw_lock, S - acquire trx_i_s_cache_t::last_read_mutex - release trx_i_s_cache_t::last_read_mutex release trx_i_s_cache_t::rw_lock */ rw_lock_create(&cache->rw_lock, SYNC_TRX_I_S_RWLOCK); cache->last_read = 0; - mutex_create(&cache->last_read_mutex, SYNC_TRX_I_S_LAST_READ); - table_cache_init(&cache->innodb_trx, sizeof(i_s_trx_row_t)); table_cache_init(&cache->innodb_locks, sizeof(i_s_locks_row_t)); table_cache_init(&cache->innodb_lock_waits, @@ -1307,18 +1342,10 @@ trx_i_s_cache_end_read( /*===================*/ trx_i_s_cache_t* cache) /*!< in: cache */ { - ullint now; - #ifdef UNIV_SYNC_DEBUG ut_a(rw_lock_own(&cache->rw_lock, RW_LOCK_SHARED)); #endif - /* update cache last read time */ - now = ut_time_us(NULL); - mutex_enter(&cache->last_read_mutex); - cache->last_read = now; - mutex_exit(&cache->last_read_mutex); - rw_lock_s_unlock(&cache->rw_lock); } diff --git a/trx/trx0undo.c b/trx/trx0undo.c index 346e2116f06..9ed83b5d5c1 100644 --- a/trx/trx0undo.c +++ b/trx/trx0undo.c @@ -1408,7 +1408,7 @@ trx_undo_lists_init( page_no = mtr_read_ulint(rseg_header + TRX_RSEG_UNDO_SLOTS + i * TRX_RSEG_SLOT_SIZE, MLOG_4BYTES, &mtr); - if (page_no != FIL_NULL) { + if (page_no != 0 && page_no != FIL_NULL) { srv_extra_undoslots = TRUE; fprintf(stderr, "InnoDB: Error: innodb_extra_undoslots option is disabled, but it was enabled before.\n" @@ -1861,21 +1861,11 @@ trx_undo_set_state_at_finish( if (undo->size == 1 && mach_read_from_2(page_hdr + TRX_UNDO_PAGE_FREE) - < TRX_UNDO_PAGE_REUSE_LIMIT) { + < TRX_UNDO_PAGE_REUSE_LIMIT + && UT_LIST_GET_LEN(rseg->update_undo_list) < 500 + && UT_LIST_GET_LEN(rseg->insert_undo_list) < 500) { - /* This is a heuristic to avoid the problem of all UNDO - slots ending up in one of the UNDO lists. Previously if - the server crashed with all the slots in one of the lists, - transactions that required the slots of a different type - would fail for lack of slots. */ - - if (UT_LIST_GET_LEN(rseg->update_undo_list) < 500 - && UT_LIST_GET_LEN(rseg->insert_undo_list) < 500) { - - state = TRX_UNDO_CACHED; - } else { - state = TRX_UNDO_TO_FREE; - } + state = TRX_UNDO_CACHED; } else if (undo->type == TRX_UNDO_INSERT) { From fecd255a16fc3be6206e03ad5e70d8e90118acc6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Apr 2011 14:49:04 +0200 Subject: [PATCH 3/6] Updated with changes from Percona Server 5.1.56-12.7, from lp:~percona-dev/percona-server/release-5.1.56-12.7 percona-server-5.1.56-12.7 as of April 29, 2011. Merged: revid:ignacio.nin@percona.com-20110427224434-e5a4kpyfwvj641q3 --- ChangeLog | 98 +++ btr/btr0btr.c | 4 +- btr/btr0cur.c | 748 ++++++------------ btr/btr0sea.c | 187 +++-- buf/buf0buddy.c | 7 +- buf/buf0buf.c | 59 +- buf/buf0flu.c | 9 +- buf/buf0lru.c | 91 ++- dict/dict0boot.c | 6 +- dict/dict0crea.c | 7 +- dict/dict0dict.c | 150 +++- dict/dict0load.c | 1 + fil/fil0fil.c | 104 ++- fsp/fsp0fsp.c | 23 +- handler/ha_innodb.cc | 349 ++++---- handler/i_s.cc | 44 +- ibuf/ibuf0ibuf.c | 8 +- include/btr0cur.h | 89 ++- include/buf0buf.h | 15 +- include/buf0buf.ic | 11 +- include/buf0lru.h | 21 +- include/buf0types.h | 2 +- include/data0data.h | 11 +- include/data0data.ic | 22 +- include/dict0boot.h | 1 + include/dict0dict.h | 7 + include/dict0mem.h | 6 + include/dict0types.h | 5 - include/fil0fil.h | 12 +- include/fsp0types.h | 2 +- include/os0file.h | 7 +- include/page0cur.h | 16 - include/rem0cmp.h | 7 +- include/rem0cmp.ic | 2 +- include/row0mysql.h | 8 + include/row0upd.h | 34 +- include/srv0srv.h | 24 +- include/sync0rw.h | 15 +- include/sync0sync.h | 13 +- include/trx0i_s.h | 2 + include/trx0rseg.h | 4 +- include/trx0trx.h | 4 +- include/univ.i | 23 +- include/ut0vec.h | 19 + include/ut0vec.ic | 29 + lock/lock0lock.c | 78 +- log/log0recv.c | 2 +- mem/mem0mem.c | 2 +- mtr/mtr0log.c | 2 +- mtr/mtr0mtr.c | 1 + os/os0file.c | 15 +- page/page0cur.c | 68 -- page/page0zip.c | 2 +- percona-suite/innodb_fix_misc_bug51325.result | 13 + percona-suite/innodb_fix_misc_bug51325.test | 13 + .../percona_show_slave_status_nolock.result | 12 +- .../percona_show_slave_status_nolock.test | 3 + ...na_slow_extended-slave_innodb_stats.result | 10 +- ...ents-and-use_global_long_query_time.result | 13 +- ...ements-and-use_global_long_query_time.test | 3 + ...cona_slow_extended-slave_statements.result | 17 +- ...ercona_slow_extended-slave_statements.test | 3 + percona-suite/userstat_bug602047.result | 16 + percona-suite/userstat_bug602047.test | 13 + plug.in | 25 +- rem/rem0cmp.c | 17 +- row/row0ins.c | 4 +- row/row0merge.c | 4 +- row/row0mysql.c | 29 +- row/row0purge.c | 68 +- row/row0row.c | 16 + row/row0umod.c | 44 +- row/row0upd.c | 386 ++++++--- row/row0vers.c | 10 +- srv/srv0srv.c | 16 +- sync/sync0arr.c | 4 +- sync/sync0rw.c | 25 +- sync/sync0sync.c | 7 +- trx/trx0i_s.c | 5 +- trx/trx0rec.c | 17 +- trx/trx0roll.c | 4 +- trx/trx0trx.c | 25 +- ut/ut0dbg.c | 2 +- 83 files changed, 1998 insertions(+), 1302 deletions(-) create mode 100644 percona-suite/innodb_fix_misc_bug51325.result create mode 100644 percona-suite/innodb_fix_misc_bug51325.test create mode 100644 percona-suite/userstat_bug602047.result create mode 100644 percona-suite/userstat_bug602047.test diff --git a/ChangeLog b/ChangeLog index 5ca60eb73d5..102db3d7824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,102 @@ +2011-01-31 The InnoDB Team + + * btr/btr0cur.c, include/row0upd.h, + row/row0purge.c, row/row0umod.c, row/row0upd.c: + Bug#59230 assert 0 row_upd_changes_ord_field_binary() + in post-crash rollback or purge + +2011-01-27 The InnoDB Team + + * btr/btr0cur.c: + Bug#59465 btr_estimate_number_of_different_key_vals use + incorrect offset for external_size + +2011-01-27 The InnoDB Team + + * include/trx0trx.h, trx/trx0trx.c: + Bug#59440 Race condition in XA ROLLBACK and XA COMMIT + after server restart + +2011-01-25 The InnoDB Team + + * row/row0upd.c: + Bug#59585 Fix 58912 introduces compiler warning + due to potentially uninitialized variable + +2011-01-25 The InnoDB Team + + * mtr/mtr0log.c: + Bug#59486 Incorrect usage of UNIV_UNLIKELY() in mlog_parse_string() + +2011-01-25 The InnoDB Team + + * row/row0vers.c: + Fix Bug#59464 Race condition in row_vers_build_for_semi_consistent_read + +2011-01-25 The InnoDB Team + + * btr/btr0btr.c, btr/btr0cur.c, btr/btr0sea.c, + buf/buf0buddy.c, buf/buf0buf.c, buf/buf0lru.c, + include/buf0buf.h, include/buf0buf.ic, include/buf0lru.h, + mem/mem0mem.c, page/page0zip.c: + Fix Bug#59707 Unused compression-related parameters + in buffer pool functions + +2011-01-18 The InnoDB Team + + * include/sync0rw.h, sync/sync0arr.c, sync/sync0rw.c: + Fix Bug#59579 rw_lock_debug_print outputs to stderr, not to + SHOW ENGINE INNODB STATUS + +2011-01-14 The InnoDB Team + * btr/btr0cur.c, dict/dict0dict.c, handler/ha_innodb.cc, + include/btr0cur.h, include/dict0mem.h, include/rem0cmp.h, + include/rem0cmp.ic, include/srv0srv.h, rem/rem0cmp.c, + srv/srv0srv.c, innodb_bug30423.test: + Fix Bug#30423 InnoDBs treatment of NULL in index stats causes + bad "rows examined" estimates + +2011-01-06 The InnoDB Team + * row/row0merge.c: + Fix Bug#59312 Examine MAX_FULL_NAME_LEN in InnoDB to address + possible insufficient name buffer + +2011-01-06 The InnoDB Team + * dict/dict0dict.c, handler/ha_innodb.cc, handler/i_s.cc, + include/univ.i: + Fix Bug#58643 InnoDB: too long table name + +2011-01-06 The InnoDB Team + * handler/i_s.cc, include/trx0i_s.h, trx/trx0i_s.c: + Fix Bug#55397 cannot select from innodb_trx when trx_query contains + blobs that aren't strings + +2011-01-04 The InnoDB Team + * dict/dict0dict.c: + Fix Bug#59197 double quote in field comment prevents foreign + key constraint creation + +2010-12-21 The InnoDB Team + * include/btr0cur.h, include/row0upd.h, btr/btr0cur.c, + row/row0umod.c, row/row0upd.c: + Fix Bug#55284 Double free of off-page columns due to lock wait + while updating PRIMARY KEY + +2010-12-21 The InnoDB Team + + * include/data0data.h, include/data0data.ic, include/row0upd.h, + btr/btr0cur.c, row/row0purge.c, row/row0umod.c, row/row0upd.c, + innodb.result, innodb.test: + Fix Bug#58912 InnoDB unnecessarily avoids update-in-place + on column prefix indexes + +2010-12-09 The InnoDB Team + + * buf/buf0lru.c: + Fix Bug#57600 output of I/O sum[%lu] can go negative + 2010-11-11 The InnoDB Team + * thr/thr0loc.c, trx/trx0i_s.c: Fix Bug#57802 Empty ASSERTION parameter passed to the HASH_SEARCH macro diff --git a/btr/btr0btr.c b/btr/btr0btr.c index 4d6cd8d80fc..2fb14b06a7b 100644 --- a/btr/btr0btr.c +++ b/btr/btr0btr.c @@ -675,7 +675,7 @@ btr_page_get_father_node_ptr_func( " to fix the\n" "InnoDB: corruption. If the crash happens at " "the database startup, see\n" - "InnoDB: " REFMAN "forcing-recovery.html about\n" + "InnoDB: " REFMAN "forcing-innodb-recovery.html about\n" "InnoDB: forcing recovery. " "Then dump + drop + reimport.\n", stderr); @@ -1009,7 +1009,7 @@ btr_page_reorganize_low( log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE); #ifndef UNIV_HOTBACKUP - temp_block = buf_block_alloc(0); + temp_block = buf_block_alloc(); #else /* !UNIV_HOTBACKUP */ ut_ad(block == back_block1); temp_block = back_block2; diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 25bdd176880..9b306ea2864 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -100,6 +100,18 @@ can be released by page reorganize, then it is reorganized */ /*--------------------------------------*/ #define BTR_BLOB_HDR_SIZE 8 /*!< Size of a BLOB part header, in bytes */ + +/** Estimated table level stats from sampled value. +@param value sampled stats +@param index index being sampled +@param sample number of sampled rows +@param ext_size external stored data size +@param not_empty table not empty +@return estimated table wide stats from sampled value */ +#define BTR_TABLE_STATS_FROM_SAMPLE(value, index, sample, ext_size, not_empty)\ + (((value) * (ib_int64_t) index->stat_n_leaf_pages \ + + (sample) - 1 + (ext_size) + (not_empty)) / ((sample) + (ext_size))) + /* @} */ #endif /* !UNIV_HOTBACKUP */ @@ -174,7 +186,7 @@ static ulint btr_rec_get_externally_stored_len( /*==============================*/ - rec_t* rec, /*!< in: record */ + const rec_t* rec, /*!< in: record */ const ulint* offsets);/*!< in: array returned by rec_get_offsets() */ #endif /* !UNIV_HOTBACKUP */ @@ -961,108 +973,6 @@ btr_cur_open_at_rnd_pos_func( } } -/**********************************************************************//** -Positions a cursor at a randomly chosen position within a B-tree -after the given path -@return TRUE if the position is at the first page, and cursor must point - the first record for used by the caller.*/ -UNIV_INTERN -ibool -btr_cur_open_at_rnd_pos_after_path( -/*====================*/ - dict_index_t* index, /*!< in: index */ - ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ... */ - btr_path_t* first_rec_path, - btr_cur_t* cursor, /*!< in/out: B-tree cursor */ - mtr_t* mtr) /*!< in: mtr */ -{ - page_cur_t* page_cursor; - btr_path_t* slot; - ibool is_first_rec = TRUE; - ulint page_no; - ulint space; - ulint zip_size; - ulint height; - rec_t* node_ptr; - mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; - rec_offs_init(offsets_); - - if (latch_mode == BTR_MODIFY_TREE) { - mtr_x_lock(dict_index_get_lock(index), mtr); - } else { - mtr_s_lock(dict_index_get_lock(index), mtr); - } - - page_cursor = btr_cur_get_page_cur(cursor); - cursor->index = index; - - space = dict_index_get_space(index); - zip_size = dict_table_zip_size(index->table); - page_no = dict_index_get_page(index); - - height = ULINT_UNDEFINED; - slot = first_rec_path; - - for (;;) { - buf_block_t* block; - page_t* page; - - block = buf_page_get_gen(space, zip_size, page_no, - RW_NO_LATCH, NULL, BUF_GET, - __FILE__, __LINE__, mtr); - page = buf_block_get_frame(block); - ut_ad(0 == ut_dulint_cmp(index->id, - btr_page_get_index_id(page))); - - if (height == ULINT_UNDEFINED) { - /* We are in the root node */ - - height = btr_page_get_level(page, mtr); - } - - if (height == 0) { - btr_cur_latch_leaves(page, space, zip_size, page_no, - latch_mode, cursor, mtr); - } - - if (is_first_rec && slot->nth_rec != ULINT_UNDEFINED) { - if (height == 0) { - /* must open the first rec */ - page_cur_open_on_nth_user_rec(block, page_cursor, slot->nth_rec); - } else { - is_first_rec = page_cur_open_on_rnd_user_rec_after_nth(block, - page_cursor, slot->nth_rec); - } - } else { - is_first_rec = FALSE; - page_cur_open_on_rnd_user_rec(block, page_cursor); - } - - if (height == 0) { - break; - } - - ut_ad(height > 0); - - height--; - slot++; - - node_ptr = page_cur_get_rec(page_cursor); - offsets = rec_get_offsets(node_ptr, cursor->index, offsets, - ULINT_UNDEFINED, &heap); - /* Go to the child node */ - page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets); - } - - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } - - return (is_first_rec); -} - /*==================== B-TREE INSERT =========================*/ /*************************************************************//** @@ -1933,7 +1843,8 @@ btr_cur_update_in_place( NOT call it if index is secondary */ if (!dict_index_is_clust(index) - || row_upd_changes_ord_field_binary(NULL, index, update)) { + || row_upd_changes_ord_field_binary(index, update, thr, + NULL, NULL)) { /* Remove possible hash index pointer to this record */ btr_search_update_hash_on_delete(cursor); @@ -2685,27 +2596,24 @@ ulint btr_cur_del_mark_set_clust_rec( /*===========================*/ ulint flags, /*!< in: undo logging and locking flags */ - btr_cur_t* cursor, /*!< in: cursor */ + buf_block_t* block, /*!< in/out: buffer block of the record */ + rec_t* rec, /*!< in/out: record */ + dict_index_t* index, /*!< in: clustered index of the record */ + const ulint* offsets,/*!< in: rec_get_offsets(rec) */ ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ mtr_t* mtr) /*!< in: mtr */ { - dict_index_t* index; - buf_block_t* block; roll_ptr_t roll_ptr; ulint err; - rec_t* rec; page_zip_des_t* page_zip; trx_t* trx; - mem_heap_t* heap = NULL; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets = offsets_; - rec_offs_init(offsets_); - rec = btr_cur_get_rec(cursor); - index = cursor->index; + ut_ad(dict_index_is_clust(index)); + ut_ad(rec_offs_validate(rec, index, offsets)); ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); - offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); + ut_ad(buf_block_get_frame(block) == page_align(rec)); + ut_ad(page_is_leaf(page_align(rec))); #ifdef UNIV_DEBUG if (btr_cur_print_record_ops && thr) { @@ -2717,13 +2625,12 @@ btr_cur_del_mark_set_clust_rec( ut_ad(dict_index_is_clust(index)); ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets))); - err = lock_clust_rec_modify_check_and_lock(flags, - btr_cur_get_block(cursor), + err = lock_clust_rec_modify_check_and_lock(flags, block, rec, index, offsets, thr); if (err != DB_SUCCESS) { - goto func_exit; + return(err); } err = trx_undo_report_row_operation(flags, TRX_UNDO_MODIFY_OP, thr, @@ -2731,11 +2638,9 @@ btr_cur_del_mark_set_clust_rec( &roll_ptr); if (err != DB_SUCCESS) { - goto func_exit; + return(err); } - block = btr_cur_get_block(cursor); - if (block->is_hashed) { rw_lock_x_lock(&btr_search_latch); } @@ -2758,10 +2663,6 @@ btr_cur_del_mark_set_clust_rec( btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx, roll_ptr, mtr); -func_exit: - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } return(err); } @@ -3392,149 +3293,43 @@ btr_estimate_n_rows_in_range( } /*******************************************************************//** -Estimates the number of pages which have not null value of the key of n_cols. -@return estimated number of pages */ -UNIV_INTERN -ulint -btr_estimate_n_pages_not_null( -/*=========================*/ - dict_index_t* index, /*!< in: index */ - ulint n_cols, /*!< in: The cols should be not null */ - btr_path_t* path1) /*!< in: path1[BTR_PATH_ARRAY_N_SLOTS] */ +Record the number of non_null key values in a given index for +each n-column prefix of the index where n < dict_index_get_n_unique(index). +The estimates are eventually stored in the array: +index->stat_n_non_null_key_vals. */ +static +void +btr_record_not_null_field_in_rec( +/*=============================*/ + rec_t* rec, /*!< in: physical record */ + ulint n_unique, /*!< in: dict_index_get_n_unique(index), + number of columns uniquely determine + an index entry */ + const ulint* offsets, /*!< in: rec_get_offsets(rec, index), + its size could be for all fields or + that of "n_unique" */ + ib_int64_t* n_not_null) /*!< in/out: array to record number of + not null rows for n-column prefix */ { - dtuple_t* tuple1; - btr_path_t path2[BTR_PATH_ARRAY_N_SLOTS]; - btr_cur_t cursor; - btr_path_t* slot1; - btr_path_t* slot2; - ibool diverged; - ibool diverged_lot; - ulint divergence_level; - ulint n_pages; - ulint i; - mtr_t mtr; - mem_heap_t* heap; + ulint i; - heap = mem_heap_create(n_cols * sizeof(dfield_t) - + sizeof(dtuple_t)); + ut_ad(rec_offs_n_fields(offsets) >= n_unique); - /* make tuple1 (NULL,NULL,,,) from n_cols */ - tuple1 = dtuple_create(heap, n_cols); - dict_index_copy_types(tuple1, index, n_cols); - - for (i = 0; i < n_cols; i++) { - dfield_set_null(dtuple_get_nth_field(tuple1, i)); + if (n_not_null == NULL) { + return; } - mtr_start(&mtr); + for (i = 0; i < n_unique; i++) { + ulint rec_len; + byte* field; - cursor.path_arr = path1; + field = rec_get_nth_field(rec, offsets, i, &rec_len); - btr_cur_search_to_nth_level(index, 0, tuple1, PAGE_CUR_G, - BTR_SEARCH_LEAF | BTR_ESTIMATE, - &cursor, 0, __FILE__, __LINE__, &mtr); - - mtr_commit(&mtr); - - - - mtr_start(&mtr); - - cursor.path_arr = path2; - - btr_cur_open_at_index_side(FALSE, index, - BTR_SEARCH_LEAF | BTR_ESTIMATE, - &cursor, &mtr); - - mtr_commit(&mtr); - - mem_heap_free(heap); - - /* We have the path information for the range in path1 and path2 */ - - n_pages = 1; - diverged = FALSE; /* This becomes true when the path is not - the same any more */ - diverged_lot = FALSE; /* This becomes true when the paths are - not the same or adjacent any more */ - divergence_level = 1000000; /* This is the level where paths diverged - a lot */ - for (i = 0; ; i++) { - ut_ad(i < BTR_PATH_ARRAY_N_SLOTS); - - slot1 = path1 + i; - slot2 = path2 + i; - - if ((slot1 + 1)->nth_rec == ULINT_UNDEFINED - || (slot2 + 1)->nth_rec == ULINT_UNDEFINED) { - - if (i > divergence_level + 1) { - /* In trees whose height is > 1 our algorithm - tends to underestimate: multiply the estimate - by 2: */ - - n_pages = n_pages * 2; - } - - /* Do not estimate the number of rows in the range - to over 1 / 2 of the estimated rows in the whole - table */ - - if (n_pages > index->stat_n_leaf_pages / 2) { - n_pages = index->stat_n_leaf_pages / 2; - - /* If there are just 0 or 1 rows in the table, - then we estimate all rows are in the range */ - - if (n_pages == 0) { - n_pages = index->stat_n_leaf_pages; - } - } - - return(n_pages); - } - - if (!diverged && slot1->nth_rec != slot2->nth_rec) { - - diverged = TRUE; - - if (slot1->nth_rec < slot2->nth_rec) { - n_pages = slot2->nth_rec - slot1->nth_rec; - - if (n_pages > 1) { - diverged_lot = TRUE; - divergence_level = i; - } - } else { - /* Maybe the tree has changed between - searches */ - - return(10); - } - - } else if (diverged && !diverged_lot) { - - if (slot1->nth_rec < slot1->n_recs - || slot2->nth_rec > 1) { - - diverged_lot = TRUE; - divergence_level = i; - - n_pages = 0; - - if (slot1->nth_rec < slot1->n_recs) { - n_pages += slot1->n_recs - - slot1->nth_rec; - } - - if (slot2->nth_rec > 1) { - n_pages += slot2->nth_rec - 1; - } - } - } else if (diverged_lot) { - - n_pages = (n_pages * (slot1->n_recs + slot2->n_recs)) - / 2; + if (rec_len != UNIV_SQL_NULL) { + n_not_null[i]++; + } else { + /* Break if we hit the first NULL value */ + break; } } } @@ -3542,7 +3337,10 @@ btr_estimate_n_pages_not_null( /*******************************************************************//** Estimates the number of different key values in a given index, for each n-column prefix of the index where n <= dict_index_get_n_unique(index). -The estimates are stored in the array index->stat_n_diff_key_vals. */ +The estimates are stored in the array index->stat_n_diff_key_vals. +If innodb_stats_method is "nulls_ignored", we also record the number of +non-null values for each prefix and store the estimates in +array index->stat_n_non_null_key_vals. */ UNIV_INTERN void btr_estimate_number_of_different_key_vals( @@ -3556,6 +3354,8 @@ btr_estimate_number_of_different_key_vals( ulint matched_fields; ulint matched_bytes; ib_int64_t* n_diff; + ib_int64_t* n_not_null; + ibool stats_null_not_equal; ullint n_sample_pages; /* number of pages to sample */ ulint not_empty_flag = 0; ulint total_external_size = 0; @@ -3564,42 +3364,49 @@ btr_estimate_number_of_different_key_vals( ullint add_on; mtr_t mtr; mem_heap_t* heap = NULL; - ulint offsets_rec_[REC_OFFS_NORMAL_SIZE]; - ulint offsets_next_rec_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets_rec = offsets_rec_; - ulint* offsets_next_rec= offsets_next_rec_; - ulint stats_method = srv_stats_method; - btr_path_t first_rec_path[BTR_PATH_ARRAY_N_SLOTS]; - ulint effective_pages; /* effective leaf pages */ - rec_offs_init(offsets_rec_); - rec_offs_init(offsets_next_rec_); + ulint* offsets_rec = NULL; + ulint* offsets_next_rec = NULL; n_cols = dict_index_get_n_unique(index); - if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) { - /* estimate effective pages and path for the first effective record */ - /* TODO: make it work also for n_cols > 1. */ - effective_pages = btr_estimate_n_pages_not_null(index, 1 /*k*/, first_rec_path); + heap = mem_heap_create((sizeof *n_diff + sizeof *n_not_null) + * (n_cols + 1) + + dict_index_get_n_fields(index) + * (sizeof *offsets_rec + + sizeof *offsets_next_rec)); - if (!effective_pages) { - for (j = 0; j <= n_cols; j++) { - index->stat_n_diff_key_vals[j] = (ib_int64_t)index->stat_n_leaf_pages; - } - return; - } else if (effective_pages > index->stat_n_leaf_pages) { - effective_pages = index->stat_n_leaf_pages; - } - } else { - effective_pages = index->stat_n_leaf_pages; - } + n_diff = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); - n_diff = mem_zalloc((n_cols + 1) * sizeof(ib_int64_t)); + n_not_null = NULL; + + /* Check srv_innodb_stats_method setting, and decide whether we + need to record non-null value and also decide if NULL is + considered equal (by setting stats_null_not_equal value) */ + switch (srv_innodb_stats_method) { + case SRV_STATS_NULLS_IGNORED: + n_not_null = mem_heap_zalloc(heap, (n_cols + 1) + * sizeof *n_not_null); + /* fall through */ + + case SRV_STATS_NULLS_UNEQUAL: + /* for both SRV_STATS_NULLS_IGNORED and SRV_STATS_NULLS_UNEQUAL + case, we will treat NULLs as unequal value */ + stats_null_not_equal = TRUE; + break; + + case SRV_STATS_NULLS_EQUAL: + stats_null_not_equal = FALSE; + break; + + default: + ut_error; + } /* It makes no sense to test more pages than are contained in the index, thus we lower the number if it is too high */ - if (srv_stats_sample_pages > effective_pages) { - if (effective_pages > 0) { - n_sample_pages = effective_pages; + if (srv_stats_sample_pages > index->stat_index_size) { + if (index->stat_index_size > 0) { + n_sample_pages = index->stat_index_size; } else { n_sample_pages = 1; } @@ -3610,16 +3417,9 @@ btr_estimate_number_of_different_key_vals( /* We sample some pages in the index to get an estimate */ for (i = 0; i < n_sample_pages; i++) { - rec_t* supremum; - ibool is_first_page = TRUE; mtr_start(&mtr); - if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) { - is_first_page = btr_cur_open_at_rnd_pos_after_path(index, BTR_SEARCH_LEAF, - first_rec_path, &cursor, &mtr); - } else { btr_cur_open_at_rnd_pos(index, BTR_SEARCH_LEAF, &cursor, &mtr); - } /* Count the number of different key values for each prefix of the key on this index page. If the prefix does not determine @@ -3634,25 +3434,25 @@ btr_estimate_number_of_different_key_vals( } ut_a(page); - supremum = page_get_supremum_rec(page); - if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS && is_first_page) { - /* the cursor should be the first record of the page. */ - /* Counting should be started from here. */ - rec = btr_cur_get_rec(&cursor); - } else { rec = page_rec_get_next(page_get_infimum_rec(page)); - } - if (rec != supremum) { + if (!page_rec_is_supremum(rec)) { not_empty_flag = 1; offsets_rec = rec_get_offsets(rec, index, offsets_rec, ULINT_UNDEFINED, &heap); + + if (n_not_null) { + btr_record_not_null_field_in_rec( + rec, n_cols, offsets_rec, n_not_null); + } } - while (rec != supremum) { - rec_t* next_rec; - next_rec = page_rec_get_next(rec); - if (next_rec == supremum) { + while (!page_rec_is_supremum(rec)) { + rec_t* next_rec = page_rec_get_next(rec); + if (page_rec_is_supremum(next_rec)) { + total_external_size += + btr_rec_get_externally_stored_len( + rec, offsets_rec); break; } @@ -3660,15 +3460,14 @@ btr_estimate_number_of_different_key_vals( matched_bytes = 0; offsets_next_rec = rec_get_offsets(next_rec, index, offsets_next_rec, - n_cols, &heap); + ULINT_UNDEFINED, + &heap); cmp_rec_rec_with_match(rec, next_rec, offsets_rec, offsets_next_rec, - index, &matched_fields, - &matched_bytes, - (stats_method==SRV_STATS_METHOD_NULLS_NOT_EQUAL) ? - SRV_STATS_METHOD_NULLS_NOT_EQUAL : - SRV_STATS_METHOD_NULLS_EQUAL); + index, stats_null_not_equal, + &matched_fields, + &matched_bytes); for (j = matched_fields + 1; j <= n_cols; j++) { /* We add one if this index record has @@ -3677,6 +3476,12 @@ btr_estimate_number_of_different_key_vals( n_diff[j]++; } + if (n_not_null) { + btr_record_not_null_field_in_rec( + next_rec, n_cols, offsets_next_rec, + n_not_null); + } + total_external_size += btr_rec_get_externally_stored_len( rec, offsets_rec); @@ -3711,10 +3516,6 @@ btr_estimate_number_of_different_key_vals( } } - offsets_rec = rec_get_offsets(rec, index, offsets_rec, - ULINT_UNDEFINED, &heap); - total_external_size += btr_rec_get_externally_stored_len( - rec, offsets_rec); mtr_commit(&mtr); } @@ -3728,13 +3529,9 @@ btr_estimate_number_of_different_key_vals( for (j = 0; j <= n_cols; j++) { index->stat_n_diff_key_vals[j] - = ((n_diff[j] - * (ib_int64_t)effective_pages - + n_sample_pages - 1 - + total_external_size - + not_empty_flag) - / (n_sample_pages - + total_external_size)); + = BTR_TABLE_STATS_FROM_SAMPLE( + n_diff[j], index, n_sample_pages, + total_external_size, not_empty_flag); /* If the tree is small, smaller than 10 * n_sample_pages + total_external_size, then @@ -3744,7 +3541,7 @@ btr_estimate_number_of_different_key_vals( different key values, or even more. Let us try to approximate that: */ - add_on = effective_pages + add_on = index->stat_n_leaf_pages / (10 * (n_sample_pages + total_external_size)); @@ -3754,24 +3551,52 @@ btr_estimate_number_of_different_key_vals( index->stat_n_diff_key_vals[j] += add_on; - if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) { - /* index->stat_n_diff_key_vals[k] is used for calc rec_per_key, - as "stats.records / index->stat_n_diff_key_vals[x]". - So it should be adjusted to the value which is based on whole of the index. */ - index->stat_n_diff_key_vals[j] = - index->stat_n_diff_key_vals[j] * (ib_int64_t)index->stat_n_leaf_pages - / (ib_int64_t)effective_pages; + /* Update the stat_n_non_null_key_vals[] with our + sampled result. stat_n_non_null_key_vals[] is created + and initialized to zero in dict_index_add_to_cache(), + along with stat_n_diff_key_vals[] array */ + if (n_not_null != NULL && (j < n_cols)) { + index->stat_n_non_null_key_vals[j] = + BTR_TABLE_STATS_FROM_SAMPLE( + n_not_null[j], index, n_sample_pages, + total_external_size, not_empty_flag); } } - mem_free(n_diff); - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } + mem_heap_free(heap); } /*================== EXTERNAL STORAGE OF BIG FIELDS ===================*/ +/***********************************************************//** +Gets the offset of the pointer to the externally stored part of a field. +@return offset of the pointer to the externally stored part */ +static +ulint +btr_rec_get_field_ref_offs( +/*=======================*/ + const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ + ulint n) /*!< in: index of the external field */ +{ + ulint field_ref_offs; + ulint local_len; + + ut_a(rec_offs_nth_extern(offsets, n)); + field_ref_offs = rec_get_nth_field_offs(offsets, n, &local_len); + ut_a(local_len != UNIV_SQL_NULL); + ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE); + + return(field_ref_offs + local_len - BTR_EXTERN_FIELD_REF_SIZE); +} + +/** Gets a pointer to the externally stored part of a field. +@param rec record +@param offsets rec_get_offsets(rec) +@param n index of the externally stored field +@return pointer to the externally stored part */ +#define btr_rec_get_field_ref(rec, offsets, n) \ + ((rec) + btr_rec_get_field_ref_offs(offsets, n)) + /***********************************************************//** Gets the externally stored size of a record, in units of a database page. @return externally stored part, in units of a database page */ @@ -3779,28 +3604,27 @@ static ulint btr_rec_get_externally_stored_len( /*==============================*/ - rec_t* rec, /*!< in: record */ + const rec_t* rec, /*!< in: record */ const ulint* offsets)/*!< in: array returned by rec_get_offsets() */ { ulint n_fields; - byte* data; - ulint local_len; - ulint extern_len; ulint total_extern_len = 0; ulint i; ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec)); + + if (!rec_offs_any_extern(offsets)) { + return(0); + } + n_fields = rec_offs_n_fields(offsets); for (i = 0; i < n_fields; i++) { if (rec_offs_nth_extern(offsets, i)) { - data = rec_get_nth_field(rec, offsets, i, &local_len); - - local_len -= BTR_EXTERN_FIELD_REF_SIZE; - - extern_len = mach_read_from_4(data + local_len - + BTR_EXTERN_LEN + 4); + ulint extern_len = mach_read_from_4( + btr_rec_get_field_ref(rec, offsets, i) + + BTR_EXTERN_LEN + 4); total_extern_len += ut_calc_align(extern_len, UNIV_PAGE_SIZE); @@ -3830,7 +3654,7 @@ btr_cur_set_ownership_of_extern_field( ulint byte_val; data = rec_get_nth_field(rec, offsets, i, &local_len); - + ut_ad(rec_offs_nth_extern(offsets, i)); ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE); local_len -= BTR_EXTERN_FIELD_REF_SIZE; @@ -3840,6 +3664,9 @@ btr_cur_set_ownership_of_extern_field( if (val) { byte_val = byte_val & (~BTR_EXTERN_OWNER_FLAG); } else { +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + ut_a(!(byte_val & BTR_EXTERN_OWNER_FLAG)); +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ byte_val = byte_val | BTR_EXTERN_OWNER_FLAG; } @@ -3856,108 +3683,36 @@ btr_cur_set_ownership_of_extern_field( } /*******************************************************************//** -Marks not updated extern fields as not-owned by this record. The ownership -is transferred to the updated record which is inserted elsewhere in the +Marks non-updated off-page fields as disowned by this record. The ownership +must be transferred to the updated record which is inserted elsewhere in the index tree. In purge only the owner of externally stored field is allowed -to free the field. -@return TRUE if BLOB ownership was transferred */ +to free the field. */ UNIV_INTERN -ibool -btr_cur_mark_extern_inherited_fields( -/*=================================*/ +void +btr_cur_disown_inherited_fields( +/*============================*/ page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed part will be updated, or NULL */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ - mtr_t* mtr) /*!< in: mtr, or NULL if not logged */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { - ulint n; - ulint j; ulint i; - ibool change_ownership = FALSE; - ut_ad(rec_offs_validate(rec, NULL, offsets)); + ut_ad(rec_offs_validate(rec, index, offsets)); ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec)); + ut_ad(rec_offs_any_extern(offsets)); + ut_ad(mtr); - if (!rec_offs_any_extern(offsets)) { - - return(FALSE); - } - - n = rec_offs_n_fields(offsets); - - for (i = 0; i < n; i++) { - if (rec_offs_nth_extern(offsets, i)) { - - /* Check it is not in updated fields */ - - if (update) { - for (j = 0; j < upd_get_n_fields(update); - j++) { - if (upd_get_nth_field(update, j) - ->field_no == i) { - - goto updated; - } - } - } - + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (rec_offs_nth_extern(offsets, i) + && !upd_get_field_by_field_no(update, i)) { btr_cur_set_ownership_of_extern_field( page_zip, rec, index, offsets, i, FALSE, mtr); - - change_ownership = TRUE; -updated: - ; } } - - return(change_ownership); -} - -/*******************************************************************//** -The complement of the previous function: in an update entry may inherit -some externally stored fields from a record. We must mark them as inherited -in entry, so that they are not freed in a rollback. */ -UNIV_INTERN -void -btr_cur_mark_dtuple_inherited_extern( -/*=================================*/ - dtuple_t* entry, /*!< in/out: updated entry to be - inserted to clustered index */ - const upd_t* update) /*!< in: update vector */ -{ - ulint i; - - for (i = 0; i < dtuple_get_n_fields(entry); i++) { - - dfield_t* dfield = dtuple_get_nth_field(entry, i); - byte* data; - ulint len; - ulint j; - - if (!dfield_is_ext(dfield)) { - continue; - } - - /* Check if it is in updated fields */ - - for (j = 0; j < upd_get_n_fields(update); j++) { - if (upd_get_nth_field(update, j)->field_no == i) { - - goto is_updated; - } - } - - data = dfield_get_data(dfield); - len = dfield_get_len(dfield); - data[len - BTR_EXTERN_FIELD_REF_SIZE + BTR_EXTERN_LEN] - |= BTR_EXTERN_INHERITED_FLAG; - -is_updated: - ; - } } /*******************************************************************//** @@ -3995,29 +3750,6 @@ btr_cur_unmark_extern_fields( } } -/*******************************************************************//** -Marks all extern fields in a dtuple as owned by the record. */ -UNIV_INTERN -void -btr_cur_unmark_dtuple_extern_fields( -/*================================*/ - dtuple_t* entry) /*!< in/out: clustered index entry */ -{ - ulint i; - - for (i = 0; i < dtuple_get_n_fields(entry); i++) { - dfield_t* dfield = dtuple_get_nth_field(entry, i); - - if (dfield_is_ext(dfield)) { - byte* data = dfield_get_data(dfield); - ulint len = dfield_get_len(dfield); - - data[len - BTR_EXTERN_FIELD_REF_SIZE + BTR_EXTERN_LEN] - &= ~BTR_EXTERN_OWNER_FLAG; - } - } -} - /*******************************************************************//** Flags the data tuple fields that are marked as extern storage in the update vector. We use this function to remember which fields we must @@ -4152,8 +3884,7 @@ btr_blob_free( && buf_block_get_space(block) == space && buf_block_get_page_no(block) == page_no) { - if (buf_LRU_free_block(&block->page, all, NULL, TRUE) - != BUF_LRU_FREED + if (buf_LRU_free_block(&block->page, all, TRUE) != BUF_LRU_FREED && all && block->page.zip.data /* Now, buf_LRU_free_block() may release mutex temporarily */ && buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE @@ -4162,7 +3893,7 @@ btr_blob_free( /* Attempt to deallocate the uncompressed page if the whole block cannot be deallocted. */ - buf_LRU_free_block(&block->page, FALSE, NULL, TRUE); + buf_LRU_free_block(&block->page, FALSE, TRUE); } } @@ -4179,8 +3910,8 @@ file segment of the index tree. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ UNIV_INTERN ulint -btr_store_big_rec_extern_fields( -/*============================*/ +btr_store_big_rec_extern_fields_func( +/*=================================*/ dict_index_t* index, /*!< in: index of rec; the index tree MUST be X-latched */ buf_block_t* rec_block, /*!< in/out: block containing rec */ @@ -4189,11 +3920,17 @@ btr_store_big_rec_extern_fields( the "external storage" flags in offsets will not correspond to rec when this function returns */ - big_rec_t* big_rec_vec, /*!< in: vector containing fields +#ifdef UNIV_DEBUG + mtr_t* local_mtr, /*!< in: mtr containing the + latch to rec and to the tree */ +#endif /* UNIV_DEBUG */ +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + ibool update_in_place,/*! in: TRUE if the record is updated + in place (not delete+insert) */ +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ + const big_rec_t*big_rec_vec) /*!< in: vector containing fields to be stored externally */ - mtr_t* local_mtr __attribute__((unused))) /*!< in: mtr - containing the latch to rec and to the - tree */ + { ulint rec_page_no; byte* field_ref; @@ -4211,6 +3948,7 @@ btr_store_big_rec_extern_fields( z_stream c_stream; ut_ad(rec_offs_validate(rec, index, offsets)); + ut_ad(rec_offs_any_extern(offsets)); ut_ad(mtr_memo_contains(local_mtr, dict_index_get_lock(index), MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains(local_mtr, rec_block, MTR_MEMO_PAGE_X_FIX)); @@ -4242,21 +3980,37 @@ btr_store_big_rec_extern_fields( ut_a(err == Z_OK); } +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + /* All pointers to externally stored columns in the record + must either be zero or they must be pointers to inherited + columns, owned by this record or an earlier record version. */ + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (!rec_offs_nth_extern(offsets, i)) { + continue; + } + field_ref = btr_rec_get_field_ref(rec, offsets, i); + + ut_a(!(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG)); + /* Either this must be an update in place, + or the BLOB must be inherited, or the BLOB pointer + must be zero (will be written in this function). */ + ut_a(update_in_place + || (field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_INHERITED_FLAG) + || !memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); + } +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ /* We have to create a file segment to the tablespace for each field and put the pointer to the field in rec */ for (i = 0; i < big_rec_vec->n_fields; i++) { - ut_ad(rec_offs_nth_extern(offsets, - big_rec_vec->fields[i].field_no)); - { - ulint local_len; - field_ref = rec_get_nth_field( - rec, offsets, big_rec_vec->fields[i].field_no, - &local_len); - ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE); - local_len -= BTR_EXTERN_FIELD_REF_SIZE; - field_ref += local_len; - } + field_ref = btr_rec_get_field_ref( + rec, offsets, big_rec_vec->fields[i].field_no); +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + /* A zero BLOB pointer should have been initially inserted. */ + ut_a(!memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ extern_len = big_rec_vec->fields[i].len; UNIV_MEM_ASSERT_RW(big_rec_vec->fields[i].data, extern_len); @@ -4538,6 +4292,23 @@ next_zip_page: mem_heap_free(heap); } +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + /* All pointers to externally stored columns in the record + must be valid. */ + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (!rec_offs_nth_extern(offsets, i)) { + continue; + } + + field_ref = btr_rec_get_field_ref(rec, offsets, i); + + /* The pointer must not be zero. */ + ut_a(0 != memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); + /* The column must not be disowned by this record. */ + ut_a(!(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG)); + } +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ return(DB_SUCCESS); } @@ -4560,6 +4331,7 @@ btr_check_blob_fil_page_type( if (UNIV_UNLIKELY(type != FIL_PAGE_TYPE_BLOB)) { ulint flags = fil_space_get_flags(space_id); +#ifndef UNIV_DEBUG /* Improve debug test coverage */ if (UNIV_LIKELY ((flags & DICT_TF_FORMAT_MASK) == DICT_TF_FORMAT_51)) { /* Old versions of InnoDB did not initialize @@ -4568,6 +4340,7 @@ btr_check_blob_fil_page_type( a BLOB page that is in Antelope format.*/ return; } +#endif /* !UNIV_DEBUG */ ut_print_timestamp(stderr); fprintf(stderr, @@ -4617,23 +4390,13 @@ btr_free_externally_stored_field( ulint page_no; ulint next_page_no; mtr_t mtr; -#ifdef UNIV_DEBUG + ut_ad(mtr_memo_contains(local_mtr, dict_index_get_lock(index), MTR_MEMO_X_LOCK)); ut_ad(mtr_memo_contains_page(local_mtr, field_ref, MTR_MEMO_PAGE_X_FIX)); ut_ad(!rec || rec_offs_validate(rec, index, offsets)); - - if (rec) { - ulint local_len; - const byte* f = rec_get_nth_field(rec, offsets, - i, &local_len); - ut_a(local_len >= BTR_EXTERN_FIELD_REF_SIZE); - local_len -= BTR_EXTERN_FIELD_REF_SIZE; - f += local_len; - ut_ad(f == field_ref); - } -#endif /* UNIV_DEBUG */ + ut_ad(!rec || field_ref == btr_rec_get_field_ref(rec, offsets, i)); if (UNIV_UNLIKELY(!memcmp(field_ref, field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE))) { @@ -4798,13 +4561,8 @@ btr_rec_free_externally_stored_fields( for (i = 0; i < n_fields; i++) { if (rec_offs_nth_extern(offsets, i)) { - ulint len; - byte* data - = rec_get_nth_field(rec, offsets, i, &len); - ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); - btr_free_externally_stored_field( - index, data + len - BTR_EXTERN_FIELD_REF_SIZE, + index, btr_rec_get_field_ref(rec, offsets, i), rec, offsets, page_zip, i, rb_ctx, mtr); } } diff --git a/btr/btr0sea.c b/btr/btr0sea.c index c78f791480c..3b38e2799c2 100644 --- a/btr/btr0sea.c +++ b/btr/btr0sea.c @@ -141,7 +141,7 @@ btr_search_check_free_space_in_heap(void) be enough free space in the hash table. */ if (heap->free_block == NULL) { - buf_block_t* block = buf_block_alloc(0); + buf_block_t* block = buf_block_alloc(); rw_lock_x_lock(&btr_search_latch); @@ -1186,7 +1186,7 @@ btr_search_drop_page_hash_index_on_index( /*=====================================*/ dict_index_t* index) /* in: record descriptor */ { - buf_page_t* bpage; + hash_table_t* table; buf_block_t* block; ulint n_fields; @@ -1202,96 +1202,143 @@ btr_search_drop_page_hash_index_on_index( ulint i; mem_heap_t* heap = NULL; ulint* offsets; + ibool released_search_latch; - rw_lock_x_lock(&btr_search_latch); - mutex_enter(&LRU_list_mutex); + rw_lock_s_lock(&btr_search_latch); table = btr_search_sys->hash_index; - bpage = UT_LIST_GET_LAST(buf_pool->LRU); + do { + buf_chunk_t* chunks = buf_pool->chunks; + buf_chunk_t* chunk = chunks + buf_pool->n_chunks; - while (bpage != NULL) { - block = (buf_block_t*) bpage; - if (block->index == index && block->is_hashed) { - page = block->frame; + released_search_latch = FALSE; - /* from btr_search_drop_page_hash_index() */ - n_fields = block->curr_n_fields; - n_bytes = block->curr_n_bytes; + while (--chunk >= chunks) { + block = chunk->blocks; + i = chunk->size; - ut_a(n_fields + n_bytes > 0); - - n_recs = page_get_n_recs(page); - - /* Calculate and cache fold values into an array for fast deletion - from the hash index */ - - folds = mem_alloc(n_recs * sizeof(ulint)); - - n_cached = 0; - - rec = page_get_infimum_rec(page); - rec = page_rec_get_next_low(rec, page_is_comp(page)); - - index_id = btr_page_get_index_id(page); - - ut_a(0 == ut_dulint_cmp(index_id, index->id)); - - prev_fold = 0; - - offsets = NULL; - - while (!page_rec_is_supremum(rec)) { - offsets = rec_get_offsets(rec, index, offsets, - n_fields + (n_bytes > 0), &heap); - ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); - fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); - - if (fold == prev_fold && prev_fold != 0) { - - goto next_rec; +retry: + for (; i--; block++) { + if (buf_block_get_state(block) + != BUF_BLOCK_FILE_PAGE + || block->index != index + || !block->is_hashed) { + continue; } - /* Remove all hash nodes pointing to this page from the - hash chain */ + page = block->frame; - folds[n_cached] = fold; - n_cached++; -next_rec: - rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); - prev_fold = fold; - } + /* from btr_search_drop_page_hash_index() */ + n_fields = block->curr_n_fields; + n_bytes = block->curr_n_bytes; - for (i = 0; i < n_cached; i++) { - ha_remove_all_nodes_to_page(table, folds[i], page); - } + /* keeping latch order */ + rw_lock_s_unlock(&btr_search_latch); + released_search_latch = TRUE; + rw_lock_x_lock(&block->lock); - ut_a(index->search_info->ref_count > 0); - index->search_info->ref_count--; - block->is_hashed = FALSE; - block->index = NULL; + ut_a(n_fields + n_bytes > 0); + + n_recs = page_get_n_recs(page); + + /* Calculate and cache fold values into an array for fast deletion + from the hash index */ + + folds = mem_alloc(n_recs * sizeof(ulint)); + + n_cached = 0; + + rec = page_get_infimum_rec(page); + rec = page_rec_get_next_low(rec, page_is_comp(page)); + + index_id = btr_page_get_index_id(page); + ut_a(0 == ut_dulint_cmp(index_id, index->id)); + + prev_fold = 0; + + offsets = NULL; + + while (!page_rec_is_supremum(rec)) { + offsets = rec_get_offsets(rec, index, offsets, + n_fields + (n_bytes > 0), &heap); + ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); + fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); + + if (fold == prev_fold && prev_fold != 0) { + + goto next_rec; + } + + /* Remove all hash nodes pointing to this page from the + hash chain */ + + folds[n_cached] = fold; + n_cached++; +next_rec: + rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); + prev_fold = fold; + } + + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_empty(heap); + } + + rw_lock_x_lock(&btr_search_latch); + + if (UNIV_UNLIKELY(!block->is_hashed)) { + goto cleanup; + } + + ut_a(block->index == index); + + if (UNIV_UNLIKELY(block->curr_n_fields != n_fields) + || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) { + rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(&block->lock); + + mem_free(folds); + + rw_lock_s_lock(&btr_search_latch); + goto retry; + } + + for (i = 0; i < n_cached; i++) { + + ha_remove_all_nodes_to_page(table, folds[i], page); + } + + ut_a(index->search_info->ref_count > 0); + index->search_info->ref_count--; + + block->is_hashed = FALSE; + block->index = NULL; + +cleanup: #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG - if (UNIV_UNLIKELY(block->n_pointers)) { - /* Corruption */ - ut_print_timestamp(stderr); - fprintf(stderr, + if (UNIV_UNLIKELY(block->n_pointers)) { + /* Corruption */ + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: Corruption of adaptive hash index. After dropping\n" "InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n", - index->name, (ulong) block->n_pointers); - } + index->name, (ulong) block->n_pointers); + } #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ + rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(&block->lock); - mem_free(folds); + mem_free(folds); + + rw_lock_s_lock(&btr_search_latch); + } } + } while (released_search_latch); - bpage = UT_LIST_GET_PREV(LRU, bpage); - } - - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&btr_search_latch); + rw_lock_s_unlock(&btr_search_latch); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); diff --git a/buf/buf0buddy.c b/buf/buf0buddy.c index 8ce2d1888ef..db94b4bed24 100644 --- a/buf/buf0buddy.c +++ b/buf/buf0buddy.c @@ -346,7 +346,7 @@ buf_buddy_alloc_low( if (have_page_hash_mutex) { rw_lock_x_unlock(&page_hash_latch); } - block = buf_LRU_get_free_block(0); + block = buf_LRU_get_free_block(); *lru = TRUE; //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); @@ -475,6 +475,7 @@ buf_buddy_relocate( if (size >= PAGE_ZIP_MIN_SIZE) { /* This is a compressed page. */ mutex_t* mutex; + ulint space, page_no; if (!have_page_hash_mutex) { mutex_exit(&zip_free_mutex); @@ -490,9 +491,9 @@ buf_buddy_relocate( pool), so there is nothing wrong about this. The mach_read_from_4() calls here will only trigger bogus Valgrind memcheck warnings in UNIV_DEBUG_VALGRIND builds. */ - ulint space = mach_read_from_4( + space = mach_read_from_4( (const byte*) src + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID); - ulint page_no = mach_read_from_4( + page_no = mach_read_from_4( (const byte*) src + FIL_PAGE_OFFSET); /* Suppress Valgrind warnings about conditional jump on uninitialized value. */ diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 175e460753b..07dc09f572b 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -81,9 +81,9 @@ inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx) block->page.offset, DPAH_SIZE << 3); block_hash_byte = block_hash >> 3; block_hash_offset = (byte) block_hash & 0x07; - if (block_hash_byte < 0 || block_hash_byte >= DPAH_SIZE) + if (block_hash_byte >= DPAH_SIZE) fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); - if (block_hash_offset < 0 || block_hash_offset > 7) + if (block_hash_offset > 7) fprintf(stderr, "!!! block_hash_byte = %lu block_hash_offset = %d !!!\n", block_hash_byte, block_hash_offset); if ((trx->distinct_page_access_hash[block_hash_byte] & ((byte) 0x01 << block_hash_offset)) == 0) trx->distinct_page_access++; @@ -457,7 +457,7 @@ buf_page_is_corrupted( "you may have copied the InnoDB\n" "InnoDB: tablespace but not the InnoDB " "log files. See\n" - "InnoDB: " REFMAN "forcing-recovery.html\n" + "InnoDB: " REFMAN "forcing-innodb-recovery.html\n" "InnoDB: for more information.\n", (ulong) mach_read_from_4(read_buf + FIL_PAGE_OFFSET), @@ -754,9 +754,9 @@ buf_block_init( block->modify_clock = 0; -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG block->page.file_page_was_freed = FALSE; -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ block->check_index_page_at_flush = FALSE; block->index = NULL; @@ -839,11 +839,13 @@ buf_chunk_init( ulint zip_hash_mem_size = 0; hash_table_t* zip_hash_tmp = NULL; ulint i; + ulint size_target; buf_shm_info_t* shm_info = NULL; /* Round down to a multiple of page size, although it already should be. */ mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE); + size_target = (mem_size / UNIV_PAGE_SIZE) - 1; srv_buffer_pool_shm_is_reused = FALSE; @@ -1044,6 +1046,10 @@ init_again: chunk->size = size; } + if (chunk->size > size_target) { + chunk->size = size_target; + } + if (shm_info && !(shm_info->is_new)) { /* convert the shared memory segment for reuse */ ptrdiff_t phys_offset; @@ -1829,7 +1835,7 @@ shrink_again: buf_LRU_make_block_old(&block->page); dirty++; - } else if (buf_LRU_free_block(&block->page, TRUE, NULL, FALSE) + } else if (buf_LRU_free_block(&block->page, TRUE, FALSE) != BUF_LRU_FREED) { nonfree++; } @@ -2176,7 +2182,7 @@ buf_page_peek_if_search_hashed( return(is_hashed); } -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG /********************************************************************//** Sets file_page_was_freed TRUE if the page is found in the buffer pool. This function should be called when we free a file page and want the @@ -2198,6 +2204,8 @@ buf_page_set_file_page_was_freed( bpage = buf_page_hash_get(space, offset); if (bpage) { + /* bpage->file_page_was_freed can already hold + when this code is invoked from dict_drop_index_tree() */ bpage->file_page_was_freed = TRUE; } @@ -2236,7 +2244,7 @@ buf_page_reset_file_page_was_freed( return(bpage); } -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ /********************************************************************//** Get read access to a compressed page (usually of type @@ -2332,8 +2340,7 @@ err_exit: ut_a(block_mutex == &((buf_block_t*) bpage)->mutex); /* Discard the uncompressed page frame if possible. */ - if (buf_LRU_free_block(bpage, FALSE, NULL, FALSE) - == BUF_LRU_FREED) { + if (buf_LRU_free_block(bpage, FALSE, FALSE) == BUF_LRU_FREED) { mutex_exit(block_mutex); goto lookup; @@ -2357,7 +2364,7 @@ got_block: buf_page_set_accessed_make_young(bpage, access_time); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(!bpage->file_page_was_freed); #endif @@ -2820,7 +2827,7 @@ wait_until_unfixed: //mutex_exit(&buf_pool_zip_mutex); mutex_exit(block_mutex); - block = buf_LRU_get_free_block(0); + block = buf_LRU_get_free_block(); ut_a(block); block_mutex = &block->mutex; @@ -2973,8 +2980,7 @@ wait_until_unfixed: /* Try to evict the block from the buffer pool, to use the insert buffer as much as possible. */ - if (buf_LRU_free_block(&block->page, TRUE, NULL) - == BUF_LRU_FREED) { + if (buf_LRU_free_block(&block->page, TRUE, FALSE) == BUF_LRU_FREED) { buf_pool_mutex_exit(); mutex_exit(&block->mutex); fprintf(stderr, @@ -3006,7 +3012,7 @@ wait_until_unfixed: buf_page_set_accessed_make_young(&block->page, access_time); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(!block->page.file_page_was_freed); #endif @@ -3182,7 +3188,7 @@ buf_page_optimistic_get( ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(block->page.file_page_was_freed == FALSE); #endif if (innobase_get_slow_log()) { @@ -3302,7 +3308,7 @@ buf_page_get_known_nowait( ut_a(block->page.buf_fix_count > 0); ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(block->page.file_page_was_freed == FALSE); #endif @@ -3393,9 +3399,9 @@ buf_page_try_get_func( ut_a(block->page.buf_fix_count > 0); ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(block->page.file_page_was_freed == FALSE); -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK); buf_pool->stat.n_page_gets++; @@ -3425,9 +3431,9 @@ buf_page_init_low( bpage->oldest_modification = 0; HASH_INVALIDATE(bpage, hash); bpage->is_corrupt = FALSE; -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG bpage->file_page_was_freed = FALSE; -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ } /********************************************************************//** @@ -3555,7 +3561,7 @@ buf_page_init_for_read( && UNIV_LIKELY(!recv_recovery_is_on())) { block = NULL; } else { - block = buf_LRU_get_free_block(0); + block = buf_LRU_get_free_block(); ut_ad(block); } @@ -3681,6 +3687,7 @@ err_exit: bpage->state = BUF_BLOCK_ZIP_PAGE; bpage->space = space; bpage->offset = offset; + bpage->space_was_being_deleted = FALSE; #ifdef UNIV_DEBUG bpage->in_page_hash = FALSE; @@ -3749,7 +3756,7 @@ buf_page_create( ut_ad(mtr->state == MTR_ACTIVE); ut_ad(space || !zip_size); - free_block = buf_LRU_get_free_block(0); + free_block = buf_LRU_get_free_block(); //buf_pool_mutex_enter(); mutex_enter(&LRU_list_mutex); @@ -3761,9 +3768,9 @@ buf_page_create( #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(space, offset) == 0); #endif -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG block->page.file_page_was_freed = FALSE; -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ /* Page can be found in buf_pool */ //buf_pool_mutex_exit(); @@ -3999,7 +4006,7 @@ corrupt: "InnoDB: TABLE to scan your" " table for corruption.\n" "InnoDB: See also " - REFMAN "forcing-recovery.html\n" + REFMAN "forcing-innodb-recovery.html\n" "InnoDB: about forcing recovery.\n", stderr); if (srv_pass_corrupt_table && !trx_sys_sys_space(bpage->space) diff --git a/buf/buf0flu.c b/buf/buf0flu.c index 5db6f816aab..cda8d3b170e 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -367,7 +367,7 @@ buf_flush_ready_for_replace( if (UNIV_LIKELY(bpage->in_LRU_list && buf_page_in_file(bpage))) { - return(bpage->oldest_modification == 0 + return((bpage->oldest_modification == 0 || bpage->space_was_being_deleted) && buf_page_get_io_fix(bpage) == BUF_IO_NONE && bpage->buf_fix_count == 0); } @@ -406,6 +406,13 @@ buf_flush_ready_for_flush( && buf_page_get_io_fix(bpage) == BUF_IO_NONE) { ut_ad(bpage->in_flush_list); + if (bpage->space_was_being_deleted) { + /* should be removed from flush_list here */ + /* because buf_flush_try_neighbors() cannot flush without fil_space_get_size(space) */ + buf_flush_remove(bpage); + return(FALSE); + } + if (flush_type != BUF_FLUSH_LRU) { return(TRUE); diff --git a/buf/buf0lru.c b/buf/buf0lru.c index 1c2c3d7f04f..33db5dce193 100644 --- a/buf/buf0lru.c +++ b/buf/buf0lru.c @@ -530,6 +530,30 @@ next_page_no_mutex: } } +/******************************************************************//** +*/ +UNIV_INTERN +void +buf_LRU_mark_space_was_deleted( +/*===========================*/ + ulint id) /*!< in: space id */ +{ + buf_page_t* bpage; + + mutex_enter(&LRU_list_mutex); + + bpage = UT_LIST_GET_FIRST(buf_pool->LRU); + + while (bpage != NULL) { + if (buf_page_get_space(bpage) == id) { + bpage->space_was_being_deleted = TRUE; + } + bpage = UT_LIST_GET_NEXT(LRU, bpage); + } + + mutex_exit(&LRU_list_mutex); +} + /********************************************************************//** Insert a compressed block into buf_pool->zip_clean in the LRU order. */ UNIV_INTERN @@ -618,7 +642,7 @@ restart: ut_ad(block->in_unzip_LRU_list); ut_ad(block->page.in_LRU_list); - freed = buf_LRU_free_block(&block->page, FALSE, NULL, have_LRU_mutex); + freed = buf_LRU_free_block(&block->page, FALSE, have_LRU_mutex); mutex_exit(&block->mutex); switch (freed) { @@ -690,7 +714,7 @@ restart: ut_ad(bpage->in_LRU_list); accessed = buf_page_is_accessed(bpage); - freed = buf_LRU_free_block(bpage, TRUE, NULL, have_LRU_mutex); + freed = buf_LRU_free_block(bpage, TRUE, have_LRU_mutex); mutex_exit(block_mutex); switch (freed) { @@ -876,10 +900,8 @@ LRU list to the free list. @return the free control block, in state BUF_BLOCK_READY_FOR_USE */ UNIV_INTERN buf_block_t* -buf_LRU_get_free_block( -/*===================*/ - ulint zip_size) /*!< in: compressed page size in bytes, - or 0 if uncompressed tablespace */ +buf_LRU_get_free_block(void) +/*========================*/ { buf_block_t* block = NULL; ibool freed; @@ -955,28 +977,10 @@ loop: /* If there is a block in the free list, take it */ block = buf_LRU_get_free_only(); + //buf_pool_mutex_exit(); + if (block) { - -#ifdef UNIV_DEBUG - block->page.zip.m_start = -#endif /* UNIV_DEBUG */ - block->page.zip.m_end = - block->page.zip.m_nonempty = - block->page.zip.n_blobs = 0; - - if (UNIV_UNLIKELY(zip_size)) { - ibool lru; - page_zip_set_size(&block->page.zip, zip_size); - mutex_enter(&LRU_list_mutex); - block->page.zip.data = buf_buddy_alloc(zip_size, &lru, FALSE); - mutex_exit(&LRU_list_mutex); - UNIV_MEM_DESC(block->page.zip.data, zip_size, block); - } else { - page_zip_set_size(&block->page.zip, 0); - block->page.zip.data = NULL; - } - - //buf_pool_mutex_exit(); + memset(&block->page.zip, 0, sizeof block->page.zip); if (started_monitor) { srv_print_innodb_monitor = mon_value_was; @@ -988,8 +992,6 @@ loop: /* If no block was in the free list, search from the end of the LRU list and try to free a block there */ - //buf_pool_mutex_exit(); - freed = buf_LRU_search_and_free_block(n_iterations); if (freed > 0) { @@ -1471,10 +1473,6 @@ buf_LRU_free_block( buf_page_t* bpage, /*!< in: block to be freed */ ibool zip, /*!< in: TRUE if should remove also the compressed page of an uncompressed page */ - ibool* buf_pool_mutex_released, - /*!< in: pointer to a variable that will - be assigned TRUE if buf_pool_mutex - was temporarily released, or NULL */ ibool have_LRU_mutex) { buf_page_t* b = NULL; @@ -1498,6 +1496,10 @@ buf_LRU_free_block( return(BUF_LRU_NOT_FREED); } + if (bpage->space_was_being_deleted && bpage->oldest_modification != 0) { + buf_flush_remove(bpage); + } + #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(bpage->space, bpage->offset) == 0); #endif /* UNIV_IBUF_COUNT_DEBUG */ @@ -1685,10 +1687,6 @@ not_freed: b->io_fix = BUF_IO_READ; } - if (buf_pool_mutex_released) { - *buf_pool_mutex_released = TRUE; - } - //buf_pool_mutex_exit(); mutex_exit(&LRU_list_mutex); rw_lock_x_unlock(&page_hash_latch); @@ -2093,6 +2091,7 @@ buf_LRU_stat_update(void) /*=====================*/ { buf_LRU_stat_t* item; + buf_LRU_stat_t cur_stat; /* If we haven't started eviction yet then don't update stats. */ if (buf_pool->freed_page_clock == 0) { @@ -2107,12 +2106,19 @@ buf_LRU_stat_update(void) buf_LRU_stat_arr_ind++; buf_LRU_stat_arr_ind %= BUF_LRU_STAT_N_INTERVAL; - /* Add the current value and subtract the obsolete entry. */ - buf_LRU_stat_sum.io += buf_LRU_stat_cur.io - item->io; - buf_LRU_stat_sum.unzip += buf_LRU_stat_cur.unzip - item->unzip; + /* Add the current value and subtract the obsolete entry. + Since buf_LRU_stat_cur is not protected by any mutex, + it can be changing between adding to buf_LRU_stat_sum + and copying to item. Assign it to local variables to make + sure the same value assign to the buf_LRU_stat_sum + and item */ + cur_stat = buf_LRU_stat_cur; + + buf_LRU_stat_sum.io += cur_stat.io - item->io; + buf_LRU_stat_sum.unzip += cur_stat.unzip - item->unzip; /* Put current entry in the array. */ - memcpy(item, &buf_LRU_stat_cur, sizeof *item); + memcpy(item, &cur_stat, sizeof *item); //buf_pool_mutex_exit(); mutex_exit(&buf_pool_mutex); @@ -2361,8 +2367,7 @@ buf_LRU_file_restore(void) continue; } - if (fil_area_is_exist(space_id, zip_size, page_no, 0, - zip_size ? zip_size : UNIV_PAGE_SIZE)) { + if (fil_is_exist(space_id, page_no)) { tablespace_version = fil_space_get_version(space_id); diff --git a/dict/dict0boot.c b/dict/dict0boot.c index 43cfced65a0..2b6a208321d 100644 --- a/dict/dict0boot.c +++ b/dict/dict0boot.c @@ -465,16 +465,20 @@ dict_boot(void) ut_a(error == DB_SUCCESS); /*-------------------------*/ - table = dict_mem_table_create("SYS_STATS", DICT_HDR_SPACE, 3, 0); + table = dict_mem_table_create("SYS_STATS", DICT_HDR_SPACE, 4, 0); table->n_mysql_handles_opened = 1; /* for pin */ dict_mem_table_add_col(table, heap, "INDEX_ID", DATA_BINARY, 0, 0); dict_mem_table_add_col(table, heap, "KEY_COLS", DATA_INT, 0, 4); dict_mem_table_add_col(table, heap, "DIFF_VALS", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "NON_NULL_VALS", DATA_BINARY, 0, 0); /* The '+ 2' below comes from the fields DB_TRX_ID, DB_ROLL_PTR */ #if DICT_SYS_STATS_DIFF_VALS_FIELD != 2 + 2 #error "DICT_SYS_STATS_DIFF_VALS_FIELD != 2 + 2" +#endif +#if DICT_SYS_STATS_NON_NULL_VALS_FIELD != 3 + 2 +#error "DICT_SYS_STATS_NON_NULL_VALS_FIELD != 3 + 2" #endif table->id = DICT_STATS_ID; diff --git a/dict/dict0crea.c b/dict/dict0crea.c index 45765949496..99b9f266ddc 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -529,7 +529,7 @@ dict_create_sys_stats_tuple( sys_stats = dict_sys->sys_stats; - entry = dtuple_create(heap, 3 + DATA_N_SYS_COLS); + entry = dtuple_create(heap, 4 + DATA_N_SYS_COLS); dict_table_copy_types(entry, sys_stats); @@ -548,6 +548,11 @@ dict_create_sys_stats_tuple( ptr = mem_heap_alloc(heap, 8); mach_write_to_8(ptr, ut_dulint_zero); /* initial value is 0 */ dfield_set_data(dfield, ptr, 8); + /* 5: NON_NULL_VALS ------------------*/ + dfield = dtuple_get_nth_field(entry, 3/*NON_NULL_VALS*/); + ptr = mem_heap_alloc(heap, 8); + mach_write_to_8(ptr, ut_dulint_zero); /* initial value is 0 */ + dfield_set_data(dfield, ptr, 8); return(entry); } diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 4d99907f093..18880a5c72c 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -937,7 +937,7 @@ dict_table_rename_in_cache( dict_foreign_t* foreign; dict_index_t* index; ulint fold; - char old_name[MAX_TABLE_NAME_LEN + 1]; + char old_name[MAX_FULL_NAME_LEN + 1]; ut_ad(table); ut_ad(mutex_own(&(dict_sys->mutex))); @@ -949,7 +949,7 @@ dict_table_rename_in_cache( ut_print_timestamp(stderr); fprintf(stderr, "InnoDB: too long table name: '%s', " "max length is %d\n", table->name, - MAX_TABLE_NAME_LEN); + MAX_FULL_NAME_LEN); ut_error; } @@ -999,11 +999,11 @@ dict_table_rename_in_cache( ut_fold_string(old_name), table); if (strlen(new_name) > strlen(table->name)) { - /* We allocate MAX_TABLE_NAME_LEN+1 bytes here to avoid + /* We allocate MAX_FULL_NAME_LEN + 1 bytes here to avoid memory fragmentation, we assume a repeated calls of ut_realloc() with the same size do not cause fragmentation */ - ut_a(strlen(new_name) <= MAX_TABLE_NAME_LEN); - table->name = ut_realloc(table->name, MAX_TABLE_NAME_LEN + 1); + ut_a(strlen(new_name) <= MAX_FULL_NAME_LEN); + table->name = ut_realloc(table->name, MAX_FULL_NAME_LEN + 1); } memcpy(table->name, new_name, strlen(new_name) + 1); @@ -1732,6 +1732,12 @@ undo_size_ok: new_index->heap, (1 + dict_index_get_n_unique(new_index)) * sizeof(ib_int64_t)); + + new_index->stat_n_non_null_key_vals = mem_heap_zalloc( + new_index->heap, + (1 + dict_index_get_n_unique(new_index)) + * sizeof(*new_index->stat_n_non_null_key_vals)); + /* Give some sensible values to stat_n_... in case we do not calculate statistics quickly enough */ @@ -2756,7 +2762,7 @@ dict_scan_to( quote = '\0'; } else if (quote) { /* Within quotes: do nothing. */ - } else if (*ptr == '`' || *ptr == '"') { + } else if (*ptr == '`' || *ptr == '"' || *ptr == '\'') { /* Starting quote: remember the quote character. */ quote = *ptr; } else { @@ -4331,15 +4337,18 @@ dict_reload_statistics( ulint key_cols; ulint n_cols; const rec_t* rec; + ulint n_fields; const byte* field; ulint len; ib_int64_t* stat_n_diff_key_vals_tmp; + ib_int64_t* stat_n_non_null_key_vals_tmp; byte* buf; ulint i; mtr_t mtr; n_cols = dict_index_get_n_unique(index); stat_n_diff_key_vals_tmp = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); + stat_n_non_null_key_vals_tmp = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); sys_stats = dict_sys->sys_stats; sys_index = UT_LIST_GET_FIRST(sys_stats->indexes); @@ -4375,9 +4384,13 @@ dict_reload_statistics( } if (rec_get_deleted_flag(rec, 0)) { + /* don't count */ + i--; goto next_rec; } + n_fields = rec_get_n_fields_old(rec); + field = rec_get_nth_field_old(rec, 1, &len); ut_a(len == 4); @@ -4389,6 +4402,21 @@ dict_reload_statistics( ut_a(len == 8); stat_n_diff_key_vals_tmp[i] = ut_conv_dulint_to_longlong(mach_read_from_8(field)); + + if (n_fields > DICT_SYS_STATS_NON_NULL_VALS_FIELD) { + field = rec_get_nth_field_old(rec, DICT_SYS_STATS_NON_NULL_VALS_FIELD, &len); + ut_a(len == 8); + + stat_n_non_null_key_vals_tmp[i] = ut_conv_dulint_to_longlong(mach_read_from_8(field)); + } else { + /* not enough fields: should be older */ + fprintf(stderr, "InnoDB: Notice: stats for %s/%s (%lu/%lu)" + " in SYS_STATS seems older format. " + "Please execute ANALYZE TABLE for it.\n", + index->table_name, index->name, i, n_cols); + + stat_n_non_null_key_vals_tmp[i] = ((ib_int64_t)(-1)); + } next_rec: btr_pcur_move_to_next_user_rec(&pcur, &mtr); } @@ -4398,6 +4426,12 @@ next_rec: for (i = 0; i <= n_cols; i++) { index->stat_n_diff_key_vals[i] = stat_n_diff_key_vals_tmp[i]; + if (stat_n_non_null_key_vals_tmp[i] == ((ib_int64_t)(-1))) { + /* approximate value */ + index->stat_n_non_null_key_vals[i] = stat_n_diff_key_vals_tmp[n_cols]; + } else { + index->stat_n_non_null_key_vals[i] = stat_n_non_null_key_vals_tmp[i]; + } } } /*===========================================*/ @@ -4442,18 +4476,22 @@ dict_store_statistics( ulint n_cols; ulint rests; const rec_t* rec; + ulint n_fields; const byte* field; ulint len; ib_int64_t* stat_n_diff_key_vals_tmp; + ib_int64_t* stat_n_non_null_key_vals_tmp; byte* buf; ulint i; mtr_t mtr; n_cols = dict_index_get_n_unique(index); stat_n_diff_key_vals_tmp = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); + stat_n_non_null_key_vals_tmp = mem_heap_zalloc(heap, (n_cols + 1) * sizeof(ib_int64_t)); for (i = 0; i <= n_cols; i++) { stat_n_diff_key_vals_tmp[i] = index->stat_n_diff_key_vals[i]; + stat_n_non_null_key_vals_tmp[i] = index->stat_n_non_null_key_vals[i]; } sys_stats = dict_sys->sys_stats; @@ -4481,12 +4519,24 @@ dict_store_statistics( || ut_dulint_cmp(mach_read_from_8(rec_get_nth_field_old(rec, 0, &len)), index->id)) { /* not found */ - btr_pcur_close(&pcur); - mtr_commit(&mtr); + + break; } if (rec_get_deleted_flag(rec, 0)) { + /* don't count */ + i--; + goto next_rec; + } + + n_fields = rec_get_n_fields_old(rec); + + if (n_fields <= DICT_SYS_STATS_NON_NULL_VALS_FIELD) { + /* not update for the older smaller format */ + fprintf(stderr, "InnoDB: Notice: stats for %s/%s (%lu/%lu)" + " in SYS_STATS seems older format. Please ANALYZE TABLE it.\n", + index->table_name, index->name, i, n_cols); goto next_rec; } @@ -4503,6 +4553,14 @@ dict_store_statistics( (ulint) stat_n_diff_key_vals_tmp[key_cols] & 0xFFFFFFFF), &mtr); + field = rec_get_nth_field_old(rec, DICT_SYS_STATS_NON_NULL_VALS_FIELD, &len); + ut_a(len == 8); + + mlog_write_dulint((byte*)field, + ut_dulint_create((ulint) (stat_n_non_null_key_vals_tmp[key_cols] >> 32), + (ulint) stat_n_non_null_key_vals_tmp[key_cols] & 0xFFFFFFFF), + &mtr); + rests--; next_rec: @@ -4635,6 +4693,10 @@ dict_update_statistics( for (i = dict_index_get_n_unique(index); i; ) { index->stat_n_diff_key_vals[i--] = 1; } + + memset(index->stat_n_non_null_key_vals, 0, + (1 + dict_index_get_n_unique(index)) + * sizeof(*index->stat_n_non_null_key_vals)); } index = dict_table_get_next_index(index); @@ -4662,6 +4724,78 @@ end: dict_table_stats_unlock(table, RW_X_LATCH); } +/*********************************************************************//** +*/ +UNIV_INTERN +ibool +dict_is_older_statistics( +/*=====================*/ + dict_index_t* index) +{ + mem_heap_t* heap; + dict_table_t* sys_stats; + dict_index_t* sys_index; + btr_pcur_t pcur; + dtuple_t* tuple; + dfield_t* dfield; + const rec_t* rec; + ulint n_fields; + ulint len; + byte* buf; + mtr_t mtr; + + heap = mem_heap_create(100); + + sys_stats = dict_sys->sys_stats; + sys_index = UT_LIST_GET_FIRST(sys_stats->indexes); + ut_a(!dict_table_is_comp(sys_stats)); + + tuple = dtuple_create(heap, 1); + dfield = dtuple_get_nth_field(tuple, 0); + + buf = mem_heap_alloc(heap, 8); + mach_write_to_8(buf, index->id); + + dfield_set_data(dfield, buf, 8); + dict_index_copy_types(tuple, sys_index, 1); + + mtr_start(&mtr); + + btr_pcur_open_on_user_rec(sys_index, tuple, PAGE_CUR_GE, + BTR_SEARCH_LEAF, &pcur, &mtr); + +next_rec: + rec = btr_pcur_get_rec(&pcur); + + if (!btr_pcur_is_on_user_rec(&pcur) + || ut_dulint_cmp(mach_read_from_8(rec_get_nth_field_old(rec, 0, &len)), + index->id)) { + /* not found */ + btr_pcur_close(&pcur); + mtr_commit(&mtr); + mem_heap_free(heap); + /* no statistics == not older statistics */ + return(FALSE); + } + + if (rec_get_deleted_flag(rec, 0)) { + btr_pcur_move_to_next_user_rec(&pcur, &mtr); + goto next_rec; + } + + n_fields = rec_get_n_fields_old(rec); + + btr_pcur_close(&pcur); + mtr_commit(&mtr); + mem_heap_free(heap); + + if (n_fields > DICT_SYS_STATS_NON_NULL_VALS_FIELD) { + return(FALSE); + } else { + return(TRUE); + } +} + /**********************************************************************//** Prints info of a foreign key constraint. */ static diff --git a/dict/dict0load.c b/dict/dict0load.c index 758ee8b4969..edd77e2530f 100644 --- a/dict/dict0load.c +++ b/dict/dict0load.c @@ -40,6 +40,7 @@ Created 4/24/1996 Heikki Tuuri #include "rem0cmp.h" #include "srv0start.h" #include "srv0srv.h" +#include "trx0sys.h" /****************************************************************//** Compare the name of an index column. diff --git a/fil/fil0fil.c b/fil/fil0fil.c index 52af7d45f25..fe0f591e423 100644 --- a/fil/fil0fil.c +++ b/fil/fil0fil.c @@ -242,6 +242,7 @@ the ib_logfiles form a 'space' and it is handled here */ struct fil_system_struct { #ifndef UNIV_HOTBACKUP mutex_t mutex; /*!< The mutex protecting the cache */ + mutex_t file_extend_mutex; #endif /* !UNIV_HOTBACKUP */ hash_table_t* spaces; /*!< The hash table of spaces in the system; they are hashed on the space @@ -690,7 +691,7 @@ fil_node_open_file( ut_a(space->purpose != FIL_LOG); ut_a(!trx_sys_sys_space(space->id)); - if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { + if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { fprintf(stderr, "InnoDB: Error: the size of single-table" " tablespace file %s\n" @@ -816,7 +817,7 @@ fil_node_close_file( ut_ad(node && system); ut_ad(mutex_own(&(system->mutex))); ut_a(node->open); - ut_a(node->n_pending == 0); + ut_a(node->n_pending == 0 || srv_lazy_drop_table); ut_a(node->n_pending_flushes == 0); ut_a(node->modification_counter == node->flush_counter); @@ -1028,7 +1029,7 @@ fil_node_free( ut_ad(node && system && space); ut_ad(mutex_own(&(system->mutex))); ut_a(node->magic_n == FIL_NODE_MAGIC_N); - ut_a(node->n_pending == 0); + ut_a(node->n_pending == 0 || srv_lazy_drop_table); if (node->open) { /* We fool the assertion in fil_node_close_file() to think @@ -1549,6 +1550,7 @@ fil_init( fil_system = mem_zalloc(sizeof(fil_system_t)); mutex_create(&fil_system->mutex, SYNC_ANY_LATCH); + mutex_create(&fil_system->file_extend_mutex, SYNC_OUTER_ANY_LATCH); fil_system->spaces = hash_create(hash_size); fil_system->name_hash = hash_create(hash_size); @@ -2295,7 +2297,11 @@ try_again: completely and permanently. The flag is_being_deleted also prevents fil_flush() from being applied to this tablespace. */ + if (srv_lazy_drop_table) { + buf_LRU_mark_space_was_deleted(id); + } else { buf_LRU_invalidate_tablespace(id); + } #endif /* printf("Deleting tablespace %s id %lu\n", space->name, id); */ @@ -3095,8 +3101,8 @@ fil_open_single_table_tablespace( space_id = fsp_header_get_space_id(page); space_flags = fsp_header_get_flags(page); - if (srv_expand_import - && (space_id != id || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) { + if (srv_expand_import) { + ibool file_is_corrupt = FALSE; byte* buf3; byte* descr_page; @@ -3167,8 +3173,10 @@ fil_open_single_table_tablespace( if (size_bytes < free_limit_bytes) { free_limit_bytes = size_bytes; - fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath); - file_is_corrupt = TRUE; + if (size_bytes >= (ib_int64_t) (FSP_EXTENT_SIZE * UNIV_PAGE_SIZE)) { + fprintf(stderr, "InnoDB: free limit of %s is larger than its real size.\n", filepath); + file_is_corrupt = TRUE; + } } /* get cruster index information */ @@ -3314,7 +3322,7 @@ skip_info: file_is_corrupt = TRUE; descr_is_corrupt = TRUE; } else { - ut_a(fil_page_get_type(page) == FIL_PAGE_TYPE_XDES); + descr_is_corrupt = FALSE; } @@ -3778,7 +3786,7 @@ fil_load_single_table_tablespace( size = (((ib_int64_t)size_high) << 32) + (ib_int64_t)size_low; #ifndef UNIV_HOTBACKUP - if (size < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { + if (size < FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { fprintf(stderr, "InnoDB: Error: the size of single-table tablespace" " file %s\n" @@ -3798,7 +3806,7 @@ fil_load_single_table_tablespace( /* Align the memory for file i/o if we might have O_DIRECT set */ page = ut_align(buf2, UNIV_PAGE_SIZE); - if (size >= FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) { + if (size >= FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); /* We have to read the tablespace id from the file */ @@ -4348,6 +4356,10 @@ fil_extend_space_to_desired_size( ulint page_size; ibool success = TRUE; + /* file_extend_mutex is for http://bugs.mysql.com/56433 */ + /* to protect from the other fil_extend_space_to_desired_size() */ + /* during temprary releasing &fil_system->mutex */ + mutex_enter(&fil_system->file_extend_mutex); fil_mutex_enter_and_prepare_for_io(space_id); space = fil_space_get_by_id(space_id); @@ -4359,6 +4371,7 @@ fil_extend_space_to_desired_size( *actual_size = space->size; mutex_exit(&fil_system->mutex); + mutex_exit(&fil_system->file_extend_mutex); return(TRUE); } @@ -4391,6 +4404,8 @@ fil_extend_space_to_desired_size( offset_low = ((start_page_no - file_start_page_no) % (4096 * ((1024 * 1024) / page_size))) * page_size; + + mutex_exit(&fil_system->mutex); #ifdef UNIV_HOTBACKUP success = os_file_write(node->name, node->handle, buf, offset_low, offset_high, @@ -4400,8 +4415,10 @@ fil_extend_space_to_desired_size( node->name, node->handle, buf, offset_low, offset_high, page_size * n_pages, - NULL, NULL, NULL); + NULL, NULL, space_id, NULL); #endif + mutex_enter(&fil_system->mutex); + if (success) { node->size += n_pages; space->size += n_pages; @@ -4447,6 +4464,7 @@ fil_extend_space_to_desired_size( printf("Extended %s to %lu, actual size %lu pages\n", space->name, size_after_extend, *actual_size); */ mutex_exit(&fil_system->mutex); + mutex_exit(&fil_system->file_extend_mutex); fil_flush(space_id); @@ -4811,6 +4829,22 @@ _fil_io( srv_data_written+= len; } + /* if the table space was already deleted, space might not exist already. */ + if (message + && space_id < SRV_LOG_SPACE_FIRST_ID + && ((buf_page_t*)message)->space_was_being_deleted) { + + if (mode == OS_AIO_NORMAL) { + buf_page_io_complete(message, trx); + return(DB_SUCCESS); /*fake*/ + } + if (type == OS_FILE_READ) { + return(DB_TABLESPACE_DELETED); + } else { + return(DB_SUCCESS); /*fake*/ + } + } + /* Reserve the fil_system mutex and make sure that we can open at least one file while holding it, if the file is not already open */ @@ -4940,10 +4974,24 @@ _fil_io( #else /* Queue the aio request */ ret = os_aio(type, mode | wake_later, node->name, node->handle, buf, - offset_low, offset_high, len, node, message, trx); + offset_low, offset_high, len, node, message, space_id, trx); #endif } /**/ + /* if the table space was already deleted, space might not exist already. */ + if (message + && space_id < SRV_LOG_SPACE_FIRST_ID + && ((buf_page_t*)message)->space_was_being_deleted) { + + if (mode == OS_AIO_SYNC) { + if (type == OS_FILE_READ) { + return(DB_TABLESPACE_DELETED); + } else { + return(DB_SUCCESS); /*fake*/ + } + } + } + ut_a(ret); if (mode == OS_AIO_SYNC) { @@ -4966,18 +5014,10 @@ _fil_io( Confirm whether the parameters are valid or not */ UNIV_INTERN ibool -fil_area_is_exist( +fil_is_exist( /*==============*/ ulint space_id, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes; - 0 for uncompressed pages */ - ulint block_offset, /*!< in: offset in number of blocks */ - ulint byte_offset, /*!< in: remainder of offset in bytes; in - aio this must be divisible by the OS block - size */ - ulint len) /*!< in: how many bytes to read or write; this - must not cross a file boundary; in aio this - must be a block size multiple */ + ulint block_offset) /*!< in: offset in number of blocks */ { fil_space_t* space; fil_node_t* node; @@ -5051,6 +5091,7 @@ fil_aio_wait( fil_node_t* fil_node; void* message; ulint type; + ulint space_id = 0; ut_ad(fil_validate()); @@ -5058,7 +5099,7 @@ fil_aio_wait( srv_set_io_thread_op_info(segment, "native aio handle"); #ifdef WIN_ASYNC_IO ret = os_aio_windows_handle(segment, 0, &fil_node, - &message, &type); + &message, &type, &space_id); #else ret = 0; /* Eliminate compiler warning */ ut_error; @@ -5067,7 +5108,22 @@ fil_aio_wait( srv_set_io_thread_op_info(segment, "simulated aio handle"); ret = os_aio_simulated_handle(segment, &fil_node, - &message, &type); + &message, &type, &space_id); + } + + /* if the table space was already deleted, fil_node might not exist already. */ + if (message + && space_id < SRV_LOG_SPACE_FIRST_ID + && ((buf_page_t*)message)->space_was_being_deleted) { + + /* intended not to be uncompress read page */ + ut_a(buf_page_get_io_fix(message) == BUF_IO_WRITE + || !buf_page_get_zip_size(message) + || buf_page_get_state(message) != BUF_BLOCK_FILE_PAGE); + + srv_set_io_thread_op_info(segment, "complete io for buf page"); + buf_page_io_complete(message, NULL); + return; } ut_a(ret); diff --git a/fsp/fsp0fsp.c b/fsp/fsp0fsp.c index c5a28d60880..c8e4f8e269c 100644 --- a/fsp/fsp0fsp.c +++ b/fsp/fsp0fsp.c @@ -657,17 +657,18 @@ xdes_calc_descriptor_page( 0 for uncompressed pages */ ulint offset) /*!< in: page offset */ { -#ifndef DOXYGEN /* Doxygen gets confused of these */ +//#ifndef DOXYGEN /* Doxygen gets confused of these */ //# if UNIV_PAGE_SIZE <= XDES_ARR_OFFSET // + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE //# error //# endif -# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET \ - + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE -# error -# endif -#endif /* !DOXYGEN */ +//# if PAGE_ZIP_MIN_SIZE <= XDES_ARR_OFFSET +// + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE +//# error +//# endif +//#endif /* !DOXYGEN */ ut_a(UNIV_PAGE_SIZE > XDES_ARR_OFFSET + (UNIV_PAGE_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE); + ut_a(PAGE_ZIP_MIN_SIZE > XDES_ARR_OFFSET + (PAGE_ZIP_MIN_SIZE / FSP_EXTENT_SIZE) * XDES_SIZE); ut_ad(ut_is_2pow(zip_size)); if (!zip_size) { @@ -3359,7 +3360,7 @@ fseg_free_page_low( "InnoDB: database!\n", (ulong) page); crash: fputs("InnoDB: Please refer to\n" - "InnoDB: " REFMAN "forcing-recovery.html\n" + "InnoDB: " REFMAN "forcing-innodb-recovery.html\n" "InnoDB: about forcing recovery.\n", stderr); ut_error; } @@ -3477,9 +3478,9 @@ fseg_free_page( fseg_free_page_low(seg_inode, space, zip_size, page, mtr); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG buf_page_set_file_page_was_freed(space, page); -#endif +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ } /**********************************************************************//** @@ -3546,13 +3547,13 @@ fseg_free_extent( fsp_free_extent(space, zip_size, page, mtr); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG for (i = 0; i < FSP_EXTENT_SIZE; i++) { buf_page_set_file_page_was_freed(space, first_page_in_extent + i); } -#endif +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ } /**********************************************************************//** diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 519984f2f73..5722033f4b4 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -204,6 +204,25 @@ static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; +/** Possible values for system variable "innodb_stats_method". The values +are defined the same as its corresponding MyISAM system variable +"myisam_stats_method"(see "myisam_stats_method_names"), for better usability */ +static const char* innodb_stats_method_names[] = { + "nulls_equal", + "nulls_unequal", + "nulls_ignored", + NullS +}; + +/** Used to define an enumerate type of the system variable innodb_stats_method. +This is the same as "myisam_stats_method_typelib" */ +static TYPELIB innodb_stats_method_typelib = { + array_elements(innodb_stats_method_names) - 1, + "innodb_stats_method_typelib", + innodb_stats_method_names, + NULL +}; + /* The following counter is used to convey information to InnoDB about server activity: in selects it is not sensible to call srv_active_wake_master_thread after each fetch or search, we only do @@ -5862,6 +5881,11 @@ ha_innobase::index_read( case DB_SUCCESS: error = 0; table->status = 0; +#ifdef EXTENDED_FOR_USERSTAT + rows_read++; + if (active_index < MAX_KEY) + index_rows_read[active_index]++; +#endif break; case DB_RECORD_NOT_FOUND: error = HA_ERR_KEY_NOT_FOUND; @@ -6085,7 +6109,7 @@ ha_innobase::general_fetch( table->status = 0; #ifdef EXTENDED_FOR_USERSTAT rows_read++; - if (active_index >= 0 && active_index < MAX_KEY) + if (active_index < MAX_KEY) index_rows_read[active_index]++; #endif break; @@ -6421,6 +6445,16 @@ create_table_def( DBUG_RETURN(HA_ERR_GENERIC); } + /* MySQL does the name length check. But we do additional check + on the name length here */ + if (strlen(table_name) > MAX_FULL_NAME_LEN) { + push_warning_printf( + (THD*) trx->mysql_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_TABLE_NAME, + "InnoDB: Table Name or Database Name is too long"); + DBUG_RETURN(ER_TABLE_NAME); + } + n_cols = form->s->fields; /* We pass 0 as the space id, and determine at a lower level the space @@ -6705,10 +6739,11 @@ create_clustered_index_when_no_primary( /*****************************************************************//** Return a display name for the row format @return row format name */ - -const char *get_row_format_name( -/*============================*/ -enum row_type row_format) /*!< in: Row Format */ +UNIV_INTERN +const char* +get_row_format_name( +/*================*/ + enum row_type row_format) /*!< in: Row Format */ { switch (row_format) { case ROW_TYPE_COMPACT: @@ -6723,12 +6758,38 @@ enum row_type row_format) /*!< in: Row Format */ return("DEFAULT"); case ROW_TYPE_FIXED: return("FIXED"); - default: + case ROW_TYPE_PAGE: + case ROW_TYPE_NOT_USED: break; } return("NOT USED"); } +/** If file-per-table is missing, issue warning and set ret false */ +#define CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE \ + if (!srv_file_per_table) { \ + push_warning_printf( \ + thd, MYSQL_ERROR::WARN_LEVEL_WARN, \ + ER_ILLEGAL_HA_CREATE_OPTION, \ + "InnoDB: ROW_FORMAT=%s requires" \ + " innodb_file_per_table.", \ + get_row_format_name(row_format)); \ + ret = FALSE; \ + } + +/** If file-format is Antelope, issue warning and set ret false */ +#define CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE \ + if (srv_file_format < DICT_TF_FORMAT_ZIP) { \ + push_warning_printf( \ + thd, MYSQL_ERROR::WARN_LEVEL_WARN, \ + ER_ILLEGAL_HA_CREATE_OPTION, \ + "InnoDB: ROW_FORMAT=%s requires" \ + " innodb_file_format > Antelope.", \ + get_row_format_name(row_format)); \ + ret = FALSE; \ + } + + /*****************************************************************//** Validates the create options. We may build on this function in future. For now, it checks two specifiers: @@ -6746,7 +6807,7 @@ create_options_are_valid( { ibool kbs_specified = FALSE; ibool ret = TRUE; - enum row_type row_type = form->s->row_type; + enum row_type row_format = form->s->row_type; ut_ad(thd != NULL); @@ -6755,23 +6816,6 @@ create_options_are_valid( return(TRUE); } - /* Check for a valid Innodb ROW_FORMAT specifier. For example, - ROW_TYPE_FIXED can be sent to Innodb */ - switch (row_type) { - case ROW_TYPE_COMPACT: - case ROW_TYPE_COMPRESSED: - case ROW_TYPE_DYNAMIC: - case ROW_TYPE_REDUNDANT: - case ROW_TYPE_DEFAULT: - break; - default: - push_warning( - thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: invalid ROW_FORMAT specifier."); - ret = FALSE; - } - ut_ad(form != NULL); ut_ad(create_info != NULL); @@ -6784,7 +6828,23 @@ create_options_are_valid( case 4: case 8: case 16: - /* Valid value. */ + /* Valid KEY_BLOCK_SIZE, check its dependencies. */ + if (!srv_file_per_table) { + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE requires" + " innodb_file_per_table."); + ret = FALSE; + } + if (srv_file_format < DICT_TF_FORMAT_ZIP) { + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, + "InnoDB: KEY_BLOCK_SIZE requires" + " innodb_file_format > Antelope."); + ret = FALSE; + } break; default: push_warning_printf( @@ -6794,72 +6854,43 @@ create_options_are_valid( " Valid values are [1, 2, 4, 8, 16]", create_info->key_block_size); ret = FALSE; + break; } } - /* If KEY_BLOCK_SIZE was specified, check for its - dependencies. */ - if (kbs_specified && !srv_file_per_table) { - push_warning( - thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_per_table."); - ret = FALSE; - } - - if (kbs_specified && srv_file_format < DICT_TF_FORMAT_ZIP) { - push_warning( - thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE requires" - " innodb_file_format > Antelope."); - ret = FALSE; - } - - switch (row_type) { + /* Check for a valid Innodb ROW_FORMAT specifier and + other incompatibilities. */ + switch (row_format) { case ROW_TYPE_COMPRESSED: - case ROW_TYPE_DYNAMIC: - /* These two ROW_FORMATs require srv_file_per_table - and srv_file_format > Antelope */ - if (!srv_file_per_table) { - push_warning_printf( - thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s" - " requires innodb_file_per_table.", - get_row_format_name(row_type)); - ret = FALSE; - } - - if (srv_file_format < DICT_TF_FORMAT_ZIP) { - push_warning_printf( - thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ROW_FORMAT=%s requires" - " innodb_file_format > Antelope.", - get_row_format_name(row_type)); - ret = FALSE; - } - default: + CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE; + CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE; break; - } - - switch (row_type) { - case ROW_TYPE_REDUNDANT: - case ROW_TYPE_COMPACT: case ROW_TYPE_DYNAMIC: - /* KEY_BLOCK_SIZE is only allowed with Compressed or Default */ + CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE; + CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE; + /* fall through since dynamic also shuns KBS */ + case ROW_TYPE_COMPACT: + case ROW_TYPE_REDUNDANT: if (kbs_specified) { push_warning_printf( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: cannot specify ROW_FORMAT = %s" " with KEY_BLOCK_SIZE.", - get_row_format_name(row_type)); - ret = FALSE; + get_row_format_name(row_format)); + ret = FALSE; } - default: + break; + case ROW_TYPE_DEFAULT: + break; + case ROW_TYPE_FIXED: + case ROW_TYPE_PAGE: + case ROW_TYPE_NOT_USED: + push_warning( + thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_ILLEGAL_HA_CREATE_OPTION, \ + "InnoDB: invalid ROW_FORMAT specifier."); + ret = FALSE; break; } @@ -6910,7 +6941,7 @@ ha_innobase::create( const ulint file_format = srv_file_format; const char* stmt; size_t stmt_len; - enum row_type row_type; + enum row_type row_format; DBUG_ENTER("ha_innobase::create"); @@ -7010,8 +7041,8 @@ ha_innobase::create( push_warning( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: KEY_BLOCK_SIZE" - " requires innodb_file_per_table."); + "InnoDB: KEY_BLOCK_SIZE requires" + " innodb_file_per_table."); flags = 0; } @@ -7028,20 +7059,19 @@ ha_innobase::create( push_warning_printf( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, - "InnoDB: ignoring" - " KEY_BLOCK_SIZE=%lu.", + "InnoDB: ignoring KEY_BLOCK_SIZE=%lu.", create_info->key_block_size); } } - row_type = form->s->row_type; + row_format = form->s->row_type; if (flags) { /* if ROW_FORMAT is set to default, automatically change it to COMPRESSED.*/ - if (row_type == ROW_TYPE_DEFAULT) { - row_type = ROW_TYPE_COMPRESSED; - } else if (row_type != ROW_TYPE_COMPRESSED) { + if (row_format == ROW_TYPE_DEFAULT) { + row_format = ROW_TYPE_COMPRESSED; + } else if (row_format != ROW_TYPE_COMPRESSED) { /* ROW_FORMAT other than COMPRESSED ignores KEY_BLOCK_SIZE. It does not make sense to reject conflicting @@ -7058,7 +7088,7 @@ ha_innobase::create( } } else { /* flags == 0 means no KEY_BLOCK_SIZE.*/ - if (row_type == ROW_TYPE_COMPRESSED) { + if (row_format == ROW_TYPE_COMPRESSED) { /* ROW_FORMAT=COMPRESSED without KEY_BLOCK_SIZE implies half the maximum KEY_BLOCK_SIZE. */ @@ -7073,7 +7103,7 @@ ha_innobase::create( } } - switch (row_type) { + switch (row_format) { case ROW_TYPE_REDUNDANT: break; case ROW_TYPE_COMPRESSED: @@ -7084,25 +7114,25 @@ ha_innobase::create( ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: ROW_FORMAT=%s requires" " innodb_file_per_table.", - get_row_format_name(row_type)); + get_row_format_name(row_format)); } else if (file_format < DICT_TF_FORMAT_ZIP) { push_warning_printf( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, "InnoDB: ROW_FORMAT=%s requires" " innodb_file_format > Antelope.", - get_row_format_name(row_type)); + get_row_format_name(row_format)); } else { flags |= DICT_TF_COMPACT - | (DICT_TF_FORMAT_ZIP - << DICT_TF_FORMAT_SHIFT); + | (DICT_TF_FORMAT_ZIP + << DICT_TF_FORMAT_SHIFT); break; } /* fall through */ case ROW_TYPE_NOT_USED: case ROW_TYPE_FIXED: - default: + case ROW_TYPE_PAGE: push_warning( thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA_CREATE_OPTION, @@ -7220,23 +7250,25 @@ ha_innobase::create( setup at this stage and so we use thd. */ /* We need to copy the AUTOINC value from the old table if - this is an ALTER TABLE or CREATE INDEX because CREATE INDEX - does a table copy too. */ + this is an ALTER|OPTIMIZE TABLE or CREATE INDEX because CREATE INDEX + does a table copy too. If query was one of : + + CREATE TABLE ...AUTO_INCREMENT = x; or + ALTER TABLE...AUTO_INCREMENT = x; or + OPTIMIZE TABLE t; or + CREATE INDEX x on t(...); + + Find out a table definition from the dictionary and get + the current value of the auto increment field. Set a new + value to the auto increment field if the value is greater + than the maximum value in the column. */ if (((create_info->used_fields & HA_CREATE_USED_AUTO) || thd_sql_command(thd) == SQLCOM_ALTER_TABLE + || thd_sql_command(thd) == SQLCOM_OPTIMIZE || thd_sql_command(thd) == SQLCOM_CREATE_INDEX) && create_info->auto_increment_value > 0) { - /* Query was one of : - CREATE TABLE ...AUTO_INCREMENT = x; or - ALTER TABLE...AUTO_INCREMENT = x; or - CREATE INDEX x on t(...); - Find out a table definition from the dictionary and get - the current value of the auto increment field. Set a new - value to the auto increment field if the value is greater - than the maximum value in the column. */ - auto_inc_value = create_info->auto_increment_value; dict_table_autoinc_lock(innobase_table); @@ -7947,6 +7979,65 @@ innobase_get_mysql_key_number_for_index( return(0); } + +/*********************************************************************//** +Calculate Record Per Key value. Need to exclude the NULL value if +innodb_stats_method is set to "nulls_ignored" +@return estimated record per key value */ +static +ha_rows +innodb_rec_per_key( +/*===============*/ + dict_index_t* index, /*!< in: dict_index_t structure */ + ulint i, /*!< in: the column we are + calculating rec per key */ + ha_rows records) /*!< in: estimated total records */ +{ + ha_rows rec_per_key; + + ut_ad(i < dict_index_get_n_unique(index)); + + /* Note the stat_n_diff_key_vals[] stores the diff value with + n-prefix indexing, so it is always stat_n_diff_key_vals[i + 1] */ + if (index->stat_n_diff_key_vals[i + 1] == 0) { + + rec_per_key = records; + } else if (srv_innodb_stats_method == SRV_STATS_NULLS_IGNORED) { + ib_int64_t num_null; + + /* Number of rows with NULL value in this + field */ + num_null = records - index->stat_n_non_null_key_vals[i]; + + /* In theory, index->stat_n_non_null_key_vals[i] + should always be less than the number of records. + Since this is statistics value, the value could + have slight discrepancy. But we will make sure + the number of null values is not a negative number. */ + num_null = (num_null < 0) ? 0 : num_null; + + /* If the number of NULL values is the same as or + large than that of the distinct values, we could + consider that the table consists mostly of NULL value. + Set rec_per_key to 1. */ + if (index->stat_n_diff_key_vals[i + 1] <= num_null) { + rec_per_key = 1; + } else { + /* Need to exclude rows with NULL values from + rec_per_key calculation */ + rec_per_key = (ha_rows)( + (records - num_null) + / (index->stat_n_diff_key_vals[i + 1] + - num_null)); + } + } else { + rec_per_key = (ha_rows) + (records / index->stat_n_diff_key_vals[i + 1]); + } + + return(rec_per_key); +} + /*********************************************************************//** Returns statistics information of the table to the MySQL interpreter, in various fields of the handle object. */ @@ -8005,6 +8096,10 @@ ha_innobase::info_low( for (index = dict_table_get_first_index(ib_table); index != NULL; index = dict_table_get_next_index(index)) { + if (dict_is_older_statistics(index)) { + row_delete_stats_for_mysql(index, prebuilt->trx); + innobase_commit_low(prebuilt->trx); + } row_insert_stats_for_mysql(index, prebuilt->trx); innobase_commit_low(prebuilt->trx); } @@ -8197,13 +8292,8 @@ ha_innobase::info_low( break; } - if (index->stat_n_diff_key_vals[j + 1] == 0) { - - rec_per_key = stats.records; - } else { - rec_per_key = (ha_rows)(stats.records / - index->stat_n_diff_key_vals[j + 1]); - } + rec_per_key = innodb_rec_per_key( + index, j, stats.records); /* Since MySQL seems to favor table scans too much over index searches, we pretend @@ -11341,25 +11431,6 @@ static MYSQL_SYSVAR_ULONGLONG(stats_sample_pages, srv_stats_sample_pages, "The number of index pages to sample when calculating statistics (default 8)", NULL, NULL, 8, 1, ~0ULL, 0); -const char *innobase_stats_method_names[]= -{ - "nulls_equal", - "nulls_unequal", - "nulls_ignored", - NullS -}; -TYPELIB innobase_stats_method_typelib= -{ - array_elements(innobase_stats_method_names) - 1, "innobase_stats_method_typelib", - innobase_stats_method_names, NULL -}; -static MYSQL_SYSVAR_ENUM(stats_method, srv_stats_method, - PLUGIN_VAR_RQCMDARG, - "Specifies how InnoDB index statistics collection code should threat NULLs. " - "Possible values of name are same to for 'myisam_stats_method'. " - "This is startup parameter.", - NULL, NULL, 0, &innobase_stats_method_typelib); - static MYSQL_SYSVAR_ULONG(stats_auto_update, srv_stats_auto_update, PLUGIN_VAR_RQCMDARG, "Enable/Disable InnoDB's auto update statistics of indexes. " @@ -11548,6 +11619,13 @@ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering, innodb_change_buffering_validate, innodb_change_buffering_update, "inserts"); +static MYSQL_SYSVAR_ENUM(stats_method, srv_innodb_stats_method, + PLUGIN_VAR_RQCMDARG, + "Specifies how InnoDB index statistics collection code should " + "treat NULLs. Possible values are NULLS_EQUAL (default), " + "NULLS_UNEQUAL and NULLS_IGNORED", + NULL, NULL, SRV_STATS_NULLS_EQUAL, &innodb_stats_method_typelib); + #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug, PLUGIN_VAR_RQCMDARG, @@ -11686,6 +11764,12 @@ static MYSQL_SYSVAR_ULONG(pass_corrupt_table, srv_pass_corrupt_table, "except for the deletion.", NULL, NULL, 0, 0, 1, 0); +static MYSQL_SYSVAR_ULONG(lazy_drop_table, srv_lazy_drop_table, + PLUGIN_VAR_RQCMDARG, + "At deleting tablespace, only miminum needed processes at the time are done. " + "e.g. for http://bugs.mysql.com/51325", + NULL, NULL, 0, 0, 1, 0); + static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(page_size), MYSQL_SYSVAR(log_block_size), @@ -11735,12 +11819,12 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(overwrite_relay_log_info), MYSQL_SYSVAR(rollback_on_timeout), MYSQL_SYSVAR(stats_on_metadata), - MYSQL_SYSVAR(stats_method), MYSQL_SYSVAR(stats_auto_update), MYSQL_SYSVAR(stats_update_need_lock), MYSQL_SYSVAR(use_sys_stats_table), MYSQL_SYSVAR(stats_sample_pages), MYSQL_SYSVAR(adaptive_hash_index), + MYSQL_SYSVAR(stats_method), MYSQL_SYSVAR(replication_delay), MYSQL_SYSVAR(status_file), MYSQL_SYSVAR(strict_mode), @@ -11777,6 +11861,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(auto_lru_dump), MYSQL_SYSVAR(use_purge_thread), MYSQL_SYSVAR(pass_corrupt_table), + MYSQL_SYSVAR(lazy_drop_table), NULL }; diff --git a/handler/i_s.cc b/handler/i_s.cc index fa179c52f91..efb0822f14b 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -1239,8 +1239,16 @@ fill_innodb_trx_from_cache( row->trx_mysql_thread_id)); /* trx_query */ - OK(field_store_string(fields[IDX_TRX_QUERY], - row->trx_query)); + if (row->trx_query) { + /* store will do appropriate character set + conversion check */ + fields[IDX_TRX_QUERY]->store( + row->trx_query, strlen(row->trx_query), + row->trx_query_cs); + fields[IDX_TRX_QUERY]->set_notnull(); + } else { + fields[IDX_TRX_QUERY]->set_null(); + } OK(schema_table_store_record(thd, table)); } @@ -1443,16 +1451,7 @@ fill_innodb_locks_from_cache( for (i = 0; i < rows_num; i++) { i_s_locks_row_t* row; - - /* note that the decoded database or table name is - never expected to be longer than NAME_LEN; - NAME_LEN for database name - 2 for surrounding quotes around database name - NAME_LEN for table name - 2 for surrounding quotes around table name - 1 for the separating dot (.) - 9 for the #mysql50# prefix */ - char buf[2 * NAME_LEN + 14]; + char buf[MAX_FULL_NAME_LEN + 1]; const char* bufend; char lock_trx_id[TRX_ID_MAX_LEN + 1]; @@ -3281,6 +3280,14 @@ static ST_FIELD_INFO i_s_innodb_sys_stats_info[] = STRUCT_FLD(old_name, ""), STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, + {STRUCT_FLD(field_name, "NON_NULL_VALS"), + STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS), + STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG), + STRUCT_FLD(value, 0), + STRUCT_FLD(field_flags, MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL), + STRUCT_FLD(old_name, ""), + STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}, + END_OF_ST_FIELD_INFO }; @@ -3549,6 +3556,9 @@ copy_sys_stats_rec( { int status; int field; + ulint n_fields; + + n_fields = rec_get_n_fields_old(rec); /* INDEX_ID */ field = dict_index_get_nth_col_pos(index, 0); @@ -3568,6 +3578,16 @@ copy_sys_stats_rec( if (status) { return status; } + /* NON_NULL_VALS */ + if (n_fields < 6) { + table->field[3]->set_null(); + } else { + field = dict_index_get_nth_col_pos(index, 3); + status = copy_id_field(table, 3, rec, field); + if (status) { + return status; + } + } return 0; } diff --git a/ibuf/ibuf0ibuf.c b/ibuf/ibuf0ibuf.c index 12dbc29be23..3f741da60bb 100644 --- a/ibuf/ibuf0ibuf.c +++ b/ibuf/ibuf0ibuf.c @@ -1881,9 +1881,9 @@ ibuf_remove_free_page(void) fseg_free_page(header_page + IBUF_HEADER + IBUF_TREE_SEG_HEADER, IBUF_SPACE_ID, page_no, &mtr); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG buf_page_reset_file_page_was_freed(IBUF_SPACE_ID, page_no); -#endif +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ ibuf_enter(); @@ -1925,9 +1925,9 @@ ibuf_remove_free_page(void) ibuf_bitmap_page_set_bits( bitmap_page, page_no, zip_size, IBUF_BITMAP_IBUF, FALSE, &mtr); -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG buf_page_set_file_page_was_freed(IBUF_SPACE_ID, page_no); -#endif +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ mtr_commit(&mtr); mutex_exit(&ibuf_mutex); diff --git a/include/btr0cur.h b/include/btr0cur.h index 1e1dc0f580a..ece3621fa97 100644 --- a/include/btr0cur.h +++ b/include/btr0cur.h @@ -332,10 +332,14 @@ ulint btr_cur_del_mark_set_clust_rec( /*===========================*/ ulint flags, /*!< in: undo logging and locking flags */ - btr_cur_t* cursor, /*!< in: cursor */ + buf_block_t* block, /*!< in/out: buffer block of the record */ + rec_t* rec, /*!< in/out: record */ + dict_index_t* index, /*!< in: clustered index of the record */ + const ulint* offsets,/*!< in: rec_get_offsets(rec) */ ibool val, /*!< in: value to set */ que_thr_t* thr, /*!< in: query thread */ - mtr_t* mtr); /*!< in: mtr */ + mtr_t* mtr) /*!< in: mtr */ + __attribute__((nonnull)); /***********************************************************//** Sets a secondary index record delete mark to TRUE or FALSE. @return DB_SUCCESS, DB_LOCK_WAIT, or error number */ @@ -474,47 +478,32 @@ btr_estimate_n_rows_in_range( /*******************************************************************//** Estimates the number of different key values in a given index, for each n-column prefix of the index where n <= dict_index_get_n_unique(index). -The estimates are stored in the array index->stat_n_diff_key_vals. */ +The estimates are stored in the array index->stat_n_diff_key_vals. +If innodb_stats_method is nulls_ignored, we also record the number of +non-null values for each prefix and stored the estimates in +array index->stat_n_non_null_key_vals. */ UNIV_INTERN void btr_estimate_number_of_different_key_vals( /*======================================*/ dict_index_t* index); /*!< in: index */ /*******************************************************************//** -Marks not updated extern fields as not-owned by this record. The ownership -is transferred to the updated record which is inserted elsewhere in the +Marks non-updated off-page fields as disowned by this record. The ownership +must be transferred to the updated record which is inserted elsewhere in the index tree. In purge only the owner of externally stored field is allowed -to free the field. -@return TRUE if BLOB ownership was transferred */ +to free the field. */ UNIV_INTERN -ibool -btr_cur_mark_extern_inherited_fields( -/*=================================*/ +void +btr_cur_disown_inherited_fields( +/*============================*/ page_zip_des_t* page_zip,/*!< in/out: compressed page whose uncompressed part will be updated, or NULL */ rec_t* rec, /*!< in/out: record in a clustered index */ dict_index_t* index, /*!< in: index of the page */ const ulint* offsets,/*!< in: array returned by rec_get_offsets() */ const upd_t* update, /*!< in: update vector */ - mtr_t* mtr); /*!< in: mtr, or NULL if not logged */ -/*******************************************************************//** -The complement of the previous function: in an update entry may inherit -some externally stored fields from a record. We must mark them as inherited -in entry, so that they are not freed in a rollback. */ -UNIV_INTERN -void -btr_cur_mark_dtuple_inherited_extern( -/*=================================*/ - dtuple_t* entry, /*!< in/out: updated entry to be - inserted to clustered index */ - const upd_t* update); /*!< in: update vector */ -/*******************************************************************//** -Marks all extern fields in a dtuple as owned by the record. */ -UNIV_INTERN -void -btr_cur_unmark_dtuple_extern_fields( -/*================================*/ - dtuple_t* entry); /*!< in/out: clustered index entry */ + mtr_t* mtr) /*!< in/out: mini-transaction */ + __attribute__((nonnull(2,3,4,5,6))); /*******************************************************************//** Stores the fields in big_rec_vec to the tablespace and puts pointers to them in rec. The extern flags in rec will have to be set beforehand. @@ -523,8 +512,8 @@ file segment of the index tree. @return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ UNIV_INTERN ulint -btr_store_big_rec_extern_fields( -/*============================*/ +btr_store_big_rec_extern_fields_func( +/*=================================*/ dict_index_t* index, /*!< in: index of rec; the index tree MUST be X-latched */ buf_block_t* rec_block, /*!< in/out: block containing rec */ @@ -533,10 +522,42 @@ btr_store_big_rec_extern_fields( the "external storage" flags in offsets will not correspond to rec when this function returns */ - big_rec_t* big_rec_vec, /*!< in: vector containing fields +#ifdef UNIV_DEBUG + mtr_t* local_mtr, /*!< in: mtr containing the + latch to rec and to the tree */ +#endif /* UNIV_DEBUG */ +#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG + ibool update_in_place,/*! in: TRUE if the record is updated + in place (not delete+insert) */ +#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */ + const big_rec_t*big_rec_vec) /*!< in: vector containing fields to be stored externally */ - mtr_t* local_mtr); /*!< in: mtr containing the latch to - rec and to the tree */ + __attribute__((nonnull)); + +/** Stores the fields in big_rec_vec to the tablespace and puts pointers to +them in rec. The extern flags in rec will have to be set beforehand. +The fields are stored on pages allocated from leaf node +file segment of the index tree. +@param index in: clustered index; MUST be X-latched by mtr +@param b in/out: block containing rec; MUST be X-latched by mtr +@param rec in/out: clustered index record +@param offsets in: rec_get_offsets(rec, index); + the "external storage" flags in offsets will not be adjusted +@param mtr in: mini-transaction that holds x-latch on index and b +@param upd in: TRUE if the record is updated in place (not delete+insert) +@param big in: vector containing fields to be stored externally +@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */ +#ifdef UNIV_DEBUG +# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \ + btr_store_big_rec_extern_fields_func(index,b,rec,offsets,mtr,upd,big) +#elif defined UNIV_BLOB_LIGHT_DEBUG +# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \ + btr_store_big_rec_extern_fields_func(index,b,rec,offsets,upd,big) +#else +# define btr_store_big_rec_extern_fields(index,b,rec,offsets,mtr,upd,big) \ + btr_store_big_rec_extern_fields_func(index,b,rec,offsets,big) +#endif + /*******************************************************************//** Frees the space in an externally stored field to the file space management if the field in data is owned the externally stored field, diff --git a/include/buf0buf.h b/include/buf0buf.h index e06927f42f0..bc0e9170281 100644 --- a/include/buf0buf.h +++ b/include/buf0buf.h @@ -166,10 +166,8 @@ Allocates a buffer block. @return own: the allocated block, in state BUF_BLOCK_MEMORY */ UNIV_INLINE buf_block_t* -buf_block_alloc( -/*============*/ - ulint zip_size); /*!< in: compressed page size in bytes, - or 0 if uncompressed tablespace */ +buf_block_alloc(void); +/*=================*/ /********************************************************************//** Frees a buffer block which does not contain a file page. */ UNIV_INLINE @@ -371,7 +369,7 @@ buf_reset_check_index_page_at_flush( /*================================*/ ulint space, /*!< in: space id */ ulint offset);/*!< in: page number */ -#ifdef UNIV_DEBUG_FILE_ACCESSES +#if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG /********************************************************************//** Sets file_page_was_freed TRUE if the page is found in the buffer pool. This function should be called when we free a file page and want the @@ -396,7 +394,7 @@ buf_page_reset_file_page_was_freed( /*===============================*/ ulint space, /*!< in: space id */ ulint offset); /*!< in: page number */ -#endif /* UNIV_DEBUG_FILE_ACCESSES */ +#endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ /********************************************************************//** Reads the freed_page_clock of a buffer block. @return freed_page_clock */ @@ -1157,12 +1155,13 @@ struct buf_page_struct{ 0 if the block was never accessed in the buffer pool */ /* @} */ + ibool space_was_being_deleted; ibool is_corrupt; -# ifdef UNIV_DEBUG_FILE_ACCESSES +# if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ibool file_page_was_freed; /*!< this is set to TRUE when fsp frees a page in buffer pool */ -# endif /* UNIV_DEBUG_FILE_ACCESSES */ +# endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ #endif /* !UNIV_HOTBACKUP */ }; diff --git a/include/buf0buf.ic b/include/buf0buf.ic index a725446629f..2cb0d8ef497 100644 --- a/include/buf0buf.ic +++ b/include/buf0buf.ic @@ -384,6 +384,7 @@ buf_block_set_file_page( buf_block_set_state(block, BUF_BLOCK_FILE_PAGE); block->page.space = space; block->page.offset = page_no; + block->page.space_was_being_deleted = FALSE; } /*********************************************************************//** @@ -757,14 +758,12 @@ Allocates a buffer block. @return own: the allocated block, in state BUF_BLOCK_MEMORY */ UNIV_INLINE buf_block_t* -buf_block_alloc( -/*============*/ - ulint zip_size) /*!< in: compressed page size in bytes, - or 0 if uncompressed tablespace */ +buf_block_alloc(void) +/*=================*/ { buf_block_t* block; - block = buf_LRU_get_free_block(zip_size); + block = buf_LRU_get_free_block(); buf_block_set_state(block, BUF_BLOCK_MEMORY); @@ -1075,7 +1074,7 @@ buf_page_release( buf_block_t* block, /*!< in: buffer block */ ulint rw_latch, /*!< in: RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH */ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr __attribute__((unused))) /*!< in: mtr */ { ut_ad(block); diff --git a/include/buf0lru.h b/include/buf0lru.h index d3b59e8b579..fe7c067dfb7 100644 --- a/include/buf0lru.h +++ b/include/buf0lru.h @@ -84,6 +84,13 @@ void buf_LRU_invalidate_tablespace( /*==========================*/ ulint id); /*!< in: space id */ +/******************************************************************//** +*/ +UNIV_INTERN +void +buf_LRU_mark_space_was_deleted( +/*===========================*/ + ulint id); /*!< in: space id */ /********************************************************************//** Insert a compressed block into buf_pool->zip_clean in the LRU order. */ UNIV_INTERN @@ -112,11 +119,8 @@ buf_LRU_free_block( buf_page_t* bpage, /*!< in: block to be freed */ ibool zip, /*!< in: TRUE if should remove also the compressed page of an uncompressed page */ - ibool* buf_pool_mutex_released, - /*!< in: pointer to a variable that will - be assigned TRUE if buf_pool_mutex - was temporarily released, or NULL */ - ibool have_LRU_mutex); + ibool have_LRU_mutex) + __attribute__((nonnull)); /******************************************************************//** Try to free a replaceable block. @return TRUE if found and freed */ @@ -147,10 +151,9 @@ LRU list to the free list. @return the free control block, in state BUF_BLOCK_READY_FOR_USE */ UNIV_INTERN buf_block_t* -buf_LRU_get_free_block( -/*===================*/ - ulint zip_size); /*!< in: compressed page size in bytes, - or 0 if uncompressed tablespace */ +buf_LRU_get_free_block(void) +/*========================*/ + __attribute__((warn_unused_result)); /******************************************************************//** Puts a block back to the free list. */ diff --git a/include/buf0types.h b/include/buf0types.h index 507f1543bbb..ce3e5ecc9c5 100644 --- a/include/buf0types.h +++ b/include/buf0types.h @@ -76,7 +76,7 @@ enum buf_io_fix { /** twice the maximum block size of the buddy system; the underlying memory is aligned by this amount: this must be equal to UNIV_PAGE_SIZE */ -#define BUF_BUDDY_HIGH (BUF_BUDDY_LOW << BUF_BUDDY_SIZES) +#define BUF_BUDDY_HIGH ((ulint)BUF_BUDDY_LOW << BUF_BUDDY_SIZES) /* @} */ #endif diff --git a/include/data0data.h b/include/data0data.h index f9fce3f3657..cab8d790ac1 100644 --- a/include/data0data.h +++ b/include/data0data.h @@ -154,14 +154,19 @@ dfield_dup( dfield_t* field, /*!< in/out: data field */ mem_heap_t* heap); /*!< in: memory heap where allocated */ /*********************************************************************//** -Tests if data length and content is equal for two dfields. -@return TRUE if equal */ +Tests if two data fields are equal. +If len==0, tests the data length and content for equality. +If len>0, tests the first len bytes of the content for equality. +@return TRUE if both fields are NULL or if they are equal */ UNIV_INLINE ibool dfield_datas_are_binary_equal( /*==========================*/ const dfield_t* field1, /*!< in: field */ - const dfield_t* field2);/*!< in: field */ + const dfield_t* field2, /*!< in: field */ + ulint len) /*!< in: maximum prefix to compare, + or 0 to compare the whole field length */ + __attribute__((nonnull, warn_unused_result)); /*********************************************************************//** Tests if dfield data length and content is equal to the given. @return TRUE if equal */ diff --git a/include/data0data.ic b/include/data0data.ic index da79aa33702..74e0f7d09a0 100644 --- a/include/data0data.ic +++ b/include/data0data.ic @@ -229,20 +229,30 @@ dfield_dup( } /*********************************************************************//** -Tests if data length and content is equal for two dfields. -@return TRUE if equal */ +Tests if two data fields are equal. +If len==0, tests the data length and content for equality. +If len>0, tests the first len bytes of the content for equality. +@return TRUE if both fields are NULL or if they are equal */ UNIV_INLINE ibool dfield_datas_are_binary_equal( /*==========================*/ const dfield_t* field1, /*!< in: field */ - const dfield_t* field2) /*!< in: field */ + const dfield_t* field2, /*!< in: field */ + ulint len) /*!< in: maximum prefix to compare, + or 0 to compare the whole field length */ { - ulint len; + ulint len2 = len; - len = field1->len; + if (field1->len == UNIV_SQL_NULL || len == 0 || field1->len < len) { + len = field1->len; + } - return(len == field2->len + if (field2->len == UNIV_SQL_NULL || len2 == 0 || field2->len < len2) { + len2 = field2->len; + } + + return(len == len2 && (len == UNIV_SQL_NULL || !memcmp(field1->data, field2->data, len))); } diff --git a/include/dict0boot.h b/include/dict0boot.h index 9239e031a7f..a57c5127323 100644 --- a/include/dict0boot.h +++ b/include/dict0boot.h @@ -146,6 +146,7 @@ clustered index */ #define DICT_SYS_INDEXES_NAME_FIELD 4 #define DICT_SYS_STATS_DIFF_VALS_FIELD 4 +#define DICT_SYS_STATS_NON_NULL_VALS_FIELD 5 /* When a row id which is zero modulo this number (which must be a power of two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is diff --git a/include/dict0dict.h b/include/dict0dict.h index 7baacdd6055..2baecdc958a 100644 --- a/include/dict0dict.h +++ b/include/dict0dict.h @@ -1062,6 +1062,13 @@ dict_update_statistics( not been initialized yet, otherwise do nothing */ ibool sync); +/*********************************************************************//** +*/ +UNIV_INTERN +ibool +dict_is_older_statistics( +/*=====================*/ + dict_index_t* index); /********************************************************************//** Reserves the dictionary system mutex for MySQL. */ UNIV_INTERN diff --git a/include/dict0mem.h b/include/dict0mem.h index 6736c2a3a36..f47293bedf6 100644 --- a/include/dict0mem.h +++ b/include/dict0mem.h @@ -321,6 +321,12 @@ struct dict_index_struct{ dict_get_n_unique(index); we periodically calculate new estimates */ + ib_int64_t* stat_n_non_null_key_vals; + /* approximate number of non-null key values + for this index, for each column where + n < dict_get_n_unique(index); This + is used when innodb_stats_method is + "nulls_ignored". */ ulint stat_index_size; /*!< approximate index size in database pages */ diff --git a/include/dict0types.h b/include/dict0types.h index 7ad69193cc9..f14b59a19d4 100644 --- a/include/dict0types.h +++ b/include/dict0types.h @@ -33,11 +33,6 @@ typedef struct dict_index_struct dict_index_t; typedef struct dict_table_struct dict_table_t; typedef struct dict_foreign_struct dict_foreign_t; -/* A cluster object is a table object with the type field set to -DICT_CLUSTERED */ - -typedef dict_table_t dict_cluster_t; - typedef struct ind_node_struct ind_node_t; typedef struct tab_node_struct tab_node_t; diff --git a/include/fil0fil.h b/include/fil0fil.h index a262ec8f9cc..fbf8ca20db3 100644 --- a/include/fil0fil.h +++ b/include/fil0fil.h @@ -648,18 +648,10 @@ _fil_io( Confirm whether the parameters are valid or not */ UNIV_INTERN ibool -fil_area_is_exist( +fil_is_exist( /*==============*/ ulint space_id, /*!< in: space id */ - ulint zip_size, /*!< in: compressed page size in bytes; - 0 for uncompressed pages */ - ulint block_offset, /*!< in: offset in number of blocks */ - ulint byte_offset, /*!< in: remainder of offset in bytes; in - aio this must be divisible by the OS block - size */ - ulint len); /*!< in: how many bytes to read or write; this - must not cross a file boundary; in aio this - must be a block size multiple */ + ulint block_offset); /*!< in: offset in number of blocks */ /**********************************************************************//** Waits for an aio operation to complete. This function is used to write the handler for completed requests. The aio array of pending requests is divided diff --git a/include/fsp0types.h b/include/fsp0types.h index 496081c2346..43e385b7eb0 100644 --- a/include/fsp0types.h +++ b/include/fsp0types.h @@ -42,7 +42,7 @@ fseg_alloc_free_page) */ /* @} */ /** File space extent size (one megabyte) in pages */ -#define FSP_EXTENT_SIZE (1 << (20 - UNIV_PAGE_SIZE_SHIFT)) +#define FSP_EXTENT_SIZE ((ulint)1 << (20 - UNIV_PAGE_SIZE_SHIFT)) /** On a page of any file segment, data may be put starting from this offset */ diff --git a/include/os0file.h b/include/os0file.h index cbbec2cf55e..732e930517b 100644 --- a/include/os0file.h +++ b/include/os0file.h @@ -657,6 +657,7 @@ os_aio( (can be used to identify a completed aio operation); ignored if mode is OS_AIO_SYNC */ + ulint space_id, trx_t* trx); /************************************************************************//** Wakes up all async i/o threads so that they know to exit themselves in @@ -717,7 +718,8 @@ os_aio_windows_handle( parameters are valid and can be used to restart the operation, for example */ void** message2, - ulint* type); /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* space_id); #endif /**********************************************************************//** @@ -739,7 +741,8 @@ os_aio_simulated_handle( parameters are valid and can be used to restart the operation, for example */ void** message2, - ulint* type); /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* space_id); /**********************************************************************//** Validates the consistency of the aio system. @return TRUE if ok */ diff --git a/include/page0cur.h b/include/page0cur.h index 6b444b3dd96..1544b0abe1c 100644 --- a/include/page0cur.h +++ b/include/page0cur.h @@ -293,22 +293,6 @@ page_cur_open_on_rnd_user_rec( /*==========================*/ buf_block_t* block, /*!< in: page */ page_cur_t* cursor);/*!< out: page cursor */ - -UNIV_INTERN -void -page_cur_open_on_nth_user_rec( -/*==========================*/ - buf_block_t* block, /*!< in: page */ - page_cur_t* cursor, /*!< out: page cursor */ - ulint nth); - -UNIV_INTERN -ibool -page_cur_open_on_rnd_user_rec_after_nth( -/*==========================*/ - buf_block_t* block, /*!< in: page */ - page_cur_t* cursor, /*!< out: page cursor */ - ulint nth); #endif /* !UNIV_HOTBACKUP */ /***********************************************************//** Parses a log record of a record insert on a page. diff --git a/include/rem0cmp.h b/include/rem0cmp.h index fcea62ad486..a908521c9f7 100644 --- a/include/rem0cmp.h +++ b/include/rem0cmp.h @@ -165,15 +165,18 @@ cmp_rec_rec_with_match( const ulint* offsets1,/*!< in: rec_get_offsets(rec1, index) */ const ulint* offsets2,/*!< in: rec_get_offsets(rec2, index) */ dict_index_t* index, /*!< in: data dictionary index */ + ibool nulls_unequal, + /* in: TRUE if this is for index statistics + cardinality estimation, and innodb_stats_method + is "nulls_unequal" or "nulls_ignored" */ ulint* matched_fields, /*!< in/out: number of already completely matched fields; when the function returns, contains the value the for current comparison */ - ulint* matched_bytes, /*!< in/out: number of already matched + ulint* matched_bytes);/*!< in/out: number of already matched bytes within the first field not completely matched; when the function returns, contains the value for the current comparison */ - ulint stats_method); /*************************************************************//** This function is used to compare two physical records. Only the common first fields are compared. diff --git a/include/rem0cmp.ic b/include/rem0cmp.ic index d5185ec94af..63415fe7837 100644 --- a/include/rem0cmp.ic +++ b/include/rem0cmp.ic @@ -87,5 +87,5 @@ cmp_rec_rec( ulint match_b = 0; return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index, - &match_f, &match_b, 0)); + FALSE, &match_f, &match_b)); } diff --git a/include/row0mysql.h b/include/row0mysql.h index 141f4beb81e..4acfd2e793b 100644 --- a/include/row0mysql.h +++ b/include/row0mysql.h @@ -384,6 +384,14 @@ row_insert_stats_for_mysql( dict_index_t* index, trx_t* trx); /*********************************************************************//** +*/ +UNIV_INTERN +int +row_delete_stats_for_mysql( +/*=======================*/ + dict_index_t* index, + trx_t* trx); +/*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function should be called after the indexes for a table have been created. diff --git a/include/row0upd.h b/include/row0upd.h index ea14cd64213..97b7ec49a17 100644 --- a/include/row0upd.h +++ b/include/row0upd.h @@ -280,16 +280,29 @@ NOTE: we compare the fields as binary strings! @return TRUE if update vector changes an ordering field in the index record */ UNIV_INTERN ibool -row_upd_changes_ord_field_binary( -/*=============================*/ +row_upd_changes_ord_field_binary_func( +/*==================================*/ + dict_index_t* index, /*!< in: index of the record */ + const upd_t* update, /*!< in: update vector for the row; NOTE: the + field numbers in this MUST be clustered index + positions! */ +#ifdef UNIV_DEBUG + const que_thr_t*thr, /*!< in: query thread */ +#endif /* UNIV_DEBUG */ const dtuple_t* row, /*!< in: old value of row, or NULL if the row and the data values in update are not known when this function is called, e.g., at compile time */ - dict_index_t* index, /*!< in: index of the record */ - const upd_t* update);/*!< in: update vector for the row; NOTE: the - field numbers in this MUST be clustered index - positions! */ + const row_ext_t*ext) /*!< NULL, or prefixes of the externally + stored columns in the old row */ + __attribute__((nonnull(1,2), warn_unused_result)); +#ifdef UNIV_DEBUG +# define row_upd_changes_ord_field_binary(index,update,thr,row,ext) \ + row_upd_changes_ord_field_binary_func(index,update,thr,row,ext) +#else /* UNIV_DEBUG */ +# define row_upd_changes_ord_field_binary(index,update,thr,row,ext) \ + row_upd_changes_ord_field_binary_func(index,update,row,ext) +#endif /* UNIV_DEBUG */ /***********************************************************//** Checks if an update vector changes an ordering field of an index record. This function is fast if the update vector is short or the number of ordering @@ -462,11 +475,16 @@ struct upd_node_struct{ #define UPD_NODE_INSERT_CLUSTERED 3 /* clustered index record should be inserted, old record is already delete marked */ -#define UPD_NODE_UPDATE_ALL_SEC 4 /* an ordering field of the clustered +#define UPD_NODE_INSERT_BLOB 4 /* clustered index record should be + inserted, old record is already + delete-marked; non-updated BLOBs + should be inherited by the new record + and disowned by the old record */ +#define UPD_NODE_UPDATE_ALL_SEC 5 /* an ordering field of the clustered index record was changed, or this is a delete operation: should update all the secondary index records */ -#define UPD_NODE_UPDATE_SOME_SEC 5 /* secondary index entries should be +#define UPD_NODE_UPDATE_SOME_SEC 6 /* secondary index entries should be looked at and updated if an ordering field changed */ diff --git a/include/srv0srv.h b/include/srv0srv.h index 9888c95fa66..13bf0b5b9ea 100644 --- a/include/srv0srv.h +++ b/include/srv0srv.h @@ -177,6 +177,11 @@ capacity. PCT_IO(5) -> returns the number of IO operations that is 5% of the max where max is srv_io_capacity. */ #define PCT_IO(p) ((ulong) (srv_io_capacity * ((double) p / 100.0))) +/* The "innodb_stats_method" setting, decides how InnoDB is going +to treat NULL value when collecting statistics. It is not defined +as enum type because the configure option takes unsigned integer type. */ +extern ulong srv_innodb_stats_method; + #ifdef UNIV_LOG_ARCHIVE extern ibool srv_log_archive_on; extern ibool srv_archive_recovery; @@ -208,10 +213,6 @@ extern ulint srv_fast_shutdown; /* If this is 1, do not do a extern ibool srv_innodb_status; extern unsigned long long srv_stats_sample_pages; -extern ulint srv_stats_method; -#define SRV_STATS_METHOD_NULLS_EQUAL 0 -#define SRV_STATS_METHOD_NULLS_NOT_EQUAL 1 -#define SRV_STATS_METHOD_IGNORE_NULLS 2 extern ulint srv_stats_auto_update; extern ulint srv_stats_update_need_lock; extern ibool srv_use_sys_stats_table; @@ -242,6 +243,8 @@ extern ulint srv_pass_corrupt_table; extern ulint srv_extra_rsegments; extern ulint srv_dict_size_limit; + +extern ulint srv_lazy_drop_table; /*-------------------------------------------*/ extern ulint srv_n_rows_inserted; @@ -413,6 +416,19 @@ enum { in connection with recovery */ }; +/* Alternatives for srv_innodb_stats_method, which could be changed by +setting innodb_stats_method */ +enum srv_stats_method_name_enum { + SRV_STATS_NULLS_EQUAL, /* All NULL values are treated as + equal. This is the default setting + for innodb_stats_method */ + SRV_STATS_NULLS_UNEQUAL, /* All NULL values are treated as + NOT equal. */ + SRV_STATS_NULLS_IGNORED /* NULL values are ignored */ +}; + +typedef enum srv_stats_method_name_enum srv_stats_method_name_t; + #ifndef UNIV_HOTBACKUP /** Types of threads existing in the system. */ enum srv_thread_type { diff --git a/include/sync0rw.h b/include/sync0rw.h index 4edf93f4042..22de1bfdd93 100644 --- a/include/sync0rw.h +++ b/include/sync0rw.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -113,14 +113,14 @@ is necessary only if the memory block containing it is freed. */ #ifdef UNIV_DEBUG # ifdef UNIV_SYNC_DEBUG # define rw_lock_create(L, level) \ - rw_lock_create_func((L), (level), #L, __FILE__, __LINE__) + rw_lock_create_func((L), (level), __FILE__, __LINE__, #L) # else /* UNIV_SYNC_DEBUG */ # define rw_lock_create(L, level) \ - rw_lock_create_func((L), #L, __FILE__, __LINE__) + rw_lock_create_func((L), __FILE__, __LINE__, #L) # endif /* UNIV_SYNC_DEBUG */ #else /* UNIV_DEBUG */ # define rw_lock_create(L, level) \ - rw_lock_create_func((L), #L, NULL, 0) + rw_lock_create_func((L), #L) #endif /* UNIV_DEBUG */ /******************************************************************//** @@ -137,10 +137,10 @@ rw_lock_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ -#endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline); /*!< in: file line where created */ + ulint cline, /*!< in: file line where created */ +#endif /* UNIV_DEBUG */ + const char* cmutex_name); /*!< in: mutex name */ /******************************************************************//** Calling this function is obligatory only if the memory buffer containing the rw-lock is freed. Removes an rw-lock object from the global list. The @@ -490,6 +490,7 @@ UNIV_INTERN void rw_lock_debug_print( /*================*/ + FILE* f, /*!< in: output stream */ rw_lock_debug_t* info); /*!< in: debug struct */ #endif /* UNIV_SYNC_DEBUG */ diff --git a/include/sync0sync.h b/include/sync0sync.h index a500cf1da45..f2ff83101ab 100644 --- a/include/sync0sync.h +++ b/include/sync0sync.h @@ -73,14 +73,14 @@ necessary only if the memory block containing it is freed. */ #ifdef UNIV_DEBUG # ifdef UNIV_SYNC_DEBUG # define mutex_create(M, level) \ - mutex_create_func((M), #M, (level), __FILE__, __LINE__) + mutex_create_func((M), (level), __FILE__, __LINE__, #M) # else # define mutex_create(M, level) \ - mutex_create_func((M), #M, __FILE__, __LINE__) + mutex_create_func((M), __FILE__, __LINE__, #M) # endif #else # define mutex_create(M, level) \ - mutex_create_func((M), #M, NULL, 0) + mutex_create_func((M), #M) #endif /******************************************************************//** @@ -93,14 +93,14 @@ void mutex_create_func( /*==============*/ mutex_t* mutex, /*!< in: pointer to memory */ - const char* cmutex_name, /*!< in: mutex name */ #ifdef UNIV_DEBUG # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ -#endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ - ulint cline); /*!< in: file line where created */ + ulint cline, /*!< in: file line where created */ +#endif /* UNIV_DEBUG */ + const char* cmutex_name); /*!< in: mutex name */ #undef mutex_free /* Fix for MacOS X */ @@ -496,6 +496,7 @@ or row lock! */ #define SYNC_BUF_POOL 150 #define SYNC_BUF_FLUSH_LIST 149 #define SYNC_DOUBLEWRITE 140 +#define SYNC_OUTER_ANY_LATCH 136 #define SYNC_ANY_LATCH 135 #define SYNC_THR_LOCAL 133 #define SYNC_MEM_HASH 131 diff --git a/include/trx0i_s.h b/include/trx0i_s.h index 7bd4e1b88c8..48d41038ea4 100644 --- a/include/trx0i_s.h +++ b/include/trx0i_s.h @@ -110,6 +110,8 @@ struct i_s_trx_row_struct { /*!< thd_get_thread_id() */ const char* trx_query; /*!< MySQL statement being executed in the transaction */ + struct charset_info_st* trx_query_cs; /*!< charset encode the MySQL + statement */ }; /** This structure represents INFORMATION_SCHEMA.innodb_lock_waits row */ diff --git a/include/trx0rseg.h b/include/trx0rseg.h index 303188f09f2..ea9956cd143 100644 --- a/include/trx0rseg.h +++ b/include/trx0rseg.h @@ -149,9 +149,7 @@ struct trx_rseg_struct{ ulint id; /*!< rollback segment id == the index of its slot in the trx system file copy */ mutex_t mutex; /*!< mutex protecting the fields in this - struct except id; NOTE that the latching - order must always be kernel mutex -> - rseg mutex */ + struct except id, which is constant */ ulint space; /*!< space where the rollback segment is header is placed */ ulint zip_size;/* compressed page size of space diff --git a/include/trx0trx.h b/include/trx0trx.h index 4c0ce392bcd..173c63918d3 100644 --- a/include/trx0trx.h +++ b/include/trx0trx.h @@ -214,12 +214,12 @@ trx_recover_for_mysql( /*******************************************************************//** This function is used to find one X/Open XA distributed transaction which is in the prepared state -@return trx or NULL */ +@return trx or NULL; on match, the trx->xid will be invalidated */ UNIV_INTERN trx_t * trx_get_trx_by_xid( /*===============*/ - XID* xid); /*!< in: X/Open XA transaction identification */ + const XID* xid); /*!< in: X/Open XA transaction identifier */ /**********************************************************************//** If required, flushes the log to disk if we called trx_commit_for_mysql() with trx->flush_log_later == TRUE. diff --git a/include/univ.i b/include/univ.i index 14c89813cad..a658c7b6eaa 100644 --- a/include/univ.i +++ b/include/univ.i @@ -46,7 +46,7 @@ Created 1/20/1994 Heikki Tuuri #define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MINOR 0 -#define INNODB_VERSION_BUGFIX 14 +#define INNODB_VERSION_BUGFIX 15 #ifndef PERCONA_INNODB_VERSION #define PERCONA_INNODB_VERSION 12.5 @@ -184,14 +184,15 @@ command. Not tested on Windows. */ debugging without UNIV_DEBUG */ #define UNIV_BUF_DEBUG /* Enable buffer pool debugging without UNIV_DEBUG */ +#define UNIV_BLOB_LIGHT_DEBUG /* Enable off-page column + 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) */ +#define UNIV_DEBUG_FILE_ACCESSES /* Enable freed block access + debugging without UNIV_DEBUG */ #define UNIV_LRU_DEBUG /* debug the buffer pool LRU */ #define UNIV_HASH_DEBUG /* debug HASH_ macros */ #define UNIV_LIST_DEBUG /* debug UT_LIST_ macros */ @@ -307,6 +308,18 @@ number does not include a terminating '\0'. InnoDB probably can handle longer names internally */ #define MAX_TABLE_NAME_LEN 192 +/* The maximum length of a database name. Like MAX_TABLE_NAME_LEN this is +the MySQL's NAME_LEN, see check_and_convert_db_name(). */ +#define MAX_DATABASE_NAME_LEN MAX_TABLE_NAME_LEN + +/* MAX_FULL_NAME_LEN defines the full name path including the +database name and table name. In addition, 14 bytes is added for: + 2 for surrounding quotes around table name + 1 for the separating dot (.) + 9 for the #mysql50# prefix */ +#define MAX_FULL_NAME_LEN \ + (MAX_TABLE_NAME_LEN + MAX_DATABASE_NAME_LEN + 14) + /* UNIVERSAL TYPE DEFINITIONS ========================== @@ -423,7 +436,7 @@ it is read or written. */ /* Use sun_prefetch when compile with Sun Studio */ # define UNIV_EXPECT(expr,value) (expr) # define UNIV_LIKELY_NULL(expr) (expr) -# define UNIV_PREFETCH_R(addr) sun_prefetch_read_many(addr) +# define UNIV_PREFETCH_R(addr) sun_prefetch_read_many((void*) addr) # define UNIV_PREFETCH_RW(addr) sun_prefetch_write_many(addr) #else /* Dummy versions of the macros */ diff --git a/include/ut0vec.h b/include/ut0vec.h index a770f671cfc..0f8b955b098 100644 --- a/include/ut0vec.h +++ b/include/ut0vec.h @@ -93,6 +93,25 @@ ib_vector_get( ib_vector_t* vec, /*!< in: vector */ ulint n); /*!< in: element index to get */ +/****************************************************************//** +Get last element. The vector must not be empty. +@return last element */ +UNIV_INLINE +void* +ib_vector_get_last( +/*===============*/ + ib_vector_t* vec); /*!< in: vector */ + +/****************************************************************//** +Set the n'th element. */ +UNIV_INLINE +void +ib_vector_set( +/*==========*/ + ib_vector_t* vec, /*!< in/out: vector */ + ulint n, /*!< in: element index to set */ + void* elem); /*!< in: data element */ + /****************************************************************//** Remove the last element from the vector. */ UNIV_INLINE diff --git a/include/ut0vec.ic b/include/ut0vec.ic index 02e881f9bca..34c858868ce 100644 --- a/include/ut0vec.ic +++ b/include/ut0vec.ic @@ -50,6 +50,35 @@ ib_vector_get( return(vec->data[n]); } +/****************************************************************//** +Get last element. The vector must not be empty. +@return last element */ +UNIV_INLINE +void* +ib_vector_get_last( +/*===============*/ + ib_vector_t* vec) /*!< in: vector */ +{ + ut_a(vec->used > 0); + + return(vec->data[vec->used - 1]); +} + +/****************************************************************//** +Set the n'th element. */ +UNIV_INLINE +void +ib_vector_set( +/*==========*/ + ib_vector_t* vec, /*!< in/out: vector */ + ulint n, /*!< in: element index to set */ + void* elem) /*!< in: data element */ +{ + ut_a(n < vec->used); + + vec->data[n] = elem; +} + /****************************************************************//** Remove the last element from the vector. @return last vector element */ diff --git a/lock/lock0lock.c b/lock/lock0lock.c index 1ded67d9147..4fcb5b2c522 100644 --- a/lock/lock0lock.c +++ b/lock/lock0lock.c @@ -3631,6 +3631,80 @@ lock_table_create( return(lock); } +/*************************************************************//** +Pops autoinc lock requests from the transaction's autoinc_locks. We +handle the case where there are gaps in the array and they need to +be popped off the stack. */ +UNIV_INLINE +void +lock_table_pop_autoinc_locks( +/*=========================*/ + trx_t* trx) /*!< in/out: transaction that owns the AUTOINC locks */ +{ + ut_ad(mutex_own(&kernel_mutex)); + ut_ad(!ib_vector_is_empty(trx->autoinc_locks)); + + /* Skip any gaps, gaps are NULL lock entries in the + trx->autoinc_locks vector. */ + + do { + ib_vector_pop(trx->autoinc_locks); + + if (ib_vector_is_empty(trx->autoinc_locks)) { + return; + } + + } while (ib_vector_get_last(trx->autoinc_locks) == NULL); +} + +/*************************************************************//** +Removes an autoinc lock request from the transaction's autoinc_locks. */ +UNIV_INLINE +void +lock_table_remove_autoinc_lock( +/*===========================*/ + lock_t* lock, /*!< in: table lock */ + trx_t* trx) /*!< in/out: transaction that owns the lock */ +{ + lock_t* autoinc_lock; + lint i = ib_vector_size(trx->autoinc_locks) - 1; + + ut_ad(mutex_own(&kernel_mutex)); + ut_ad(lock_get_mode(lock) == LOCK_AUTO_INC); + ut_ad(lock_get_type_low(lock) & LOCK_TABLE); + ut_ad(!ib_vector_is_empty(trx->autoinc_locks)); + + /* With stored functions and procedures the user may drop + a table within the same "statement". This special case has + to be handled by deleting only those AUTOINC locks that were + held by the table being dropped. */ + + autoinc_lock = ib_vector_get(trx->autoinc_locks, i); + + /* This is the default fast case. */ + + if (autoinc_lock == lock) { + lock_table_pop_autoinc_locks(trx); + } else { + /* The last element should never be NULL */ + ut_a(autoinc_lock != NULL); + + /* Handle freeing the locks from within the stack. */ + + while (--i >= 0) { + autoinc_lock = ib_vector_get(trx->autoinc_locks, i); + + if (UNIV_LIKELY(autoinc_lock == lock)) { + ib_vector_set(trx->autoinc_locks, i, NULL); + return; + } + } + + /* Must find the autoinc lock. */ + ut_error; + } +} + /*************************************************************//** Removes a table lock request from the queue and the trx list of locks; this is a low-level function which does NOT check if waiting requests @@ -3670,10 +3744,8 @@ lock_table_remove_low( if (!lock_get_wait(lock) && !ib_vector_is_empty(trx->autoinc_locks)) { - lock_t* autoinc_lock; - autoinc_lock = ib_vector_pop(trx->autoinc_locks); - ut_a(autoinc_lock == lock); + lock_table_remove_autoinc_lock(lock, trx); } ut_a(table->n_waiting_or_granted_auto_inc_locks > 0); diff --git a/log/log0recv.c b/log/log0recv.c index 5702f47ad5f..8ef24995b09 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -2260,7 +2260,7 @@ recv_report_corrupt_log( "InnoDB: far enough in recovery! Please run CHECK TABLE\n" "InnoDB: on your InnoDB tables to check that they are ok!\n" "InnoDB: If mysqld crashes after this recovery, look at\n" - "InnoDB: " REFMAN "forcing-recovery.html\n" + "InnoDB: " REFMAN "forcing-innodb-recovery.html\n" "InnoDB: about forcing recovery.\n", stderr); fflush(stderr); diff --git a/mem/mem0mem.c b/mem/mem0mem.c index 1dd4db30841..86100b04fd6 100644 --- a/mem/mem0mem.c +++ b/mem/mem0mem.c @@ -347,7 +347,7 @@ mem_heap_create_block( return(NULL); } } else { - buf_block = buf_block_alloc(0); + buf_block = buf_block_alloc(); } block = (mem_block_t*) buf_block->frame; diff --git a/mtr/mtr0log.c b/mtr/mtr0log.c index 3f3dab36b76..3349036b5b3 100644 --- a/mtr/mtr0log.c +++ b/mtr/mtr0log.c @@ -408,7 +408,7 @@ mlog_parse_string( ptr += 2; if (UNIV_UNLIKELY(offset >= UNIV_PAGE_SIZE) - || UNIV_UNLIKELY(len + offset) > UNIV_PAGE_SIZE) { + || UNIV_UNLIKELY(len + offset > UNIV_PAGE_SIZE)) { recv_sys->found_corrupt_log = TRUE; return(NULL); diff --git a/mtr/mtr0mtr.c b/mtr/mtr0mtr.c index 44d11fe5b1d..34e6d3ffc92 100644 --- a/mtr/mtr0mtr.c +++ b/mtr/mtr0mtr.c @@ -33,6 +33,7 @@ Created 11/26/1995 Heikki Tuuri #include "page0types.h" #include "mtr0log.h" #include "log0log.h" +#include "buf0flu.h" #ifndef UNIV_HOTBACKUP # include "log0recv.h" diff --git a/os/os0file.c b/os/os0file.c index 7bb9440b184..31dec031af3 100644 --- a/os/os0file.c +++ b/os/os0file.c @@ -142,6 +142,7 @@ struct os_aio_slot_struct{ // made and only the slot message // needs to be passed to the caller // of os_aio_simulated_handle */ + ulint space_id; fil_node_t* message1; /*!< message which is given by the */ void* message2; /*!< the requester of an aio operation and which can be used to identify @@ -3391,7 +3392,7 @@ os_aio_array_reserve_slot( ulint offset_high, /*!< in: most significant 32 bits of offset */ ulint len, /*!< in: length of the block to read or write */ - trx_t* trx) + ulint space_id) { os_aio_slot_t* slot; ulint i; @@ -3473,6 +3474,7 @@ found: slot->offset_high = offset_high; // slot->io_already_done = FALSE; slot->status = OS_AIO_NOT_ISSUED; + slot->space_id = space_id; #ifdef WIN_ASYNC_IO control = &(slot->control); @@ -3681,6 +3683,7 @@ os_aio( (can be used to identify a completed aio operation); ignored if mode is OS_AIO_SYNC */ + ulint space_id, trx_t* trx) { os_aio_array_t* array; @@ -3763,7 +3766,7 @@ try_again: trx->io_read += n; } slot = os_aio_array_reserve_slot(type, array, message1, message2, file, - name, buf, offset, offset_high, n, trx); + name, buf, offset, offset_high, n, space_id); if (type == OS_FILE_READ) { if (os_aio_use_native_aio) { #ifdef WIN_ASYNC_IO @@ -3873,7 +3876,8 @@ os_aio_windows_handle( parameters are valid and can be used to restart the operation, for example */ void** message2, - ulint* type) /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* space_id) { ulint orig_seg = segment; os_aio_array_t* array; @@ -3927,6 +3931,7 @@ os_aio_windows_handle( *message2 = slot->message2; *type = slot->type; + *space_id = slot->space_id; if (ret && len == slot->len) { ret_val = TRUE; @@ -4010,7 +4015,8 @@ os_aio_simulated_handle( parameters are valid and can be used to restart the operation, for example */ void** message2, - ulint* type) /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* type, /*!< out: OS_FILE_WRITE or ..._READ */ + ulint* space_id) { os_aio_array_t* array; ulint segment; @@ -4301,6 +4307,7 @@ slot_io_done: *message2 = slot->message2; *type = slot->type; + *space_id = slot->space_id; os_mutex_exit(array->mutex); diff --git a/page/page0cur.c b/page/page0cur.c index fa3d2532deb..f10f16a7dd9 100644 --- a/page/page0cur.c +++ b/page/page0cur.c @@ -564,74 +564,6 @@ page_cur_open_on_rnd_user_rec( } while (rnd--); } -UNIV_INTERN -void -page_cur_open_on_nth_user_rec( -/*==========================*/ - buf_block_t* block, /*!< in: page */ - page_cur_t* cursor, /*!< out: page cursor */ - ulint nth) -{ - ulint n_recs = page_get_n_recs(buf_block_get_frame(block)); - - page_cur_set_before_first(block, cursor); - - if (UNIV_UNLIKELY(n_recs == 0)) { - - return; - } - - nth--; - - if (nth >= n_recs) { - nth = n_recs - 1; - } - - do { - page_cur_move_to_next(cursor); - } while (nth--); -} - -UNIV_INTERN -ibool -page_cur_open_on_rnd_user_rec_after_nth( -/*==========================*/ - buf_block_t* block, /*!< in: page */ - page_cur_t* cursor, /*!< out: page cursor */ - ulint nth) -{ - ulint rnd; - ulint n_recs = page_get_n_recs(buf_block_get_frame(block)); - ibool ret; - - page_cur_set_before_first(block, cursor); - - if (UNIV_UNLIKELY(n_recs == 0)) { - - return (FALSE); - } - - nth--; - - if (nth >= n_recs) { - nth = n_recs - 1; - } - - rnd = (ulint) (nth + page_cur_lcg_prng() % (n_recs - nth)); - - if (rnd == nth) { - ret = TRUE; - } else { - ret = FALSE; - } - - do { - page_cur_move_to_next(cursor); - } while (rnd--); - - return (ret); -} - /***********************************************************//** Writes the log record of a record insert on a page. */ static diff --git a/page/page0zip.c b/page/page0zip.c index a94d2d54417..5b4f5d3b76a 100644 --- a/page/page0zip.c +++ b/page/page0zip.c @@ -4443,7 +4443,7 @@ page_zip_reorganize( log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE); #ifndef UNIV_HOTBACKUP - temp_block = buf_block_alloc(0); + temp_block = buf_block_alloc(); btr_search_drop_page_hash_index(block); block->check_index_page_at_flush = TRUE; #else /* !UNIV_HOTBACKUP */ diff --git a/percona-suite/innodb_fix_misc_bug51325.result b/percona-suite/innodb_fix_misc_bug51325.result new file mode 100644 index 00000000000..87cd4a2971a --- /dev/null +++ b/percona-suite/innodb_fix_misc_bug51325.result @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS t1; +SET GLOBAL innodb_file_per_table=ON; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +Variable_name Value +innodb_lazy_drop_table 0 +SET GLOBAL innodb_lazy_drop_table=1; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +Variable_name Value +innodb_lazy_drop_table 1 +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +DROP TABLE t1; +SET GLOBAL innodb_lazy_drop_table=default; +SET GLOBAL innodb_file_per_table=default; diff --git a/percona-suite/innodb_fix_misc_bug51325.test b/percona-suite/innodb_fix_misc_bug51325.test new file mode 100644 index 00000000000..78d6e60046a --- /dev/null +++ b/percona-suite/innodb_fix_misc_bug51325.test @@ -0,0 +1,13 @@ +# Test for 'innodb_lazy_drop_table' variable +--source include/have_innodb.inc +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +SET GLOBAL innodb_file_per_table=ON; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +SET GLOBAL innodb_lazy_drop_table=1; +SHOW VARIABLES LIKE 'innodb_lazy_drop_table'; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +DROP TABLE t1; +SET GLOBAL innodb_lazy_drop_table=default; +SET GLOBAL innodb_file_per_table=default; diff --git a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result index a028aeadde4..15cefd67c1e 100644 --- a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result +++ b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t; CREATE TABLE t(id INT); INSERT INTO t SELECT SLEEP(10); @@ -15,7 +11,11 @@ master 1 slave count(*) slave 0 SHOW SLAVE STATUS NOLOCK; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc slave count(*) slave 1 DROP TABLE t; +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test index 9e856d24956..d8ae98262ea 100644 --- a/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test +++ b/percona-suite/show_slave_status_nolock.patch/percona_show_slave_status_nolock.test @@ -45,3 +45,6 @@ connection slave; connection master; DROP TABLE t; sync_slave_with_master; + +STOP SLAVE; +--source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result index 162c92afbd9..c2292c4d2ac 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_innodb_stats.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] DROP TABLE IF EXISTS t; CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB; INSERT INTO t VALUES @@ -15,7 +11,9 @@ INSERT INTO t VALUES INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2; STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t SELECT t.id,t.data from t; DROP TABLE IF EXISTS t; FLUSH LOGS; diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result index 386faf225ec..e96126e34c7 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.result @@ -1,15 +1,12 @@ # Activate master-slave replication -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # Make table t for test DROP TABLE IF EXISTS t; CREATE TABLE t(id INT); # Start slave replication START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (1); # Read and change log_slow_slave_statements to ON on slave show variables like 'log_slow_slave_statements'; @@ -22,7 +19,9 @@ log_slow_slave_statements ON INSERT INTO t VALUES (2); # Restart slave STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (3); show variables like 'long_query_time'; Variable_name Value @@ -91,3 +90,5 @@ FLUSH LOGS; 1 set global log_slow_slave_statements=OFF; DROP TABLE t; +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test index b5a6154bbfc..755b83fa93b 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements-and-use_global_long_query_time.test @@ -111,3 +111,6 @@ DROP TABLE t; sync_slave_with_master; connection slave; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result index 9f9085ff444..6563d6d863e 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.result @@ -1,15 +1,12 @@ # Activate master-slave replication -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] # Make table t for test DROP TABLE IF EXISTS t; CREATE TABLE t(id INT); # Start slave replication START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (1); # Read information about master binlog # Sync(1) slave thread @@ -26,7 +23,9 @@ INSERT INTO t VALUES (2); # Sync slave(2) thread # Restart slave STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (3); # Read information about master binlog # Sync(3) slave thread @@ -43,7 +42,9 @@ INSERT INTO t VALUES (4); # Sync slave(4) thread # Restart slave STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (5); # Read information about master binlog # Sync slave(5) thread @@ -60,7 +61,9 @@ INSERT INTO t VALUES (6); # Sync slave(6) thread # Restart slave STOP SLAVE; +include/wait_for_slave_to_stop.inc START SLAVE; +include/wait_for_slave_to_start.inc INSERT INTO t VALUES (7); # Read information about master binlog # Sync slave(7) thread @@ -86,3 +89,5 @@ set global log_slow_slave_statements=OFF; DROP TABLE t; # Read information about master binlog # Sync slave(8) thread +STOP SLAVE; +include/wait_for_slave_to_stop.inc diff --git a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test index bce7a5f0530..bdf37533933 100644 --- a/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test +++ b/percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test @@ -163,3 +163,6 @@ let $binlog_position = query_get_value(SHOW MASTER STATUS,Position,1); -- echo # Sync slave(8) thread connection slave; let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`; + +STOP SLAVE; +-- source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/userstat_bug602047.result b/percona-suite/userstat_bug602047.result new file mode 100644 index 00000000000..bc14ca3362a --- /dev/null +++ b/percona-suite/userstat_bug602047.result @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS t1; +SET @userstat_running_old= @@userstat_running; +SET GLOBAL userstat_running=ON; +CREATE TABLE t1 ( id int(10), PRIMARY KEY (id)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SELECT COUNT(*) FROM t1; +COUNT(*) +10 +SELECT ROWS_READ FROM information_schema.table_statistics WHERE TABLE_NAME='t1'; +ROWS_READ +10 +SELECT ROWS_READ FROM information_schema.index_statistics WHERE TABLE_NAME='t1'; +ROWS_READ +10 +SET GLOBAL userstat_running= @userstat_running_old; +DROP TABLE t1; diff --git a/percona-suite/userstat_bug602047.test b/percona-suite/userstat_bug602047.test new file mode 100644 index 00000000000..37c08d32bf0 --- /dev/null +++ b/percona-suite/userstat_bug602047.test @@ -0,0 +1,13 @@ +--source include/have_innodb.inc +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +SET @userstat_running_old= @@userstat_running; +SET GLOBAL userstat_running=ON; +CREATE TABLE t1 ( id int(10), PRIMARY KEY (id)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +SELECT COUNT(*) FROM t1; +SELECT ROWS_READ FROM information_schema.table_statistics WHERE TABLE_NAME='t1'; +SELECT ROWS_READ FROM information_schema.index_statistics WHERE TABLE_NAME='t1'; +SET GLOBAL userstat_running= @userstat_running_old; +DROP TABLE t1; diff --git a/plug.in b/plug.in index 4a621361671..427cc87eeb5 100644 --- a/plug.in +++ b/plug.in @@ -17,6 +17,8 @@ MYSQL_STORAGE_ENGINE(innodb_plugin,, [InnoDB Storage Engine], [Transactional Tables using InnoDB], [max,max-no-ndb]) MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin]) +# Enable if you know what you are doing (trying to link both InnoDB and +# InnoDB Plugin statically into MySQL does not work). MYSQL_PLUGIN_STATIC(innodb_plugin, [libinnobase.a]) MYSQL_PLUGIN_DYNAMIC(innodb_plugin, [ha_innodb_plugin.la]) MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ @@ -137,17 +139,24 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ ) AC_MSG_CHECKING(whether Solaris libc atomic functions are available) - # either define HAVE_IB_SOLARIS_ATOMICS or not - AC_CHECK_FUNCS(atomic_cas_ulong \ + # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following + # functions are present. + AC_CHECK_FUNCS(atomic_add_long_nv \ atomic_cas_32 \ atomic_cas_64 \ - atomic_add_long_nv \ - atomic_swap_uchar, + atomic_cas_ulong \ + atomic_swap_uchar) - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], - [Define to 1 if Solaris libc atomic functions \ - are available]) - ) + if test "${ac_cv_func_atomic_add_long_nv}" = "yes" -a \ + "${ac_cv_func_atomic_cas_32}" = "yes" -a \ + "${ac_cv_func_atomic_cas_64}" = "yes" -a \ + "${ac_cv_func_atomic_cas_ulong}" = "yes" -a \ + "${ac_cv_func_atomic_swap_uchar}" = "yes" ; then + + AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], + [Define to 1 if Solaris libc atomic functions are available] + ) + fi AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not diff --git a/rem/rem0cmp.c b/rem/rem0cmp.c index 8ee434f85da..04d2c15437b 100644 --- a/rem/rem0cmp.c +++ b/rem/rem0cmp.c @@ -862,15 +862,18 @@ cmp_rec_rec_with_match( const ulint* offsets1,/*!< in: rec_get_offsets(rec1, index) */ const ulint* offsets2,/*!< in: rec_get_offsets(rec2, index) */ dict_index_t* index, /*!< in: data dictionary index */ + ibool nulls_unequal, + /* in: TRUE if this is for index statistics + cardinality estimation, and innodb_stats_method + is "nulls_unequal" or "nulls_ignored" */ ulint* matched_fields, /*!< in/out: number of already completely matched fields; when the function returns, contains the value the for current comparison */ - ulint* matched_bytes, /*!< in/out: number of already matched + ulint* matched_bytes) /*!< in/out: number of already matched bytes within the first field not completely matched; when the function returns, contains the value for the current comparison */ - ulint stats_method) { ulint rec1_n_fields; /* the number of fields in rec */ ulint rec1_f_len; /* length of current field in rec */ @@ -962,13 +965,13 @@ cmp_rec_rec_with_match( || rec2_f_len == UNIV_SQL_NULL) { if (rec1_f_len == rec2_f_len) { - - if (stats_method == SRV_STATS_METHOD_NULLS_EQUAL) { - goto next_field; - } else { + /* This is limited to stats collection, + cannot use it for regular search */ + if (nulls_unequal) { ret = -1; + } else { + goto next_field; } - } else if (rec2_f_len == UNIV_SQL_NULL) { /* We define the SQL null to be the diff --git a/row/row0ins.c b/row/row0ins.c index 3372e1480b5..efcea62f212 100644 --- a/row/row0ins.c +++ b/row/row0ins.c @@ -2026,6 +2026,8 @@ row_ins_index_entry_low( } #ifdef UNIV_DEBUG + if (!srv_use_sys_stats_table + || index != UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) { page_t* page = btr_cur_get_page(&cursor); rec_t* first_rec = page_rec_get_next( @@ -2136,7 +2138,7 @@ function_exit: err = btr_store_big_rec_extern_fields( index, btr_cur_get_block(&cursor), - rec, offsets, big_rec, &mtr); + rec, offsets, &mtr, FALSE, big_rec); if (modify) { dtuple_big_rec_free(big_rec); diff --git a/row/row0merge.c b/row/row0merge.c index 402a168f5dd..782c029fbcc 100644 --- a/row/row0merge.c +++ b/row/row0merge.c @@ -2350,7 +2350,7 @@ row_merge_rename_tables( { ulint err = DB_ERROR; pars_info_t* info; - char old_name[MAX_TABLE_NAME_LEN + 1]; + char old_name[MAX_FULL_NAME_LEN + 1]; ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); ut_ad(old_table != new_table); @@ -2365,7 +2365,7 @@ row_merge_rename_tables( ut_print_timestamp(stderr); fprintf(stderr, "InnoDB: too long table name: '%s', " "max length is %d\n", old_table->name, - MAX_TABLE_NAME_LEN); + MAX_FULL_NAME_LEN); ut_error; } diff --git a/row/row0mysql.c b/row/row0mysql.c index 4639dd4aaf7..2728b3d66d9 100644 --- a/row/row0mysql.c +++ b/row/row0mysql.c @@ -51,6 +51,7 @@ Created 9/17/2000 Heikki Tuuri #include "btr0sea.h" #include "fil0fil.h" #include "ibuf0ibuf.h" +#include "ha_prototypes.h" /** Provide optional 4.x backwards compatibility for 5.0 and above */ UNIV_INTERN ibool row_rollback_on_timeout = FALSE; @@ -573,7 +574,7 @@ handle_new_error: "InnoDB: If the mysqld server crashes" " after the startup or when\n" "InnoDB: you dump the tables, look at\n" - "InnoDB: " REFMAN "forcing-recovery.html" + "InnoDB: " REFMAN "forcing-innodb-recovery.html" " for help.\n", stderr); break; case DB_FOREIGN_EXCEED_MAX_CASCADE: @@ -2094,6 +2095,32 @@ row_insert_stats_for_mysql( return((int) err); } +/*********************************************************************//** +*/ +UNIV_INTERN +int +row_delete_stats_for_mysql( +/*=============================*/ + dict_index_t* index, + trx_t* trx) +{ + pars_info_t* info = pars_info_create(); + + trx->op_info = "delete rows from SYS_STATS"; + + trx_start_if_not_started(trx); + trx->error_state = DB_SUCCESS; + + pars_info_add_dulint_literal(info, "indexid", index->id); + + return((int) que_eval_sql(info, + "PROCEDURE DELETE_STATISTICS_PROC () IS\n" + "BEGIN\n" + "DELETE FROM SYS_STATS WHERE INDEX_ID = :indexid;\n" + "END;\n" + , TRUE, trx)); +} + /*********************************************************************//** Scans a table create SQL string and adds to the data dictionary the foreign key constraints declared in the string. This function diff --git a/row/row0purge.c b/row/row0purge.c index 31b255cf2d4..752a2ec9e83 100644 --- a/row/row0purge.c +++ b/row/row0purge.c @@ -387,8 +387,11 @@ Purges an update of an existing record. Also purges an update of a delete marked record if that record contained an externally stored field. */ static void -row_purge_upd_exist_or_extern( -/*==========================*/ +row_purge_upd_exist_or_extern_func( +/*===============================*/ +#ifdef UNIV_DEBUG + const que_thr_t*thr, /*!< in: query thread */ +#endif /* UNIV_DEBUG */ purge_node_t* node) /*!< in: row purge node */ { mem_heap_t* heap; @@ -413,8 +416,8 @@ row_purge_upd_exist_or_extern( while (node->index != NULL) { index = node->index; - if (row_upd_changes_ord_field_binary(NULL, node->index, - node->update)) { + if (row_upd_changes_ord_field_binary(node->index, node->update, + thr, NULL, NULL)) { /* Build the older version of the index entry */ entry = row_build_index_entry(node->row, NULL, index, heap); @@ -496,6 +499,14 @@ skip_secondaries: } } +#ifdef UNIV_DEBUG +# define row_purge_upd_exist_or_extern(thr,node) \ + row_purge_upd_exist_or_extern_func(thr,node) +#else /* UNIV_DEBUG */ +# define row_purge_upd_exist_or_extern(thr,node) \ + row_purge_upd_exist_or_extern_func(node) +#endif /* UNIV_DEBUG */ + /***********************************************************//** Parses the row reference and other info in a modify undo log record. @return TRUE if purge operation required: NOTE that then the CALLER @@ -602,47 +613,32 @@ err_exit: /***********************************************************//** Fetches an undo log record and does the purge for the recorded operation. If none left, or the current purge completed, returns the control to the -parent node, which is always a query thread node. -@return DB_SUCCESS if operation successfully completed, else error code */ -static -ulint +parent node, which is always a query thread node. */ +static __attribute__((nonnull)) +void row_purge( /*======*/ purge_node_t* node, /*!< in: row purge node */ que_thr_t* thr) /*!< in: query thread */ { - roll_ptr_t roll_ptr; - ibool purge_needed; ibool updated_extern; - trx_t* trx; - ut_ad(node && thr); + ut_ad(node); + ut_ad(thr); - trx = thr_get_trx(thr); - - node->undo_rec = trx_purge_fetch_next_rec(&roll_ptr, - &(node->reservation), + node->undo_rec = trx_purge_fetch_next_rec(&node->roll_ptr, + &node->reservation, node->heap); if (!node->undo_rec) { /* Purge completed for this query thread */ thr->run_node = que_node_get_parent(node); - return(DB_SUCCESS); + return; } - node->roll_ptr = roll_ptr; - - if (node->undo_rec == &trx_purge_dummy_rec) { - purge_needed = FALSE; - } else { - purge_needed = row_purge_parse_undo_rec(node, &updated_extern, - thr); - /* If purge_needed == TRUE, we must also remember to unfreeze - data dictionary! */ - } - - if (purge_needed) { + if (node->undo_rec != &trx_purge_dummy_rec + && row_purge_parse_undo_rec(node, &updated_extern, thr)) { node->found_clust = FALSE; node->index = dict_table_get_next_index( @@ -654,14 +650,14 @@ row_purge( } else if (updated_extern || node->rec_type == TRX_UNDO_UPD_EXIST_REC) { - row_purge_upd_exist_or_extern(node); + row_purge_upd_exist_or_extern(thr, node); } if (node->found_clust) { btr_pcur_close(&(node->pcur)); } - row_mysql_unfreeze_data_dictionary(trx); + row_mysql_unfreeze_data_dictionary(thr_get_trx(thr)); } /* Do some cleanup */ @@ -669,8 +665,6 @@ row_purge( mem_heap_empty(node->heap); thr->run_node = node; - - return(DB_SUCCESS); } /***********************************************************//** @@ -684,9 +678,6 @@ row_purge_step( que_thr_t* thr) /*!< in: query thread */ { purge_node_t* node; -#ifdef UNIV_DEBUG - ulint err; -#endif /* UNIV_DEBUG */ ut_ad(thr); @@ -694,12 +685,7 @@ row_purge_step( ut_ad(que_node_get_type(node) == QUE_NODE_PURGE); -#ifdef UNIV_DEBUG - err = -#endif /* UNIV_DEBUG */ row_purge(node, thr); - ut_ad(err == DB_SUCCESS); - return(thr); } diff --git a/row/row0row.c b/row/row0row.c index 8e806a14a98..0783d482f76 100644 --- a/row/row0row.c +++ b/row/row0row.c @@ -347,6 +347,14 @@ row_rec_to_index_entry_low( rec_len = rec_offs_n_fields(offsets); + if (srv_use_sys_stats_table + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) { + if (rec_len < dict_index_get_n_fields(index)) { + /* the new record should be extended */ + rec_len = dict_index_get_n_fields(index); + } + } + entry = dtuple_create(heap, rec_len); dtuple_set_n_fields_cmp(entry, @@ -358,6 +366,14 @@ row_rec_to_index_entry_low( for (i = 0; i < rec_len; i++) { dfield = dtuple_get_nth_field(entry, i); + + if (srv_use_sys_stats_table + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes) + && i >= rec_offs_n_fields(offsets)) { + dfield_set_null(dfield); + continue; + } + field = rec_get_nth_field(rec, offsets, i, &len); dfield_set_data(dfield, field, len); diff --git a/row/row0umod.c b/row/row0umod.c index 5998dadd16d..5202a498eed 100644 --- a/row/row0umod.c +++ b/row/row0umod.c @@ -173,40 +173,26 @@ row_undo_mod_remove_clust_low( mtr_t* mtr, /*!< in: mtr */ ulint mode) /*!< in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */ { - btr_pcur_t* pcur; btr_cur_t* btr_cur; ulint err; - ibool success; ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC); - pcur = &(node->pcur); - btr_cur = btr_pcur_get_btr_cur(pcur); - success = btr_pcur_restore_position(mode, pcur, mtr); + /* Find out if the record has been purged already + or if we can remove it. */ - if (!success) { + if (!btr_pcur_restore_position(mode, &node->pcur, mtr) + || row_vers_must_preserve_del_marked(node->new_trx_id, mtr)) { return(DB_SUCCESS); } - /* Find out if we can remove the whole clustered index record */ - - if (node->rec_type == TRX_UNDO_UPD_DEL_REC - && !row_vers_must_preserve_del_marked(node->new_trx_id, mtr)) { - - /* Ok, we can remove */ - } else { - return(DB_SUCCESS); - } + btr_cur = btr_pcur_get_btr_cur(&node->pcur); if (mode == BTR_MODIFY_LEAF) { - success = btr_cur_optimistic_delete(btr_cur, mtr); - - if (success) { - err = DB_SUCCESS; - } else { - err = DB_FAIL; - } + err = btr_cur_optimistic_delete(btr_cur, mtr) + ? DB_SUCCESS + : DB_FAIL; } else { ut_ad(mode == BTR_MODIFY_TREE); @@ -668,19 +654,19 @@ row_undo_mod_upd_exist_sec( while (node->index != NULL) { index = node->index; - if (row_upd_changes_ord_field_binary(node->row, node->index, - node->update)) { + if (row_upd_changes_ord_field_binary(node->index, node->update, + thr, + node->row, node->ext)) { /* Build the newest version of the index entry */ entry = row_build_index_entry(node->row, node->ext, index, heap); if (UNIV_UNLIKELY(!entry)) { /* The server must have crashed in - row_upd_clust_rec_by_insert(), in - row_ins_index_entry_low() before - btr_store_big_rec_extern_fields() - has written the externally stored columns - (BLOBs) of the new clustered index entry. */ + row_upd_clust_rec_by_insert() before + the updated externally stored columns (BLOBs) + of the new clustered index entry were + written. */ /* The table must be in DYNAMIC or COMPRESSED format. REDUNDANT and COMPACT formats diff --git a/row/row0upd.c b/row/row0upd.c index 0dc550b93f5..ba4096f8d4d 100644 --- a/row/row0upd.c +++ b/row/row0upd.c @@ -439,6 +439,12 @@ row_upd_changes_field_size_or_external( 0); } + if (srv_use_sys_stats_table + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes) + && upd_field->field_no >= rec_offs_n_fields(offsets)) { + return(TRUE); + } + old_len = rec_offs_nth_size(offsets, upd_field->field_no); if (rec_offs_comp(offsets) @@ -844,6 +850,18 @@ row_upd_build_difference_binary( for (i = 0; i < dtuple_get_n_fields(entry); i++) { + if (srv_use_sys_stats_table + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes) + && i >= rec_offs_n_fields(offsets)) { + dfield = dtuple_get_nth_field(entry, i); + + upd_field = upd_get_nth_field(update, n_diff); + dfield_copy(&(upd_field->new_val), dfield); + upd_field_set_field_no(upd_field, i, index, trx); + n_diff++; + goto skip_compare; + } + data = rec_get_nth_field(rec, offsets, i, &len); dfield = dtuple_get_nth_field(entry, i); @@ -1192,26 +1210,33 @@ NOTE: we compare the fields as binary strings! @return TRUE if update vector changes an ordering field in the index record */ UNIV_INTERN ibool -row_upd_changes_ord_field_binary( -/*=============================*/ +row_upd_changes_ord_field_binary_func( +/*==================================*/ + dict_index_t* index, /*!< in: index of the record */ + const upd_t* update, /*!< in: update vector for the row; NOTE: the + field numbers in this MUST be clustered index + positions! */ +#ifdef UNIV_DEBUG + const que_thr_t*thr, /*!< in: query thread */ +#endif /* UNIV_DEBUG */ const dtuple_t* row, /*!< in: old value of row, or NULL if the row and the data values in update are not known when this function is called, e.g., at compile time */ - dict_index_t* index, /*!< in: index of the record */ - const upd_t* update) /*!< in: update vector for the row; NOTE: the - field numbers in this MUST be clustered index - positions! */ + const row_ext_t*ext) /*!< NULL, or prefixes of the externally + stored columns in the old row */ { - ulint n_unique; - ulint n_upd_fields; - ulint i, j; - dict_index_t* clust_index; + ulint n_unique; + ulint i; + const dict_index_t* clust_index; - ut_ad(update && index); + ut_ad(index); + ut_ad(update); + ut_ad(thr); + ut_ad(thr->graph); + ut_ad(thr->graph->trx); n_unique = dict_index_get_n_unique(index); - n_upd_fields = upd_get_n_fields(update); clust_index = dict_table_get_first_index(index->table); @@ -1219,33 +1244,81 @@ row_upd_changes_ord_field_binary( const dict_field_t* ind_field; const dict_col_t* col; - ulint col_pos; ulint col_no; + const upd_field_t* upd_field; + const dfield_t* dfield; + dfield_t dfield_ext; + ulint dfield_len; + const byte* buf; ind_field = dict_index_get_nth_field(index, i); col = dict_field_get_col(ind_field); - col_pos = dict_col_get_clust_pos(col, clust_index); col_no = dict_col_get_no(col); - for (j = 0; j < n_upd_fields; j++) { + upd_field = upd_get_field_by_field_no( + update, dict_col_get_clust_pos(col, clust_index)); - const upd_field_t* upd_field - = upd_get_nth_field(update, j); + if (upd_field == NULL) { + continue; + } - /* Note that if the index field is a column prefix - then it may be that row does not contain an externally - stored part of the column value, and we cannot compare - the datas */ + if (row == NULL) { + ut_ad(ext == NULL); + return(TRUE); + } - if (col_pos == upd_field->field_no - && (row == NULL - || ind_field->prefix_len > 0 - || !dfield_datas_are_binary_equal( - dtuple_get_nth_field(row, col_no), - &(upd_field->new_val)))) { + dfield = dtuple_get_nth_field(row, col_no); - return(TRUE); + /* This treatment of column prefix indexes is loosely + based on row_build_index_entry(). */ + + if (UNIV_LIKELY(ind_field->prefix_len == 0) + || dfield_is_null(dfield)) { + /* do nothing special */ + } else if (UNIV_LIKELY_NULL(ext)) { + /* Silence a compiler warning without + silencing a Valgrind error. */ + dfield_len = 0; + UNIV_MEM_INVALID(&dfield_len, sizeof dfield_len); + /* See if the column is stored externally. */ + buf = row_ext_lookup(ext, col_no, &dfield_len); + + ut_ad(col->ord_part); + + if (UNIV_LIKELY_NULL(buf)) { + if (UNIV_UNLIKELY(buf == field_ref_zero)) { + /* The externally stored field + was not written yet. This + record should only be seen by + recv_recovery_rollback_active(), + when the server had crashed before + storing the field. */ + ut_ad(thr->graph->trx->is_recovered); + ut_ad(trx_is_recv(thr->graph->trx)); + return(TRUE); + } + + goto copy_dfield; } + } else if (dfield_is_ext(dfield)) { + dfield_len = dfield_get_len(dfield); + ut_a(dfield_len > BTR_EXTERN_FIELD_REF_SIZE); + dfield_len -= BTR_EXTERN_FIELD_REF_SIZE; + ut_a(dict_index_is_clust(index) + || ind_field->prefix_len <= dfield_len); + buf = dfield_get_data(dfield); +copy_dfield: + ut_a(dfield_len > 0); + dfield_copy(&dfield_ext, dfield); + dfield_set_data(&dfield_ext, buf, dfield_len); + dfield = &dfield_ext; + } + + if (!dfield_datas_are_binary_equal( + dfield, &upd_field->new_val, + ind_field->prefix_len)) { + + return(TRUE); } } @@ -1329,7 +1402,7 @@ row_upd_changes_first_fields_binary( if (col_pos == upd_field->field_no && !dfield_datas_are_binary_equal( dtuple_get_nth_field(entry, i), - &(upd_field->new_val))) { + &upd_field->new_val, 0)) { return(TRUE); } @@ -1568,14 +1641,99 @@ row_upd_sec_step( ut_ad(!dict_index_is_clust(node->index)); if (node->state == UPD_NODE_UPDATE_ALL_SEC - || row_upd_changes_ord_field_binary(node->row, node->index, - node->update)) { + || row_upd_changes_ord_field_binary(node->index, node->update, + thr, node->row, node->ext)) { return(row_upd_sec_index_entry(node, thr)); } return(DB_SUCCESS); } +#ifdef UNIV_DEBUG +# define row_upd_clust_rec_by_insert_inherit(rec,offsets,entry,update) \ + row_upd_clust_rec_by_insert_inherit_func(rec,offsets,entry,update) +#else /* UNIV_DEBUG */ +# define row_upd_clust_rec_by_insert_inherit(rec,offsets,entry,update) \ + row_upd_clust_rec_by_insert_inherit_func(entry,update) +#endif /* UNIV_DEBUG */ +/*******************************************************************//** +Mark non-updated off-page columns inherited when the primary key is +updated. We must mark them as inherited in entry, so that they are not +freed in a rollback. A limited version of this function used to be +called btr_cur_mark_dtuple_inherited_extern(). +@return TRUE if any columns were inherited */ +static __attribute__((warn_unused_result)) +ibool +row_upd_clust_rec_by_insert_inherit_func( +/*=====================================*/ +#ifdef UNIV_DEBUG + const rec_t* rec, /*!< in: old record, or NULL */ + const ulint* offsets,/*!< in: rec_get_offsets(rec), or NULL */ +#endif /* UNIV_DEBUG */ + dtuple_t* entry, /*!< in/out: updated entry to be + inserted into the clustered index */ + const upd_t* update) /*!< in: update vector */ +{ + ibool inherit = FALSE; + ulint i; + + ut_ad(!rec == !offsets); + ut_ad(!rec || rec_offs_any_extern(offsets)); + + for (i = 0; i < dtuple_get_n_fields(entry); i++) { + dfield_t* dfield = dtuple_get_nth_field(entry, i); + byte* data; + ulint len; + + ut_ad(!offsets + || !rec_offs_nth_extern(offsets, i) + == !dfield_is_ext(dfield) + || upd_get_field_by_field_no(update, i)); + if (!dfield_is_ext(dfield) + || upd_get_field_by_field_no(update, i)) { + continue; + } + +#ifdef UNIV_DEBUG + if (UNIV_LIKELY(rec != NULL)) { + const byte* rec_data + = rec_get_nth_field(rec, offsets, i, &len); + ut_ad(len == dfield_get_len(dfield)); + ut_ad(len != UNIV_SQL_NULL); + ut_ad(len >= BTR_EXTERN_FIELD_REF_SIZE); + + rec_data += len - BTR_EXTERN_FIELD_REF_SIZE; + + /* The pointer must not be zero. */ + ut_ad(memcmp(rec_data, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); + /* The BLOB must be owned. */ + ut_ad(!(rec_data[BTR_EXTERN_LEN] + & BTR_EXTERN_OWNER_FLAG)); + } +#endif /* UNIV_DEBUG */ + + len = dfield_get_len(dfield); + ut_a(len != UNIV_SQL_NULL); + ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); + data = dfield_get_data(dfield); + data += len - BTR_EXTERN_FIELD_REF_SIZE; + /* The pointer must not be zero. */ + ut_a(memcmp(data, field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE)); + /* The BLOB must be owned. */ + ut_a(!(data[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG)); + + data[BTR_EXTERN_LEN] |= BTR_EXTERN_INHERITED_FLAG; + /* The BTR_EXTERN_INHERITED_FLAG only matters in + rollback. Purge will always free the extern fields of + a delete-marked row. */ + + inherit = TRUE; + } + + return(inherit); +} + /***********************************************************//** Marks the clustered index record deleted and inserts the updated version of the record to the index. This function should be used when the ordering @@ -1594,14 +1752,16 @@ row_upd_clust_rec_by_insert( a foreign key constraint */ mtr_t* mtr) /*!< in/out: mtr; gets committed here */ { - mem_heap_t* heap = NULL; + mem_heap_t* heap; btr_pcur_t* pcur; btr_cur_t* btr_cur; trx_t* trx; dict_table_t* table; dtuple_t* entry; ulint err; - ibool change_ownership = FALSE; + ibool change_ownership = FALSE; + rec_t* rec; + ulint* offsets = NULL; ut_ad(node); ut_ad(dict_index_is_clust(index)); @@ -1611,53 +1771,7 @@ row_upd_clust_rec_by_insert( pcur = node->pcur; btr_cur = btr_pcur_get_btr_cur(pcur); - if (node->state != UPD_NODE_INSERT_CLUSTERED) { - rec_t* rec; - dict_index_t* index; - ulint offsets_[REC_OFFS_NORMAL_SIZE]; - ulint* offsets; - rec_offs_init(offsets_); - - err = btr_cur_del_mark_set_clust_rec(BTR_NO_LOCKING_FLAG, - btr_cur, TRUE, thr, mtr); - if (err != DB_SUCCESS) { - mtr_commit(mtr); - return(err); - } - - /* Mark as not-owned the externally stored fields which the new - row inherits from the delete marked record: purge should not - free those externally stored fields even if the delete marked - record is removed from the index tree, or updated. */ - - rec = btr_cur_get_rec(btr_cur); - index = dict_table_get_first_index(table); - offsets = rec_get_offsets(rec, index, offsets_, - ULINT_UNDEFINED, &heap); - change_ownership = btr_cur_mark_extern_inherited_fields( - btr_cur_get_page_zip(btr_cur), rec, index, offsets, - node->update, mtr); - if (check_ref) { - /* NOTE that the following call loses - the position of pcur ! */ - err = row_upd_check_references_constraints( - node, pcur, table, index, offsets, thr, mtr); - if (err != DB_SUCCESS) { - mtr_commit(mtr); - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } - return(err); - } - } - } - - mtr_commit(mtr); - - if (!heap) { - heap = mem_heap_create(500); - } - node->state = UPD_NODE_INSERT_CLUSTERED; + heap = mem_heap_create(1000); entry = row_build_index_entry(node->upd_row, node->upd_ext, index, heap); @@ -1665,23 +1779,104 @@ row_upd_clust_rec_by_insert( row_upd_index_entry_sys_field(entry, index, DATA_TRX_ID, trx->id); - if (change_ownership) { - /* If we return from a lock wait, for example, we may have - extern fields marked as not-owned in entry (marked in the - if-branch above). We must unmark them, take the ownership - back. */ + switch (node->state) { + default: + ut_error; + case UPD_NODE_INSERT_BLOB: + /* A lock wait occurred in row_ins_index_entry() in + the previous invocation of this function. Mark the + off-page columns in the entry inherited. */ - btr_cur_unmark_dtuple_extern_fields(entry); + change_ownership = row_upd_clust_rec_by_insert_inherit( + NULL, NULL, entry, node->update); + ut_a(change_ownership); + /* fall through */ + case UPD_NODE_INSERT_CLUSTERED: + /* A lock wait occurred in row_ins_index_entry() in + the previous invocation of this function. */ + break; + case UPD_NODE_UPDATE_CLUSTERED: + /* This is the first invocation of the function where + we update the primary key. Delete-mark the old record + in the clustered index and prepare to insert a new entry. */ + rec = btr_cur_get_rec(btr_cur); + offsets = rec_get_offsets(rec, index, NULL, + ULINT_UNDEFINED, &heap); + ut_ad(page_rec_is_user_rec(rec)); - /* We must mark non-updated extern fields in entry as - inherited, so that a possible rollback will not free them. */ + err = btr_cur_del_mark_set_clust_rec( + BTR_NO_LOCKING_FLAG, btr_cur_get_block(btr_cur), + rec, index, offsets, TRUE, thr, mtr); + if (err != DB_SUCCESS) { +err_exit: + mtr_commit(mtr); + mem_heap_free(heap); + return(err); + } - btr_cur_mark_dtuple_inherited_extern(entry, node->update); + /* If the the new row inherits externally stored + fields (off-page columns a.k.a. BLOBs) from the + delete-marked old record, mark them disowned by the + old record and owned by the new entry. */ + + if (rec_offs_any_extern(offsets)) { + change_ownership = row_upd_clust_rec_by_insert_inherit( + rec, offsets, entry, node->update); + + if (change_ownership) { + btr_pcur_store_position(pcur, mtr); + } + } + + if (check_ref) { + /* NOTE that the following call loses + the position of pcur ! */ + err = row_upd_check_references_constraints( + node, pcur, table, index, offsets, thr, mtr); + if (err != DB_SUCCESS) { + goto err_exit; + } + } } + mtr_commit(mtr); + err = row_ins_index_entry(index, entry, node->upd_ext ? node->upd_ext->n_ext : 0, TRUE, thr); + node->state = change_ownership + ? UPD_NODE_INSERT_BLOB + : UPD_NODE_INSERT_CLUSTERED; + + if (err == DB_SUCCESS && change_ownership) { + /* Mark the non-updated fields disowned by the old record. */ + + /* NOTE: this transaction has an x-lock on the record + and therefore other transactions cannot modify the + record when we have no latch on the page. In addition, + we assume that other query threads of the same + transaction do not modify the record in the meantime. + Therefore we can assert that the restoration of the + cursor succeeds. */ + + mtr_start(mtr); + + if (!btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr)) { + ut_error; + } + + rec = btr_cur_get_rec(btr_cur); + offsets = rec_get_offsets(rec, index, offsets, + ULINT_UNDEFINED, &heap); + ut_ad(page_rec_is_user_rec(rec)); + + btr_cur_disown_inherited_fields( + btr_cur_get_page_zip(btr_cur), + rec, index, offsets, node->update, mtr); + + mtr_commit(mtr); + } + mem_heap_free(heap); return(err); @@ -1775,7 +1970,7 @@ row_upd_clust_rec( index, btr_cur_get_block(btr_cur), rec, rec_get_offsets(rec, index, offsets_, ULINT_UNDEFINED, &heap), - big_rec, mtr); + mtr, TRUE, big_rec); mtr_commit(mtr); } @@ -1825,8 +2020,9 @@ row_upd_del_mark_clust_rec( /* Mark the clustered index record deleted; we do not have to check locks, because we assume that we have an x-lock on the record */ - err = btr_cur_del_mark_set_clust_rec(BTR_NO_LOCKING_FLAG, - btr_cur, TRUE, thr, mtr); + err = btr_cur_del_mark_set_clust_rec( + BTR_NO_LOCKING_FLAG, btr_cur_get_block(btr_cur), + btr_cur_get_rec(btr_cur), index, offsets, TRUE, thr, mtr); if (err == DB_SUCCESS && check_ref) { /* NOTE that the following call loses the position of pcur ! */ @@ -1973,7 +2169,8 @@ exit_func: row_upd_store_row(node); - if (row_upd_changes_ord_field_binary(node->row, index, node->update)) { + if (row_upd_changes_ord_field_binary(index, node->update, thr, + node->row, node->ext)) { /* Update causes an ordering field (ordering fields within the B-tree) of the clustered index record to change: perform @@ -2042,7 +2239,8 @@ row_upd( } if (node->state == UPD_NODE_UPDATE_CLUSTERED - || node->state == UPD_NODE_INSERT_CLUSTERED) { + || node->state == UPD_NODE_INSERT_CLUSTERED + || node->state == UPD_NODE_INSERT_BLOB) { log_free_check(); err = row_upd_clust_step(node, thr); diff --git a/row/row0vers.c b/row/row0vers.c index b6d35363f08..d4fde0b939b 100644 --- a/row/row0vers.c +++ b/row/row0vers.c @@ -669,11 +669,15 @@ row_vers_build_for_semi_consistent_read( mutex_enter(&kernel_mutex); version_trx = trx_get_on_id(version_trx_id); + if (version_trx + && (version_trx->conc_state == TRX_COMMITTED_IN_MEMORY + || version_trx->conc_state == TRX_NOT_STARTED)) { + + version_trx = NULL; + } mutex_exit(&kernel_mutex); - if (!version_trx - || version_trx->conc_state == TRX_NOT_STARTED - || version_trx->conc_state == TRX_COMMITTED_IN_MEMORY) { + if (!version_trx) { /* We found a version that belongs to a committed transaction: return it. */ diff --git a/srv/srv0srv.c b/srv/srv0srv.c index 0a84d91e9af..0b68574317f 100644 --- a/srv/srv0srv.c +++ b/srv/srv0srv.c @@ -269,6 +269,11 @@ UNIV_INTERN ulong srv_max_buf_pool_modified_pct = 75; /* variable counts amount of data read in total (in bytes) */ UNIV_INTERN ulint srv_data_read = 0; +/* Internal setting for "innodb_stats_method". Decides how InnoDB treats +NULL value when collecting statistics. By default, it is set to +SRV_STATS_NULLS_EQUAL(0), ie. all NULL value are treated equal */ +ulong srv_innodb_stats_method = SRV_STATS_NULLS_EQUAL; + /* here we count the amount of data written in total (in bytes) */ UNIV_INTERN ulint srv_data_written = 0; @@ -388,7 +393,6 @@ UNIV_INTERN ibool srv_innodb_status = FALSE; /* When estimating number of different key values in an index, sample this many index pages */ UNIV_INTERN unsigned long long srv_stats_sample_pages = 8; -UNIV_INTERN ulint srv_stats_method = 0; UNIV_INTERN ulint srv_stats_auto_update = 1; UNIV_INTERN ulint srv_stats_update_need_lock = 1; UNIV_INTERN ibool srv_use_sys_stats_table = FALSE; @@ -419,6 +423,8 @@ UNIV_INTERN ulint srv_pass_corrupt_table = 0; /* 0:disable 1:enable */ UNIV_INTERN ulint srv_extra_rsegments = 0; /* extra rseg for users */ UNIV_INTERN ulint srv_dict_size_limit = 0; + +UNIV_INTERN ulint srv_lazy_drop_table = 0; /*-------------------------------------------*/ UNIV_INTERN ulong srv_n_spin_wait_rounds = 30; UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; @@ -2709,7 +2715,8 @@ srv_master_thread( unsigned space:32; unsigned offset:32; ib_uint64_t oldest_modification; - } prev_flush_info; + }; + struct t_prev_flush_info_struct prev_flush_info = {0,0,0,0}; ib_uint64_t lsn_old; @@ -2765,6 +2772,8 @@ loop: for (i = 0; i < 10; i++) { ulint cur_time = ut_time_ms(); + n_pages_flushed = 0; /* initialize */ + n_ios_old = log_sys->n_log_ios + buf_pool->stat.n_pages_read + buf_pool->stat.n_pages_written; srv_main_thread_op_info = "sleeping"; @@ -3030,7 +3039,8 @@ retry_flush_batch: if (prev_adaptive_checkpoint == 3) { lint n_flush; - lint blocks_sum, new_blocks_sum, flushed_blocks_sum; + lint blocks_sum; + ulint new_blocks_sum, flushed_blocks_sum; blocks_sum = new_blocks_sum = flushed_blocks_sum = 0; diff --git a/sync/sync0arr.c b/sync/sync0arr.c index 223e1715944..57a288089c7 100644 --- a/sync/sync0arr.c +++ b/sync/sync0arr.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -714,7 +714,7 @@ print: fprintf(stderr, "rw-lock %p ", (void*) lock); sync_array_cell_print(stderr, cell); - rw_lock_debug_print(debug); + rw_lock_debug_print(stderr, debug); return(TRUE); } } diff --git a/sync/sync0rw.c b/sync/sync0rw.c index 21e4b6b03bf..9431de15fda 100644 --- a/sync/sync0rw.c +++ b/sync/sync0rw.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -231,10 +231,10 @@ rw_lock_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ -#endif /* UNIV_DEBUG */ - const char* cmutex_name, /*!< in: mutex name */ const char* cfile_name, /*!< in: file name where created */ - ulint cline) /*!< in: file line where created */ + ulint cline, /*!< in: file line where created */ +#endif /* UNIV_DEBUG */ + const char* cmutex_name) /*!< in: mutex name */ { /* If this is the very first time a synchronization object is created, then the following call initializes the sync system. */ @@ -924,7 +924,7 @@ rw_lock_list_print_info( info = UT_LIST_GET_FIRST(lock->debug_list); while (info != NULL) { - rw_lock_debug_print(info); + rw_lock_debug_print(file, info); info = UT_LIST_GET_NEXT(list, info); } } @@ -972,7 +972,7 @@ rw_lock_print( info = UT_LIST_GET_FIRST(lock->debug_list); while (info != NULL) { - rw_lock_debug_print(info); + rw_lock_debug_print(stderr, info); info = UT_LIST_GET_NEXT(list, info); } } @@ -984,28 +984,29 @@ UNIV_INTERN void rw_lock_debug_print( /*================*/ + FILE* f, /*!< in: output stream */ rw_lock_debug_t* info) /*!< in: debug struct */ { ulint rwt; rwt = info->lock_type; - fprintf(stderr, "Locked: thread %lu file %s line %lu ", + fprintf(f, "Locked: thread %lu file %s line %lu ", (ulong) os_thread_pf(info->thread_id), info->file_name, (ulong) info->line); if (rwt == RW_LOCK_SHARED) { - fputs("S-LOCK", stderr); + fputs("S-LOCK", f); } else if (rwt == RW_LOCK_EX) { - fputs("X-LOCK", stderr); + fputs("X-LOCK", f); } else if (rwt == RW_LOCK_WAIT_EX) { - fputs("WAIT X-LOCK", stderr); + fputs("WAIT X-LOCK", f); } else { ut_error; } if (info->pass != 0) { - fprintf(stderr, " pass value %lu", (ulong) info->pass); + fprintf(f, " pass value %lu", (ulong) info->pass); } - putc('\n', stderr); + putc('\n', f); } /***************************************************************//** diff --git a/sync/sync0sync.c b/sync/sync0sync.c index 225f28df78e..3a80da9318b 100644 --- a/sync/sync0sync.c +++ b/sync/sync0sync.c @@ -238,14 +238,14 @@ void mutex_create_func( /*==============*/ mutex_t* mutex, /*!< in: pointer to memory */ - const char* cmutex_name, /*!< in: mutex name */ #ifdef UNIV_DEBUG # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ -#endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ - ulint cline) /*!< in: file line where created */ + ulint cline, /*!< in: file line where created */ +#endif /* UNIV_DEBUG */ + const char* cmutex_name) /*!< in: mutex name */ { #if defined(HAVE_ATOMIC_BUILTINS) mutex_reset_lock_word(mutex); @@ -1161,6 +1161,7 @@ sync_thread_add_level( case SYNC_LOG: case SYNC_THR_LOCAL: case SYNC_ANY_LATCH: + case SYNC_OUTER_ANY_LATCH: case SYNC_TRX_SYS_HEADER: case SYNC_FILE_FORMAT_TAG: case SYNC_DOUBLEWRITE: diff --git a/trx/trx0i_s.c b/trx/trx0i_s.c index c11ebb6397e..e148234888b 100644 --- a/trx/trx0i_s.c +++ b/trx/trx0i_s.c @@ -431,7 +431,7 @@ i_s_locks_row_validate( /* record lock */ ut_ad(!strcmp("RECORD", row->lock_type)); ut_ad(row->lock_index != NULL); - ut_ad(row->lock_data != NULL); + /* row->lock_data == NULL if buf_page_try_get() == NULL */ ut_ad(row->lock_page != ULINT_UNDEFINED); ut_ad(row->lock_rec != ULINT_UNDEFINED); } @@ -494,7 +494,6 @@ fill_trx_row( stmt = innobase_get_stmt(trx->mysql_thd, &stmt_len); if (stmt != NULL) { - char query[TRX_I_S_TRX_QUERY_MAX_LEN + 1]; if (stmt_len > TRX_I_S_TRX_QUERY_MAX_LEN) { @@ -508,6 +507,8 @@ fill_trx_row( cache->storage, stmt, stmt_len + 1, MAX_ALLOWED_FOR_STORAGE(cache)); + row->trx_query_cs = innobase_get_charset(trx->mysql_thd); + if (row->trx_query == NULL) { return(FALSE); diff --git a/trx/trx0rec.c b/trx/trx0rec.c index f50e10ed756..71629f01d73 100644 --- a/trx/trx0rec.c +++ b/trx/trx0rec.c @@ -665,14 +665,27 @@ trx_undo_page_report_modify( /* Save to the undo log the old values of the columns to be updated. */ if (update) { + ulint extended = 0; + if (trx_undo_left(undo_page, ptr) < 5) { return(0); } - ptr += mach_write_compressed(ptr, upd_get_n_fields(update)); + if (srv_use_sys_stats_table + && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) { + for (i = 0; i < upd_get_n_fields(update); i++) { + ulint pos = upd_get_nth_field(update, i)->field_no; - for (i = 0; i < upd_get_n_fields(update); i++) { + if (pos >= rec_offs_n_fields(offsets)) { + extended++; + } + } + } + + ptr += mach_write_compressed(ptr, upd_get_n_fields(update) - extended); + + for (i = 0; i < upd_get_n_fields(update) - extended; i++) { ulint pos = upd_get_nth_field(update, i)->field_no; diff --git a/trx/trx0roll.c b/trx/trx0roll.c index 1a43e419214..a4bbf7fd652 100644 --- a/trx/trx0roll.c +++ b/trx/trx0roll.c @@ -48,8 +48,8 @@ Created 3/26/1996 Heikki Tuuri rollback */ #define TRX_ROLL_TRUNC_THRESHOLD 1 -/** In crash recovery, the current trx to be rolled back */ -static trx_t* trx_roll_crash_recv_trx = NULL; +/** In crash recovery, the current trx to be rolled back; NULL otherwise */ +static const trx_t* trx_roll_crash_recv_trx = NULL; /** In crash recovery we set this to the undo n:o of the current trx to be rolled back. Then we can print how many % the rollback has progressed. */ diff --git a/trx/trx0trx.c b/trx/trx0trx.c index 75bbe1b342a..98bd9e4ac58 100644 --- a/trx/trx0trx.c +++ b/trx/trx0trx.c @@ -2106,18 +2106,18 @@ trx_recover_for_mysql( /*******************************************************************//** This function is used to find one X/Open XA distributed transaction which is in the prepared state -@return trx or NULL */ +@return trx or NULL; on match, the trx->xid will be invalidated */ UNIV_INTERN trx_t* trx_get_trx_by_xid( /*===============*/ - XID* xid) /*!< in: X/Open XA transaction identification */ + const XID* xid) /*!< in: X/Open XA transaction identifier */ { trx_t* trx; if (xid == NULL) { - return (NULL); + return(NULL); } mutex_enter(&kernel_mutex); @@ -2130,10 +2130,16 @@ trx_get_trx_by_xid( of gtrid_lenght+bqual_length bytes should be the same */ - if (xid->gtrid_length == trx->xid.gtrid_length + if (trx->conc_state == TRX_PREPARED + && xid->gtrid_length == trx->xid.gtrid_length && xid->bqual_length == trx->xid.bqual_length && memcmp(xid->data, trx->xid.data, xid->gtrid_length + xid->bqual_length) == 0) { + + /* Invalidate the XID, so that subsequent calls + will not find it. */ + memset(&trx->xid, 0, sizeof(trx->xid)); + trx->xid.formatID = -1; break; } @@ -2142,14 +2148,5 @@ trx_get_trx_by_xid( mutex_exit(&kernel_mutex); - if (trx) { - if (trx->conc_state != TRX_PREPARED) { - - return(NULL); - } - - return(trx); - } else { - return(NULL); - } + return(trx); } diff --git a/ut/ut0dbg.c b/ut/ut0dbg.c index 4484e6c36de..7839466e16f 100644 --- a/ut/ut0dbg.c +++ b/ut/ut0dbg.c @@ -79,7 +79,7 @@ ut_dbg_assertion_failed( " or crashes, even\n" "InnoDB: immediately after the mysqld startup, there may be\n" "InnoDB: corruption in the InnoDB tablespace. Please refer to\n" - "InnoDB: " REFMAN "forcing-recovery.html\n" + "InnoDB: " REFMAN "forcing-innodb-recovery.html\n" "InnoDB: about forcing recovery.\n", stderr); #if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) ut_dbg_stop_threads = TRUE; From 54ab9ea20f00a2cf230aa173db83eb66497ba91f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 14 Jul 2011 21:22:41 +0200 Subject: [PATCH 4/6] xtradb 5.5.13 --- CMakeLists.txt | 242 +- COPYING | 351 - COPYING.Sun_Microsystems | 31 - ChangeLog | 2122 ---- Doxyfile | 2 +- Makefile.am | 345 - Makefile.in | 3346 ------ README | 32 - btr/btr0btr.c | 604 +- btr/btr0cur.c | 768 +- btr/btr0sea.c | 590 +- buf/buf0buddy.c | 284 +- buf/buf0buf.c | 3135 ++++-- buf/buf0flu.c | 1146 +- buf/buf0lru.c | 888 +- buf/buf0rea.c | 99 +- build/debian/README.Maintainer | 116 - .../additions/Docs__Images__Makefile.in | 6 - build/debian/additions/Docs__Makefile.in | 6 - build/debian/additions/debian-start | 31 - build/debian/additions/debian-start.inc.sh | 72 - build/debian/additions/echo_stderr | 2 - .../debian/additions/innotop/InnoDBParser.pm | 1089 -- .../additions/innotop/changelog.innotop | 318 - build/debian/additions/innotop/innotop | 9485 ----------------- build/debian/additions/innotop/innotop.1 | 2086 ---- build/debian/additions/msql2mysql.1 | 16 - build/debian/additions/my.cnf | 129 - build/debian/additions/my_print_defaults.1 | 16 - build/debian/additions/myisam_ftdump.1 | 16 - build/debian/additions/myisamchk.1 | 17 - build/debian/additions/myisamlog.1 | 16 - build/debian/additions/myisampack.1 | 19 - .../additions/mysql-server.lintian-overrides | 2 - build/debian/additions/mysql_config.1 | 17 - .../additions/mysql_convert_table_format.1 | 17 - build/debian/additions/mysql_find_rows.1 | 18 - build/debian/additions/mysql_fix_extensions.1 | 18 - build/debian/additions/mysql_install_db.1 | 16 - .../additions/mysql_secure_installation.1 | 17 - build/debian/additions/mysql_setpermission.1 | 23 - build/debian/additions/mysql_tableinfo.1 | 322 - build/debian/additions/mysql_waitpid.1 | 20 - build/debian/additions/mysqlbinlog.1 | 17 - build/debian/additions/mysqlbug.1 | 14 - build/debian/additions/mysqlcheck.1 | 28 - build/debian/additions/mysqld_safe_syslog.cnf | 2 - build/debian/additions/mysqldumpslow.1 | 50 - build/debian/additions/mysqlimport.1 | 20 - build/debian/additions/mysqlmanager.1 | 49 - build/debian/additions/mysqlreport | 1298 --- build/debian/additions/mysqlreport.1 | 180 - build/debian/additions/mysqltest.1 | 16 - build/debian/additions/pack_isam.1 | 19 - build/debian/additions/resolve_stack_dump.1 | 16 - build/debian/additions/resolveip.1 | 16 - build/debian/changelog | 4186 -------- build/debian/compat | 1 - build/debian/control | 118 - build/debian/copyright | 169 - ...ercona-xtradb-client-dev.README.Maintainer | 4 - .../debian/libpercona-xtradb-client-dev.dirs | 2 - .../debian/libpercona-xtradb-client-dev.docs | 1 - .../libpercona-xtradb-client-dev.examples | 1 - .../debian/libpercona-xtradb-client-dev.files | 7 - .../debian/libpercona-xtradb-client-dev.links | 2 - build/debian/libpercona-xtradb-client16.dirs | 1 - build/debian/libpercona-xtradb-client16.docs | 1 - build/debian/libpercona-xtradb-client16.files | 1 - .../libpercona-xtradb-client16.postinst | 12 - build/debian/patches/00list | 6 - ..._MAKEFILES__Docs_Images_Makefile.in.dpatch | 776 -- .../01_MAKEFILES__Docs_Makefile.in.dpatch | 776 -- ...mysql_create_system_tables__no_test.dpatch | 29 - ...38_scripts__mysqld_safe.sh__signals.dpatch | 43 - ...ripts__mysql_install_db.sh__no_test.dpatch | 20 - .../44_scripts__mysql_config__libs.dpatch | 24 - .../patches/50_mysql-test__db_test.dpatch | 23 - .../debian/patches/60_percona_support.dpatch | 16 - .../percona-xtradb-client-5.1.README.Debian | 4 - build/debian/percona-xtradb-client-5.1.dirs | 3 - build/debian/percona-xtradb-client-5.1.docs | 3 - build/debian/percona-xtradb-client-5.1.files | 39 - build/debian/percona-xtradb-client-5.1.links | 3 - ...ercona-xtradb-client-5.1.lintian-overrides | 3 - build/debian/percona-xtradb-client-5.1.menu | 3 - build/debian/percona-xtradb-common.dirs | 1 - build/debian/percona-xtradb-common.files | 2 - .../percona-xtradb-common.lintian-overrides | 2 - build/debian/percona-xtradb-common.postrm | 7 - build/debian/percona-xtradb-server-5.1.NEWS | 34 - .../percona-xtradb-server-5.1.README.Debian | 109 - build/debian/percona-xtradb-server-5.1.config | 46 - build/debian/percona-xtradb-server-5.1.dirs | 9 - build/debian/percona-xtradb-server-5.1.docs | 1 - build/debian/percona-xtradb-server-5.1.files | 53 - build/debian/percona-xtradb-server-5.1.links | 2 - ...ercona-xtradb-server-5.1.lintian-overrides | 4 - ...xtradb-server-5.1.logcheck.ignore.paranoid | 9 - ...a-xtradb-server-5.1.logcheck.ignore.server | 32 - ...adb-server-5.1.logcheck.ignore.workstation | 32 - .../percona-xtradb-server-5.1.mysql.init | 182 - ...server-5.1.percona-xtradb-server.logrotate | 27 - .../debian/percona-xtradb-server-5.1.postinst | 277 - build/debian/percona-xtradb-server-5.1.postrm | 83 - .../debian/percona-xtradb-server-5.1.preinst | 186 - build/debian/percona-xtradb-server-5.1.prerm | 8 - .../percona-xtradb-server-5.1.templates | 90 - build/debian/po/POTFILES.in | 1 - build/debian/po/ar.po | 267 - build/debian/po/ca.po | 342 - build/debian/po/cs.po | 361 - build/debian/po/da.po | 397 - build/debian/po/de.po | 277 - build/debian/po/es.po | 405 - build/debian/po/eu.po | 295 - build/debian/po/fr.po | 274 - build/debian/po/gl.po | 264 - build/debian/po/it.po | 266 - build/debian/po/ja.po | 394 - build/debian/po/nb.po | 297 - build/debian/po/nl.po | 302 - build/debian/po/pt.po | 322 - build/debian/po/pt_BR.po | 458 - build/debian/po/ro.po | 319 - build/debian/po/ru.po | 305 - build/debian/po/sv.po | 400 - build/debian/po/templates.pot | 187 - build/debian/po/tr.po | 342 - build/debian/rules | 322 - build/debian/source.lintian-overrides | 2 - build/debian/watch | 3 - build/percona-sql.spec | 1644 --- compile-innodb | 21 +- compile-innodb-debug | 24 - data/data0data.c | 28 +- data/data0type.c | 11 +- dict/dict0boot.c | 53 +- dict/dict0crea.c | 17 +- dict/dict0dict.c | 201 +- dict/dict0load.c | 1465 ++- dict/dict0mem.c | 130 +- fil/fil0fil.c | 699 +- fsp/fsp0fsp.c | 141 +- ha/ha0ha.c | 3 +- ha/hash0hash.c | 72 +- handler/ha_innodb.cc | 1912 ++-- handler/ha_innodb.h | 29 +- handler/handler0alter.cc | 77 +- handler/i_s.cc | 4151 +++++--- handler/i_s.h | 20 +- handler/innodb_patch_info.h | 52 - handler/mysql_addons.cc | 42 - ibuf/ibuf0ibuf.c | 2449 +++-- include/btr0btr.h | 174 +- include/btr0btr.ic | 7 +- include/btr0cur.h | 61 +- include/btr0pcur.h | 40 +- include/btr0pcur.ic | 45 +- include/btr0sea.h | 51 +- include/btr0sea.ic | 73 +- include/btr0types.h | 125 + include/buf0buddy.h | 29 +- include/buf0buddy.ic | 72 +- include/buf0buf.h | 528 +- include/buf0buf.ic | 380 +- include/buf0flu.h | 83 +- include/buf0flu.ic | 69 +- include/buf0lru.h | 48 +- include/buf0rea.h | 10 +- include/buf0types.h | 2 + include/data0data.h | 2 +- include/data0data.ic | 4 +- include/data0type.h | 52 +- include/data0type.ic | 75 +- include/db0err.h | 13 + include/dict0boot.h | 35 +- include/dict0boot.ic | 16 +- include/dict0dict.h | 59 +- include/dict0dict.ic | 86 +- include/dict0load.h | 233 +- include/dict0mem.h | 94 +- include/dict0mem.ic | 46 + include/dict0types.h | 17 + include/fil0fil.h | 7 +- include/ha_prototypes.h | 33 +- include/handler0alter.h | 6 +- include/hash0hash.h | 49 - include/ibuf0ibuf.h | 131 +- include/ibuf0ibuf.ic | 64 +- include/lock0lock.h | 11 +- include/log0log.h | 22 + include/log0log.ic | 2 +- include/mach0data.h | 112 +- include/mach0data.ic | 229 +- include/mem0mem.h | 2 +- include/mem0mem.ic | 12 +- include/mtr0log.h | 22 +- include/mtr0log.ic | 12 +- include/mtr0mtr.h | 23 +- include/mtr0mtr.ic | 13 +- include/mysql_addons.h | 33 - include/os0file.h | 518 +- include/os0file.ic | 421 + include/os0proc.h | 28 - include/os0sync.h | 88 +- include/os0sync.ic | 11 +- include/os0thread.h | 40 +- include/page0page.h | 10 +- include/page0page.ic | 5 +- include/page0zip.h | 2 +- include/pars0pars.h | 10 +- include/que0que.h | 3 - include/read0read.h | 11 +- include/read0read.ic | 14 +- include/rem0rec.h | 19 +- include/rem0rec.ic | 14 +- include/row0merge.h | 4 +- include/row0mysql.h | 11 + include/row0purge.h | 22 + include/row0row.h | 20 +- include/row0types.h | 4 +- include/row0upd.h | 2 +- include/row0upd.ic | 2 +- include/srv0que.h | 42 - include/srv0srv.h | 239 +- include/srv0start.h | 4 - include/sync0arr.h | 7 +- include/sync0rw.h | 353 +- include/sync0rw.ic | 257 + include/sync0sync.h | 303 +- include/sync0sync.ic | 147 +- include/thr0loc.h | 101 - include/thr0loc.ic | 24 - include/trx0i_s.h | 91 +- include/trx0purge.h | 52 +- include/trx0rec.h | 4 +- include/trx0rec.ic | 4 +- include/trx0rseg.h | 36 +- include/trx0sys.h | 47 +- include/trx0sys.ic | 25 +- include/trx0trx.h | 59 +- include/trx0trx.ic | 12 - include/trx0types.h | 13 +- include/trx0undo.h | 13 +- include/trx0undo.ic | 41 +- include/univ.i | 95 +- include/ut0auxconf.h | 14 - include/ut0bh.h | 152 + include/ut0bh.ic | 125 + include/ut0byte.h | 169 +- include/ut0byte.ic | 254 +- include/ut0dbg.h | 51 +- include/ut0lst.h | 47 +- include/ut0mem.h | 2 +- include/ut0rbt.h | 169 +- include/ut0rnd.h | 8 +- include/ut0rnd.ic | 12 +- include/ut0ut.h | 43 +- lock/lock0lock.c | 87 +- log/log0log.c | 220 +- log/log0recv.c | 106 +- mach/mach0data.c | 40 - mem/mem0dbg.c | 25 +- mem/mem0mem.c | 2 +- mem/mem0pool.c | 7 +- mtr/mtr0log.c | 22 +- mtr/mtr0mtr.c | 154 +- mysql-test/ctype_innodb_like.inc | 21 - mysql-test/have_innodb.inc | 4 - mysql-test/innodb-analyze.result | 2 - mysql-test/innodb-analyze.test | 65 - mysql-test/innodb-autoinc.result | 1128 -- mysql-test/innodb-autoinc.test | 618 -- mysql-test/innodb-consistent-master.opt | 1 - mysql-test/innodb-consistent.result | 35 - mysql-test/innodb-consistent.test | 58 - mysql-test/innodb-index.inc | 26 - mysql-test/innodb-index.result | 1171 -- mysql-test/innodb-index.test | 544 - mysql-test/innodb-index_ucs2.result | 116 - mysql-test/innodb-index_ucs2.test | 5 - mysql-test/innodb-lock.result | 57 - mysql-test/innodb-lock.test | 102 - mysql-test/innodb-master.opt | 1 - mysql-test/innodb-replace.result | 13 - mysql-test/innodb-replace.test | 22 - mysql-test/innodb-semi-consistent-master.opt | 1 - mysql-test/innodb-semi-consistent.result | 47 - mysql-test/innodb-semi-consistent.test | 68 - mysql-test/innodb-timeout.result | 38 - mysql-test/innodb-timeout.test | 64 - mysql-test/innodb-use-sys-malloc-master.opt | 1 - mysql-test/innodb-use-sys-malloc.result | 48 - mysql-test/innodb-use-sys-malloc.test | 48 - mysql-test/innodb-zip.result | 421 - mysql-test/innodb-zip.test | 343 - mysql-test/innodb.result | 3310 ------ mysql-test/innodb.test | 2569 ----- mysql-test/innodb_bug21704.result | 55 - mysql-test/innodb_bug21704.test | 96 - mysql-test/innodb_bug34053.result | 1 - mysql-test/innodb_bug34053.test | 50 - mysql-test/innodb_bug34300.result | 4 - mysql-test/innodb_bug34300.test | 34 - mysql-test/innodb_bug35220.result | 1 - mysql-test/innodb_bug35220.test | 16 - mysql-test/innodb_bug36169.result | 2 - mysql-test/innodb_bug36169.test | 1159 -- mysql-test/innodb_bug36172.result | 1 - mysql-test/innodb_bug36172.test | 32 - mysql-test/innodb_bug40360.result | 4 - mysql-test/innodb_bug40360.test | 16 - mysql-test/innodb_bug40565.result | 9 - mysql-test/innodb_bug40565.test | 10 - mysql-test/innodb_bug41904.result | 4 - mysql-test/innodb_bug41904.test | 14 - mysql-test/innodb_bug42101-nonzero-master.opt | 1 - mysql-test/innodb_bug42101-nonzero.result | 26 - mysql-test/innodb_bug42101-nonzero.test | 21 - mysql-test/innodb_bug42101.result | 22 - mysql-test/innodb_bug42101.test | 19 - mysql-test/innodb_bug44032.result | 7 - mysql-test/innodb_bug44032.test | 13 - mysql-test/innodb_bug44369.result | 6 - mysql-test/innodb_bug44369.test | 17 - mysql-test/innodb_bug44571.result | 7 - mysql-test/innodb_bug44571.test | 13 - mysql-test/innodb_bug45357.result | 7 - mysql-test/innodb_bug45357.test | 10 - mysql-test/innodb_bug46000.result | 19 - mysql-test/innodb_bug46000.test | 32 - mysql-test/innodb_bug46676.result | 9 - mysql-test/innodb_bug46676.test | 16 - mysql-test/innodb_bug47167.result | 24 - mysql-test/innodb_bug47167.test | 45 - mysql-test/innodb_bug47777.result | 13 - mysql-test/innodb_bug47777.test | 24 - mysql-test/innodb_file_format.result | 43 - mysql-test/innodb_file_format.test | 29 - mysql-test/innodb_information_schema.result | 23 - mysql-test/innodb_information_schema.test | 149 - mysql-test/innodb_trx_weight.inc | 51 - mysql-test/innodb_trx_weight.result | 1 - mysql-test/innodb_trx_weight.test | 108 - mysql-test/innodb_xtradb_bug317074.result | 4 - mysql-test/innodb_xtradb_bug317074.test | 44 - mysql-test/patches/README | 30 - mysql-test/patches/disabled.def.diff | 12 - .../patches/index_merge_innodb-explain.diff | 31 - mysql-test/patches/information_schema.diff | 202 - mysql-test/patches/mysql.diff | 22 - mysql-test/patches/mysql_upgrade.diff | 11 - mysql-test/patches/partition_innodb.diff | 59 - os/os0file.c | 1358 ++- os/os0proc.c | 174 +- os/os0sync.c | 618 +- os/os0thread.c | 128 +- page/page0cur.c | 10 + page/page0page.c | 119 +- page/page0zip.c | 31 +- pars/pars0pars.c | 8 +- .../{slow_extended.patch => include}/grep.inc | 0 .../have_response_time_distribution.inc | 0 .../percona_query_cache_with_comments.inc | 0 ...ercona_query_cache_with_comments_begin.inc | 0 ...ercona_query_cache_with_comments_clear.inc | 0 .../percona_query_cache_with_comments_end.inc | 0 ...percona_query_cache_with_comments_eval.inc | 0 ...percona_query_cache_with_comments_show.inc | 0 .../include/percona_server_variables.inc | 3 + percona-suite/innodb_fix_misc_bug51325.result | 13 - percona-suite/innodb_fix_misc_bug51325.test | 13 - .../percona_innodb_buffer_pool_shm.test | 19 - percona-suite/percona_server_variables.result | 343 - percona-suite/percona_server_variables.test | 8 - .../percona_suppress_log_warning_1592.result | 28 - .../percona_bug643149.result | 16 - ...rcona_query_cache_with_comments.inc.backup | 88 - .../have_response_time_distribution.require | 0 percona-suite/r/percona_bug643149.result | 21 + .../percona_innodb_buffer_pool_shm.result | 4 - .../percona_innodb_deadlock_count.result | 10 +- .../percona_innodb_doublewrite_file.result | 0 .../percona_innodb_use_sys_stats_table.result | 0 .../percona_log_connection_error.result | 0 .../r/percona_log_warnings_suppress.result | 31 + ...cona_mysqldump_innodb_optimize_keys.result | 109 + .../r/percona_processlist_row_stats.result | 74 + .../percona_query_cache_with_comments.result | 0 ...ona_query_cache_with_comments_crash.result | 0 ...a_query_cache_with_comments_disable.result | 0 ...e_with_comments_prepared_statements.result | 0 .../r/percona_server_variables_debug.result | 371 + .../r/percona_server_variables_release.result | 368 + .../percona_show_slave_status_nolock.result | 2 +- .../{ => r}/percona_show_temp_tables.result | 0 ...rcona_slow_extended-log_slow_filter.result | 2 +- ..._extended-log_slow_sp_statements-cl.result | 0 ...slow_extended-log_slow_verbosity-cl.result | 0 ...na_slow_extended-log_slow_verbosity.result | 0 ...rcona_slow_extended-long_query_time.result | 2 + ...ended-microseconds_in_slow_extended.result | 13 + ...low_extended-min_examined_row_limit.result | 2 +- ...na_slow_extended-slave_innodb_stats.result | 2 + ...ents-and-use_global_long_query_time.result | 29 +- ...cona_slow_extended-slave_statements.result | 51 +- ...query_log_microseconds_timestamp-cl.result | 3 + ...-slow_query_log_timestamp_always-cl.result | 3 + ...na_slow_extended-use_global_control.result | 12 + ...extended-use_global_long_query_time.result | 46 + .../percona_sql_no_fcache.result | 0 ...rcona_status_wait_query_cache_mutex.result | 10 +- .../percona_xtradb_admin_command.result | 0 .../{ => r}/percona_xtradb_bug317074.result | 1 + .../{ => r}/userstat_bug602047.result | 5 +- ...ona_query_response_time-replication.result | 70 - ...rcona_query_response_time-replication.test | 57 - .../percona_query_response_time-stored.result | 313 - .../percona_query_response_time-stored.test | 90 - .../percona_query_response_time.result | 567 - .../percona_query_response_time.test | 68 - .../percona_query_response_time_flush.inc | 1 - .../percona_query_response_time_show.inc | 8 - .../percona_query_response_time_sleep.inc | 19 - .../percona_slow_extended-combined-master.opt | 1 - .../percona_slow_extended-combined.result | 18 - .../percona_slow_extended-combined.test | 6 - ...percona_slow_extended-combined2-master.opt | 1 - .../percona_slow_extended-combined2.result | 12 - .../percona_slow_extended-combined2.test | 4 - ...a_slow_extended-control_global_slow.result | 12 - ...ded-log_slow_timestamp_every-cl-master.opt | 1 - ...xtended-log_slow_timestamp_every-cl.result | 3 - ..._extended-log_slow_timestamp_every-cl.test | 1 - ...ended-microseconds_in_slow_extended.result | 11 - ...ercona_slow_extended-slave_statements.test | 168 - ...y_log_microseconds_timestamp-cl-master.opt | 1 - ...query_log_microseconds_timestamp-cl.result | 3 - ...w_query_log_microseconds_timestamp-cl.test | 1 - ...d-use_global_long_query_time-cl-master.opt | 1 - ...ended-use_global_long_query_time-cl.result | 3 - ...xtended-use_global_long_query_time-cl.test | 1 - ...nded-use_global_long_query_time-master.opt | 1 - ...extended-use_global_long_query_time.result | 59 - ...w_extended-use_global_long_query_time.test | 41 - .../percona_bug643149.test | 11 +- .../percona_innodb_buffer_pool_shm-master.opt | 1 - .../t/percona_innodb_buffer_pool_shm.test | 2 + .../percona_innodb_deadlock_count.test | 22 +- ...percona_innodb_doublewrite_file-master.opt | 0 .../percona_innodb_doublewrite_file.test | 0 ...cona_innodb_use_sys_stats_table-master.opt | 0 .../percona_innodb_use_sys_stats_table.test | 0 .../percona_log_connection_error-master.opt | 0 .../percona_log_connection_error.test | 4 +- .../percona_log_warnings_suppress-master.opt} | 0 .../percona_log_warnings_suppress.test} | 17 +- ...ercona_mysqldump_innodb_optimize_keys.test | 62 + .../t/percona_processlist_row_stats.test | 92 + .../percona_query_cache_with_comments.test | 0 ...rcona_query_cache_with_comments_crash.test | 0 ...ona_query_cache_with_comments_disable.test | 0 ...che_with_comments_prepared_statements.test | 0 .../t/percona_server_variables_debug.test | 2 + .../t/percona_server_variables_release.test | 2 + .../percona_show_slave_status_nolock.test | 7 +- .../{ => t}/percona_show_temp_tables.test | 0 ...a_slow_extended-log_slow_filter-master.opt | 2 +- ...percona_slow_extended-log_slow_filter.test | 4 +- ...ended-log_slow_sp_statements-cl-master.opt | 0 ...ow_extended-log_slow_sp_statements-cl.test | 0 ..._extended-log_slow_verbosity-cl-master.opt | 0 ...a_slow_extended-log_slow_verbosity-cl.test | 0 ...low_extended-log_slow_verbosity-master.opt | 0 ...cona_slow_extended-log_slow_verbosity.test | 0 ...a_slow_extended-long_query_time-master.opt | 2 +- ...percona_slow_extended-long_query_time.test | 4 + ...d-microseconds_in_slow_extended-master.opt | 2 +- ...xtended-microseconds_in_slow_extended.test | 12 +- ...extended-min_examined_row_limit-master.opt | 2 +- ..._slow_extended-min_examined_row_limit.test | 4 +- ...low_extended-slave_innodb_stats-master.opt | 0 ...slow_extended-slave_innodb_stats-slave.opt | 0 ...cona_slow_extended-slave_innodb_stats.test | 3 + ...-and-use_global_long_query_time-master.opt | 0 ...s-and-use_global_long_query_time-slave.opt | 0 ...ements-and-use_global_long_query_time.test | 31 +- ..._slow_extended-slave_statements-master.opt | 0 ...a_slow_extended-slave_statements-slave.opt | 0 ...ercona_slow_extended-slave_statements.test | 133 + ...y_log_microseconds_timestamp-cl-master.opt | 1 + ...w_query_log_microseconds_timestamp-cl.test | 1 + ...w_query_log_timestamp_always-cl-master.opt | 1 + ...ed-slow_query_log_timestamp_always-cl.test | 1 + ...ow_extended-use_global_control-master.opt} | 0 ...ona_slow_extended-use_global_control.test} | 6 +- ...nded-use_global_long_query_time-master.opt | 1 + ...w_extended-use_global_long_query_time.test | 40 + .../percona_sql_no_fcache.test | 0 ...percona_status_wait_query_cache_mutex.test | 2 +- .../{ => t}/percona_xtradb_admin_command.test | 0 .../{ => t}/percona_xtradb_bug317074.test | 4 +- percona-suite/{ => t}/userstat_bug602047.test | 8 +- plug.in | 235 - que/que0que.c | 1 - read/read0read.c | 55 +- rem/rem0rec.c | 6 +- row/row0ins.c | 86 +- row/row0merge.c | 232 +- row/row0mysql.c | 120 +- row/row0purge.c | 210 +- row/row0row.c | 39 +- row/row0sel.c | 180 +- row/row0uins.c | 50 +- row/row0umod.c | 87 +- row/row0undo.c | 5 +- row/row0upd.c | 157 +- row/row0vers.c | 12 +- scripts/install_innodb_plugins.sql | 17 - scripts/install_innodb_plugins_win.sql | 17 - setup.sh | 47 - srv/srv0que.c | 49 - srv/srv0srv.c | 1301 ++- srv/srv0start.c | 662 +- sync/sync0arr.c | 74 +- sync/sync0rw.c | 25 +- sync/sync0sync.c | 536 +- thr/thr0loc.c | 330 - trx/trx0i_s.c | 132 +- trx/trx0purge.c | 632 +- trx/trx0rec.c | 64 +- trx/trx0roll.c | 86 +- trx/trx0rseg.c | 192 +- trx/trx0sys.c | 308 +- trx/trx0trx.c | 543 +- trx/trx0undo.c | 103 +- ut/ut0bh.c | 164 + ut/ut0byte.c | 25 - ut/ut0dbg.c | 36 +- ut/ut0mem.c | 8 +- ut/ut0rbt.c | 259 +- ut/ut0ut.c | 119 +- ut/ut0wqueue.c | 4 +- 544 files changed, 25730 insertions(+), 66664 deletions(-) delete mode 100644 COPYING delete mode 100644 COPYING.Sun_Microsystems delete mode 100644 ChangeLog delete mode 100644 Makefile.am delete mode 100644 Makefile.in delete mode 100644 README delete mode 100644 build/debian/README.Maintainer delete mode 100644 build/debian/additions/Docs__Images__Makefile.in delete mode 100644 build/debian/additions/Docs__Makefile.in delete mode 100644 build/debian/additions/debian-start delete mode 100644 build/debian/additions/debian-start.inc.sh delete mode 100644 build/debian/additions/echo_stderr delete mode 100644 build/debian/additions/innotop/InnoDBParser.pm delete mode 100644 build/debian/additions/innotop/changelog.innotop delete mode 100644 build/debian/additions/innotop/innotop delete mode 100644 build/debian/additions/innotop/innotop.1 delete mode 100644 build/debian/additions/msql2mysql.1 delete mode 100644 build/debian/additions/my.cnf delete mode 100644 build/debian/additions/my_print_defaults.1 delete mode 100644 build/debian/additions/myisam_ftdump.1 delete mode 100644 build/debian/additions/myisamchk.1 delete mode 100644 build/debian/additions/myisamlog.1 delete mode 100644 build/debian/additions/myisampack.1 delete mode 100644 build/debian/additions/mysql-server.lintian-overrides delete mode 100644 build/debian/additions/mysql_config.1 delete mode 100644 build/debian/additions/mysql_convert_table_format.1 delete mode 100644 build/debian/additions/mysql_find_rows.1 delete mode 100644 build/debian/additions/mysql_fix_extensions.1 delete mode 100644 build/debian/additions/mysql_install_db.1 delete mode 100644 build/debian/additions/mysql_secure_installation.1 delete mode 100644 build/debian/additions/mysql_setpermission.1 delete mode 100644 build/debian/additions/mysql_tableinfo.1 delete mode 100644 build/debian/additions/mysql_waitpid.1 delete mode 100644 build/debian/additions/mysqlbinlog.1 delete mode 100644 build/debian/additions/mysqlbug.1 delete mode 100644 build/debian/additions/mysqlcheck.1 delete mode 100644 build/debian/additions/mysqld_safe_syslog.cnf delete mode 100644 build/debian/additions/mysqldumpslow.1 delete mode 100644 build/debian/additions/mysqlimport.1 delete mode 100644 build/debian/additions/mysqlmanager.1 delete mode 100644 build/debian/additions/mysqlreport delete mode 100644 build/debian/additions/mysqlreport.1 delete mode 100644 build/debian/additions/mysqltest.1 delete mode 100644 build/debian/additions/pack_isam.1 delete mode 100644 build/debian/additions/resolve_stack_dump.1 delete mode 100644 build/debian/additions/resolveip.1 delete mode 100644 build/debian/changelog delete mode 100644 build/debian/compat delete mode 100644 build/debian/control delete mode 100644 build/debian/copyright delete mode 100644 build/debian/libpercona-xtradb-client-dev.README.Maintainer delete mode 100644 build/debian/libpercona-xtradb-client-dev.dirs delete mode 100644 build/debian/libpercona-xtradb-client-dev.docs delete mode 100644 build/debian/libpercona-xtradb-client-dev.examples delete mode 100644 build/debian/libpercona-xtradb-client-dev.files delete mode 100644 build/debian/libpercona-xtradb-client-dev.links delete mode 100644 build/debian/libpercona-xtradb-client16.dirs delete mode 100644 build/debian/libpercona-xtradb-client16.docs delete mode 100644 build/debian/libpercona-xtradb-client16.files delete mode 100644 build/debian/libpercona-xtradb-client16.postinst delete mode 100644 build/debian/patches/00list delete mode 100644 build/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch delete mode 100644 build/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch delete mode 100644 build/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch delete mode 100644 build/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch delete mode 100644 build/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch delete mode 100644 build/debian/patches/44_scripts__mysql_config__libs.dpatch delete mode 100644 build/debian/patches/50_mysql-test__db_test.dpatch delete mode 100644 build/debian/patches/60_percona_support.dpatch delete mode 100644 build/debian/percona-xtradb-client-5.1.README.Debian delete mode 100644 build/debian/percona-xtradb-client-5.1.dirs delete mode 100644 build/debian/percona-xtradb-client-5.1.docs delete mode 100644 build/debian/percona-xtradb-client-5.1.files delete mode 100644 build/debian/percona-xtradb-client-5.1.links delete mode 100644 build/debian/percona-xtradb-client-5.1.lintian-overrides delete mode 100644 build/debian/percona-xtradb-client-5.1.menu delete mode 100644 build/debian/percona-xtradb-common.dirs delete mode 100644 build/debian/percona-xtradb-common.files delete mode 100644 build/debian/percona-xtradb-common.lintian-overrides delete mode 100644 build/debian/percona-xtradb-common.postrm delete mode 100644 build/debian/percona-xtradb-server-5.1.NEWS delete mode 100644 build/debian/percona-xtradb-server-5.1.README.Debian delete mode 100644 build/debian/percona-xtradb-server-5.1.config delete mode 100644 build/debian/percona-xtradb-server-5.1.dirs delete mode 100644 build/debian/percona-xtradb-server-5.1.docs delete mode 100644 build/debian/percona-xtradb-server-5.1.files delete mode 100644 build/debian/percona-xtradb-server-5.1.links delete mode 100644 build/debian/percona-xtradb-server-5.1.lintian-overrides delete mode 100644 build/debian/percona-xtradb-server-5.1.logcheck.ignore.paranoid delete mode 100644 build/debian/percona-xtradb-server-5.1.logcheck.ignore.server delete mode 100644 build/debian/percona-xtradb-server-5.1.logcheck.ignore.workstation delete mode 100644 build/debian/percona-xtradb-server-5.1.mysql.init delete mode 100644 build/debian/percona-xtradb-server-5.1.percona-xtradb-server.logrotate delete mode 100644 build/debian/percona-xtradb-server-5.1.postinst delete mode 100644 build/debian/percona-xtradb-server-5.1.postrm delete mode 100644 build/debian/percona-xtradb-server-5.1.preinst delete mode 100644 build/debian/percona-xtradb-server-5.1.prerm delete mode 100644 build/debian/percona-xtradb-server-5.1.templates delete mode 100644 build/debian/po/POTFILES.in delete mode 100644 build/debian/po/ar.po delete mode 100644 build/debian/po/ca.po delete mode 100644 build/debian/po/cs.po delete mode 100644 build/debian/po/da.po delete mode 100644 build/debian/po/de.po delete mode 100644 build/debian/po/es.po delete mode 100644 build/debian/po/eu.po delete mode 100644 build/debian/po/fr.po delete mode 100644 build/debian/po/gl.po delete mode 100644 build/debian/po/it.po delete mode 100644 build/debian/po/ja.po delete mode 100644 build/debian/po/nb.po delete mode 100644 build/debian/po/nl.po delete mode 100644 build/debian/po/pt.po delete mode 100644 build/debian/po/pt_BR.po delete mode 100644 build/debian/po/ro.po delete mode 100644 build/debian/po/ru.po delete mode 100644 build/debian/po/sv.po delete mode 100644 build/debian/po/templates.pot delete mode 100644 build/debian/po/tr.po delete mode 100755 build/debian/rules delete mode 100644 build/debian/source.lintian-overrides delete mode 100644 build/debian/watch delete mode 100644 build/percona-sql.spec delete mode 100755 compile-innodb-debug delete mode 100644 handler/innodb_patch_info.h delete mode 100644 handler/mysql_addons.cc delete mode 100644 include/mysql_addons.h create mode 100644 include/os0file.ic delete mode 100644 include/srv0que.h delete mode 100644 include/thr0loc.h delete mode 100644 include/thr0loc.ic delete mode 100644 include/ut0auxconf.h create mode 100644 include/ut0bh.h create mode 100644 include/ut0bh.ic delete mode 100644 mysql-test/ctype_innodb_like.inc delete mode 100644 mysql-test/have_innodb.inc delete mode 100644 mysql-test/innodb-analyze.result delete mode 100644 mysql-test/innodb-analyze.test delete mode 100644 mysql-test/innodb-autoinc.result delete mode 100644 mysql-test/innodb-autoinc.test delete mode 100644 mysql-test/innodb-consistent-master.opt delete mode 100644 mysql-test/innodb-consistent.result delete mode 100644 mysql-test/innodb-consistent.test delete mode 100644 mysql-test/innodb-index.inc delete mode 100644 mysql-test/innodb-index.result delete mode 100644 mysql-test/innodb-index.test delete mode 100644 mysql-test/innodb-index_ucs2.result delete mode 100644 mysql-test/innodb-index_ucs2.test delete mode 100644 mysql-test/innodb-lock.result delete mode 100644 mysql-test/innodb-lock.test delete mode 100644 mysql-test/innodb-master.opt delete mode 100644 mysql-test/innodb-replace.result delete mode 100644 mysql-test/innodb-replace.test delete mode 100644 mysql-test/innodb-semi-consistent-master.opt delete mode 100644 mysql-test/innodb-semi-consistent.result delete mode 100644 mysql-test/innodb-semi-consistent.test delete mode 100644 mysql-test/innodb-timeout.result delete mode 100644 mysql-test/innodb-timeout.test delete mode 100644 mysql-test/innodb-use-sys-malloc-master.opt delete mode 100644 mysql-test/innodb-use-sys-malloc.result delete mode 100644 mysql-test/innodb-use-sys-malloc.test delete mode 100644 mysql-test/innodb-zip.result delete mode 100644 mysql-test/innodb-zip.test delete mode 100644 mysql-test/innodb.result delete mode 100644 mysql-test/innodb.test delete mode 100644 mysql-test/innodb_bug21704.result delete mode 100644 mysql-test/innodb_bug21704.test delete mode 100644 mysql-test/innodb_bug34053.result delete mode 100644 mysql-test/innodb_bug34053.test delete mode 100644 mysql-test/innodb_bug34300.result delete mode 100644 mysql-test/innodb_bug34300.test delete mode 100644 mysql-test/innodb_bug35220.result delete mode 100644 mysql-test/innodb_bug35220.test delete mode 100644 mysql-test/innodb_bug36169.result delete mode 100644 mysql-test/innodb_bug36169.test delete mode 100644 mysql-test/innodb_bug36172.result delete mode 100644 mysql-test/innodb_bug36172.test delete mode 100644 mysql-test/innodb_bug40360.result delete mode 100644 mysql-test/innodb_bug40360.test delete mode 100644 mysql-test/innodb_bug40565.result delete mode 100644 mysql-test/innodb_bug40565.test delete mode 100644 mysql-test/innodb_bug41904.result delete mode 100644 mysql-test/innodb_bug41904.test delete mode 100644 mysql-test/innodb_bug42101-nonzero-master.opt delete mode 100644 mysql-test/innodb_bug42101-nonzero.result delete mode 100644 mysql-test/innodb_bug42101-nonzero.test delete mode 100644 mysql-test/innodb_bug42101.result delete mode 100644 mysql-test/innodb_bug42101.test delete mode 100644 mysql-test/innodb_bug44032.result delete mode 100644 mysql-test/innodb_bug44032.test delete mode 100644 mysql-test/innodb_bug44369.result delete mode 100644 mysql-test/innodb_bug44369.test delete mode 100644 mysql-test/innodb_bug44571.result delete mode 100644 mysql-test/innodb_bug44571.test delete mode 100644 mysql-test/innodb_bug45357.result delete mode 100644 mysql-test/innodb_bug45357.test delete mode 100644 mysql-test/innodb_bug46000.result delete mode 100644 mysql-test/innodb_bug46000.test delete mode 100644 mysql-test/innodb_bug46676.result delete mode 100644 mysql-test/innodb_bug46676.test delete mode 100644 mysql-test/innodb_bug47167.result delete mode 100644 mysql-test/innodb_bug47167.test delete mode 100644 mysql-test/innodb_bug47777.result delete mode 100644 mysql-test/innodb_bug47777.test delete mode 100644 mysql-test/innodb_file_format.result delete mode 100644 mysql-test/innodb_file_format.test delete mode 100644 mysql-test/innodb_information_schema.result delete mode 100644 mysql-test/innodb_information_schema.test delete mode 100644 mysql-test/innodb_trx_weight.inc delete mode 100644 mysql-test/innodb_trx_weight.result delete mode 100644 mysql-test/innodb_trx_weight.test delete mode 100644 mysql-test/innodb_xtradb_bug317074.result delete mode 100644 mysql-test/innodb_xtradb_bug317074.test delete mode 100644 mysql-test/patches/README delete mode 100644 mysql-test/patches/disabled.def.diff delete mode 100644 mysql-test/patches/index_merge_innodb-explain.diff delete mode 100644 mysql-test/patches/information_schema.diff delete mode 100644 mysql-test/patches/mysql.diff delete mode 100644 mysql-test/patches/mysql_upgrade.diff delete mode 100644 mysql-test/patches/partition_innodb.diff rename percona-suite/{slow_extended.patch => include}/grep.inc (100%) rename percona-suite/{ => include}/have_response_time_distribution.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments_begin.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments_clear.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments_end.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments_eval.inc (100%) rename percona-suite/{query_cache_enhance.patch => include}/percona_query_cache_with_comments_show.inc (100%) create mode 100644 percona-suite/include/percona_server_variables.inc delete mode 100644 percona-suite/innodb_fix_misc_bug51325.result delete mode 100644 percona-suite/innodb_fix_misc_bug51325.test delete mode 100644 percona-suite/percona_innodb_buffer_pool_shm.test delete mode 100644 percona-suite/percona_server_variables.result delete mode 100644 percona-suite/percona_server_variables.test delete mode 100644 percona-suite/percona_suppress_log_warning_1592.result delete mode 100644 percona-suite/profiling_slow.patch/percona_bug643149.result delete mode 100644 percona-suite/query_cache_enhance.patch/percona_query_cache_with_comments.inc.backup rename percona-suite/{ => r}/have_response_time_distribution.require (100%) create mode 100644 percona-suite/r/percona_bug643149.result rename percona-suite/{ => r}/percona_innodb_buffer_pool_shm.result (50%) rename percona-suite/{ => r}/percona_innodb_deadlock_count.result (88%) rename percona-suite/{ => r}/percona_innodb_doublewrite_file.result (100%) rename percona-suite/{ => r}/percona_innodb_use_sys_stats_table.result (100%) rename percona-suite/{log_connection_error.patch => r}/percona_log_connection_error.result (100%) create mode 100644 percona-suite/r/percona_log_warnings_suppress.result create mode 100644 percona-suite/r/percona_mysqldump_innodb_optimize_keys.result create mode 100644 percona-suite/r/percona_processlist_row_stats.result rename percona-suite/{query_cache_enhance.patch => r}/percona_query_cache_with_comments.result (100%) rename percona-suite/{query_cache_enhance.patch => r}/percona_query_cache_with_comments_crash.result (100%) rename percona-suite/{query_cache_enhance.patch => r}/percona_query_cache_with_comments_disable.result (100%) rename percona-suite/{query_cache_enhance.patch => r}/percona_query_cache_with_comments_prepared_statements.result (100%) create mode 100644 percona-suite/r/percona_server_variables_debug.result create mode 100644 percona-suite/r/percona_server_variables_release.result rename percona-suite/{show_slave_status_nolock.patch => r}/percona_show_slave_status_nolock.result (64%) rename percona-suite/{ => r}/percona_show_temp_tables.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-log_slow_filter.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-log_slow_sp_statements-cl.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-log_slow_verbosity-cl.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-log_slow_verbosity.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-long_query_time.result (78%) create mode 100644 percona-suite/r/percona_slow_extended-microseconds_in_slow_extended.result rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-min_examined_row_limit.result (100%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-slave_innodb_stats.result (92%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-slave_statements-and-use_global_long_query_time.result (73%) rename percona-suite/{slow_extended.patch => r}/percona_slow_extended-slave_statements.result (64%) create mode 100644 percona-suite/r/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result create mode 100644 percona-suite/r/percona_slow_extended-slow_query_log_timestamp_always-cl.result create mode 100644 percona-suite/r/percona_slow_extended-use_global_control.result create mode 100644 percona-suite/r/percona_slow_extended-use_global_long_query_time.result rename percona-suite/{sql_no_fcache.patch => r}/percona_sql_no_fcache.result (100%) rename percona-suite/{query_cache_enhance.patch => r}/percona_status_wait_query_cache_mutex.result (66%) rename percona-suite/{ => r}/percona_xtradb_admin_command.result (100%) rename percona-suite/{ => r}/percona_xtradb_bug317074.result (76%) rename percona-suite/{ => r}/userstat_bug602047.result (74%) delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-replication.result delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-replication.test delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-stored.result delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time-stored.test delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time.result delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time.test delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_flush.inc delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_show.inc delete mode 100644 percona-suite/response-time-distribution.patch/percona_query_response_time_sleep.inc delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-combined2.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-control_global_slow.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-log_slow_timestamp_every-cl.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-microseconds_in_slow_extended.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slave_statements.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-cl.test delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time-master.opt delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.result delete mode 100644 percona-suite/slow_extended.patch/percona_slow_extended-use_global_long_query_time.test rename percona-suite/{profiling_slow.patch => t}/percona_bug643149.test (89%) rename percona-suite/{ => t}/percona_innodb_buffer_pool_shm-master.opt (70%) create mode 100644 percona-suite/t/percona_innodb_buffer_pool_shm.test rename percona-suite/{ => t}/percona_innodb_deadlock_count.test (83%) rename percona-suite/{ => t}/percona_innodb_doublewrite_file-master.opt (100%) rename percona-suite/{ => t}/percona_innodb_doublewrite_file.test (100%) rename percona-suite/{ => t}/percona_innodb_use_sys_stats_table-master.opt (100%) rename percona-suite/{ => t}/percona_innodb_use_sys_stats_table.test (100%) rename percona-suite/{log_connection_error.patch => t}/percona_log_connection_error-master.opt (100%) rename percona-suite/{log_connection_error.patch => t}/percona_log_connection_error.test (94%) rename percona-suite/{percona_suppress_log_warning_1592-master.opt => t/percona_log_warnings_suppress-master.opt} (100%) rename percona-suite/{percona_suppress_log_warning_1592.test => t/percona_log_warnings_suppress.test} (76%) create mode 100644 percona-suite/t/percona_mysqldump_innodb_optimize_keys.test create mode 100644 percona-suite/t/percona_processlist_row_stats.test rename percona-suite/{query_cache_enhance.patch => t}/percona_query_cache_with_comments.test (100%) rename percona-suite/{query_cache_enhance.patch => t}/percona_query_cache_with_comments_crash.test (100%) rename percona-suite/{query_cache_enhance.patch => t}/percona_query_cache_with_comments_disable.test (100%) rename percona-suite/{query_cache_enhance.patch => t}/percona_query_cache_with_comments_prepared_statements.test (100%) create mode 100644 percona-suite/t/percona_server_variables_debug.test create mode 100644 percona-suite/t/percona_server_variables_release.test rename percona-suite/{show_slave_status_nolock.patch => t}/percona_show_slave_status_nolock.test (67%) rename percona-suite/{ => t}/percona_show_temp_tables.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_filter-master.opt (60%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_filter.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_sp_statements-cl-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_sp_statements-cl.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_verbosity-cl-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_verbosity-cl.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_verbosity-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-log_slow_verbosity.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-long_query_time-master.opt (60%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-long_query_time.test (84%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-microseconds_in_slow_extended-master.opt (52%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-microseconds_in_slow_extended.test (72%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-min_examined_row_limit-master.opt (56%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-min_examined_row_limit.test (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_innodb_stats-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_innodb_stats-slave.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_innodb_stats.test (95%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_statements-and-use_global_long_query_time.test (76%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_statements-master.opt (100%) rename percona-suite/{slow_extended.patch => t}/percona_slow_extended-slave_statements-slave.opt (100%) create mode 100644 percona-suite/t/percona_slow_extended-slave_statements.test create mode 100644 percona-suite/t/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt create mode 100644 percona-suite/t/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test create mode 100644 percona-suite/t/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt create mode 100644 percona-suite/t/percona_slow_extended-slow_query_log_timestamp_always-cl.test rename percona-suite/{slow_extended.patch/percona_slow_extended-control_global_slow-master.opt => t/percona_slow_extended-use_global_control-master.opt} (100%) rename percona-suite/{slow_extended.patch/percona_slow_extended-control_global_slow.test => t/percona_slow_extended-use_global_control.test} (64%) create mode 100644 percona-suite/t/percona_slow_extended-use_global_long_query_time-master.opt create mode 100644 percona-suite/t/percona_slow_extended-use_global_long_query_time.test rename percona-suite/{sql_no_fcache.patch => t}/percona_sql_no_fcache.test (100%) rename percona-suite/{query_cache_enhance.patch => t}/percona_status_wait_query_cache_mutex.test (93%) rename percona-suite/{ => t}/percona_xtradb_admin_command.test (100%) rename percona-suite/{ => t}/percona_xtradb_bug317074.test (87%) rename percona-suite/{ => t}/userstat_bug602047.test (67%) delete mode 100644 plug.in delete mode 100644 scripts/install_innodb_plugins.sql delete mode 100644 scripts/install_innodb_plugins_win.sql delete mode 100755 setup.sh delete mode 100644 srv/srv0que.c delete mode 100644 thr/thr0loc.c create mode 100644 ut/ut0bh.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 87318ceec78..01034eede69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -# Copyright (C) 2009 Oracle/Innobase Oy -# +# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. @@ -11,43 +11,210 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# This is the CMakeLists for InnoDB Plugin +# This is the CMakeLists for InnoDB + +INCLUDE(CheckFunctionExists) +INCLUDE(CheckCSourceCompiles) +INCLUDE(CheckCSourceRuns) + +# OS tests +IF(UNIX) + IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H) + CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO) + ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1") + IF(HAVE_LIBAIO_H AND HAVE_LIBAIO) + ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1) + LINK_LIBRARIES(aio) + ENDIF() + ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*") + ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE") + ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX") + ADD_DEFINITIONS("-DUNIV_AIX -DUNIX_MUST_NOT_INLINE") + ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + ADD_DEFINITIONS("-DUNIV_SOLARIS") + ELSE() + ADD_DEFINITIONS("-DUNIV_MUST_NOT_INLINE") + ENDIF() +ENDIF() + +# Enable InnoDB's UNIV_DEBUG for debug builds +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DUNIV_DEBUG") +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DUNIV_DEBUG") + +IF(NOT MSVC) +# either define HAVE_IB_GCC_ATOMIC_BUILTINS or not +IF(NOT CMAKE_CROSSCOMPILING) + CHECK_C_SOURCE_RUNS( + " + int main() + { + long x; + long y; + long res; + char c; + + x = 10; + y = 123; + res = __sync_bool_compare_and_swap(&x, x, y); + if (!res || x != y) { + return(1); + } + + x = 10; + y = 123; + res = __sync_bool_compare_and_swap(&x, x + 1, y); + if (res || x != 10) { + return(1); + } + x = 10; + y = 123; + res = __sync_add_and_fetch(&x, y); + if (res != 123 + 10 || x != 123 + 10) { + return(1); + } + + c = 10; + res = __sync_lock_test_and_set(&c, 123); + if (res != 10 || c != 123) { + return(1); + } + return(0); + }" + HAVE_IB_GCC_ATOMIC_BUILTINS + ) +ENDIF() + +IF(HAVE_IB_GCC_ATOMIC_BUILTINS) + ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_BUILTINS=1) +ENDIF() + + # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not +IF(NOT CMAKE_CROSSCOMPILING) + CHECK_C_SOURCE_RUNS( + " + #include + #include + + int main() { + pthread_t x1; + pthread_t x2; + pthread_t x3; + + memset(&x1, 0x0, sizeof(x1)); + memset(&x2, 0x0, sizeof(x2)); + memset(&x3, 0x0, sizeof(x3)); + + __sync_bool_compare_and_swap(&x1, x2, x3); + + return(0); + }" + HAVE_IB_ATOMIC_PTHREAD_T_GCC) +ENDIF() +IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC) + ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1) +ENDIF() + +ENDIF(NOT MSVC) + +# Solaris atomics +IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") + CHECK_FUNCTION_EXISTS(atomic_cas_ulong HAVE_ATOMIC_CAS_ULONG) + CHECK_FUNCTION_EXISTS(atomic_cas_32 HAVE_ATOMIC_CAS_32) + CHECK_FUNCTION_EXISTS(atomic_cas_64 HAVE_ATOMIC_CAS_64) + CHECK_FUNCTION_EXISTS(atomic_add_long_nv HAVE_ATOMIC_ADD_LONG_NV) + CHECK_FUNCTION_EXISTS(atomic_swap_uchar HAVE_ATOMIC_SWAP_UCHAR) + IF(HAVE_ATOMIC_CAS_ULONG AND + HAVE_ATOMIC_CAS_32 AND + HAVE_ATOMIC_CAS_64 AND + HAVE_ATOMIC_ADD_LONG_NV AND + HAVE_ATOMIC_SWAP_UCHAR) + SET(HAVE_IB_SOLARIS_ATOMICS 1) + ENDIF() + + IF(HAVE_IB_SOLARIS_ATOMICS) + ADD_DEFINITIONS(-DHAVE_IB_SOLARIS_ATOMICS=1) + ENDIF() + + IF(NOT CMAKE_CROSSCOMPILING) + # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not + CHECK_C_SOURCE_COMPILES( + " #include + #include + + int main(int argc, char** argv) { + pthread_t x1; + pthread_t x2; + pthread_t x3; + + memset(&x1, 0x0, sizeof(x1)); + memset(&x2, 0x0, sizeof(x2)); + memset(&x3, 0x0, sizeof(x3)); + + if (sizeof(pthread_t) == 4) { + + atomic_cas_32(&x1, x2, x3); + + } else if (sizeof(pthread_t) == 8) { + + atomic_cas_64(&x1, x2, x3); + + } else { + + return(1); + } + + return(0); + } + " HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS) + ENDIF() + IF(HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS) + ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=1) + ENDIF() +ENDIF() -SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") -SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") +IF(UNIX) +# this is needed to know which one of atomic_cas_32() or atomic_cas_64() +# to use in the source +SET(CMAKE_EXTRA_INCLUDE_FILES pthread.h) +CHECK_TYPE_SIZE(pthread_t SIZEOF_PTHREAD_T) +SET(CMAKE_EXTRA_INCLUDE_FILES) +ENDIF() -# Starting at 5.1.38, MySQL CMake files are simplified. But the plugin -# CMakeLists.txt still needs to work with previous versions of MySQL. -IF (MYSQL_VERSION_ID GREATER "50137") - INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") -ENDIF (MYSQL_VERSION_ID GREATER "50137") +IF(SIZEOF_PTHREAD_T) + ADD_DEFINITIONS(-DSIZEOF_PTHREAD_T=${SIZEOF_PTHREAD_T}) +ENDIF() -IF (CMAKE_SIZEOF_VOID_P MATCHES 8) - SET(WIN64 TRUE) -ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8) +IF(MSVC) + ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS) +ENDIF() -# Include directories under innodb_plugin -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innodb_plugin/include - ${CMAKE_SOURCE_DIR}/storage/innodb_plugin/handler) -# Include directories under mysql -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/sql - ${CMAKE_SOURCE_DIR}/regex - ${CMAKE_SOURCE_DIR}/zlib - ${CMAKE_SOURCE_DIR}/extra/yassl/include) +# Include directories under innobase +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include + ${CMAKE_SOURCE_DIR}/storage/innobase/handler) + +# Sun Studio bug with -xO2 +IF(CMAKE_C_COMPILER_ID MATCHES "SunPro" + AND CMAKE_C_FLAGS_RELEASE MATCHES "O2" + AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + # Sun Studio 12 crashes with -xO2 flag, but not with higher optimization + # -xO3 + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/rem/rem0rec.c + PROPERTIES COMPILE_FLAGS -xO3) +ENDIF() # Removing compiler optimizations for innodb/mem/* files on 64-bit Windows # due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297 -IF (MSVC AND $(WIN64)) +IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c PROPERTIES COMPILE_FLAGS -Od) -ENDIF (MSVC AND $(WIN64)) +ENDIF() -SET(INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c +SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c data/data0data.c data/data0type.c dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c @@ -67,22 +234,25 @@ SET(INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c page/page0cur.c page/page0page.c page/page0zip.c que/que0que.c - handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc + handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc read/read0read.c rem/rem0cmp.c rem/rem0rec.c row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c - srv/srv0que.c srv/srv0srv.c srv/srv0start.c + srv/srv0srv.c srv/srv0start.c sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c - thr/thr0loc.c trx/trx0i_s.c trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c usr/usr0sess.c - ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c - ut/ut0list.c ut/ut0wqueue.c) -# Windows atomics do not perform well. Disable Windows atomics by default. -# See bug#52102 for details. -#ADD_DEFINITIONS(-DHAVE_WINDOWS_ATOMICS -DINNODB_RW_LOCKS_USE_ATOMICS -DHAVE_IB_PAUSE_INSTRUCTION) -ADD_DEFINITIONS(-DHAVE_IB_PAUSE_INSTRUCTION) + ut/ut0byte.c ut/ut0dbg.c ut/ut0list.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c + ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c ut/ut0bh.c) -MYSQL_STORAGE_ENGINE(INNODB_PLUGIN) +IF(WITH_INNODB) + # Legacy option + SET(WITH_INNOBASE_STORAGE_ENGINE TRUE) +ENDIF() + +MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE + DEFAULT + MODULE_OUTPUT_NAME ha_innodb + LINK_LIBRARIES ${ZLIB_LIBRARY}) diff --git a/COPYING b/COPYING deleted file mode 100644 index 6b106e18fdb..00000000000 --- a/COPYING +++ /dev/null @@ -1,351 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -Preamble -======== - -The licenses for most software are designed to take away your freedom -to share and change it. By contrast, the GNU General Public License is -intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not price. -Our General Public Licenses are designed to make sure that you have -the freedom to distribute copies of free software (and charge for this -service if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone -to deny you these rights or to ask you to surrender the rights. These -restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis -or for a fee, you must give the recipients all the rights that you -have. You must make sure that they, too, receive or can get the source -code. And you must show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - -Finally, any free program is threatened constantly by software patents. -We wish to avoid the danger that redistributors of a free program will -individually obtain patent licenses, in effect making the program -proprietary. To prevent this, we have made it clear that any patent -must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains a - notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", - below, refers to any such program or work, and a "work based on - the Program" means either the Program or any derivative work under - copyright law: that is to say, a work containing the Program or a - portion of it, either verbatim or with modifications and/or - translated into another language. (Hereinafter, translation is - included without limitation in the term "modification".) Each - licensee is addressed as "you". - - Activities other than copying, distribution and modification are - not covered by this License; they are outside its scope. The act - of running the Program is not restricted, and the output from the - Program is covered only if its contents constitute a work based on - the Program (independent of having been made by running the - Program). Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty; keep intact all the - notices that refer to this License and to the absence of any - warranty; and give any other recipients of the Program a copy of - this License along with the Program. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange - for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a. You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b. You must cause any work that you distribute or publish, that - in whole or in part contains or is derived from the Program - or any part thereof, to be licensed as a whole at no charge - to all third parties under the terms of this License. - - c. If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display - an announcement including an appropriate copyright notice and - a notice that there is no warranty (or else, saying that you - provide a warranty) and that users may redistribute the - program under these conditions, and telling the user how to - view a copy of this License. (Exception: if the Program - itself is interactive but does not normally print such an - announcement, your work based on the Program is not required - to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the - Program, and can be reasonably considered independent and separate - works in themselves, then this License, and its terms, do not - apply to those sections when you distribute them as separate - works. But when you distribute the same sections as part of a - whole which is a work based on the Program, the distribution of - the whole must be on the terms of this License, whose permissions - for other licensees extend to the entire whole, and thus to each - and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or - contest your rights to work written entirely by you; rather, the - intent is to exercise the right to control the distribution of - derivative or collective works based on the Program. - - In addition, mere aggregation of another work not based on the - Program with the Program (or with a work based on the Program) on - a volume of a storage or distribution medium does not bring the - other work under the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms - of Sections 1 and 2 above provided that you also do one of the - following: - - a. Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Sections 1 and 2 above on a medium customarily used for - software interchange; or, - - b. Accompany it with a written offer, valid for at least three - years, to give any third-party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange; or, - - c. Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with - such an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete - source code means all the source code for all modules it contains, - plus any associated interface definition files, plus the scripts - used to control compilation and installation of the executable. - However, as a special exception, the source code distributed need - not include anything that is normally distributed (in either - source or binary form) with the major components (compiler, - kernel, and so on) of the operating system on which the executable - runs, unless that component itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify - or distribute the Program or its derivative works. These actions - are prohibited by law if you do not accept this License. - Therefore, by modifying or distributing the Program (or any work - based on the Program), you indicate your acceptance of this - License to do so, and all its terms and conditions for copying, - distributing or modifying the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program - subject to these terms and conditions. You may not impose any - further restrictions on the recipients' exercise of the rights - granted herein. You are not responsible for enforcing compliance - by third parties to this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent - issues), conditions are imposed on you (whether by court order, - agreement or otherwise) that contradict the conditions of this - License, they do not excuse you from the conditions of this - License. If you cannot distribute so as to satisfy simultaneously - your obligations under this License and any other pertinent - obligations, then as a consequence you may not distribute the - Program at all. For example, if a patent license would not permit - royalty-free redistribution of the Program by all those who - receive copies directly or indirectly through you, then the only - way you could satisfy both it and this License would be to refrain - entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable - under any particular circumstance, the balance of the section is - intended to apply and the section as a whole is intended to apply - in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of - any such claims; this section has the sole purpose of protecting - the integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system; it is up to the author/donor to decide if he or she is - willing to distribute software through any other system and a - licensee cannot impose that choice. - - This section is intended to make thoroughly clear what is believed - to be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, - the original copyright holder who places the Program under this - License may add an explicit geographical distribution limitation - excluding those countries, so that distribution is permitted only - in or among countries not thus excluded. In such case, this - License incorporates the limitation as if written in the body of - this License. - - 9. The Free Software Foundation may publish revised and/or new - versions of the General Public License from time to time. Such - new versions will be similar in spirit to the present version, but - may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the - Program specifies a version number of this License which applies - to it and "any later version", you have the option of following - the terms and conditions either of that version or of any later - version published by the Free Software Foundation. If the Program - does not specify a version number of this License, you may choose - any version ever published by the Free Software Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the - author to ask for permission. For software which is copyrighted - by the Free Software Foundation, write to the Free Software - Foundation; we sometimes make exceptions for this. Our decision - will be guided by the two goals of preserving the free status of - all derivatives of our free software and of promoting the sharing - and reuse of software generally. - - NO WARRANTY - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE - LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT - WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE - QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY - SERVICING, REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY - MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE - LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, - INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR - INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU - OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY - OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs -============================================= - -If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these -terms. - -To do so, attach the following notices to the program. It is safest to -attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. - Copyright (C) YYYY NAME OF AUTHOR - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the -appropriate parts of the General Public License. Of course, the -commands you use may be called something other than `show w' and `show -c'; they could even be mouse-clicks or menu items--whatever suits your -program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - SIGNATURE OF TY COON, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, -you may consider it more useful to permit linking proprietary -applications with the library. If this is what you want to do, use the -GNU Library General Public License instead of this License. diff --git a/COPYING.Sun_Microsystems b/COPYING.Sun_Microsystems deleted file mode 100644 index 5a77ef3ab73..00000000000 --- a/COPYING.Sun_Microsystems +++ /dev/null @@ -1,31 +0,0 @@ -Portions of this software contain modifications contributed by -Sun Microsystems, Inc. These contributions are used with the following -license: - -Copyright (c) 2009, Sun Microsystems, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - * Neither the name of Sun Microsystems, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 102db3d7824..00000000000 --- a/ChangeLog +++ /dev/null @@ -1,2122 +0,0 @@ -2011-01-31 The InnoDB Team - - * btr/btr0cur.c, include/row0upd.h, - row/row0purge.c, row/row0umod.c, row/row0upd.c: - Bug#59230 assert 0 row_upd_changes_ord_field_binary() - in post-crash rollback or purge - -2011-01-27 The InnoDB Team - - * btr/btr0cur.c: - Bug#59465 btr_estimate_number_of_different_key_vals use - incorrect offset for external_size - -2011-01-27 The InnoDB Team - - * include/trx0trx.h, trx/trx0trx.c: - Bug#59440 Race condition in XA ROLLBACK and XA COMMIT - after server restart - -2011-01-25 The InnoDB Team - - * row/row0upd.c: - Bug#59585 Fix 58912 introduces compiler warning - due to potentially uninitialized variable - -2011-01-25 The InnoDB Team - - * mtr/mtr0log.c: - Bug#59486 Incorrect usage of UNIV_UNLIKELY() in mlog_parse_string() - -2011-01-25 The InnoDB Team - - * row/row0vers.c: - Fix Bug#59464 Race condition in row_vers_build_for_semi_consistent_read - -2011-01-25 The InnoDB Team - - * btr/btr0btr.c, btr/btr0cur.c, btr/btr0sea.c, - buf/buf0buddy.c, buf/buf0buf.c, buf/buf0lru.c, - include/buf0buf.h, include/buf0buf.ic, include/buf0lru.h, - mem/mem0mem.c, page/page0zip.c: - Fix Bug#59707 Unused compression-related parameters - in buffer pool functions - -2011-01-18 The InnoDB Team - - * include/sync0rw.h, sync/sync0arr.c, sync/sync0rw.c: - Fix Bug#59579 rw_lock_debug_print outputs to stderr, not to - SHOW ENGINE INNODB STATUS - -2011-01-14 The InnoDB Team - * btr/btr0cur.c, dict/dict0dict.c, handler/ha_innodb.cc, - include/btr0cur.h, include/dict0mem.h, include/rem0cmp.h, - include/rem0cmp.ic, include/srv0srv.h, rem/rem0cmp.c, - srv/srv0srv.c, innodb_bug30423.test: - Fix Bug#30423 InnoDBs treatment of NULL in index stats causes - bad "rows examined" estimates - -2011-01-06 The InnoDB Team - * row/row0merge.c: - Fix Bug#59312 Examine MAX_FULL_NAME_LEN in InnoDB to address - possible insufficient name buffer - -2011-01-06 The InnoDB Team - * dict/dict0dict.c, handler/ha_innodb.cc, handler/i_s.cc, - include/univ.i: - Fix Bug#58643 InnoDB: too long table name - -2011-01-06 The InnoDB Team - * handler/i_s.cc, include/trx0i_s.h, trx/trx0i_s.c: - Fix Bug#55397 cannot select from innodb_trx when trx_query contains - blobs that aren't strings - -2011-01-04 The InnoDB Team - * dict/dict0dict.c: - Fix Bug#59197 double quote in field comment prevents foreign - key constraint creation - -2010-12-21 The InnoDB Team - * include/btr0cur.h, include/row0upd.h, btr/btr0cur.c, - row/row0umod.c, row/row0upd.c: - Fix Bug#55284 Double free of off-page columns due to lock wait - while updating PRIMARY KEY - -2010-12-21 The InnoDB Team - - * include/data0data.h, include/data0data.ic, include/row0upd.h, - btr/btr0cur.c, row/row0purge.c, row/row0umod.c, row/row0upd.c, - innodb.result, innodb.test: - Fix Bug#58912 InnoDB unnecessarily avoids update-in-place - on column prefix indexes - -2010-12-09 The InnoDB Team - - * buf/buf0lru.c: - Fix Bug#57600 output of I/O sum[%lu] can go negative - -2010-11-11 The InnoDB Team - - * thr/thr0loc.c, trx/trx0i_s.c: - Fix Bug#57802 Empty ASSERTION parameter passed to the HASH_SEARCH macro - -2010-11-10 The InnoDB Team - - * dict/dict0dict.c, handler/handler0alter.cc, include/dict0dict.h - row/row0merge.c: - Fix Bug#55084 InnoDB crash and corruption after ALTER TABLE - -2010-11-10 The InnoDB Team - - * srv/srv0start.c: - Fix Bug#48026 Log start and end of InnoDB buffer pool - initialization to the error log - -2010-11-03 The InnoDB Team - - * include/btr0btr.h, include/btr0btr.ic, dict/dict0crea.c: - Fix Bug#57947 InnoDB diagnostics shows btr_block_get calls - instead of real callers - -2010-11-03 The InnoDB Team - - * fil/fil0fil.c, fsp/fsp0fsp.c, handler/ha_innodb.cc, - include/fil0fil.h, include/univ.i: - Fix Bug #54538 - use of exclusive innodb dictionary lock limits - performance. - -2010-11-02 The InnoDB Team - - * btr/btr0cur.c, dict/dict0dict.c, dict/dict0load.c, - handler/ha_innodb.cc, include/dict0dict.h, row/row0mysql.c, - innodb_bug53046.result, innodb_bug53046.test: - Fix Bug#53046 dict_update_statistics_low can still be run - concurrently on same table - -2010-11-02 The InnoDB Team - - * row/row0sel.c: - Fix Bug#57799 READ UNCOMMITTED access failure of off-page - DYNAMIC or COMPRESSED columns again - -2010-10-24 The InnoDB Team - - * row/row0mysql.c - Fix Bug#57700 Latching order violation in - row_truncate_table_for_mysql() - -2010-10-20 The InnoDB Team - - * dict/dict0load.c - Fix Bug#57616 Sig 11 in dict_load_table() when failed to load - index or foreign key - -2010-10-19 The InnoDB Team - - * btr/btr0cur.c, buf/buf0buf.c, buf/buf0flu.c, handler/ha_innodb.cc, - ibuf/ibuf0ibuf.c, include/btr0cur.h, include/buf0flu.h, - include/ibuf0ibuf.h, include/row0mysql.h, - row/row0mysql.c, row/row0sel.c, - innodb_bug56680.test, innodb_bug56680.result: - Fix Bug#56680 InnoDB may return wrong results from a - case-insensitive covering index - -2010-10-18 The InnoDB Team - - * handler/ha_innodb.cc, handler/ha_innodb.h, innodb_bug57252.result, - innodb_bug57252.test: - Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE - -2010-10-14 The InnoDB Team - - * handler/ha_innodb.cc, innodb_bug56143.result, innodb_bug56143.test: - Fix Bug#56143 too many foreign keys causes output of show create - table to become invalid - -2010-10-14 The InnoDB Team - - * srv/srv0start.c: - Fix Bug#57397 io_handler_thread() will never cleanup - -2010-10-11 The InnoDB Team - - * row/row0sel.c - Fix Bug #57345 btr_pcur_store_position abort for load with - concurrent lock/unlock tables - -2010-10-11 The InnoDB Team - - * row/row0mysql.c, innodb_bug56947.result, innodb_bug56947.test: - Fix Bug #56947 InnoDB leaks memory when failing to create a table - -2010-10-06 The InnoDB Team - - * row/row0mysql.c, innodb_bug57255.result, innodb_bug57255.test - Fix Bug #57255 Cascade Delete results in "Got error -1 from - storage engine" - -2010-09-27 The InnoDB Team - - * row/row0sel.c, innodb_bug56716.result, innodb_bug56716.test: - Fix Bug#56716 InnoDB locks a record gap without locking the table - -2010-09-06 The InnoDB Team - - * dict/dict0load.c, innodb_bug53756.test innodb_bug53756.result: - Fix Bug#53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery - -2010-08-24 The InnoDB Team - - * handler/ha_innodb.c, dict/dict0dict.c: - Fix Bug#55832 selects crash too easily when innodb_force_recovery>3 - -2010-08-03 The InnoDB Team - - * include/dict0dict.h, include/dict0dict.ic, row/row0mysql.c: - Fix Bug#54678 InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock - -2010-08-03 The InnoDB Team - - * dict/dict0load.c, handler/ha_innodb.cc, include/db0err.h, - include/dict0load.h, include/dict0mem.h, include/que0que.h, - row/row0merge.c, row/row0mysql.c: - Fix Bug#54582 stack overflow when opening many tables linked - with foreign keys at once - -2010-08-03 The InnoDB Team - - * include/ut0mem.h, ut/ut0mem.c: - Fix Bug#55627 segv in ut_free pars_lexer_close innobase_shutdown - innodb-use-sys-malloc=0 - -2010-08-01 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#55382 Assignment with SELECT expressions takes unexpected - S locks in READ COMMITTED - -2010-07-27 The InnoDB Team - - * include/mem0pool.h, mem/mem0mem.c, mem/mem0pool.c, srv/srv0start.c: - Fix Bug#55581 shutdown with innodb-use-sys-malloc=0: assert - mutex->magic_n == MUTEX_MAGIC_N. - -2010-06-30 The InnoDB Team - - * btr/btr0sea.c, ha/ha0ha.c, handler/ha_innodb.cc, include/btr0sea.h: - Fix Bug#54311 Crash on CHECK PARTITION after concurrent LOAD DATA - and adaptive_hash_index=OFF - -2010-06-29 The InnoDB Team - * row/row0row.c, row/row0undo.c, row/row0upd.c: - Fix Bug#54408 txn rollback after recovery: row0umod.c:673 - dict_table_get_format(index->table) - -2010-06-29 The InnoDB Team - - * btr/btr0cur.c, include/btr0cur.h, include/row0mysql.h, - row/row0merge.c, row/row0sel.c: - Fix Bug#54358 READ UNCOMMITTED access failure of off-page DYNAMIC - or COMPRESSED columns - -2010-06-24 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#54679 alter table causes compressed row_format to revert - to compact - -2010-06-22 The InnoDB Team - - * dict/dict0dict.c, dict/dict0mem.c, include/dict0mem.h, - include/univ.i, page/page0zip.c, row/row0merge.c: - Fix Bug#47991 InnoDB Dictionary Cache memory usage increases - indefinitely when renaming tables - -2010-06-22 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#54686: "field->col->mtype == type" assertion error at - row/row0sel.c - -2010-06-22 The InnoDB Team - - * handler/ha_innodb.cc, innodb_bug54044.result, innodb_bug54044.test: - Fix Bug#54044 Create temporary tables and using innodb crashes. - -2010-06-21 The InnoDB Team - - * dict/dict0load.c, fil/fil0fil.c: - Fix Bug#54658: InnoDB: Warning: allocated tablespace %lu, - old maximum was 0 (introduced in Bug#53578 fix) - -2010-06-16 The InnoDB Team - - * row/row0merge.c: - Fix Bug#54330 Broken fast index creation - -2010-06-10 The InnoDB Team - - * include/log0log.ic, row/row0ins.c, row/row0purge.c, - row/row0uins.c, row/row0umod.c, row/row0upd.c: - Fix Bug#39168 ERROR: the age of the last checkpoint ... exceeds - the log group capacity - -2010-06-08 The InnoDB Team - - * dict/dict0load.c: - Fix Bug#54009 Server crashes when data is selected from non backed - up table for InnoDB plugin - -2010-06-02 The InnoDB Team - - * include/db0err.h, include/lock0lock.h, include/row0mysql.h, - lock/lock0lock.c, row/row0ins.c, row/row0mysql.c, row/row0sel.c: - Fix Bug#53674 InnoDB: Error: unlock row could not find a - 4 mode lock on the record - -2010-06-01 The InnoDB Team - - * include/sync0rw.h, sync/sync0rw.c: - Fix Bug#48197 Concurrent rw_lock_free may cause assertion failure - -2010-06-01 The InnoDB Team - - * row/row0umod.c: - Fix Bug#53812 assert row/row0umod.c line 660 in txn rollback - after crash recovery - -2010-05-25 The InnoDB Team - - * handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c: - Fix Bug#53592: crash replacing duplicates into table after fast - alter table added unique key - -2010-05-24 The InnoDB Team - - * dict/dict0boot.c, dict/dict0crea.c, fil/fil0fil.c, - include/dict0boot.h, include/fil0fil.h, row/row0mysql.c: - Fix Bug#53578: assert on invalid page access, in fil_io() - -2010-05-14 The InnoDB Team - * mysql-test/innodb_bug48024.test, mysql-test/innodb_bug48024.result, - dict/dict0dict.c, handler/ha_innodb.cc, handler/ha_innodb.h, - include/dict0dict.h, include/ha_prototypes.h, include/row0mysql.h, - include/trx0trx.h, row/row0mysql.c, trx/trx0i_s.c, trx/trx0trx.c: - Fix Bug#48024 Innodb doesn't work with multi-statements - Fix Bug#53644 InnoDB thinks that /*/ starts and ends a comment - -2010-05-12 The InnoDB Team - - * handler/handler0alter.cc: - Fix Bug#53591 crash with fast alter table and text/blob prefix - primary key - -2010-05-12 The InnoDB Team - - * row/row0merge.c: - Fix Bug#53471 row_merge_drop_temp_indexes() refers freed memory, SEGVs - -2010-05-11 The InnoDB Team - - * mysql-test/innodb_bug53290.test, mysql-test/innodb_bug53290.result, - include/rem0cmp.h, rem/rem0cmp.c, row/row0merge.c: - Fix Bug#53290 wrong duplicate key error when adding a unique index - via fast alter table - -2010-05-11 The InnoDB Team - * buf/buf0lru.c, include/buf0buf.ic: - Fix Bug#53307 valgrind: warnings in main.partition_innodb_plugin - -2010-05-05 The InnoDB Team - - * row/row0merge.c: - Fix Bug#53256 in a stress test, assert dict/dict0dict.c:815 - table2 == NULL - -2010-05-05 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#53165 Setting innodb_change_buffering=DEFAULT produces - incorrect result - -2010-05-04 The InnoDB Team - - * fsp/fsp0fsp.c: - Fix Bug#53306 valgrind: warnings in innodb.innodb - -2010-05-03 The InnoDB Team - - * buf0buf.c: - Fix Bug#53248 compressed tables page checksum mismatch after - re-enabling innodb_checksums - -2010-04-28 The InnoDB Team - - * log/log0recv.h, log/log0recv.c: - Fix Bug#53122 InnoDB recovery uses too big a hash table for redo - log records - -2010-04-27 The InnoDB Team - - * handler/ha_innodb.cc, lock/lock0lock.c, row/row0mysql.c, - row/row0sel.c: - Fix Bug#48607 READ UNCOMMITTED uses more locks than READ COMMITTED - in InnoDB 5.1+ - -2010-04-26 The InnoDB Team - - * row/row0sel.c: - Fix Bug#52663 Lost update incrementing column value under - READ COMMITTED isolation level - -2010-04-22 The InnoDB Team - - * include/dict0boot.h, dict/dict0boot.c: - Fix a bug that prevented the crash recovery of fast CREATE INDEX - from dropping partially created indexes. - -2010-04-21 The InnoDB Team - - * btr/btr0btr.c: - Fix Bug#52964 Infinite loop in btr_page_split_and_insert() - in ROW_FORMAT=COMPRESSED - -2010-04-21 The InnoDB Team - - * data/data0data.c: - Fix Bug#52745 Failing assertion: blob_no < page_zip->n_blobs - -2010-04-20 The InnoDB Team - - * dict/dict0crea.c, handler/ha_innodb.cc, include/trx0trx.h: - Fix Bug#50495 'Row size too large' for plugin, but works for - built-in InnoDB - Only check the record size at index creation time when - innodb_strict_mode is set or when ROW_FORMAT is DYNAMIC or COMPRESSED. - -2010-04-15 The InnoDB Team - - * trx/trx0rec.c: - Fix Bug#52746 InnoDB purge thread crashed with table containing - prefix indexed blobs - -2010-03-31 The InnoDB Team - - * mysql-test/innodb_bug51920.test, mysql-test/innodb_bug51920.result, - srv/srv0srv.c: - Fix Bug#51920 InnoDB connections in row lock wait ignore KILL - until lock wait timeout - -2010-03-31 The InnoDB Team - - * mysql-test/innodb_bug38231.test: - Remove non-determinism in the test case. - -2010-03-29 The InnoDB Team - - InnoDB Plugin 1.0.7 released - -2010-03-18 The InnoDB Team - - * CMakeLists.txt: - Fix Bug#52102 InnoDB Plugin shows performance drop compared to - InnoDB (Windows) - -2010-03-18 The InnoDB Team - - * buf0buf.ic: - When comparing the time of the first access to a block against - innodb_old_blocks_time, use 32-bit arithmetics. The comparison was - incorrect on 64-bit systems. - -2010-03-11 The InnoDB Team - - * buf0buf.h, buf0buf.ic: - Fix and clarify the latching of some buf_block_t members. - Note that check_index_page_at_flush is not protected by any mutex. - Note and assert that lock_hash_val is protected by the rw-latch. - -2010-03-10 The InnoDB Team - - * trx/trx0sys.c: - Fix Bug#51653 outdated reference to set-variable - -2010-03-10 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug21704.result, - mysql-test/innodb_bug47621.result, mysql-test/innodb_bug47621.test: - Fix Bug#47621 MySQL and InnoDB data dictionaries will become out of - sync when renaming columns - -2010-03-10 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#51356 Many Valgrind errors in error messages - with concurrent DDL - -2010-03-10 The InnoDB Team - - * handler/ha_innodb.cc, handler/handler0alter.cc, - mysql-test/innodb_bug51378.result, mysql-test/innodb_bug51378.test: - Fix Bug#51378 Init 'ref_length' to correct value, in case an out - of bound MySQL primary_key - -2010-03-10 The InnoDB Team - - * log/log0recv.c: - Remove a bogus assertion about page numbers exceeding 0x90000000 - in the redo log. Abort when encountering a corrupted redo log - record, unless innodb_force_recovery is set. - -2010-03-09 The InnoDB Team - - * handler/ha_innodb.cc: - Make SHOW ENGINE INNODB MUTEX STATUS display SUM(os_waits) - for the buffer pool block mutexes and locks. - -2010-03-08 The InnoDB Team - - * fil/fil0fil.c: - Fix ALTER TABLE ... IMPORT TABLESPACE of compressed tables. - -2010-03-03 The InnoDB Team - - * handler/handler0alter.cc, innodb-index.result, innodb-index.test, - innodb.result, innodb.test: - Disallow a duplicate index name when creating an index. - -2010-02-11 The InnoDB Team - - * include/mem0mem.h, include/mem0mem.ic, mem/mem0mem.c: - Fix Bug#49535 Available memory check slows down crash - recovery tens of times - -2010-02-09 The InnoDB Team - - * buf/buf0buf.c: - Fix Bug#38901 InnoDB logs error repeatedly when trying to load - page into buffer pool - -2010-02-09 The InnoDB Team - - * srv/srv0srv.c: - Let the master thread sleep if the amount of work to be done is - calibrated as taking less than a second. - -2010-02-04 The InnoDB Team - - * btr/btr0btr.c, btr/btr0cur.c, btr/btr0pcur.c, buf/buf0buf.c, - include/btr0btr.h, include/btr0cur.h, include/btr0pcur.h, - include/btr0pcur.ic, include/buf0buf.h, row/row0ins.c, row/row0sel.c: - Pass the file name and line number of the caller of the - b-tree cursor functions to the buffer pool requests, in order - to make the latch diagnostics more accurate. - -2010-02-03 The InnoDB Team - - * lock/lock0lock.c: - Fix Bug#49001 SHOW INNODB STATUS deadlock info incorrect - when deadlock detection aborts - -2010-02-03 The InnoDB Team - - * buf/buf0lru.c: - Fix Bug#35077 Very slow DROP TABLE (ALTER TABLE, OPTIMIZE TABLE) - on compressed tables - -2010-02-03 The InnoDB Team - - * handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c: - Clean up CHECK TABLE error handling. - -2010-02-01 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.test, - mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc-44030.test, - mysql-test/innodb-autoinc-44030.result: - Fix Bug#49497 Error 1467 (ER_AUTOINC_READ_FAILED) on inserting - a negative value - -2010-01-28 The InnoDB Team - * handler/ha_innodb.h, handler/ha_innodb.cc, - handler/handler0alter.cc, - mysql-test/innodb_bug47622.test, - mysql-test/innodb_bug47622.result: - Fix Bug#47622 the new index is added before the existing ones - in MySQL, but after one in SE - -2010-01-27 The InnoDB Team - - * include/row0mysql.h, log/log0recv.c, row/row0mysql.c: - Drop temporary tables at startup. - This addresses the third aspect of - Bug#41609 Crash recovery does not work for InnoDB temporary tables. - -2010-01-21 The InnoDB Team - - * buf/buf0buf.c: - Do not merge buffered inserts to compressed pages before - the redo log has been applied in crash recovery. - -2010-01-13 The InnoDB Team - - * row/row0sel.c: - On the READ UNCOMMITTED isolation level, do not attempt to access - a clustered index record that has been marked for deletion. The - built-in InnoDB in MySQL 5.1 and earlier would attempt to retrieve - a previous version of the record in this case. - -2010-01-13 The InnoDB Team - - * buf/buf0buf.c: - When disabling the adaptive hash index, check the block state - before checking block->is_hashed, because the latter may be - uninitialized right after server startup. - -2010-01-12 The InnoDB Team - - * handler/ha_innodb.cc, handler/ha_innodb.h: - Fix Bug#46193 crash when accessing tables after enabling - innodb_force_recovery option - -2010-01-12 The InnoDB Team - - * row/row0mysql.c: - Fix Bug#49238 Creating/Dropping a temporary table while at 1023 - transactions will cause assert. - -2009-12-02 The InnoDB Team - - * srv/srv0start.c: - Display the zlib version number at startup. - InnoDB compressed tables use zlib, and the implementation depends - on the zlib function compressBound(), whose definition was slightly - changed in zlib version 1.2.3.1 in 2006. MySQL bundles zlib 1.2.3 - from 2005, but some installations use a more recent zlib. - -2009-11-30 The InnoDB Team - - * dict/dict0crea.c, dict/dict0mem.c, dict/dict0load.c, - dict/dict0boot.c, fil/fil0fil.c, handler/ha_innodb.cc, - include/dict0mem.h, row/row0mysql.c: - Fix the bogus warning messages for non-existing temporary - tables that were reported in - Bug#41609 Crash recovery does not work for InnoDB temporary tables. - The actual crash recovery bug was corrected on 2009-04-29. - -2009-11-27 The InnoDB Team - - InnoDB Plugin 1.0.6 released - -2009-11-20 The InnoDB Team - - * handler/ha_innodb.cc: - Add a workaround to prevent a crash due to Bug#45961 DDL on - partitioned innodb tables leaves data dictionary in an inconsistent - state - -2009-11-19 The InnoDB Team - - * btr/btr0btr.c: - Fix Bug#48469 when innodb tablespace is configured too small, crash - and corruption! - -2009-11-19 The InnoDB Team - - * data/data0type.c: - Fix Bug#48526 Data type for float and double is incorrectly reported - in InnoDB table monitor - -2009-11-19 The InnoDB Team - - * CMakeLists.txt: - Fix Bug#48317 cannot build innodb as static library - -2009-11-18 The InnoDB Team - - * handler/handler0alter.cc: - Fix Bug#48782 On lock wait timeout, CREATE INDEX (creating primary key) - attempts DROP TABLE - -2009-11-17 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb.result, - mysql-test/innodb.test, mysql-test/innodb_bug44369.result, - mysql-test/innodb_bug44369.test, mysql-test/patches/innodb-index.diff, - row/row0mysql.c: - Report duplicate table names to the client connection, not to the - error log. - -2009-11-12 The InnoDB Team - - * handler/ha_innodb.cc, include/db0err.h, row/row0merge.c, - row/row0mysql.c: - Allow CREATE INDEX to be interrupted. - Also, when CHECK TABLE is interrupted, report ER_QUERY_INTERRUPTED. - -2009-11-11 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug47167.result, - mysql-test/innodb_bug47167.test, mysql-test/innodb_file_format.result: - Fix Bug#47167 "set global innodb_file_format_check" cannot set value - by User-Defined Variable - -2009-11-11 The InnoDB Team - - * include/os0file.h, os/os0file.c: - Fix Bug#3139 Mysql crashes: 'windows error 995' after several selects - on a large DB - -2009-11-04 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#32430 'show innodb status' causes errors - Invalid (old?) table or database name in logs - -2009-11-02 The InnoDB Team - - * btr/btr0sea.c, buf/buf0buf.c, dict/dict0dict.c, fil/fil0fil.c, - ibuf/ibuf0ibuf.c, include/btr0sea.h, include/dict0dict.h, - include/fil0fil.h, include/ibuf0ibuf.h, include/lock0lock.h, - include/log0log.h, include/log0recv.h, include/mem0mem.h, - include/mem0pool.h, include/os0file.h, include/pars0pars.h, - include/srv0srv.h, include/thr0loc.h, include/trx0i_s.h, - include/trx0purge.h, include/trx0rseg.h, include/trx0sys.h, - include/trx0undo.h, include/usr0sess.h, lock/lock0lock.c, - log/log0log.c, log/log0recv.c, mem/mem0dbg.c, mem/mem0pool.c, - os/os0file.c, os/os0sync.c, os/os0thread.c, pars/lexyy.c, - pars/pars0lex.l, que/que0que.c, srv/srv0srv.c, srv/srv0start.c, - sync/sync0arr.c, sync/sync0sync.c, thr/thr0loc.c, trx/trx0i_s.c, - trx/trx0purge.c, trx/trx0rseg.c, trx/trx0sys.c, trx/trx0undo.c, - usr/usr0sess.c, ut/ut0mem.c: - Fix Bug#45992 innodb memory not freed after shutdown - Fix Bug#46656 InnoDB plugin: memory leaks (Valgrind) - -2009-10-29 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#47125 auto_increment start value is ignored if an index is - created and engine=innodb - -2009-10-29 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug47777.result, - mysql-test/innodb_bug47777.test: - Fix Bug#47777 innodb dies with spatial pk: Failing assertion: buf <= - original_buf + buf_len - -2009-10-29 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#38996 Race condition in ANALYZE TABLE - -2009-10-29 The InnoDB Team - - * handler/ha_innodb.cc: - Fix bug#42383: Can't create table 'test.bug39438' - -2009-10-29 The InnoDB Team - - * os/os0proc.c: - Fix Bug#48237 Error handling in os_mem_alloc_large appears to - be incorrect - -2009-10-29 The InnoDB Team - - * buf/buf0buf.c, buf/buf0lru.c, include/buf0buf.h, include/buf0buf.ic: - Fix corruption of the buf_pool->LRU_old list and improve debug - assertions. - -2009-10-28 The InnoDB Team - - * srv/srv0start.c: - Fix Bug#41490 After enlargement of InnoDB page size, the error message - become inaccurate - -2009-10-26 The InnoDB Team - - * row/row0ins.c: - When allocating a data tuple, zero out the system fields in order - to avoid Valgrind warnings about uninitialized fields in - dtuple_validate(). - -2009-10-22 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-zip.result, - mysql-test/innodb-zip.test, mysql-test/innodb_bug44369.result, - mysql-test/innodb_bug44369.test: - Fix Bug#47233 Innodb calls push_warning(MYSQL_ERROR::WARN_LEVEL_ERROR) - -2009-10-19 The InnoDB Team - - * mysql-test/innodb_information_schema.test: - Fix Bug#47808 innodb_information_schema.test fails when run under - valgrind - -2009-10-15 The InnoDB Team - - * include/page0page.ic: - Fix Bug#47058 Failure to compile innodb_plugin on solaris 10u7 + spro - cc/CC 5.10 - -2009-10-13 The InnoDB Team - - * buf/buf0flu.c: - Call fsync() on datafiles after a batch of pages is written to disk - even when skip_innodb_doublewrite is set. - -2009-10-05 The InnoDB Team - - * buf/buf0buf.c: - Do not invalidate buffer pool while an LRU batch is active. Added code - to buf_pool_invalidate() to wait for the running batches to finish. - -2009-10-01 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#47763 typo in error message: Failed to open table %s after %lu - attemtps. - -2009-10-01 The InnoDB Team - - * fsp/fsp0fsp.c, row/row0merge.c: - Clean up after a crash during DROP INDEX. When InnoDB crashes - while dropping an index, ensure that the index will be completely - dropped during crash recovery. The MySQL .frm file may still - contain the dropped index, but there is little that we can do - about it. - -2009-09-28 The InnoDB Team - - * handler/ha_innodb.cc: - When a secondary index exists in the MySQL .frm file but not in - the InnoDB data dictionary, return an error instead of letting an - assertion fail in index_read. - -2009-09-28 The InnoDB Team - - * btr/btr0btr.c, buf/buf0buf.c, include/page0page.h, - include/page0zip.h, page/page0cur.c, page/page0page.c, - page/page0zip.c: - Do not write to PAGE_INDEX_ID when restoring an uncompressed page - after a compression failure. The field should only be written - when creating a B-tree page. This fix addresses a race condition - in a debug assertion. - -2009-09-28 The InnoDB Team - - * fil/fil0fil.c: - Try to prevent the reuse of tablespace identifiers after InnoDB - has crashed during table creation. Also, refuse to start if files - with duplicate tablespace identifiers are encountered. - -2009-09-25 The InnoDB Team - - * include/os0file.h, os/os0file.c: - Fix Bug#47055 unconditional exit(1) on ERROR_WORKING_SET_QUOTA - 1453 (0x5AD) for InnoDB backend - -2009-09-19 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-consistent-master.opt, - mysql-test/innodb-consistent.result, - mysql-test/innodb-consistent.test: - Fix Bug#37232 Innodb might get too many read locks for DML with - repeatable-read - -2009-09-19 The InnoDB Team - - * fsp/fsp0fsp.c: - Fix Bug#31183 Tablespace full problems not reported in error log, - error message unclear - -2009-09-17 The InnoDB Team - - * mysql-test/innodb-zip.result, mysql-test/innodb-zip.test: - Make the test pass with zlib 1.2.3.3. Apparently, the definition - of compressBound() has changed between zlib versions, and the - maximum record size of a table with 1K compressed page size has - been reduced by one byte. This is an arbitrary test. In practical - applications, for good write performance, the compressed page size - should be chosen to be bigger than the absolute minimum. - -2009-09-16 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#46256 drop table with unknown collation crashes innodb - -2009-09-16 The InnoDB Team - - * dict/dict0dict.c, handler/ha_innodb.cc, - mysql-test/innodb_bug44369.result, mysql-test/innodb_bug44369.test, - row/row0mysql.c: - Fix Bug#44369 InnoDB: Does not uniformly disallow disallowed column - names - -2009-09-16 The InnoDB Team - - * handler/ha_innodb.cc, include/db0err.h, - mysql-test/innodb_bug46000.result, mysql-test/innodb_bug46000.test: - Fix Bug#46000 using index called GEN_CLUST_INDEX crashes server - -2009-09-02 The InnoDB Team - - * include/lock0lock.h, include/row0mysql.h, lock/lock0lock.c, - row/row0mysql.c: - Fix a regression introduced by the fix for MySQL bug#26316. We check - whether a transaction holds any AUTOINC locks before we acquire - the kernel mutex and release those locks. - -2009-08-27 The InnoDB Team - - * dict/dict0dict.c, include/dict0dict.h, - mysql-test/innodb_bug44571.result, mysql-test/innodb_bug44571.test: - Fix Bug#44571 InnoDB Plugin crashes on ADD INDEX - -2009-08-27 The InnoDB Team - - * row/row0merge.c: - Fix a bug in the merge sort that can corrupt indexes in fast index - creation. Add some consistency checks. Check that the number of - records remains constant in every merge sort pass. - -2009-08-27 The InnoDB Team - - * buf/buf0buf.c, buf/buf0lru.c, buf/buf0rea.c, handler/ha_innodb.cc, - include/buf0buf.h, include/buf0buf.ic, include/buf0lru.h, - include/ut0ut.h, ut/ut0ut.c: - Make it possible to tune the buffer pool LRU eviction policy to be - more resistant against index scans. Introduce the settable global - variables innodb_old_blocks_pct and innodb_old_blocks_time for - controlling the buffer pool eviction policy. The parameter - innodb_old_blocks_pct (5..95) controls the desired amount of "old" - blocks in the LRU list. The default is 37, corresponding to the - old fixed ratio of 3/8. Each time a block is accessed, it will be - moved to the "new" blocks if its first access was at least - innodb_old_blocks_time milliseconds ago (default 0, meaning every - block). The idea is that in index scans, blocks will be accessed - a few times within innodb_old_blocks_time, and they will remain in - the "old" section of the LRU list. Thus, when innodb_old_blocks_time - is nonzero, blocks retrieved for one-time index scans will be more - likely candidates for eviction than blocks that are accessed in - random patterns. - -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 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 - (Valgrind) - -2009-08-11 The InnoDB Team - - InnoDB Plugin 1.0.4 released - -2009-07-20 The InnoDB Team - - * buf/buf0rea.c, handler/ha_innodb.cc, include/srv0srv.h, - srv/srv0srv.c: - Change the read ahead parameter name to innodb_read_ahead_threshold. - Change the meaning of this parameter to signify the number of pages - that must be sequentially accessed for InnoDB to trigger a readahead - request. - -2009-07-20 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#39802 On Windows, 32-bit time_t should be enforced - -2009-07-16 The InnoDB Team - - * include/univ.i: - Support inlining of functions and prefetch with Sun Studio. - These changes are based on contribution from Sun Microsystems Inc. - under a BSD license. - -2009-07-14 The InnoDB Team - - * fil/fil0fil.c: - Fix Bug#45814 URL reference in InnoDB server errors needs adjusting to - match documentation - -2009-07-14 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug21704.result, - mysql-test/innodb_bug21704.test: - Fix Bug#21704 Renaming column does not update FK definition - -2009-07-10 The InnoDB Team - - * handler/ha_innodb.cc, srv/srv0srv.c: - Change the defaults for - innodb_sync_spin_loops: 20 -> 30 - innodb_spin_wait_delay: 5 -> 6 - -2009-07-08 The InnoDB Team - - * buf/buf0flu.c, handler/ha_innodb.cc, include/buf0flu.h, - include/log0log.h, include/log0log.ic, include/srv0srv.h, - srv/srv0srv.c: - Implement the adaptive flushing of dirty pages, which uses - a heuristics based flushing rate of dirty pages to avoid IO - bursts at checkpoint. Expose new configure knob - innodb_adaptive_flushing to control whether the new flushing - algorithm should be used. - -2009-07-07 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, log/log0log.c, - srv/srv0srv.c: - Implement IO capacity tuning. Expose new configure knob - innodb_io_capacity to control the master threads IO rate. The - ibuf merge is also changed from synchronous to asynchronous. - These changes are based on contribution from Google Inc. - under a BSD license. - -2009-07-02 The InnoDB Team - - * include/ut0ut.h, plug.in, ut/ut0ut.c: - Use the PAUSE instruction inside the spinloop if it is available, - Thanks to Mikael Ronstrom . - -2009-06-29 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_file_format.test, - mysql-test/innodb_file_format.result: - Do not crash on SET GLOBAL innodb_file_format=DEFAULT - or SET GLOBAL innodb_file_format_check=DEFAULT. - -2009-06-29 The InnoDB Team - - * buf/buf0buf.c, buf/buf0rea.c, lock/lock0lock.c: - Tolerate missing tablespaces during crash recovery and when - printing information on locks. - -2009-06-29 The InnoDB Team - - * buf/buf0buf.c: - Fix a race condition when reading buf_fix_count. - Currently, it is not being protected by the buffer pool mutex, - but by the block mutex. - -2009-06-29 The InnoDB Team - - * handler/handler0alter.cc: - Start the user transaction prebuilt->trx if it was not started - before adding or dropping an index. Without this fix, the - table could be locked outside an active transaction. - -2009-06-25 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug42101.test, - mysql-test/innodb_bug42101.result, - mysql-test/innodb_bug42101-nonzero.test, - mysql-test/innodb_bug42101-nonzero.result: - Fix Bug#45749 Race condition in SET GLOBAL - innodb_commit_concurrency=DEFAULT - -2009-06-25 The InnoDB Team - - * dict/dict0dict.c: - When an index column cannot be found in the table during index - creation, display additional diagnostic before an assertion failure. - This does NOT fix Bug#44571 InnoDB Plugin crashes on ADD INDEX, - but it helps understand the reason of the crash. - -2009-06-17 The InnoDB Team - - * row/row0merge.c: - Fix Bug#45426 UNIV_DEBUG build cause assertion error at CREATE INDEX - -2009-06-17 The InnoDB Team - - * mysql-test/innodb_bug45357.result, mysql-test/innodb_bug45357.test, - row/row0mysql.c: - Fix Bug#45357 5.1.35 crashes with Failing assertion: index->type & - DICT_CLUSTERED - -2009-06-17 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value - from the index (PRIMARY) - -2009-06-11 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb.result, srv/srv0srv.c: - Change the following defaults: - max_dirty_pages_pct: from 90 to 75, max allowed from 100 to 99 - additional_mem_pool_size: from 1 to 8 MB - buffer_pool_size: from 8 to 128 MB - log_buffer_size: from 1 to 8 MB - read_io_threads/write_io_threads: from 1 to 4 - -2009-06-09 The InnoDB Team - - * handler/ha_innodb.cc, include/trx0trx.h, trx/trx0trx.c: - Enable Group Commit functionality that was broken in 5.0 when - distributed transactions were introduced. - -2009-06-05 The InnoDB Team - - * handler/ha_innodb.cc, include/os0file.h, include/srv0srv.h, - os/os0file.c, srv/srv0srv.c, srv/srv0start.c: - Enable functionality to have multiple background IO helper threads. - Expose new configure knobs innodb_read_io_threads and - innodb_write_io_threads and deprecate innodb_file_io_threads (this - parameter was relevant only on windows). Internally this allows - multiple segments for read and write IO request arrays where one - thread works on one segment. - -2009-06-05 The InnoDB Team - - * buf/buf0lru.c, buf/buf0rea.c, handler/ha_innodb.cc, - include/srv0srv.h, srv/srv0srv.c: - Fix a bug in linear read ahead: - 1) Take into account access pattern when deciding whether or not to - do linear read ahead. - 2) Expose a knob innodb_read_ahead_factor = [0-64] default (8), - dynamic, global to control linear read ahead behavior. This is the - value of the number of pages that InnoDB will tolerate within a - 64 page extent even if they are accessed out of order or have - not been accessed at all. This number (which varies from 0 to 64) - is indicative of the slack that we have when deciding about linear - readahead. - 3) Disable random read ahead. Keep the code for now. - -2009-06-03 The InnoDB Team - - * dict/dict0dict.c, mysql-test/t/innodb_mysql.test, - mysql-test/r/innodb_mysql.result: - Fix Bug#39793 Foreign keys not constructed when column - has a '#' in a comment or default value - -2009-05-27 The InnoDB Team - - * Doxyfile: - Allow the extraction of documentation from the code base with the - Doxygen tool. Convert and add many (but not yet all) comments to - Doxygen format. - -2009-05-19 The InnoDB Team - - * btr/btr0btr.c, btr/btr0cur.c, lock/lock0lock.c, - include/page0page.ic, include/lock0lock.h, include/dict0dict.h, - include/page0page.h, include/dict0dict.ic, ibuf/ibuf0ibuf.c, - page/page0zip.c, page/page0page.c: - Write updates of PAGE_MAX_TRX_ID to the redo log and add debug - assertions for checking that PAGE_MAX_TRX_ID is valid on leaf - pages of secondary indexes and the insert buffer B-tree. This bug - could cause failures in secondary index lookups in consistent - reads right after crash recovery. - -2009-05-18 The InnoDB Team - - * btr/btr0cur.c: - Correctly estimate the space needed on the compressed page when - performing an update by delete-and-insert. - -2009-05-14 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, - mysql-test/innodb_bug42101-nonzero-master.opt, - mysql-test/innodb_bug42101-nonzero.result, - mysql-test/innodb_bug42101-nonzero.test, - mysql-test/innodb_bug42101.result, mysql-test/innodb_bug42101.test, - srv/srv0srv.c: - Fix Bug#42101 Race condition in innodb_commit_concurrency - -2009-05-13 The InnoDB Team - - * dict/dict0dict.c: - Fix Bug#44320 InnoDB: missing DB_ROLL_PTR in Table Monitor COLUMNS - output - -2009-04-29 The InnoDB Team - - * fil/fil0fil.c, include/fil0fil.h, include/mtr0mtr.h, - log/log0recv.c: - Fix Bug#41609 Crash recovery does not work for InnoDB temporary tables - -2009-04-23 The InnoDB Team - - * row/row0mysql.c: - When scanning indexes, report in the error log any error codes - returned by the search function. These error codes will still be - ignored in CHECK TABLE. - -2009-04-23 The InnoDB Team - - * include/trx0types.h: - Define the logical type names trx_id_t, roll_ptr_t, and undo_no_t - and use them in place of dulint everywhere. - -2009-04-18 The InnoDB Team - - * handler/ha_innodb.cc, include/pars0pars.h: - Fix Bug#29125 Windows Server X64: so many compiler warnings - -2009-04-16 The InnoDB Team - - * include/univ.i: - Define REFMAN as the base URL of the MySQL Reference Manual and - use the macro in all diagnostic output. - -2009-04-16 The InnoDB Team - - * CMakeLists.txt, include/os0sync.h, include/sync0sync.h, - include/sync0sync.ic, include/univ.i, srv/srv0start.c, - sync/sync0sync.c: - Use the Windows Interlocked functions for atomic memory - access. - -2009-04-15 The InnoDB Team - - * mysql-test/innodb.result, mysql-test/innodb.test: - Fix Bug#43309 Test main.innodb can't be run twice - -2009-04-14 The InnoDB Team - - * CMakeLists.txt, handler/win_delay_loader.cc, - win-plugin/win-plugin.diff: - Remove statically linked libraries from MySQL (zlib and strings). - -2009-04-11 The InnoDB Team - - * CMakeLists.txt, win-plugin/README, win-plugin/win-plugin.diff: - Rewrite CMakeLists.txt. - -2009-04-07 The InnoDB Team - - * include/os0sync.h, include/sync0rw.ic, include/sync0sync.h, - include/sync0sync.ic, include/univ.i, plug.in, srv/srv0srv.c, - srv/srv0start.c, sync/sync0arr.c, sync/sync0sync.c: - Enable atomics on Solaris (using the libc functions as defined in - atomic.h) if GCC atomic builtins are not present. - -2009-04-07 The InnoDB Team - - * btr/btr0btr.c, dict/dict0dict.c, ibuf/ibuf0ibuf.c, - include/data0data.h, include/data0data.ic, include/data0type.h, - include/data0type.ic, include/dict0dict.h, include/dict0dict.ic, - include/rem0rec.ic, mysql-test/innodb.result, mysql-test/innodb.test, - pars/pars0pars.c, rem/rem0rec.c, row/row0upd.c: - Fix Bug#44032 In ROW_FORMAT=REDUNDANT, update UTF-8 CHAR - to/from NULL is not in-place - -2009-04-07 The InnoDB Team - - * page/page0cur.c: - Fix Bug#43660 SHOW INDEXES/ANALYZE does NOT update cardinality for - indexes of InnoDB table - -2009-04-06 The InnoDB Team - - * handler/ha_innodb.cc: - Make the parameter innodb_change_buffering settable by the - configuration file or mysqld command line options. Before this - fix, the initial value specified for this parameter was ignored. - -2009-04-06 The InnoDB Team - - * sync/sync0rw.c: - Avoid a bogus failure in UNIV_SYNC_DEBUG diagnostics. - -2009-04-02 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, srv/srv0srv.c: - Add new parameter innodb_spin_wait_delay to set the maximum delay - between polling for a spin lock. - -2009-04-02 The InnoDB Team - - * dict/dict0crea.c, handler/ha_innodb.cc, handler/ha_innodb.h, - include/dict0mem.h, include/row0merge.h, include/row0mysql.h, - mysql-test/innodb-index.result, mysql-test/innodb-index.test, - row/row0merge.c, row/row0sel.c: - In consistent reads, refuse to use newly created indexes that may - lack history. - -2009-03-25 The InnoDB Team - - * buf/buf0buf.c, handler/ha_innodb.cc, include/buf0buf.h: - In SHOW ENGINE INNODB MUTEX do not show the status of block->mutex, - block->lock, block->lock->mutex (if applicable) and all mutexes and - rw-locks for which number of os-waits are zero because this can - be overwhelming particularly when the buffer pool is very large. - -2009-03-20 The InnoDB Team - - * buf/buf0buf.c, include/log0recv.h, log/log0recv.c: - Remove the compile-time constant parameters of - recv_recover_page(), recv_scan_log_recs(), and recv_sys_init(). - -2009-03-20 The InnoDB Team - - * data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h: - Declare innobase_get_at_most_n_mbchars() in ha_prototypes.h. - -2009-03-20 The InnoDB Team - - * fil/fil0fil.h, fil/fil0fil.c, srv/srv0start.c: - Add the parameter hash_size to fil_init(). - -2009-03-20 The InnoDB Team - - * fil/fil0fil.c: - Refer to fil_system directly, not via local variables. - -2009-03-20 The InnoDB Team - - * page/page0page.c: - In page_validate(), always report the space id, page number and - the name of the index when corruption is noticed. - -2009-03-20 The InnoDB Team - - * include/log0log.h, include/log0log.ic, log/log0log.c: - Add in/out comments or const qualifiers to some function - parameters as appropriate. - -2009-03-20 The InnoDB Team - - * dict/dict0boot.c, dict/dict0dict.c, fsp/fsp0fsp.c, - include/dict0dict.h, include/srv0srv.h, srv/srv0srv.c, - page/page0page.c: - Replace srv_sys->dummy_ind1 and srv_sys->dummy_ind2 with - dict_ind_redundant and dict_ind_compact, which are - initialized by dict_init(). - -2009-03-11 The InnoDB Team - - InnoDB Plugin 1.0.3 released - -2009-03-05 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#43203 Overflow from auto incrementing causes server segv - -2009-02-25 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#42714 AUTO_INCREMENT errors in 5.1.31 - -2009-02-23 The InnoDB Team - - * btr/btr0cur.c: - Fix Bug#43043 Crash on BLOB delete operation - -2009-02-20 The InnoDB Team - - * handler/ha_innodb.cc: - Make innodb_use_sys_malloc=ON the default. - -2009-02-20 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#42400 InnoDB autoinc code can't handle floating-point columns - -2009-02-18 The InnoDB Team - - * include/ut0mem.h, os/os0proc.c, ut/ut0mem.c: - Protect ut_total_allocated_memory with ut_list_mutex in - os_mem_alloc_large() and os_mem_free_large(). The lack of this mutex - protection could cause an assertion failure during fast index - creation. Also, add UNIV_MEM_ALLOC and UNIV_MEM_FREE instrumentation - to os_mem_alloc_large() and os_mem_free_large(), so that Valgrind can - detect more errors. - -2009-02-11 The InnoDB Team - - * handler/ha_innodb.cc: - Make innodb_thread_concurrency=0 the default. The old default value - was 8. A non-zero setting may be useful when InnoDB is showing severe - scalability problems under multiple concurrent connections. - -2009-02-10 The InnoDB Team - - * handler/ha_innodb.cc, handler/ha_innodb.h: - Fix Bug#41676 Table names are case insensitive in locking - -2009-02-10 The InnoDB Team - - * mem/mem0dbg.c, mem/mem0mem.c, mem/mem0pool.c: - When innodb_use_sys_malloc is set, ignore - innodb_additional_mem_pool_size, because nothing will be allocated - from mem_comm_pool. - -2009-02-10 The InnoDB Team - - * ut/ut0mem.c: - Map ut_malloc_low(), ut_realloc(), and ut_free() directly to malloc(), - realloc(), and free() when innodb_use_sys_malloc is set. As a side - effect, ut_total_allocated_memory ("Total memory allocated" in the - "BUFFER POOL AND MEMORY" section of SHOW ENGINE INNODB STATUS) will - exclude any memory allocated by these functions when - innodb_use_sys_malloc is set. - -2009-02-10 The InnoDB Team - - * btr/btr0cur.c, btr/btr0sea.c, buf/buf0buf.c, handler/ha_innodb.cc, - include/buf0buf.ic, include/os0sync.h, include/srv0srv.h, - include/sync0rw.h, include/sync0rw.ic, include/sync0sync.h, - include/sync0sync.ic, include/univ.i, row/row0sel.c, srv/srv0srv.c, - srv/srv0start.c, sync/sync0arr.c, sync/sync0rw.c, sync/sync0sync.c: - On those platforms that support it, implement the synchronization - primitives of InnoDB mutexes and read/write locks with GCC atomic - builtins instead of Pthreads mutexes and InnoDB mutexes. These changes - are based on a patch supplied by Mark Callaghan of Google under a BSD - license. - -2009-01-30 The InnoDB Team - - * btr/btr0cur.c, btr/btr0sea.c, buf/buf0buf.c, handler/ha_innodb.cc, - include/btr0sea.h, include/buf0buf.h, include/sync0sync.h, - sync/sync0sync.c: - Make the configuration parameter innodb_adaptive_hash_index dynamic, - so that it can be changed at runtime. - -2009-01-29 The InnoDB Team - - * handler/ha_innodb.cc, ibuf/ibuf0ibuf.c, include/ibuf0ibuf.h, - include/ibuf0ibuf.ic: - Implement the settable global variable innodb_change_buffering, - with the allowed values 'none' and 'inserts'. The default value - 'inserts' enables the buffering of inserts to non-unique secondary - index trees when the B-tree leaf page is not in the buffer pool. - -2009-01-27 The InnoDB Team - - * buf/buf0lru.c: - Fix a race condition in buf_LRU_invalidate_tablespace(): The - compressed page size (zip_size) was read while the block descriptor - was no longer protected by a mutex. This could lead to corruption - when a table is dropped on a busy system that contains compressed - tables. - -2009-01-26 The InnoDB Team - - * btr/btr0sea.c, buf/buf0buf.c, include/buf0buf.h, include/buf0buf.ic, - include/mtr0log.ic, include/row0upd.ic, mtr/mtr0mtr.c: - Implement buf_block_align() with pointer arithmetics, as it is in the - built-in InnoDB distributed with MySQL. Do not acquire the buffer pool - mutex before buf_block_align(). This removes a scalability bottleneck - in the adaptive hash index lookup. In CHECK TABLE, check that - buf_pool->page_hash is consistent with buf_block_align(). - -2009-01-23 The InnoDB Team - - * btr/btr0sea.c: - Fix Bug#42279 Race condition in btr_search_drop_page_hash_when_freed() - -2009-01-23 The InnoDB Team - - * buf/buf0buf.c, include/buf0buf.h: - Remove the unused mode BUF_GET_NOWAIT of buf_page_get_gen() - -2009-01-20 The InnoDB Team - - * include/rem0rec.h, include/rem0rec.ic: - Fix Bug#41571 MySQL segfaults after innodb recovery - -2009-01-20 The InnoDB Team - - * lock/lock0lock.c: - Fix Bug#42152 Race condition in lock_is_table_exclusive() - -2009-01-14 The InnoDB Team - - * include/trx0roll.h, trx/trx0roll.c, trx/trx0trx.c: - Fix Bug#38187 Error 153 when creating savepoints - -2009-01-14 The InnoDB Team - - * dict/dict0load.c: - Fix Bug#42075 dict_load_indexes failure in dict_load_table will - corrupt the dictionary cache - -2009-01-13 The InnoDB Team - - * buf/buf0buddy.c, dict/dict0dict.c, dict/dict0mem.c, fil/fil0fil.c, - ha/ha0storage.c, handler/ha_innodb.cc, handler/win_delay_loader.cc, - include/buf0buf.ic, include/dict0dict.ic, include/hash0hash.h, - thr/thr0loc.c, trx/trx0i_s.c: - Add the parameter ASSERTION to HASH_SEARCH() macro, and use it for - light validation of the traversed items in hash table lookups when - UNIV_DEBUG is enabled. - -2009-01-09 The InnoDB Team - - * buf/buf0flu.c, include/buf0flu.h, include/buf0flu.ic: - Remove unused code from the functions - buf_flush_insert_into_flush_list() and - buf_flush_insert_sorted_into_flush_list(). - -2009-01-09 The InnoDB Team - - * buf/buf0flu.c: - Simplify the functions buf_flush_try_page() and buf_flush_batch(). Add - debug assertions and an explanation to buf_flush_write_block_low(). - -2009-01-07 The InnoDB Team - - * row/row0merge.c: - Fix a bug in recovery when dropping temporary indexes. - -2009-01-07 The InnoDB Team - - * handler/ha_innodb.cc, handler/ha_innodb.h, handler/handler0alter.cc: - Fix Bug#41680 calls to trx_allocate_for_mysql are not consistent - -2009-01-07 The InnoDB Team - - * mysql-test/innodb_bug41904.result, mysql-test/innodb_bug41904.test, - row/row0merge.c: - Fix Bug#41904 create unique index problem - -2009-01-02 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, mem/mem0pool.c, - mysql-test/innodb-use-sys-malloc-master.opt, - mysql-test/innodb-use-sys-malloc.result, - mysql-test/innodb-use-sys-malloc.test, srv/srv0srv.c, srv/srv0start.c: - Implement the configuration parameter innodb_use_sys_malloc (false by - default), for disabling InnoDB's internal memory allocator and using - system malloc/free instead. The "BUFFER POOL AND MEMORY" section of - SHOW ENGINE INNODB STATUS will report "in additional pool allocated - allocated 0" when innodb_use_sys_malloc is set. - -2008-12-30 The InnoDB Team - - * btr/btr0btr.c: - When setting the PAGE_LEVEL of a compressed B-tree page from or to 0, - compress the page at the same time. This is necessary, because the - column information stored on the compressed page will differ between - leaf and non-leaf pages. Leaf pages are identified by PAGE_LEVEL=0. - This bug can make InnoDB crash when all rows of a compressed table are - deleted. - -2008-12-17 The InnoDB Team - - * include/row0sel.h, include/row0upd.h, pars/pars0pars.c, - row/row0mysql.c, row/row0sel.c, row/row0upd.c: - Remove update-in-place select from the internal SQL interpreter. It - was only used for updating the InnoDB internal data dictionary when - renaming or dropping tables. It could have caused deadlocks when - acquiring latches on insert buffer bitmap pages. - -2008-12-17 The InnoDB Team - - * btr/btr0sea.c, buf/buf0buf.c, buf/buf0lru.c, ha/ha0ha.c, - ha/hash0hash.c, include/buf0buf.h, include/ha0ha.h, include/ha0ha.ic, - include/hash0hash.h, include/univ.i: - Introduce the preprocessor symbol UNIV_AHI_DEBUG for enabling adaptive - hash index debugging independently of UNIV_DEBUG. - -2008-12-16 The InnoDB Team - - * btr/btr0cur.c: - Do not update the free bits in the insert buffer bitmap when inserting - or deleting from the insert buffer B-tree. Assert that records in the - insert buffer B-tree are never updated. - -2008-12-12 The InnoDB Team - - * buf/buf0buf.c, fil/fil0fil.c, fsp/fsp0fsp.c, ibuf/ibuf0ibuf.c, - include/fil0fil.h, include/ibuf0ibuf.h, include/ibuf0ibuf.ic, - include/ibuf0types.h: - Clean up the insert buffer subsystem so that only one insert - buffer B-tree exists. - Originally, there were provisions in InnoDB for multiple insert - buffer B-trees, apparently one for each tablespace. - When Heikki Tuuri implemented multiple InnoDB tablespaces in - MySQL/InnoDB 4.1, he made the insert buffer live only in the - system tablespace (space 0) but left the provisions in the code. - -2008-12-11 The InnoDB Team - - * include/srv0srv.h, os/os0proc.c, srv/srv0srv.c: - Fix the issue that the InnoDB plugin fails if innodb_buffer_pool_size - is defined bigger than 4096M on 64-bit Windows. This bug should not - have affected other 64-bit systems. - -2008-12-09 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#40386 Not flushing query cache after truncate. - -2008-12-09 The InnoDB Team - - * handler/ha_innodb.cc, srv/srv0srv.c, trx/trx0trx.c: - Fix Bug#40760 "set global innodb_thread_concurrency = 0;" is not safe - -2008-12-04 The InnoDB Team - - * handler/ha_innodb.cc, handler/mysql_addons.cc, - include/mysql_addons.h, trx/trx0i_s.c, win-plugin/win-plugin.diff: - Remove dependencies to MySQL internals (defining MYSQL_SERVER). - -2008-12-02 The InnoDB Team - - * page/page0cur.c: - When allocating space for a record from the free list of previously - purged records, zero out the DB_TRX_ID and DB_ROLL_PTR of the purged - record if the new record would not overwrite these fields. This fixes - a harmless content mismatch reported by page_zip_validate(). - -2008-12-02 The InnoDB Team - - * row/row0merge.c: - Replace the WHILE 1 with WHILE 1=1 in the SQL procedure, so that the - loop will actually be entered and temporary indexes be dropped during - crash recovery. - -2008-12-01 The InnoDB Team - - InnoDB Plugin 1.0.2 released - -2008-10-31 The InnoDB Team - - * dict/dict0mem.c, include/dict0mem.h, include/lock0lock.h, - include/row0mysql.h, include/trx0trx.h, include/univ.i, - include/ut0vec.h, include/ut0vec.ic, lock/lock0lock.c, - row/row0mysql.c, trx/trx0trx.c: - Fix Bug#26316 Triggers create duplicate entries on auto-increment - columns - -2008-10-30 The InnoDB Team - - * handler/ha_innodb.cc, handler/handler0vars.h, - handler/win_delay_loader.cc, mysql-test/innodb_bug40360.result, - mysql-test/innodb_bug40360.test: - Fix Bug#40360 Binlog related errors with binlog off - -2008-10-29 The InnoDB Team - - * include/data0type.ic: - Fix Bug#40369 dtype_get_sql_null_size() returns 0 or 1, not the size - -2008-10-29 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, srv/srv0srv.c: - Fix Bug#38189 innodb_stats_on_metadata missing - -2008-10-28 The InnoDB Team - - * CMakeLists.txt, ha_innodb.def, handler/ha_innodb.cc, - handler/handler0alter.cc, handler/handler0vars.h, handler/i_s.cc, - handler/win_delay_loader.cc, win-plugin/*: - Implemented the delayloading of externals for the plugin on Windows. - This makes it possible to build a dynamic plugin (ha_innodb.dll) on - Windows. - -2008-10-27 The InnoDB Team - - * CMakeLists.txt: - Fix Bug#19424 InnoDB: Possibly a memory overrun of the buffer being - freed (64-bit Visual C) - -2008-10-23 The InnoDB Team - - * ibuf/ibuf0ibuf.c: - ibuf_delete_rec(): When the cursor to the insert buffer record - cannot be restored, do not complain if the tablespace does not - exist, because the insert buffer record may have been discarded by - some other thread. This bug has existed in MySQL/InnoDB since - version 4.1, when innodb_file_per_table was implemented. - This may fix Bug#27276 InnoDB Error: ibuf cursor restoration fails. - -2008-10-22 The InnoDB Team - - * dict/dict0dict.c, dict/dict0mem.c, handler/ha_innodb.cc, - handler/ha_innodb.h, include/dict0dict.h, include/dict0mem.h, - row/row0mysql.c: - Fix Bug#39830 Table autoinc value not updated on first insert - Fix Bug#35498 Cannot get table test/table1 auto-inccounter value in - ::info - Fix Bug#36411 "Failed to read auto-increment value from storage - engine" in 5.1.24 auto-inc - -2008-10-22 The InnoDB Team - - * handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c: - Fix Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout - errors - -2008-10-16 The InnoDB Team - - * dict/dict0dict.c, mysql-test/innodb-index.result, - mysql-test/innodb-index.test: - Skip the undo log size check when creating REDUNDANT and COMPACT - tables. In ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED, column - prefix indexes require that prefixes of externally stored columns - be written to the undo log. This may make the undo log record - bigger than the record on the B-tree page. The maximum size of an - undo log record is the page size. That must be checked for, in - dict_index_add_to_cache(). However, this restriction must not - be enforced on REDUNDANT or COMPACT tables. - -2008-10-15 The InnoDB Team - - * btr/btr0cur.c, include/btr0cur.h, row/row0ext.c, row/row0sel.c, - row/row0upd.c: - When the server crashes while freeing an externally stored column - of a compressed table, the BTR_EXTERN_LEN field in the BLOB - pointer will be written as 0. Tolerate this in the functions that - deal with externally stored columns. This fixes problems after - crash recovery, in the rollback of incomplete transactions, and in - the purge of delete-marked records. - -2008-10-15 The InnoDB Team - - * btr/btr0btr.c, include/page0zip.h, page/page0zip.c, include/univ.i: - When a B-tree node of a compressed table is split or merged, the - compression may fail. In this case, the entire compressed page - will be copied and the excess records will be deleted. However, - page_zip_copy(), now renamed to page_zip_copy_recs(), copied too - many fields in the page header, overwriting PAGE_BTR_SEG_LEAF and - PAGE_BTR_SEG_TOP when splitting the B-tree root. This caused - corruption of compressed tables. Furthermore, the lock table and - the adaptive hash index would be corrupted, because we forgot to - update them when invoking page_zip_copy_recs(). - - Introduce the symbol UNIV_ZIP_DEBUG for triggering the copying of - compressed pages more often, for debugging purposes. - -2008-10-10 The InnoDB Team - - * handler/handler0alter.cc, include/row0merge.h, row/row0merge.c, - row/row0mysql.c: - Fix some locking issues, mainly in fast index creation. The - InnoDB data dictionary cache should be latched whenever a - transaction is holding locks on any data dictionary tables. - Otherwise, lock waits or deadlocks could occur. Furthermore, the - data dictionary transaction must be committed (and the locks - released) before the data dictionary latch is released. - - ha_innobase::add_index(): Lock the data dictionary before renaming - or dropping the created indexes, because neither operation will - commit the data dictionary transaction. - - ha_innobase::final_drop_index(): Commit the transactions before - unlocking the data dictionary. - -2008-10-09 The InnoDB Team - - * buf/buf0lru.c: - Fix Bug#39939 DROP TABLE/DISCARD TABLESPACE takes long time in - buf_LRU_invalidate_tablespace() - -2008-10-08 The InnoDB Team - - * dict/dict0crea.c, trx/trx0roll.c, include/row0mysql.h, - row/row0merge.c, row/row0mysql.c: - When dropping a table, hold the data dictionary latch until the - transaction has been committed. The data dictionary latch is - supposed to prevent lock waits and deadlocks in the data - dictionary tables. Due to this bug, DROP TABLE could cause a - deadlock or hang. Note that because of Bug#33650 and Bug#39833, - MySQL may also drop a (temporary) table when executing CREATE INDEX - or ALTER TABLE ... ADD INDEX. - -2008-10-04 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb_bug39438-master.opt, - mysql-test/innodb_bug39438.result, mysql-test/innodb_bug39438.test: - Fix Bug#39438 Testcase for Bug#39436 crashes on 5.1 in - fil_space_get_latch - -2008-10-04 The InnoDB Team - - * include/lock0lock.h, lock/lock0lock.c, - mysql-test/innodb_bug38231.result, mysql-test/innodb_bug38231.test, - row/row0mysql.c: - Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + - LOCK / UNLOCK - -2008-10-04 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#35498 Cannot get table test/table1 auto-inccounter value in - ::info - -2008-10-04 The InnoDB Team - - * handler/ha_innodb.cc, handler/ha_innodb.h: - Fix Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed - tables - -2008-10-04 The InnoDB Team - - * dict/dict0dict.c, handler/ha_innodb.cc, handler/ha_innodb.h, - include/dict0dict.h, include/dict0mem.h, row/row0mysql.c: - Fix Bug#39830 Table autoinc value not updated on first insert - -2008-10-03 The InnoDB Team - - * mysql-test/innodb-index.test, mysql-test/innodb-index.result, - mysql-test/innodb-timeout.test, mysql-test/innodb-timeout.result, - srv/srv0srv.c, include/srv0srv.h, handler/ha_innodb.cc, - include/ha_prototypes.h: - Fix Bug#36285 innodb_lock_wait_timeout is not dynamic, not per session - -2008-09-19 The InnoDB Team - - * os/os0proc.c: - Fix a memory leak on Windows. The memory leak was due to wrong - parameters passed into VirtualFree() call. As the result, the - call fails with Windows error 87. - -2008-09-17 The InnoDB Team - - * mysql-test/innodb.result, mysql-test/innodb-zip.result, - mysql-test/innodb-zip.test, mysql-test/innodb.test, ibuf/ibuf0ibuf.c, - dict/dict0crea.c, dict/dict0load.c, dict/dict0boot.c, - include/dict0dict.h, include/trx0trx.h, dict/dict0dict.c, - trx/trx0trx.c, include/ha_prototypes.h, handler/ha_innodb.cc: - When creating an index in innodb_strict_mode, check that the - maximum record size will never exceed the B-tree page size limit. - For uncompressed tables, there should always be enough space for - two records in an empty B-tree page. For compressed tables, there - should be enough space for storing two node pointer records or one - data record in an empty page in uncompressed format. - The purpose of this check is to guarantee that INSERT or UPDATE - will never fail due to too big record size. - -2008-09-17 The InnoDB Team - - * btr/btr0cur.c, data/data0data.c, include/page0zip.h, - include/page0zip.ic, page/page0zip.c, mysql-test/innodb_bug36172.test: - Prevent infinite B-tree page splits in compressed tables by - ensuring that there will always be enough space for two node - pointer records in an empty B-tree page. Also, require that at - least one data record will fit in an empty compressed page. This - will reduce the maximum size of records in compressed tables. - -2008-09-09 The InnoDB Team - - * mysql-test/innodb.result: - Fix the failing innodb test by merging changes that MySQL made to - that file (r2646.12.1 in MySQL BZR repository) - -2008-09-09 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#38839 auto increment does not work properly with InnoDB after - update - -2008-09-09 The InnoDB Team - - * dict/dict0dict.c, handler/handler0alter.cc, include/dict0dict.h, - mysql-test/innodb-index.result, mysql-test/innodb-index.test: - Fix Bug#38786 InnoDB plugin crashes on drop table/create table with FK - -2008-08-21 The InnoDB Team - - * handler/ha_innodb.cc, include/ha_prototypes.h, row/row0sel.c: - Fix Bug#37885 row_search_for_mysql may gap lock unnecessarily with SQL - comments in query - -2008-08-21 The InnoDB Team - - * handler/ha_innodb.cc: - Fix Bug#38185 ha_innobase::info can hold locks even when called with - HA_STATUS_NO_LOCK - -2008-08-18 The InnoDB Team - - * buf/buf0buf.c, buf/buf0lru.c, include/buf0buf.ic, include/univ.i: - Introduce UNIV_LRU_DEBUG for debugging the LRU buffer pool cache - -2008-08-08 The InnoDB Team - - * buf/buf0lru.c, include/buf0buf.h: - Fix two recovery bugs that could lead to a crash in debug builds with - small buffer size - -2008-08-07 The InnoDB Team - - * btr/btr0cur.c, handler/ha_innodb.cc, include/srv0srv.h, - srv/srv0srv.c: - Add a parameter innodb_stats_sample_pages to allow users to control - the number of index dives when InnoDB estimates the cardinality of - an index (ANALYZE TABLE, SHOW TABLE STATUS etc) - -2008-08-07 The InnoDB Team - - * trx/trx0i_s.c: - Fix a bug that would lead to a crash if a SELECT was issued from the - INFORMATION_SCHEMA tables and there are rolling back transactions at - the same time - -2008-08-06 The InnoDB Team - - * btr/btr0btr.c, btr/btr0cur.c, ibuf/ibuf0ibuf.c, include/btr0cur.h, - include/trx0roll.h, include/trx0types.h, row/row0purge.c, - row/row0uins.c, row/row0umod.c, trx/trx0roll.c: - In the rollback of incomplete transactions after crash recovery, - tolerate clustered index records whose externally stored columns - have not been written. - -2008-07-30 The InnoDB Team - - * trx/trx0trx.c: - Fixes a race in recovery where the recovery thread recovering a - PREPARED trx and the background rollback thread can both try - to free the trx after its status is set to COMMITTED_IN_MEMORY. - -2008-07-29 The InnoDB Team - - * include/trx0rec.h, row/row0purge.c, row/row0vers.c, trx/trx0rec.c: - Fix a BLOB corruption bug - -2008-07-15 The InnoDB Team - - * btr/btr0sea.c, dict/dict0dict.c, include/btr0sea.h: - Fixed a timing hole where a thread dropping an index can free the - in-memory index struct while another thread is still using that - structure to remove entries from adaptive hash index belonging - to one of the pages that belongs to the index being dropped. - -2008-07-04 The InnoDB Team - - * mysql-test/innodb-index.result: - Fix the failing innodb-index test by adjusting the result to a new - MySQL behavior (the change occured in BZR-r2667) - -2008-07-03 The InnoDB Team - - * mysql-test/innodb-zip.result, mysql-test/innodb-zip.test: - Remove the negative test cases that produce warnings - -2008-07-02 The InnoDB Team - - * mysql-test/innodb-replace.result, mysql-test/innodb-index.test: - Disable part of innodb-index test because MySQL changed its behavior - and is not calling ::add_index() anymore when adding primary index on - non-NULL column - -2008-07-01 The InnoDB Team - - * mysql-test/innodb-replace.result, mysql-test/innodb-replace.test: - Fix the failing innodb-replace test by merging changes that MySQL - made to that file (r2659 in MySQL BZR repository) - -2008-07-01 The InnoDB Team - - * lock/lock0lock.c: - Fix Bug#36942 Performance problem in lock_get_n_rec_locks (SHOW INNODB - STATUS) - -2008-07-01 The InnoDB Team - - * ha/ha0ha.c: - Fix Bug#36941 Performance problem in ha_print_info (SHOW INNODB - STATUS) - -2008-07-01 The InnoDB Team - - * handler/ha_innodb.cc, mysql-test/innodb-autoinc.result, - mysql-test/innodb-autoinc.test: - Fix Bug#37531 After truncate, auto_increment behaves incorrectly for - InnoDB - -2008-06-19 The InnoDB Team - - * handler/ha_innodb.cc: - Rewrite the function innodb_plugin_init() to support parameters in - different order (in static and dynamic InnoDB) and to support more - parameters in the static InnoDB - -2008-06-19 The InnoDB Team - - * handler/handler0alter.cc: - Fix a bug in ::add_index() which set the transaction state to "active" - but never restored it to the original value. This bug caused warnings - to be printed by the rpl.rpl_ddl mysql-test. - -2008-06-19 The InnoDB Team - - * mysql-test/patches: - Add a directory which contains patches, which need to be applied to - MySQL source in order to get some mysql-tests to succeed. The patches - cannot be committed in MySQL repository because they are specific to - the InnoDB plugin. - -2008-06-19 The InnoDB Team - - * mysql-test/innodb-zip.result, mysql-test/innodb-zip.test, - row/row0row.c: - Fix an anomaly when updating a record with BLOB prefix - -2008-06-18 The InnoDB Team - - * include/trx0sys.h, srv/srv0start.c, trx/trx0sys.c: - Fix a bug in recovery which was a side effect of the file_format_check - changes - -2008-06-09 The InnoDB Team - - * mysql-test/innodb.result: - Fix the failing innodb test by merging changes that MySQL made to that - file - -2008-06-06 The InnoDB Team - - * buf/buf0buf.c, handler/ha_innodb.cc, include/buf0buf.h, - include/srv0srv.h, srv/srv0srv.c: - Fix Bug#36600 SHOW STATUS takes a lot of CPU in - buf_get_latched_pages_number - - * handler/ha_innodb.cc, os/os0file.c: - Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic - link hack - - * include/ut0ut.h, srv/srv0srv.c, ut/ut0ut.c: - Fix Bug#36819 ut_usectime does not handle errors from gettimeofday - - * handler/ha_innodb.cc: - Fix Bug#35602 Failed to read auto-increment value from storage engine - - * srv/srv0start.c: - Fix Bug#36149 Read buffer overflow in srv0start.c found during "make - test" - -2008-05-08 The InnoDB Team - - * btr/btr0btr.c, mysql-test/innodb_bug36172.result, - mysql-test/innodb_bug36172.test: - Fix Bug#36172 insert into compressed innodb table crashes - -2008-05-08 The InnoDB Team - - InnoDB Plugin 1.0.1 released - -2008-05-06 The InnoDB Team - - * handler/ha_innodb.cc, include/srv0srv.h, include/sync0sync.h, - include/trx0sys.h, mysql-test/innodb-zip.result, - mysql-test/innodb-zip.test, srv/srv0srv.c, srv/srv0start.c, - sync/sync0sync.c, trx/trx0sys.c: - Implement the system tablespace tagging - - * handler/ha_innodb.cc, handler/i_s.cc, include/univ.i, - srv/srv0start.c: - Add InnoDB version in INFORMATION_SCHEMA.PLUGINS.PLUGIN_VERSION, - in the startup message and in a server variable innodb_version. - - * sync/sync0sync.c: - Fix a bug in the sync debug code where a lock with level - SYNC_LEVEL_VARYING would cause an assertion failure when a thread - tried to release it. - -2008-04-30 The InnoDB Team - - * Makefile.am: - Fix Bug#36434 ha_innodb.so is installed in the wrong directory - - * handler/ha_innodb.cc: - Merge change from MySQL (Fix Bug#35406 5.1-opt crashes on select from - I_S.REFERENTIAL_CONSTRAINTS): - ChangeSet@1.2563, 2008-03-18 19:42:04+04:00, gluh@mysql.com +1 -0 - - * scripts/install_innodb_plugins.sql: - Added - - * mysql-test/innodb.result: - Merge change from MySQL (this fixes the failing innodb test): - ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00 - - * row/row0sel.c: - Fix Bug#35226 RBR event crashes slave - - * handler/ha_innodb.cc: - Change the fix for Bug#32440 to show bytes instead of kilobytes in - INFORMATION_SCHEMA.TABLES.DATA_FREE - - * handler/ha_innodb.cc, mysql-test/innodb.result, - mysql-test/innodb.test: - Fix Bug#29507 TRUNCATE shows to many rows effected - - * handler/ha_innodb.cc, mysql-test/innodb.result, - mysql-test/innodb.test: - Fix Bug#35537 Innodb doesn't increment handler_update and - handler_delete - -2008-04-29 The InnoDB Team - - * handler/i_s.cc, include/srv0start.h, srv/srv0start.c: - Fix Bug#36310 InnoDB plugin crash - -2008-04-23 The InnoDB Team - - * mysql-test/innodb_bug36169.result, mysql-test/innodb_bug36169.test, - row/row0mysql.c: - Fix Bug#36169 create innodb compressed table with too large row size - crashed - - * (outside the source tree): - Fix Bug#36222 New InnoDB plugin 1.0 has wrong MKDIR_P defined in - Makefile.in - -2008-04-15 The InnoDB Team - - InnoDB Plugin 1.0.0 released diff --git a/Doxyfile b/Doxyfile index 62aa7dd8abc..7cf5048fa52 100644 --- a/Doxyfile +++ b/Doxyfile @@ -565,7 +565,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = ut0auxconf_* +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index c73eb3d4f47..00000000000 --- a/Makefile.am +++ /dev/null @@ -1,345 +0,0 @@ -# Copyright (C) 2001, 2004, 2006 MySQL AB & Innobase Oy -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Process this file with automake to create Makefile.in - -MYSQLDATAdir= $(localstatedir) -MYSQLSHAREdir= $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir= $(pkglibdir)/plugin -INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(srcdir)/include \ - -I$(top_srcdir)/sql \ - -I$(srcdir) @ZLIB_INCLUDES@ - -DEFS= @DEFS@ - - -noinst_HEADERS= \ - handler/ha_innodb.h \ - handler/i_s.h \ - include/btr0btr.h \ - include/btr0btr.ic \ - include/btr0cur.h \ - include/btr0cur.ic \ - include/btr0pcur.h \ - include/btr0pcur.ic \ - include/btr0sea.h \ - include/btr0sea.ic \ - include/btr0types.h \ - include/buf0buddy.h \ - include/buf0buddy.ic \ - include/buf0buf.h \ - include/buf0buf.ic \ - include/buf0flu.h \ - include/buf0flu.ic \ - include/buf0lru.h \ - include/buf0lru.ic \ - include/buf0rea.h \ - include/buf0types.h \ - include/data0data.h \ - include/data0data.ic \ - include/data0type.h \ - include/data0type.ic \ - include/data0types.h \ - include/db0err.h \ - include/dict0boot.h \ - include/dict0boot.ic \ - include/dict0crea.h \ - include/dict0crea.ic \ - include/dict0dict.h \ - include/dict0dict.ic \ - include/dict0load.h \ - include/dict0load.ic \ - include/dict0mem.h \ - include/dict0mem.ic \ - include/dict0types.h \ - include/dyn0dyn.h \ - include/dyn0dyn.ic \ - include/eval0eval.h \ - include/eval0eval.ic \ - include/eval0proc.h \ - include/eval0proc.ic \ - include/fil0fil.h \ - include/fsp0fsp.h \ - include/fsp0fsp.ic \ - include/fsp0types.h \ - include/fut0fut.h \ - include/fut0fut.ic \ - include/fut0lst.h \ - include/fut0lst.ic \ - include/ha0ha.h \ - include/ha0ha.ic \ - include/ha0storage.h \ - include/ha0storage.ic \ - include/ha_prototypes.h \ - include/handler0alter.h \ - include/hash0hash.h \ - include/hash0hash.ic \ - include/ibuf0ibuf.h \ - include/ibuf0ibuf.ic \ - include/ibuf0types.h \ - include/lock0iter.h \ - include/lock0lock.h \ - include/lock0lock.ic \ - include/lock0priv.h \ - include/lock0priv.ic \ - include/lock0types.h \ - include/log0log.h \ - include/log0log.ic \ - include/log0recv.h \ - include/log0recv.ic \ - include/mach0data.h \ - include/mach0data.ic \ - include/mem0dbg.h \ - include/mem0dbg.ic \ - include/mem0mem.h \ - include/mem0mem.ic \ - include/mem0pool.h \ - include/mem0pool.ic \ - include/mtr0log.h \ - include/mtr0log.ic \ - include/mtr0mtr.h \ - include/mtr0mtr.ic \ - include/mtr0types.h \ - include/mysql_addons.h \ - include/os0file.h \ - include/os0proc.h \ - include/os0proc.ic \ - include/os0sync.h \ - include/os0sync.ic \ - include/os0thread.h \ - include/os0thread.ic \ - include/page0cur.h \ - include/page0cur.ic \ - include/page0page.h \ - include/page0page.ic \ - include/page0types.h \ - include/page0zip.h \ - include/page0zip.ic \ - include/pars0grm.h \ - include/pars0opt.h \ - include/pars0opt.ic \ - include/pars0pars.h \ - include/pars0pars.ic \ - include/pars0sym.h \ - include/pars0sym.ic \ - include/pars0types.h \ - include/que0que.h \ - include/que0que.ic \ - include/que0types.h \ - include/read0read.h \ - include/read0read.ic \ - include/read0types.h \ - include/rem0cmp.h \ - include/rem0cmp.ic \ - include/rem0rec.h \ - include/rem0rec.ic \ - include/rem0types.h \ - include/row0ext.h \ - include/row0ext.ic \ - include/row0ins.h \ - include/row0ins.ic \ - include/row0merge.h \ - include/row0mysql.h \ - include/row0mysql.ic \ - include/row0purge.h \ - include/row0purge.ic \ - include/row0row.h \ - include/row0row.ic \ - include/row0sel.h \ - include/row0sel.ic \ - include/row0types.h \ - include/row0uins.h \ - include/row0uins.ic \ - include/row0umod.h \ - include/row0umod.ic \ - include/row0undo.h \ - include/row0undo.ic \ - include/row0upd.h \ - include/row0upd.ic \ - include/row0vers.h \ - include/row0vers.ic \ - include/srv0que.h \ - include/srv0srv.h \ - include/srv0srv.ic \ - include/srv0start.h \ - include/sync0arr.h \ - include/sync0arr.ic \ - include/sync0rw.h \ - include/sync0rw.ic \ - include/sync0sync.h \ - include/sync0sync.ic \ - include/sync0types.h \ - include/thr0loc.h \ - include/thr0loc.ic \ - include/trx0i_s.h \ - include/trx0purge.h \ - include/trx0purge.ic \ - include/trx0rec.h \ - include/trx0rec.ic \ - include/trx0roll.h \ - include/trx0roll.ic \ - include/trx0rseg.h \ - include/trx0rseg.ic \ - include/trx0sys.h \ - include/trx0sys.ic \ - include/trx0trx.h \ - include/trx0trx.ic \ - include/trx0types.h \ - include/trx0undo.h \ - include/trx0undo.ic \ - include/trx0xa.h \ - include/univ.i \ - include/usr0sess.h \ - include/usr0sess.ic \ - include/usr0types.h \ - include/ut0auxconf.h \ - include/ut0byte.h \ - include/ut0byte.ic \ - include/ut0dbg.h \ - include/ut0list.h \ - include/ut0list.ic \ - include/ut0lst.h \ - include/ut0mem.h \ - include/ut0mem.ic \ - include/ut0rbt.h \ - include/ut0rnd.h \ - include/ut0rnd.ic \ - include/ut0sort.h \ - include/ut0ut.h \ - include/ut0ut.ic \ - include/ut0vec.h \ - include/ut0vec.ic \ - include/ut0wqueue.h \ - handler/innodb_patch_info.h \ - mem/mem0dbg.c - -EXTRA_LIBRARIES= libinnobase.a -noinst_LIBRARIES= @plugin_innodb_plugin_static_target@ -libinnobase_a_SOURCES= \ - btr/btr0btr.c \ - btr/btr0cur.c \ - btr/btr0pcur.c \ - btr/btr0sea.c \ - buf/buf0buddy.c \ - buf/buf0buf.c \ - buf/buf0flu.c \ - buf/buf0lru.c \ - buf/buf0rea.c \ - data/data0data.c \ - data/data0type.c \ - dict/dict0boot.c \ - dict/dict0crea.c \ - dict/dict0dict.c \ - dict/dict0load.c \ - dict/dict0mem.c \ - dyn/dyn0dyn.c \ - eval/eval0eval.c \ - eval/eval0proc.c \ - fil/fil0fil.c \ - fsp/fsp0fsp.c \ - fut/fut0fut.c \ - fut/fut0lst.c \ - ha/ha0ha.c \ - ha/ha0storage.c \ - ha/hash0hash.c \ - handler/ha_innodb.cc \ - handler/handler0alter.cc \ - handler/i_s.cc \ - handler/mysql_addons.cc \ - ibuf/ibuf0ibuf.c \ - lock/lock0iter.c \ - lock/lock0lock.c \ - log/log0log.c \ - log/log0recv.c \ - mach/mach0data.c \ - mem/mem0mem.c \ - mem/mem0pool.c \ - mtr/mtr0log.c \ - mtr/mtr0mtr.c \ - os/os0file.c \ - os/os0proc.c \ - os/os0sync.c \ - os/os0thread.c \ - page/page0cur.c \ - page/page0page.c \ - page/page0zip.c \ - pars/lexyy.c \ - pars/pars0grm.c \ - pars/pars0opt.c \ - pars/pars0pars.c \ - pars/pars0sym.c \ - que/que0que.c \ - read/read0read.c \ - rem/rem0cmp.c \ - rem/rem0rec.c \ - row/row0ext.c \ - row/row0ins.c \ - row/row0merge.c \ - row/row0mysql.c \ - row/row0purge.c \ - row/row0row.c \ - row/row0sel.c \ - row/row0uins.c \ - row/row0umod.c \ - row/row0undo.c \ - row/row0upd.c \ - row/row0vers.c \ - srv/srv0que.c \ - srv/srv0srv.c \ - srv/srv0start.c \ - sync/sync0arr.c \ - sync/sync0rw.c \ - sync/sync0sync.c \ - thr/thr0loc.c \ - trx/trx0i_s.c \ - trx/trx0purge.c \ - trx/trx0rec.c \ - trx/trx0roll.c \ - trx/trx0rseg.c \ - trx/trx0sys.c \ - trx/trx0trx.c \ - trx/trx0undo.c \ - usr/usr0sess.c \ - ut/ut0byte.c \ - ut/ut0dbg.c \ - ut/ut0list.c \ - ut/ut0mem.c \ - ut/ut0rbt.c \ - ut/ut0rnd.c \ - ut/ut0ut.c \ - ut/ut0vec.c \ - ut/ut0wqueue.c - -libinnobase_a_CXXFLAGS= $(AM_CXXFLAGS) -libinnobase_a_CFLAGS= $(AM_CFLAGS) - -EXTRA_LTLIBRARIES= ha_innodb_plugin.la -pkgplugin_LTLIBRARIES= @plugin_innodb_plugin_shared_target@ - -ha_innodb_plugin_la_LDFLAGS= -module -rpath $(pkgplugindir) -ha_innodb_plugin_la_CXXFLAGS= $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_plugin_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_plugin_la_SOURCES= $(libinnobase_a_SOURCES) - -EXTRA_DIST= CMakeLists.txt plug.in \ - pars/make_bison.sh pars/make_flex.sh \ - pars/pars0grm.y pars/pars0lex.l - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 1b5ca3b7a8b..00000000000 --- a/Makefile.in +++ /dev/null @@ -1,3346 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (C) 2001, 2004, 2006 MySQL AB & Innobase Oy -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Process this file with automake to create Makefile.in - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = storage/innodb_plugin -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in COPYING ChangeLog -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/config/ac-macros/maintainer.m4 \ - $(top_srcdir)/config/ac-macros/alloca.m4 \ - $(top_srcdir)/config/ac-macros/check_cpu.m4 \ - $(top_srcdir)/config/ac-macros/character_sets.m4 \ - $(top_srcdir)/config/ac-macros/compiler_flag.m4 \ - $(top_srcdir)/config/ac-macros/plugins.m4 \ - $(top_srcdir)/config/ac-macros/ha_ndbcluster.m4 \ - $(top_srcdir)/config/ac-macros/large_file.m4 \ - $(top_srcdir)/config/ac-macros/misc.m4 \ - $(top_srcdir)/config/ac-macros/readline.m4 \ - $(top_srcdir)/config/ac-macros/ssl.m4 \ - $(top_srcdir)/config/ac-macros/zlib.m4 \ - $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) -libinnobase_a_AR = $(AR) $(ARFLAGS) -libinnobase_a_LIBADD = -am_libinnobase_a_OBJECTS = libinnobase_a-btr0btr.$(OBJEXT) \ - libinnobase_a-btr0cur.$(OBJEXT) \ - libinnobase_a-btr0pcur.$(OBJEXT) \ - libinnobase_a-btr0sea.$(OBJEXT) \ - libinnobase_a-buf0buddy.$(OBJEXT) \ - libinnobase_a-buf0buf.$(OBJEXT) \ - libinnobase_a-buf0flu.$(OBJEXT) \ - libinnobase_a-buf0lru.$(OBJEXT) \ - libinnobase_a-buf0rea.$(OBJEXT) \ - libinnobase_a-data0data.$(OBJEXT) \ - libinnobase_a-data0type.$(OBJEXT) \ - libinnobase_a-dict0boot.$(OBJEXT) \ - libinnobase_a-dict0crea.$(OBJEXT) \ - libinnobase_a-dict0dict.$(OBJEXT) \ - libinnobase_a-dict0load.$(OBJEXT) \ - libinnobase_a-dict0mem.$(OBJEXT) \ - libinnobase_a-dyn0dyn.$(OBJEXT) \ - libinnobase_a-eval0eval.$(OBJEXT) \ - libinnobase_a-eval0proc.$(OBJEXT) \ - libinnobase_a-fil0fil.$(OBJEXT) \ - libinnobase_a-fsp0fsp.$(OBJEXT) \ - libinnobase_a-fut0fut.$(OBJEXT) \ - libinnobase_a-fut0lst.$(OBJEXT) libinnobase_a-ha0ha.$(OBJEXT) \ - libinnobase_a-ha0storage.$(OBJEXT) \ - libinnobase_a-hash0hash.$(OBJEXT) \ - libinnobase_a-ha_innodb.$(OBJEXT) \ - libinnobase_a-handler0alter.$(OBJEXT) \ - libinnobase_a-i_s.$(OBJEXT) \ - libinnobase_a-mysql_addons.$(OBJEXT) \ - libinnobase_a-ibuf0ibuf.$(OBJEXT) \ - libinnobase_a-lock0iter.$(OBJEXT) \ - libinnobase_a-lock0lock.$(OBJEXT) \ - libinnobase_a-log0log.$(OBJEXT) \ - libinnobase_a-log0recv.$(OBJEXT) \ - libinnobase_a-mach0data.$(OBJEXT) \ - libinnobase_a-mem0mem.$(OBJEXT) \ - libinnobase_a-mem0pool.$(OBJEXT) \ - libinnobase_a-mtr0log.$(OBJEXT) \ - libinnobase_a-mtr0mtr.$(OBJEXT) \ - libinnobase_a-os0file.$(OBJEXT) \ - libinnobase_a-os0proc.$(OBJEXT) \ - libinnobase_a-os0sync.$(OBJEXT) \ - libinnobase_a-os0thread.$(OBJEXT) \ - libinnobase_a-page0cur.$(OBJEXT) \ - libinnobase_a-page0page.$(OBJEXT) \ - libinnobase_a-page0zip.$(OBJEXT) libinnobase_a-lexyy.$(OBJEXT) \ - libinnobase_a-pars0grm.$(OBJEXT) \ - libinnobase_a-pars0opt.$(OBJEXT) \ - libinnobase_a-pars0pars.$(OBJEXT) \ - libinnobase_a-pars0sym.$(OBJEXT) \ - libinnobase_a-que0que.$(OBJEXT) \ - libinnobase_a-read0read.$(OBJEXT) \ - libinnobase_a-rem0cmp.$(OBJEXT) \ - libinnobase_a-rem0rec.$(OBJEXT) \ - libinnobase_a-row0ext.$(OBJEXT) \ - libinnobase_a-row0ins.$(OBJEXT) \ - libinnobase_a-row0merge.$(OBJEXT) \ - libinnobase_a-row0mysql.$(OBJEXT) \ - libinnobase_a-row0purge.$(OBJEXT) \ - libinnobase_a-row0row.$(OBJEXT) \ - libinnobase_a-row0sel.$(OBJEXT) \ - libinnobase_a-row0uins.$(OBJEXT) \ - libinnobase_a-row0umod.$(OBJEXT) \ - libinnobase_a-row0undo.$(OBJEXT) \ - libinnobase_a-row0upd.$(OBJEXT) \ - libinnobase_a-row0vers.$(OBJEXT) \ - libinnobase_a-srv0que.$(OBJEXT) \ - libinnobase_a-srv0srv.$(OBJEXT) \ - libinnobase_a-srv0start.$(OBJEXT) \ - libinnobase_a-sync0arr.$(OBJEXT) \ - libinnobase_a-sync0rw.$(OBJEXT) \ - libinnobase_a-sync0sync.$(OBJEXT) \ - libinnobase_a-thr0loc.$(OBJEXT) \ - libinnobase_a-trx0i_s.$(OBJEXT) \ - libinnobase_a-trx0purge.$(OBJEXT) \ - libinnobase_a-trx0rec.$(OBJEXT) \ - libinnobase_a-trx0roll.$(OBJEXT) \ - libinnobase_a-trx0rseg.$(OBJEXT) \ - libinnobase_a-trx0sys.$(OBJEXT) \ - libinnobase_a-trx0trx.$(OBJEXT) \ - libinnobase_a-trx0undo.$(OBJEXT) \ - libinnobase_a-usr0sess.$(OBJEXT) \ - libinnobase_a-ut0byte.$(OBJEXT) libinnobase_a-ut0dbg.$(OBJEXT) \ - libinnobase_a-ut0list.$(OBJEXT) libinnobase_a-ut0mem.$(OBJEXT) \ - libinnobase_a-ut0rbt.$(OBJEXT) libinnobase_a-ut0rnd.$(OBJEXT) \ - libinnobase_a-ut0ut.$(OBJEXT) libinnobase_a-ut0vec.$(OBJEXT) \ - libinnobase_a-ut0wqueue.$(OBJEXT) -libinnobase_a_OBJECTS = $(am_libinnobase_a_OBJECTS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(pkgplugindir)" -pkgpluginLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(pkgplugin_LTLIBRARIES) -ha_innodb_plugin_la_LIBADD = -am__objects_1 = ha_innodb_plugin_la-btr0btr.lo \ - ha_innodb_plugin_la-btr0cur.lo ha_innodb_plugin_la-btr0pcur.lo \ - ha_innodb_plugin_la-btr0sea.lo \ - ha_innodb_plugin_la-buf0buddy.lo \ - ha_innodb_plugin_la-buf0buf.lo ha_innodb_plugin_la-buf0flu.lo \ - ha_innodb_plugin_la-buf0lru.lo ha_innodb_plugin_la-buf0rea.lo \ - ha_innodb_plugin_la-data0data.lo \ - ha_innodb_plugin_la-data0type.lo \ - ha_innodb_plugin_la-dict0boot.lo \ - ha_innodb_plugin_la-dict0crea.lo \ - ha_innodb_plugin_la-dict0dict.lo \ - ha_innodb_plugin_la-dict0load.lo \ - ha_innodb_plugin_la-dict0mem.lo ha_innodb_plugin_la-dyn0dyn.lo \ - ha_innodb_plugin_la-eval0eval.lo \ - ha_innodb_plugin_la-eval0proc.lo \ - ha_innodb_plugin_la-fil0fil.lo ha_innodb_plugin_la-fsp0fsp.lo \ - ha_innodb_plugin_la-fut0fut.lo ha_innodb_plugin_la-fut0lst.lo \ - ha_innodb_plugin_la-ha0ha.lo ha_innodb_plugin_la-ha0storage.lo \ - ha_innodb_plugin_la-hash0hash.lo \ - ha_innodb_plugin_la-ha_innodb.lo \ - ha_innodb_plugin_la-handler0alter.lo \ - ha_innodb_plugin_la-i_s.lo ha_innodb_plugin_la-mysql_addons.lo \ - ha_innodb_plugin_la-ibuf0ibuf.lo \ - ha_innodb_plugin_la-lock0iter.lo \ - ha_innodb_plugin_la-lock0lock.lo \ - ha_innodb_plugin_la-log0log.lo ha_innodb_plugin_la-log0recv.lo \ - ha_innodb_plugin_la-mach0data.lo \ - ha_innodb_plugin_la-mem0mem.lo ha_innodb_plugin_la-mem0pool.lo \ - ha_innodb_plugin_la-mtr0log.lo ha_innodb_plugin_la-mtr0mtr.lo \ - ha_innodb_plugin_la-os0file.lo ha_innodb_plugin_la-os0proc.lo \ - ha_innodb_plugin_la-os0sync.lo \ - ha_innodb_plugin_la-os0thread.lo \ - ha_innodb_plugin_la-page0cur.lo \ - ha_innodb_plugin_la-page0page.lo \ - ha_innodb_plugin_la-page0zip.lo ha_innodb_plugin_la-lexyy.lo \ - ha_innodb_plugin_la-pars0grm.lo \ - ha_innodb_plugin_la-pars0opt.lo \ - ha_innodb_plugin_la-pars0pars.lo \ - ha_innodb_plugin_la-pars0sym.lo ha_innodb_plugin_la-que0que.lo \ - ha_innodb_plugin_la-read0read.lo \ - ha_innodb_plugin_la-rem0cmp.lo ha_innodb_plugin_la-rem0rec.lo \ - ha_innodb_plugin_la-row0ext.lo ha_innodb_plugin_la-row0ins.lo \ - ha_innodb_plugin_la-row0merge.lo \ - ha_innodb_plugin_la-row0mysql.lo \ - ha_innodb_plugin_la-row0purge.lo \ - ha_innodb_plugin_la-row0row.lo ha_innodb_plugin_la-row0sel.lo \ - ha_innodb_plugin_la-row0uins.lo \ - ha_innodb_plugin_la-row0umod.lo \ - ha_innodb_plugin_la-row0undo.lo ha_innodb_plugin_la-row0upd.lo \ - ha_innodb_plugin_la-row0vers.lo ha_innodb_plugin_la-srv0que.lo \ - ha_innodb_plugin_la-srv0srv.lo \ - ha_innodb_plugin_la-srv0start.lo \ - ha_innodb_plugin_la-sync0arr.lo ha_innodb_plugin_la-sync0rw.lo \ - ha_innodb_plugin_la-sync0sync.lo \ - ha_innodb_plugin_la-thr0loc.lo ha_innodb_plugin_la-trx0i_s.lo \ - ha_innodb_plugin_la-trx0purge.lo \ - ha_innodb_plugin_la-trx0rec.lo ha_innodb_plugin_la-trx0roll.lo \ - ha_innodb_plugin_la-trx0rseg.lo ha_innodb_plugin_la-trx0sys.lo \ - ha_innodb_plugin_la-trx0trx.lo ha_innodb_plugin_la-trx0undo.lo \ - ha_innodb_plugin_la-usr0sess.lo ha_innodb_plugin_la-ut0byte.lo \ - ha_innodb_plugin_la-ut0dbg.lo ha_innodb_plugin_la-ut0list.lo \ - ha_innodb_plugin_la-ut0mem.lo ha_innodb_plugin_la-ut0rbt.lo \ - ha_innodb_plugin_la-ut0rnd.lo ha_innodb_plugin_la-ut0ut.lo \ - ha_innodb_plugin_la-ut0vec.lo ha_innodb_plugin_la-ut0wqueue.lo -am_ha_innodb_plugin_la_OBJECTS = $(am__objects_1) -ha_innodb_plugin_la_OBJECTS = $(am_ha_innodb_plugin_la_OBJECTS) -ha_innodb_plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) \ - $(ha_innodb_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libinnobase_a_SOURCES) $(ha_innodb_plugin_la_SOURCES) -DIST_SOURCES = $(libinnobase_a_SOURCES) $(ha_innodb_plugin_la_SOURCES) -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABI_CHECK = @ABI_CHECK@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_CFLAGS = @AM_CFLAGS@ -AM_CXXFLAGS = @AM_CXXFLAGS@ -AR = @AR@ -ARFLAGS = @ARFLAGS@ -AS = @AS@ -ASFLAGS = @ASFLAGS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AVAILABLE_LANGUAGES = @AVAILABLE_LANGUAGES@ -AWK = @AWK@ -CC = @CC@ -CCAS = @CCAS@ -CCASDEPMODE = @CCASDEPMODE@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CC_VERSION = @CC_VERSION@ -CFLAGS = @CFLAGS@ -CHECK_PID = @CHECK_PID@ -CHMOD = @CHMOD@ -CLIENT_EXTRA_LDFLAGS = @CLIENT_EXTRA_LDFLAGS@ -CLIENT_LIBS = @CLIENT_LIBS@ -CLIENT_THREAD_LIBS = @CLIENT_THREAD_LIBS@ -CMP = @CMP@ -COMPILATION_COMMENT = @COMPILATION_COMMENT@ -CONF_COMMAND = @CONF_COMMAND@ -CP = @CP@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CXXLDFLAGS = @CXXLDFLAGS@ -CXX_VERSION = @CXX_VERSION@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIFF = @DIFF@ -DOT_FRM_VERSION = @DOT_FRM_VERSION@ -DOXYGEN = @DOXYGEN@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -DVIS = @DVIS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FIND_PROC = @FIND_PROC@ -GETCONF = @GETCONF@ -GREP = @GREP@ -GXX = @GXX@ -HOSTNAME = @HOSTNAME@ -INNODB_DYNAMIC_CFLAGS = @INNODB_DYNAMIC_CFLAGS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KILL = @KILL@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LD_VERSION_SCRIPT = @LD_VERSION_SCRIPT@ -LIBDL = @LIBDL@ -LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@ -LIPO = @LIPO@ -LM_CFLAGS = @LM_CFLAGS@ -LN = @LN@ -LN_CP_F = @LN_CP_F@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MACHINE_TYPE = @MACHINE_TYPE@ -MAKEINDEX = @MAKEINDEX@ -MAKEINFO = @MAKEINFO@ -MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@ -MAKE_SHELL = @MAKE_SHELL@ -MKDIR_P = @MKDIR_P@ -MV = @MV@ -MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@ -MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@ -MYSQLD_EXTRA_LIBS = @MYSQLD_EXTRA_LIBS@ -MYSQLD_USER = @MYSQLD_USER@ -MYSQL_BASE_VERSION = @MYSQL_BASE_VERSION@ -MYSQL_COPYRIGHT_YEAR = @MYSQL_COPYRIGHT_YEAR@ -MYSQL_NO_DASH_VERSION = @MYSQL_NO_DASH_VERSION@ -MYSQL_PREVIOUS_BASE_VERSION = @MYSQL_PREVIOUS_BASE_VERSION@ -MYSQL_SERVER_SUFFIX = @MYSQL_SERVER_SUFFIX@ -MYSQL_TCP_PORT = @MYSQL_TCP_PORT@ -MYSQL_TCP_PORT_DEFAULT = @MYSQL_TCP_PORT_DEFAULT@ -MYSQL_UNIX_ADDR = @MYSQL_UNIX_ADDR@ -MYSQL_U_SCORE_VERSION = @MYSQL_U_SCORE_VERSION@ -MYSQL_VERSION_ID = @MYSQL_VERSION_ID@ -NDB_DEFS = @NDB_DEFS@ -NDB_LD_VERSION_SCRIPT = @NDB_LD_VERSION_SCRIPT@ -NDB_SCI_INCLUDES = @NDB_SCI_INCLUDES@ -NDB_SCI_LIBS = @NDB_SCI_LIBS@ -NDB_SHARED_LIB_MAJOR_VERSION = @NDB_SHARED_LIB_MAJOR_VERSION@ -NDB_SHARED_LIB_VERSION = @NDB_SHARED_LIB_VERSION@ -NDB_SIZEOF_CHAR = @NDB_SIZEOF_CHAR@ -NDB_SIZEOF_CHARP = @NDB_SIZEOF_CHARP@ -NDB_SIZEOF_INT = @NDB_SIZEOF_INT@ -NDB_SIZEOF_LONG = @NDB_SIZEOF_LONG@ -NDB_SIZEOF_LONG_LONG = @NDB_SIZEOF_LONG_LONG@ -NDB_SIZEOF_SHORT = @NDB_SIZEOF_SHORT@ -NDB_VERSION_BUILD = @NDB_VERSION_BUILD@ -NDB_VERSION_MAJOR = @NDB_VERSION_MAJOR@ -NDB_VERSION_MINOR = @NDB_VERSION_MINOR@ -NDB_VERSION_STATUS = @NDB_VERSION_STATUS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NOINST_LDFLAGS = @NOINST_LDFLAGS@ -NON_THREADED_LIBS = @NON_THREADED_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFLATEX = @PDFLATEX@ -PDFMANUAL = @PDFMANUAL@ -PERL = @PERL@ -PERL5 = @PERL5@ -PROTOCOL_VERSION = @PROTOCOL_VERSION@ -PS = @PS@ -RANLIB = @RANLIB@ -RM = @RM@ -SAVE_ASFLAGS = @SAVE_ASFLAGS@ -SAVE_CC = @SAVE_CC@ -SAVE_CFLAGS = @SAVE_CFLAGS@ -SAVE_CXX = @SAVE_CXX@ -SAVE_CXXFLAGS = @SAVE_CXXFLAGS@ -SAVE_CXXLDFLAGS = @SAVE_CXXLDFLAGS@ -SAVE_LDFLAGS = @SAVE_LDFLAGS@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHARED_LIB_MAJOR_VERSION = @SHARED_LIB_MAJOR_VERSION@ -SHARED_LIB_VERSION = @SHARED_LIB_VERSION@ -SHELL = @SHELL@ -STATIC_NSS_FLAGS = @STATIC_NSS_FLAGS@ -STRIP = @STRIP@ -SYSTEM_TYPE = @SYSTEM_TYPE@ -TAR = @TAR@ -TARGET_LINUX = @TARGET_LINUX@ -TERMCAP_LIB = @TERMCAP_LIB@ -TEST_NDBCLUSTER = @TEST_NDBCLUSTER@ -THREAD_LOBJECTS = @THREAD_LOBJECTS@ -VERSION = @VERSION@ -WRAPLIBS = @WRAPLIBS@ -YACC = @YACC@ -ZLIB_DEPS = @ZLIB_DEPS@ -ZLIB_INCLUDES = @ZLIB_INCLUDES@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -condition_dependent_plugin_includes = @condition_dependent_plugin_includes@ -condition_dependent_plugin_links = @condition_dependent_plugin_links@ -condition_dependent_plugin_modules = @condition_dependent_plugin_modules@ -condition_dependent_plugin_objects = @condition_dependent_plugin_objects@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -docs_dirs = @docs_dirs@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -extra_docs = @extra_docs@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -innodb_system_libs = @innodb_system_libs@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libmysqld_dirs = @libmysqld_dirs@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ -man1_files = @man1_files@ -man8_files = @man8_files@ -man_dirs = @man_dirs@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -mysql_pg_dirs = @mysql_pg_dirs@ -mysql_pg_distdirs = @mysql_pg_distdirs@ -mysql_pg_unittest_dirs = @mysql_pg_unittest_dirs@ -mysql_plugin_defs = @mysql_plugin_defs@ -mysql_plugin_dirs = @mysql_plugin_dirs@ -mysql_plugin_libs = @mysql_plugin_libs@ -mysql_se_dirs = @mysql_se_dirs@ -mysql_se_distdirs = @mysql_se_distdirs@ -mysql_se_unittest_dirs = @mysql_se_unittest_dirs@ -ndb_bin_am_ldflags = @ndb_bin_am_ldflags@ -ndb_cxxflags_fix = @ndb_cxxflags_fix@ -ndb_mgmclient_libs = @ndb_mgmclient_libs@ -ndb_opt_subdirs = @ndb_opt_subdirs@ -ndb_port = @ndb_port@ -ndb_transporter_opt_objs = @ndb_transporter_opt_objs@ -ndbcluster_includes = @ndbcluster_includes@ -ndbcluster_libs = @ndbcluster_libs@ -ndbcluster_system_libs = @ndbcluster_system_libs@ -netware_dir = @netware_dir@ -oldincludedir = @oldincludedir@ -openssl_includes = @openssl_includes@ -openssl_libs = @openssl_libs@ -pdfdir = @pdfdir@ -plugin_archive_shared_target = @plugin_archive_shared_target@ -plugin_archive_static_target = @plugin_archive_static_target@ -plugin_blackhole_shared_target = @plugin_blackhole_shared_target@ -plugin_blackhole_static_target = @plugin_blackhole_static_target@ -plugin_csv_shared_target = @plugin_csv_shared_target@ -plugin_csv_static_target = @plugin_csv_static_target@ -plugin_daemon_example_shared_target = @plugin_daemon_example_shared_target@ -plugin_daemon_example_static_target = @plugin_daemon_example_static_target@ -plugin_example_shared_target = @plugin_example_shared_target@ -plugin_example_static_target = @plugin_example_static_target@ -plugin_federated_shared_target = @plugin_federated_shared_target@ -plugin_federated_static_target = @plugin_federated_static_target@ -plugin_ftexample_shared_target = @plugin_ftexample_shared_target@ -plugin_ftexample_static_target = @plugin_ftexample_static_target@ -plugin_heap_shared_target = @plugin_heap_shared_target@ -plugin_heap_static_target = @plugin_heap_static_target@ -plugin_innobase_shared_target = @plugin_innobase_shared_target@ -plugin_innobase_static_target = @plugin_innobase_static_target@ -plugin_innodb_plugin_shared_target = @plugin_innodb_plugin_shared_target@ -plugin_innodb_plugin_static_target = @plugin_innodb_plugin_static_target@ -plugin_myisam_shared_target = @plugin_myisam_shared_target@ -plugin_myisam_static_target = @plugin_myisam_static_target@ -plugin_myisammrg_shared_target = @plugin_myisammrg_shared_target@ -plugin_myisammrg_static_target = @plugin_myisammrg_static_target@ -plugin_ndbcluster_shared_target = @plugin_ndbcluster_shared_target@ -plugin_ndbcluster_static_target = @plugin_ndbcluster_static_target@ -plugin_partition_shared_target = @plugin_partition_shared_target@ -plugin_partition_static_target = @plugin_partition_static_target@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -readline_basedir = @readline_basedir@ -readline_dir = @readline_dir@ -readline_h_ln_cmd = @readline_h_ln_cmd@ -readline_link = @readline_link@ -readline_topdir = @readline_topdir@ -sbindir = @sbindir@ -server_scripts = @server_scripts@ -sharedstatedir = @sharedstatedir@ -sql_client_dirs = @sql_client_dirs@ -sql_server = @sql_server@ -sql_server_dirs = @sql_server_dirs@ -sql_union_dirs = @sql_union_dirs@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -tools_dirs = @tools_dirs@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -uname_prog = @uname_prog@ -yassl_dir = @yassl_dir@ -yassl_h_ln_cmd = @yassl_h_ln_cmd@ -yassl_libs = @yassl_libs@ -yassl_taocrypt_extra_cxxflags = @yassl_taocrypt_extra_cxxflags@ -yassl_thread_cxxflags = @yassl_thread_cxxflags@ -zlib_dir = @zlib_dir@ -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir = $(prefix) -MYSQLLIBdir = $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(srcdir)/include \ - -I$(top_srcdir)/sql \ - -I$(srcdir) @ZLIB_INCLUDES@ - -noinst_HEADERS = \ - handler/ha_innodb.h \ - handler/i_s.h \ - include/btr0btr.h \ - include/btr0btr.ic \ - include/btr0cur.h \ - include/btr0cur.ic \ - include/btr0pcur.h \ - include/btr0pcur.ic \ - include/btr0sea.h \ - include/btr0sea.ic \ - include/btr0types.h \ - include/buf0buddy.h \ - include/buf0buddy.ic \ - include/buf0buf.h \ - include/buf0buf.ic \ - include/buf0flu.h \ - include/buf0flu.ic \ - include/buf0lru.h \ - include/buf0lru.ic \ - include/buf0rea.h \ - include/buf0types.h \ - include/data0data.h \ - include/data0data.ic \ - include/data0type.h \ - include/data0type.ic \ - include/data0types.h \ - include/db0err.h \ - include/dict0boot.h \ - include/dict0boot.ic \ - include/dict0crea.h \ - include/dict0crea.ic \ - include/dict0dict.h \ - include/dict0dict.ic \ - include/dict0load.h \ - include/dict0load.ic \ - include/dict0mem.h \ - include/dict0mem.ic \ - include/dict0types.h \ - include/dyn0dyn.h \ - include/dyn0dyn.ic \ - include/eval0eval.h \ - include/eval0eval.ic \ - include/eval0proc.h \ - include/eval0proc.ic \ - include/fil0fil.h \ - include/fsp0fsp.h \ - include/fsp0fsp.ic \ - include/fsp0types.h \ - include/fut0fut.h \ - include/fut0fut.ic \ - include/fut0lst.h \ - include/fut0lst.ic \ - include/ha0ha.h \ - include/ha0ha.ic \ - include/ha0storage.h \ - include/ha0storage.ic \ - include/ha_prototypes.h \ - include/handler0alter.h \ - include/hash0hash.h \ - include/hash0hash.ic \ - include/ibuf0ibuf.h \ - include/ibuf0ibuf.ic \ - include/ibuf0types.h \ - include/lock0iter.h \ - include/lock0lock.h \ - include/lock0lock.ic \ - include/lock0priv.h \ - include/lock0priv.ic \ - include/lock0types.h \ - include/log0log.h \ - include/log0log.ic \ - include/log0recv.h \ - include/log0recv.ic \ - include/mach0data.h \ - include/mach0data.ic \ - include/mem0dbg.h \ - include/mem0dbg.ic \ - include/mem0mem.h \ - include/mem0mem.ic \ - include/mem0pool.h \ - include/mem0pool.ic \ - include/mtr0log.h \ - include/mtr0log.ic \ - include/mtr0mtr.h \ - include/mtr0mtr.ic \ - include/mtr0types.h \ - include/mysql_addons.h \ - include/os0file.h \ - include/os0proc.h \ - include/os0proc.ic \ - include/os0sync.h \ - include/os0sync.ic \ - include/os0thread.h \ - include/os0thread.ic \ - include/page0cur.h \ - include/page0cur.ic \ - include/page0page.h \ - include/page0page.ic \ - include/page0types.h \ - include/page0zip.h \ - include/page0zip.ic \ - include/pars0grm.h \ - include/pars0opt.h \ - include/pars0opt.ic \ - include/pars0pars.h \ - include/pars0pars.ic \ - include/pars0sym.h \ - include/pars0sym.ic \ - include/pars0types.h \ - include/que0que.h \ - include/que0que.ic \ - include/que0types.h \ - include/read0read.h \ - include/read0read.ic \ - include/read0types.h \ - include/rem0cmp.h \ - include/rem0cmp.ic \ - include/rem0rec.h \ - include/rem0rec.ic \ - include/rem0types.h \ - include/row0ext.h \ - include/row0ext.ic \ - include/row0ins.h \ - include/row0ins.ic \ - include/row0merge.h \ - include/row0mysql.h \ - include/row0mysql.ic \ - include/row0purge.h \ - include/row0purge.ic \ - include/row0row.h \ - include/row0row.ic \ - include/row0sel.h \ - include/row0sel.ic \ - include/row0types.h \ - include/row0uins.h \ - include/row0uins.ic \ - include/row0umod.h \ - include/row0umod.ic \ - include/row0undo.h \ - include/row0undo.ic \ - include/row0upd.h \ - include/row0upd.ic \ - include/row0vers.h \ - include/row0vers.ic \ - include/srv0que.h \ - include/srv0srv.h \ - include/srv0srv.ic \ - include/srv0start.h \ - include/sync0arr.h \ - include/sync0arr.ic \ - include/sync0rw.h \ - include/sync0rw.ic \ - include/sync0sync.h \ - include/sync0sync.ic \ - include/sync0types.h \ - include/thr0loc.h \ - include/thr0loc.ic \ - include/trx0i_s.h \ - include/trx0purge.h \ - include/trx0purge.ic \ - include/trx0rec.h \ - include/trx0rec.ic \ - include/trx0roll.h \ - include/trx0roll.ic \ - include/trx0rseg.h \ - include/trx0rseg.ic \ - include/trx0sys.h \ - include/trx0sys.ic \ - include/trx0trx.h \ - include/trx0trx.ic \ - include/trx0types.h \ - include/trx0undo.h \ - include/trx0undo.ic \ - include/trx0xa.h \ - include/univ.i \ - include/usr0sess.h \ - include/usr0sess.ic \ - include/usr0types.h \ - include/ut0auxconf.h \ - include/ut0byte.h \ - include/ut0byte.ic \ - include/ut0dbg.h \ - include/ut0list.h \ - include/ut0list.ic \ - include/ut0lst.h \ - include/ut0mem.h \ - include/ut0mem.ic \ - include/ut0rbt.h \ - include/ut0rnd.h \ - include/ut0rnd.ic \ - include/ut0sort.h \ - include/ut0ut.h \ - include/ut0ut.ic \ - include/ut0vec.h \ - include/ut0vec.ic \ - include/ut0wqueue.h \ - handler/innodb_patch_info.h \ - mem/mem0dbg.c - -EXTRA_LIBRARIES = libinnobase.a -noinst_LIBRARIES = @plugin_innodb_plugin_static_target@ -libinnobase_a_SOURCES = \ - btr/btr0btr.c \ - btr/btr0cur.c \ - btr/btr0pcur.c \ - btr/btr0sea.c \ - buf/buf0buddy.c \ - buf/buf0buf.c \ - buf/buf0flu.c \ - buf/buf0lru.c \ - buf/buf0rea.c \ - data/data0data.c \ - data/data0type.c \ - dict/dict0boot.c \ - dict/dict0crea.c \ - dict/dict0dict.c \ - dict/dict0load.c \ - dict/dict0mem.c \ - dyn/dyn0dyn.c \ - eval/eval0eval.c \ - eval/eval0proc.c \ - fil/fil0fil.c \ - fsp/fsp0fsp.c \ - fut/fut0fut.c \ - fut/fut0lst.c \ - ha/ha0ha.c \ - ha/ha0storage.c \ - ha/hash0hash.c \ - handler/ha_innodb.cc \ - handler/handler0alter.cc \ - handler/i_s.cc \ - handler/mysql_addons.cc \ - ibuf/ibuf0ibuf.c \ - lock/lock0iter.c \ - lock/lock0lock.c \ - log/log0log.c \ - log/log0recv.c \ - mach/mach0data.c \ - mem/mem0mem.c \ - mem/mem0pool.c \ - mtr/mtr0log.c \ - mtr/mtr0mtr.c \ - os/os0file.c \ - os/os0proc.c \ - os/os0sync.c \ - os/os0thread.c \ - page/page0cur.c \ - page/page0page.c \ - page/page0zip.c \ - pars/lexyy.c \ - pars/pars0grm.c \ - pars/pars0opt.c \ - pars/pars0pars.c \ - pars/pars0sym.c \ - que/que0que.c \ - read/read0read.c \ - rem/rem0cmp.c \ - rem/rem0rec.c \ - row/row0ext.c \ - row/row0ins.c \ - row/row0merge.c \ - row/row0mysql.c \ - row/row0purge.c \ - row/row0row.c \ - row/row0sel.c \ - row/row0uins.c \ - row/row0umod.c \ - row/row0undo.c \ - row/row0upd.c \ - row/row0vers.c \ - srv/srv0que.c \ - srv/srv0srv.c \ - srv/srv0start.c \ - sync/sync0arr.c \ - sync/sync0rw.c \ - sync/sync0sync.c \ - thr/thr0loc.c \ - trx/trx0i_s.c \ - trx/trx0purge.c \ - trx/trx0rec.c \ - trx/trx0roll.c \ - trx/trx0rseg.c \ - trx/trx0sys.c \ - trx/trx0trx.c \ - trx/trx0undo.c \ - usr/usr0sess.c \ - ut/ut0byte.c \ - ut/ut0dbg.c \ - ut/ut0list.c \ - ut/ut0mem.c \ - ut/ut0rbt.c \ - ut/ut0rnd.c \ - ut/ut0ut.c \ - ut/ut0vec.c \ - ut/ut0wqueue.c - -libinnobase_a_CXXFLAGS = $(AM_CXXFLAGS) -libinnobase_a_CFLAGS = $(AM_CFLAGS) -EXTRA_LTLIBRARIES = ha_innodb_plugin.la -pkgplugin_LTLIBRARIES = @plugin_innodb_plugin_shared_target@ -ha_innodb_plugin_la_LDFLAGS = -module -rpath $(pkgplugindir) -ha_innodb_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_plugin_la_CFLAGS = $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_plugin_la_SOURCES = $(libinnobase_a_SOURCES) -EXTRA_DIST = CMakeLists.txt plug.in \ - pars/make_bison.sh pars/make_flex.sh \ - pars/pars0grm.y pars/pars0lex.l - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cc .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu storage/innodb_plugin/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu storage/innodb_plugin/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libinnobase.a: $(libinnobase_a_OBJECTS) $(libinnobase_a_DEPENDENCIES) - -rm -f libinnobase.a - $(libinnobase_a_AR) libinnobase.a $(libinnobase_a_OBJECTS) $(libinnobase_a_LIBADD) - $(RANLIB) libinnobase.a -install-pkgpluginLTLIBRARIES: $(pkgplugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkgplugindir)" || $(MKDIR_P) "$(DESTDIR)$(pkgplugindir)" - @list='$(pkgplugin_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkgplugindir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgpluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkgplugindir)/$$f"; \ - else :; fi; \ - done - -uninstall-pkgpluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkgplugin_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgplugindir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgplugindir)/$$p"; \ - done - -clean-pkgpluginLTLIBRARIES: - -test -z "$(pkgplugin_LTLIBRARIES)" || rm -f $(pkgplugin_LTLIBRARIES) - @list='$(pkgplugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -ha_innodb_plugin.la: $(ha_innodb_plugin_la_OBJECTS) $(ha_innodb_plugin_la_DEPENDENCIES) - $(ha_innodb_plugin_la_LINK) $(ha_innodb_plugin_la_OBJECTS) $(ha_innodb_plugin_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-btr0btr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-btr0cur.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-btr0pcur.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-btr0sea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-buf0buddy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-buf0buf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-buf0flu.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-buf0lru.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-buf0rea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-data0data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-data0type.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dict0boot.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dict0crea.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dict0dict.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dict0load.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dict0mem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-dyn0dyn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-eval0eval.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-eval0proc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-fil0fil.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-fsp0fsp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-fut0fut.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-fut0lst.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ha0ha.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ha0storage.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ha_innodb.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-handler0alter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-hash0hash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-i_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ibuf0ibuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-lexyy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-lock0iter.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-lock0lock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-log0log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-log0recv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mach0data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mem0mem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mem0pool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mtr0log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mtr0mtr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-mysql_addons.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-os0file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-os0proc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-os0sync.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-os0thread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-page0cur.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-page0page.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-page0zip.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-pars0grm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-pars0opt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-pars0pars.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-pars0sym.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-que0que.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-read0read.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-rem0cmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-rem0rec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0ext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0ins.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0merge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0mysql.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0purge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0row.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0sel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0uins.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0umod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0undo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0upd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-row0vers.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-srv0que.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-srv0srv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-srv0start.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-sync0arr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-sync0rw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-sync0sync.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-thr0loc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0i_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0purge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0rec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0roll.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0rseg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0sys.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0trx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-trx0undo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-usr0sess.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0byte.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0dbg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0mem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0rbt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0rnd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0ut.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0vec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ha_innodb_plugin_la-ut0wqueue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-btr0btr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-btr0cur.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-btr0pcur.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-btr0sea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-buf0buddy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-buf0buf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-buf0flu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-buf0lru.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-buf0rea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-data0data.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-data0type.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dict0boot.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dict0crea.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dict0dict.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dict0load.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dict0mem.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-dyn0dyn.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-eval0eval.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-eval0proc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-fil0fil.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-fsp0fsp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-fut0fut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-fut0lst.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ha0ha.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ha0storage.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ha_innodb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-handler0alter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-hash0hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-i_s.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ibuf0ibuf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-lexyy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-lock0iter.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-lock0lock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-log0log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-log0recv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mach0data.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mem0mem.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mem0pool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mtr0log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mtr0mtr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-mysql_addons.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-os0file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-os0proc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-os0sync.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-os0thread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-page0cur.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-page0page.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-page0zip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-pars0grm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-pars0opt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-pars0pars.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-pars0sym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-que0que.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-read0read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-rem0cmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-rem0rec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0ext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0ins.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0merge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0mysql.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0purge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0row.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0sel.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0uins.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0umod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0undo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0upd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-row0vers.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-srv0que.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-srv0srv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-srv0start.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-sync0arr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-sync0rw.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-sync0sync.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-thr0loc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0i_s.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0purge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0rec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0roll.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0rseg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0sys.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0trx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-trx0undo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-usr0sess.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0byte.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0dbg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0mem.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0rbt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0rnd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0ut.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0vec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libinnobase_a-ut0wqueue.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libinnobase_a-btr0btr.o: btr/btr0btr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0btr.o -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0btr.Tpo -c -o libinnobase_a-btr0btr.o `test -f 'btr/btr0btr.c' || echo '$(srcdir)/'`btr/btr0btr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0btr.Tpo $(DEPDIR)/libinnobase_a-btr0btr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0btr.c' object='libinnobase_a-btr0btr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0btr.o `test -f 'btr/btr0btr.c' || echo '$(srcdir)/'`btr/btr0btr.c - -libinnobase_a-btr0btr.obj: btr/btr0btr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0btr.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0btr.Tpo -c -o libinnobase_a-btr0btr.obj `if test -f 'btr/btr0btr.c'; then $(CYGPATH_W) 'btr/btr0btr.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0btr.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0btr.Tpo $(DEPDIR)/libinnobase_a-btr0btr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0btr.c' object='libinnobase_a-btr0btr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0btr.obj `if test -f 'btr/btr0btr.c'; then $(CYGPATH_W) 'btr/btr0btr.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0btr.c'; fi` - -libinnobase_a-btr0cur.o: btr/btr0cur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0cur.o -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0cur.Tpo -c -o libinnobase_a-btr0cur.o `test -f 'btr/btr0cur.c' || echo '$(srcdir)/'`btr/btr0cur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0cur.Tpo $(DEPDIR)/libinnobase_a-btr0cur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0cur.c' object='libinnobase_a-btr0cur.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0cur.o `test -f 'btr/btr0cur.c' || echo '$(srcdir)/'`btr/btr0cur.c - -libinnobase_a-btr0cur.obj: btr/btr0cur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0cur.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0cur.Tpo -c -o libinnobase_a-btr0cur.obj `if test -f 'btr/btr0cur.c'; then $(CYGPATH_W) 'btr/btr0cur.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0cur.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0cur.Tpo $(DEPDIR)/libinnobase_a-btr0cur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0cur.c' object='libinnobase_a-btr0cur.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0cur.obj `if test -f 'btr/btr0cur.c'; then $(CYGPATH_W) 'btr/btr0cur.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0cur.c'; fi` - -libinnobase_a-btr0pcur.o: btr/btr0pcur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0pcur.o -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0pcur.Tpo -c -o libinnobase_a-btr0pcur.o `test -f 'btr/btr0pcur.c' || echo '$(srcdir)/'`btr/btr0pcur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0pcur.Tpo $(DEPDIR)/libinnobase_a-btr0pcur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0pcur.c' object='libinnobase_a-btr0pcur.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0pcur.o `test -f 'btr/btr0pcur.c' || echo '$(srcdir)/'`btr/btr0pcur.c - -libinnobase_a-btr0pcur.obj: btr/btr0pcur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0pcur.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0pcur.Tpo -c -o libinnobase_a-btr0pcur.obj `if test -f 'btr/btr0pcur.c'; then $(CYGPATH_W) 'btr/btr0pcur.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0pcur.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0pcur.Tpo $(DEPDIR)/libinnobase_a-btr0pcur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0pcur.c' object='libinnobase_a-btr0pcur.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0pcur.obj `if test -f 'btr/btr0pcur.c'; then $(CYGPATH_W) 'btr/btr0pcur.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0pcur.c'; fi` - -libinnobase_a-btr0sea.o: btr/btr0sea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0sea.o -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0sea.Tpo -c -o libinnobase_a-btr0sea.o `test -f 'btr/btr0sea.c' || echo '$(srcdir)/'`btr/btr0sea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0sea.Tpo $(DEPDIR)/libinnobase_a-btr0sea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0sea.c' object='libinnobase_a-btr0sea.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0sea.o `test -f 'btr/btr0sea.c' || echo '$(srcdir)/'`btr/btr0sea.c - -libinnobase_a-btr0sea.obj: btr/btr0sea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-btr0sea.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-btr0sea.Tpo -c -o libinnobase_a-btr0sea.obj `if test -f 'btr/btr0sea.c'; then $(CYGPATH_W) 'btr/btr0sea.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0sea.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-btr0sea.Tpo $(DEPDIR)/libinnobase_a-btr0sea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0sea.c' object='libinnobase_a-btr0sea.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-btr0sea.obj `if test -f 'btr/btr0sea.c'; then $(CYGPATH_W) 'btr/btr0sea.c'; else $(CYGPATH_W) '$(srcdir)/btr/btr0sea.c'; fi` - -libinnobase_a-buf0buddy.o: buf/buf0buddy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0buddy.o -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0buddy.Tpo -c -o libinnobase_a-buf0buddy.o `test -f 'buf/buf0buddy.c' || echo '$(srcdir)/'`buf/buf0buddy.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0buddy.Tpo $(DEPDIR)/libinnobase_a-buf0buddy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buddy.c' object='libinnobase_a-buf0buddy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0buddy.o `test -f 'buf/buf0buddy.c' || echo '$(srcdir)/'`buf/buf0buddy.c - -libinnobase_a-buf0buddy.obj: buf/buf0buddy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0buddy.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0buddy.Tpo -c -o libinnobase_a-buf0buddy.obj `if test -f 'buf/buf0buddy.c'; then $(CYGPATH_W) 'buf/buf0buddy.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0buddy.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0buddy.Tpo $(DEPDIR)/libinnobase_a-buf0buddy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buddy.c' object='libinnobase_a-buf0buddy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0buddy.obj `if test -f 'buf/buf0buddy.c'; then $(CYGPATH_W) 'buf/buf0buddy.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0buddy.c'; fi` - -libinnobase_a-buf0buf.o: buf/buf0buf.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0buf.o -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0buf.Tpo -c -o libinnobase_a-buf0buf.o `test -f 'buf/buf0buf.c' || echo '$(srcdir)/'`buf/buf0buf.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0buf.Tpo $(DEPDIR)/libinnobase_a-buf0buf.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buf.c' object='libinnobase_a-buf0buf.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0buf.o `test -f 'buf/buf0buf.c' || echo '$(srcdir)/'`buf/buf0buf.c - -libinnobase_a-buf0buf.obj: buf/buf0buf.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0buf.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0buf.Tpo -c -o libinnobase_a-buf0buf.obj `if test -f 'buf/buf0buf.c'; then $(CYGPATH_W) 'buf/buf0buf.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0buf.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0buf.Tpo $(DEPDIR)/libinnobase_a-buf0buf.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buf.c' object='libinnobase_a-buf0buf.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0buf.obj `if test -f 'buf/buf0buf.c'; then $(CYGPATH_W) 'buf/buf0buf.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0buf.c'; fi` - -libinnobase_a-buf0flu.o: buf/buf0flu.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0flu.o -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0flu.Tpo -c -o libinnobase_a-buf0flu.o `test -f 'buf/buf0flu.c' || echo '$(srcdir)/'`buf/buf0flu.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0flu.Tpo $(DEPDIR)/libinnobase_a-buf0flu.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0flu.c' object='libinnobase_a-buf0flu.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0flu.o `test -f 'buf/buf0flu.c' || echo '$(srcdir)/'`buf/buf0flu.c - -libinnobase_a-buf0flu.obj: buf/buf0flu.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0flu.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0flu.Tpo -c -o libinnobase_a-buf0flu.obj `if test -f 'buf/buf0flu.c'; then $(CYGPATH_W) 'buf/buf0flu.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0flu.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0flu.Tpo $(DEPDIR)/libinnobase_a-buf0flu.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0flu.c' object='libinnobase_a-buf0flu.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0flu.obj `if test -f 'buf/buf0flu.c'; then $(CYGPATH_W) 'buf/buf0flu.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0flu.c'; fi` - -libinnobase_a-buf0lru.o: buf/buf0lru.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0lru.o -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0lru.Tpo -c -o libinnobase_a-buf0lru.o `test -f 'buf/buf0lru.c' || echo '$(srcdir)/'`buf/buf0lru.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0lru.Tpo $(DEPDIR)/libinnobase_a-buf0lru.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0lru.c' object='libinnobase_a-buf0lru.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0lru.o `test -f 'buf/buf0lru.c' || echo '$(srcdir)/'`buf/buf0lru.c - -libinnobase_a-buf0lru.obj: buf/buf0lru.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0lru.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0lru.Tpo -c -o libinnobase_a-buf0lru.obj `if test -f 'buf/buf0lru.c'; then $(CYGPATH_W) 'buf/buf0lru.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0lru.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0lru.Tpo $(DEPDIR)/libinnobase_a-buf0lru.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0lru.c' object='libinnobase_a-buf0lru.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0lru.obj `if test -f 'buf/buf0lru.c'; then $(CYGPATH_W) 'buf/buf0lru.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0lru.c'; fi` - -libinnobase_a-buf0rea.o: buf/buf0rea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0rea.o -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0rea.Tpo -c -o libinnobase_a-buf0rea.o `test -f 'buf/buf0rea.c' || echo '$(srcdir)/'`buf/buf0rea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0rea.Tpo $(DEPDIR)/libinnobase_a-buf0rea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0rea.c' object='libinnobase_a-buf0rea.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0rea.o `test -f 'buf/buf0rea.c' || echo '$(srcdir)/'`buf/buf0rea.c - -libinnobase_a-buf0rea.obj: buf/buf0rea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-buf0rea.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-buf0rea.Tpo -c -o libinnobase_a-buf0rea.obj `if test -f 'buf/buf0rea.c'; then $(CYGPATH_W) 'buf/buf0rea.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0rea.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-buf0rea.Tpo $(DEPDIR)/libinnobase_a-buf0rea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0rea.c' object='libinnobase_a-buf0rea.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-buf0rea.obj `if test -f 'buf/buf0rea.c'; then $(CYGPATH_W) 'buf/buf0rea.c'; else $(CYGPATH_W) '$(srcdir)/buf/buf0rea.c'; fi` - -libinnobase_a-data0data.o: data/data0data.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-data0data.o -MD -MP -MF $(DEPDIR)/libinnobase_a-data0data.Tpo -c -o libinnobase_a-data0data.o `test -f 'data/data0data.c' || echo '$(srcdir)/'`data/data0data.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-data0data.Tpo $(DEPDIR)/libinnobase_a-data0data.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0data.c' object='libinnobase_a-data0data.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-data0data.o `test -f 'data/data0data.c' || echo '$(srcdir)/'`data/data0data.c - -libinnobase_a-data0data.obj: data/data0data.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-data0data.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-data0data.Tpo -c -o libinnobase_a-data0data.obj `if test -f 'data/data0data.c'; then $(CYGPATH_W) 'data/data0data.c'; else $(CYGPATH_W) '$(srcdir)/data/data0data.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-data0data.Tpo $(DEPDIR)/libinnobase_a-data0data.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0data.c' object='libinnobase_a-data0data.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-data0data.obj `if test -f 'data/data0data.c'; then $(CYGPATH_W) 'data/data0data.c'; else $(CYGPATH_W) '$(srcdir)/data/data0data.c'; fi` - -libinnobase_a-data0type.o: data/data0type.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-data0type.o -MD -MP -MF $(DEPDIR)/libinnobase_a-data0type.Tpo -c -o libinnobase_a-data0type.o `test -f 'data/data0type.c' || echo '$(srcdir)/'`data/data0type.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-data0type.Tpo $(DEPDIR)/libinnobase_a-data0type.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0type.c' object='libinnobase_a-data0type.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-data0type.o `test -f 'data/data0type.c' || echo '$(srcdir)/'`data/data0type.c - -libinnobase_a-data0type.obj: data/data0type.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-data0type.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-data0type.Tpo -c -o libinnobase_a-data0type.obj `if test -f 'data/data0type.c'; then $(CYGPATH_W) 'data/data0type.c'; else $(CYGPATH_W) '$(srcdir)/data/data0type.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-data0type.Tpo $(DEPDIR)/libinnobase_a-data0type.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0type.c' object='libinnobase_a-data0type.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-data0type.obj `if test -f 'data/data0type.c'; then $(CYGPATH_W) 'data/data0type.c'; else $(CYGPATH_W) '$(srcdir)/data/data0type.c'; fi` - -libinnobase_a-dict0boot.o: dict/dict0boot.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0boot.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0boot.Tpo -c -o libinnobase_a-dict0boot.o `test -f 'dict/dict0boot.c' || echo '$(srcdir)/'`dict/dict0boot.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0boot.Tpo $(DEPDIR)/libinnobase_a-dict0boot.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0boot.c' object='libinnobase_a-dict0boot.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0boot.o `test -f 'dict/dict0boot.c' || echo '$(srcdir)/'`dict/dict0boot.c - -libinnobase_a-dict0boot.obj: dict/dict0boot.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0boot.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0boot.Tpo -c -o libinnobase_a-dict0boot.obj `if test -f 'dict/dict0boot.c'; then $(CYGPATH_W) 'dict/dict0boot.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0boot.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0boot.Tpo $(DEPDIR)/libinnobase_a-dict0boot.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0boot.c' object='libinnobase_a-dict0boot.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0boot.obj `if test -f 'dict/dict0boot.c'; then $(CYGPATH_W) 'dict/dict0boot.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0boot.c'; fi` - -libinnobase_a-dict0crea.o: dict/dict0crea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0crea.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0crea.Tpo -c -o libinnobase_a-dict0crea.o `test -f 'dict/dict0crea.c' || echo '$(srcdir)/'`dict/dict0crea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0crea.Tpo $(DEPDIR)/libinnobase_a-dict0crea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0crea.c' object='libinnobase_a-dict0crea.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0crea.o `test -f 'dict/dict0crea.c' || echo '$(srcdir)/'`dict/dict0crea.c - -libinnobase_a-dict0crea.obj: dict/dict0crea.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0crea.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0crea.Tpo -c -o libinnobase_a-dict0crea.obj `if test -f 'dict/dict0crea.c'; then $(CYGPATH_W) 'dict/dict0crea.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0crea.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0crea.Tpo $(DEPDIR)/libinnobase_a-dict0crea.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0crea.c' object='libinnobase_a-dict0crea.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0crea.obj `if test -f 'dict/dict0crea.c'; then $(CYGPATH_W) 'dict/dict0crea.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0crea.c'; fi` - -libinnobase_a-dict0dict.o: dict/dict0dict.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0dict.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0dict.Tpo -c -o libinnobase_a-dict0dict.o `test -f 'dict/dict0dict.c' || echo '$(srcdir)/'`dict/dict0dict.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0dict.Tpo $(DEPDIR)/libinnobase_a-dict0dict.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0dict.c' object='libinnobase_a-dict0dict.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0dict.o `test -f 'dict/dict0dict.c' || echo '$(srcdir)/'`dict/dict0dict.c - -libinnobase_a-dict0dict.obj: dict/dict0dict.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0dict.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0dict.Tpo -c -o libinnobase_a-dict0dict.obj `if test -f 'dict/dict0dict.c'; then $(CYGPATH_W) 'dict/dict0dict.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0dict.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0dict.Tpo $(DEPDIR)/libinnobase_a-dict0dict.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0dict.c' object='libinnobase_a-dict0dict.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0dict.obj `if test -f 'dict/dict0dict.c'; then $(CYGPATH_W) 'dict/dict0dict.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0dict.c'; fi` - -libinnobase_a-dict0load.o: dict/dict0load.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0load.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0load.Tpo -c -o libinnobase_a-dict0load.o `test -f 'dict/dict0load.c' || echo '$(srcdir)/'`dict/dict0load.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0load.Tpo $(DEPDIR)/libinnobase_a-dict0load.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0load.c' object='libinnobase_a-dict0load.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0load.o `test -f 'dict/dict0load.c' || echo '$(srcdir)/'`dict/dict0load.c - -libinnobase_a-dict0load.obj: dict/dict0load.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0load.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0load.Tpo -c -o libinnobase_a-dict0load.obj `if test -f 'dict/dict0load.c'; then $(CYGPATH_W) 'dict/dict0load.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0load.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0load.Tpo $(DEPDIR)/libinnobase_a-dict0load.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0load.c' object='libinnobase_a-dict0load.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0load.obj `if test -f 'dict/dict0load.c'; then $(CYGPATH_W) 'dict/dict0load.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0load.c'; fi` - -libinnobase_a-dict0mem.o: dict/dict0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0mem.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0mem.Tpo -c -o libinnobase_a-dict0mem.o `test -f 'dict/dict0mem.c' || echo '$(srcdir)/'`dict/dict0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0mem.Tpo $(DEPDIR)/libinnobase_a-dict0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0mem.c' object='libinnobase_a-dict0mem.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0mem.o `test -f 'dict/dict0mem.c' || echo '$(srcdir)/'`dict/dict0mem.c - -libinnobase_a-dict0mem.obj: dict/dict0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dict0mem.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dict0mem.Tpo -c -o libinnobase_a-dict0mem.obj `if test -f 'dict/dict0mem.c'; then $(CYGPATH_W) 'dict/dict0mem.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0mem.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dict0mem.Tpo $(DEPDIR)/libinnobase_a-dict0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0mem.c' object='libinnobase_a-dict0mem.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dict0mem.obj `if test -f 'dict/dict0mem.c'; then $(CYGPATH_W) 'dict/dict0mem.c'; else $(CYGPATH_W) '$(srcdir)/dict/dict0mem.c'; fi` - -libinnobase_a-dyn0dyn.o: dyn/dyn0dyn.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dyn0dyn.o -MD -MP -MF $(DEPDIR)/libinnobase_a-dyn0dyn.Tpo -c -o libinnobase_a-dyn0dyn.o `test -f 'dyn/dyn0dyn.c' || echo '$(srcdir)/'`dyn/dyn0dyn.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dyn0dyn.Tpo $(DEPDIR)/libinnobase_a-dyn0dyn.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dyn/dyn0dyn.c' object='libinnobase_a-dyn0dyn.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dyn0dyn.o `test -f 'dyn/dyn0dyn.c' || echo '$(srcdir)/'`dyn/dyn0dyn.c - -libinnobase_a-dyn0dyn.obj: dyn/dyn0dyn.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-dyn0dyn.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-dyn0dyn.Tpo -c -o libinnobase_a-dyn0dyn.obj `if test -f 'dyn/dyn0dyn.c'; then $(CYGPATH_W) 'dyn/dyn0dyn.c'; else $(CYGPATH_W) '$(srcdir)/dyn/dyn0dyn.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-dyn0dyn.Tpo $(DEPDIR)/libinnobase_a-dyn0dyn.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dyn/dyn0dyn.c' object='libinnobase_a-dyn0dyn.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-dyn0dyn.obj `if test -f 'dyn/dyn0dyn.c'; then $(CYGPATH_W) 'dyn/dyn0dyn.c'; else $(CYGPATH_W) '$(srcdir)/dyn/dyn0dyn.c'; fi` - -libinnobase_a-eval0eval.o: eval/eval0eval.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-eval0eval.o -MD -MP -MF $(DEPDIR)/libinnobase_a-eval0eval.Tpo -c -o libinnobase_a-eval0eval.o `test -f 'eval/eval0eval.c' || echo '$(srcdir)/'`eval/eval0eval.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-eval0eval.Tpo $(DEPDIR)/libinnobase_a-eval0eval.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0eval.c' object='libinnobase_a-eval0eval.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-eval0eval.o `test -f 'eval/eval0eval.c' || echo '$(srcdir)/'`eval/eval0eval.c - -libinnobase_a-eval0eval.obj: eval/eval0eval.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-eval0eval.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-eval0eval.Tpo -c -o libinnobase_a-eval0eval.obj `if test -f 'eval/eval0eval.c'; then $(CYGPATH_W) 'eval/eval0eval.c'; else $(CYGPATH_W) '$(srcdir)/eval/eval0eval.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-eval0eval.Tpo $(DEPDIR)/libinnobase_a-eval0eval.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0eval.c' object='libinnobase_a-eval0eval.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-eval0eval.obj `if test -f 'eval/eval0eval.c'; then $(CYGPATH_W) 'eval/eval0eval.c'; else $(CYGPATH_W) '$(srcdir)/eval/eval0eval.c'; fi` - -libinnobase_a-eval0proc.o: eval/eval0proc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-eval0proc.o -MD -MP -MF $(DEPDIR)/libinnobase_a-eval0proc.Tpo -c -o libinnobase_a-eval0proc.o `test -f 'eval/eval0proc.c' || echo '$(srcdir)/'`eval/eval0proc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-eval0proc.Tpo $(DEPDIR)/libinnobase_a-eval0proc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0proc.c' object='libinnobase_a-eval0proc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-eval0proc.o `test -f 'eval/eval0proc.c' || echo '$(srcdir)/'`eval/eval0proc.c - -libinnobase_a-eval0proc.obj: eval/eval0proc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-eval0proc.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-eval0proc.Tpo -c -o libinnobase_a-eval0proc.obj `if test -f 'eval/eval0proc.c'; then $(CYGPATH_W) 'eval/eval0proc.c'; else $(CYGPATH_W) '$(srcdir)/eval/eval0proc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-eval0proc.Tpo $(DEPDIR)/libinnobase_a-eval0proc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0proc.c' object='libinnobase_a-eval0proc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-eval0proc.obj `if test -f 'eval/eval0proc.c'; then $(CYGPATH_W) 'eval/eval0proc.c'; else $(CYGPATH_W) '$(srcdir)/eval/eval0proc.c'; fi` - -libinnobase_a-fil0fil.o: fil/fil0fil.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fil0fil.o -MD -MP -MF $(DEPDIR)/libinnobase_a-fil0fil.Tpo -c -o libinnobase_a-fil0fil.o `test -f 'fil/fil0fil.c' || echo '$(srcdir)/'`fil/fil0fil.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fil0fil.Tpo $(DEPDIR)/libinnobase_a-fil0fil.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fil/fil0fil.c' object='libinnobase_a-fil0fil.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fil0fil.o `test -f 'fil/fil0fil.c' || echo '$(srcdir)/'`fil/fil0fil.c - -libinnobase_a-fil0fil.obj: fil/fil0fil.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fil0fil.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-fil0fil.Tpo -c -o libinnobase_a-fil0fil.obj `if test -f 'fil/fil0fil.c'; then $(CYGPATH_W) 'fil/fil0fil.c'; else $(CYGPATH_W) '$(srcdir)/fil/fil0fil.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fil0fil.Tpo $(DEPDIR)/libinnobase_a-fil0fil.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fil/fil0fil.c' object='libinnobase_a-fil0fil.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fil0fil.obj `if test -f 'fil/fil0fil.c'; then $(CYGPATH_W) 'fil/fil0fil.c'; else $(CYGPATH_W) '$(srcdir)/fil/fil0fil.c'; fi` - -libinnobase_a-fsp0fsp.o: fsp/fsp0fsp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fsp0fsp.o -MD -MP -MF $(DEPDIR)/libinnobase_a-fsp0fsp.Tpo -c -o libinnobase_a-fsp0fsp.o `test -f 'fsp/fsp0fsp.c' || echo '$(srcdir)/'`fsp/fsp0fsp.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fsp0fsp.Tpo $(DEPDIR)/libinnobase_a-fsp0fsp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsp/fsp0fsp.c' object='libinnobase_a-fsp0fsp.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fsp0fsp.o `test -f 'fsp/fsp0fsp.c' || echo '$(srcdir)/'`fsp/fsp0fsp.c - -libinnobase_a-fsp0fsp.obj: fsp/fsp0fsp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fsp0fsp.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-fsp0fsp.Tpo -c -o libinnobase_a-fsp0fsp.obj `if test -f 'fsp/fsp0fsp.c'; then $(CYGPATH_W) 'fsp/fsp0fsp.c'; else $(CYGPATH_W) '$(srcdir)/fsp/fsp0fsp.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fsp0fsp.Tpo $(DEPDIR)/libinnobase_a-fsp0fsp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsp/fsp0fsp.c' object='libinnobase_a-fsp0fsp.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fsp0fsp.obj `if test -f 'fsp/fsp0fsp.c'; then $(CYGPATH_W) 'fsp/fsp0fsp.c'; else $(CYGPATH_W) '$(srcdir)/fsp/fsp0fsp.c'; fi` - -libinnobase_a-fut0fut.o: fut/fut0fut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fut0fut.o -MD -MP -MF $(DEPDIR)/libinnobase_a-fut0fut.Tpo -c -o libinnobase_a-fut0fut.o `test -f 'fut/fut0fut.c' || echo '$(srcdir)/'`fut/fut0fut.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fut0fut.Tpo $(DEPDIR)/libinnobase_a-fut0fut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0fut.c' object='libinnobase_a-fut0fut.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fut0fut.o `test -f 'fut/fut0fut.c' || echo '$(srcdir)/'`fut/fut0fut.c - -libinnobase_a-fut0fut.obj: fut/fut0fut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fut0fut.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-fut0fut.Tpo -c -o libinnobase_a-fut0fut.obj `if test -f 'fut/fut0fut.c'; then $(CYGPATH_W) 'fut/fut0fut.c'; else $(CYGPATH_W) '$(srcdir)/fut/fut0fut.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fut0fut.Tpo $(DEPDIR)/libinnobase_a-fut0fut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0fut.c' object='libinnobase_a-fut0fut.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fut0fut.obj `if test -f 'fut/fut0fut.c'; then $(CYGPATH_W) 'fut/fut0fut.c'; else $(CYGPATH_W) '$(srcdir)/fut/fut0fut.c'; fi` - -libinnobase_a-fut0lst.o: fut/fut0lst.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fut0lst.o -MD -MP -MF $(DEPDIR)/libinnobase_a-fut0lst.Tpo -c -o libinnobase_a-fut0lst.o `test -f 'fut/fut0lst.c' || echo '$(srcdir)/'`fut/fut0lst.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fut0lst.Tpo $(DEPDIR)/libinnobase_a-fut0lst.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0lst.c' object='libinnobase_a-fut0lst.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fut0lst.o `test -f 'fut/fut0lst.c' || echo '$(srcdir)/'`fut/fut0lst.c - -libinnobase_a-fut0lst.obj: fut/fut0lst.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-fut0lst.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-fut0lst.Tpo -c -o libinnobase_a-fut0lst.obj `if test -f 'fut/fut0lst.c'; then $(CYGPATH_W) 'fut/fut0lst.c'; else $(CYGPATH_W) '$(srcdir)/fut/fut0lst.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-fut0lst.Tpo $(DEPDIR)/libinnobase_a-fut0lst.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0lst.c' object='libinnobase_a-fut0lst.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-fut0lst.obj `if test -f 'fut/fut0lst.c'; then $(CYGPATH_W) 'fut/fut0lst.c'; else $(CYGPATH_W) '$(srcdir)/fut/fut0lst.c'; fi` - -libinnobase_a-ha0ha.o: ha/ha0ha.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ha0ha.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ha0ha.Tpo -c -o libinnobase_a-ha0ha.o `test -f 'ha/ha0ha.c' || echo '$(srcdir)/'`ha/ha0ha.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha0ha.Tpo $(DEPDIR)/libinnobase_a-ha0ha.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0ha.c' object='libinnobase_a-ha0ha.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ha0ha.o `test -f 'ha/ha0ha.c' || echo '$(srcdir)/'`ha/ha0ha.c - -libinnobase_a-ha0ha.obj: ha/ha0ha.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ha0ha.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ha0ha.Tpo -c -o libinnobase_a-ha0ha.obj `if test -f 'ha/ha0ha.c'; then $(CYGPATH_W) 'ha/ha0ha.c'; else $(CYGPATH_W) '$(srcdir)/ha/ha0ha.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha0ha.Tpo $(DEPDIR)/libinnobase_a-ha0ha.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0ha.c' object='libinnobase_a-ha0ha.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ha0ha.obj `if test -f 'ha/ha0ha.c'; then $(CYGPATH_W) 'ha/ha0ha.c'; else $(CYGPATH_W) '$(srcdir)/ha/ha0ha.c'; fi` - -libinnobase_a-ha0storage.o: ha/ha0storage.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ha0storage.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ha0storage.Tpo -c -o libinnobase_a-ha0storage.o `test -f 'ha/ha0storage.c' || echo '$(srcdir)/'`ha/ha0storage.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha0storage.Tpo $(DEPDIR)/libinnobase_a-ha0storage.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0storage.c' object='libinnobase_a-ha0storage.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ha0storage.o `test -f 'ha/ha0storage.c' || echo '$(srcdir)/'`ha/ha0storage.c - -libinnobase_a-ha0storage.obj: ha/ha0storage.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ha0storage.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ha0storage.Tpo -c -o libinnobase_a-ha0storage.obj `if test -f 'ha/ha0storage.c'; then $(CYGPATH_W) 'ha/ha0storage.c'; else $(CYGPATH_W) '$(srcdir)/ha/ha0storage.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha0storage.Tpo $(DEPDIR)/libinnobase_a-ha0storage.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0storage.c' object='libinnobase_a-ha0storage.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ha0storage.obj `if test -f 'ha/ha0storage.c'; then $(CYGPATH_W) 'ha/ha0storage.c'; else $(CYGPATH_W) '$(srcdir)/ha/ha0storage.c'; fi` - -libinnobase_a-hash0hash.o: ha/hash0hash.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-hash0hash.o -MD -MP -MF $(DEPDIR)/libinnobase_a-hash0hash.Tpo -c -o libinnobase_a-hash0hash.o `test -f 'ha/hash0hash.c' || echo '$(srcdir)/'`ha/hash0hash.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-hash0hash.Tpo $(DEPDIR)/libinnobase_a-hash0hash.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/hash0hash.c' object='libinnobase_a-hash0hash.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-hash0hash.o `test -f 'ha/hash0hash.c' || echo '$(srcdir)/'`ha/hash0hash.c - -libinnobase_a-hash0hash.obj: ha/hash0hash.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-hash0hash.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-hash0hash.Tpo -c -o libinnobase_a-hash0hash.obj `if test -f 'ha/hash0hash.c'; then $(CYGPATH_W) 'ha/hash0hash.c'; else $(CYGPATH_W) '$(srcdir)/ha/hash0hash.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-hash0hash.Tpo $(DEPDIR)/libinnobase_a-hash0hash.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/hash0hash.c' object='libinnobase_a-hash0hash.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-hash0hash.obj `if test -f 'ha/hash0hash.c'; then $(CYGPATH_W) 'ha/hash0hash.c'; else $(CYGPATH_W) '$(srcdir)/ha/hash0hash.c'; fi` - -libinnobase_a-ibuf0ibuf.o: ibuf/ibuf0ibuf.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ibuf0ibuf.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ibuf0ibuf.Tpo -c -o libinnobase_a-ibuf0ibuf.o `test -f 'ibuf/ibuf0ibuf.c' || echo '$(srcdir)/'`ibuf/ibuf0ibuf.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ibuf0ibuf.Tpo $(DEPDIR)/libinnobase_a-ibuf0ibuf.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ibuf/ibuf0ibuf.c' object='libinnobase_a-ibuf0ibuf.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ibuf0ibuf.o `test -f 'ibuf/ibuf0ibuf.c' || echo '$(srcdir)/'`ibuf/ibuf0ibuf.c - -libinnobase_a-ibuf0ibuf.obj: ibuf/ibuf0ibuf.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ibuf0ibuf.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ibuf0ibuf.Tpo -c -o libinnobase_a-ibuf0ibuf.obj `if test -f 'ibuf/ibuf0ibuf.c'; then $(CYGPATH_W) 'ibuf/ibuf0ibuf.c'; else $(CYGPATH_W) '$(srcdir)/ibuf/ibuf0ibuf.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ibuf0ibuf.Tpo $(DEPDIR)/libinnobase_a-ibuf0ibuf.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ibuf/ibuf0ibuf.c' object='libinnobase_a-ibuf0ibuf.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ibuf0ibuf.obj `if test -f 'ibuf/ibuf0ibuf.c'; then $(CYGPATH_W) 'ibuf/ibuf0ibuf.c'; else $(CYGPATH_W) '$(srcdir)/ibuf/ibuf0ibuf.c'; fi` - -libinnobase_a-lock0iter.o: lock/lock0iter.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lock0iter.o -MD -MP -MF $(DEPDIR)/libinnobase_a-lock0iter.Tpo -c -o libinnobase_a-lock0iter.o `test -f 'lock/lock0iter.c' || echo '$(srcdir)/'`lock/lock0iter.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lock0iter.Tpo $(DEPDIR)/libinnobase_a-lock0iter.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0iter.c' object='libinnobase_a-lock0iter.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lock0iter.o `test -f 'lock/lock0iter.c' || echo '$(srcdir)/'`lock/lock0iter.c - -libinnobase_a-lock0iter.obj: lock/lock0iter.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lock0iter.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-lock0iter.Tpo -c -o libinnobase_a-lock0iter.obj `if test -f 'lock/lock0iter.c'; then $(CYGPATH_W) 'lock/lock0iter.c'; else $(CYGPATH_W) '$(srcdir)/lock/lock0iter.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lock0iter.Tpo $(DEPDIR)/libinnobase_a-lock0iter.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0iter.c' object='libinnobase_a-lock0iter.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lock0iter.obj `if test -f 'lock/lock0iter.c'; then $(CYGPATH_W) 'lock/lock0iter.c'; else $(CYGPATH_W) '$(srcdir)/lock/lock0iter.c'; fi` - -libinnobase_a-lock0lock.o: lock/lock0lock.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lock0lock.o -MD -MP -MF $(DEPDIR)/libinnobase_a-lock0lock.Tpo -c -o libinnobase_a-lock0lock.o `test -f 'lock/lock0lock.c' || echo '$(srcdir)/'`lock/lock0lock.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lock0lock.Tpo $(DEPDIR)/libinnobase_a-lock0lock.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0lock.c' object='libinnobase_a-lock0lock.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lock0lock.o `test -f 'lock/lock0lock.c' || echo '$(srcdir)/'`lock/lock0lock.c - -libinnobase_a-lock0lock.obj: lock/lock0lock.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lock0lock.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-lock0lock.Tpo -c -o libinnobase_a-lock0lock.obj `if test -f 'lock/lock0lock.c'; then $(CYGPATH_W) 'lock/lock0lock.c'; else $(CYGPATH_W) '$(srcdir)/lock/lock0lock.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lock0lock.Tpo $(DEPDIR)/libinnobase_a-lock0lock.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0lock.c' object='libinnobase_a-lock0lock.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lock0lock.obj `if test -f 'lock/lock0lock.c'; then $(CYGPATH_W) 'lock/lock0lock.c'; else $(CYGPATH_W) '$(srcdir)/lock/lock0lock.c'; fi` - -libinnobase_a-log0log.o: log/log0log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-log0log.o -MD -MP -MF $(DEPDIR)/libinnobase_a-log0log.Tpo -c -o libinnobase_a-log0log.o `test -f 'log/log0log.c' || echo '$(srcdir)/'`log/log0log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-log0log.Tpo $(DEPDIR)/libinnobase_a-log0log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0log.c' object='libinnobase_a-log0log.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-log0log.o `test -f 'log/log0log.c' || echo '$(srcdir)/'`log/log0log.c - -libinnobase_a-log0log.obj: log/log0log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-log0log.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-log0log.Tpo -c -o libinnobase_a-log0log.obj `if test -f 'log/log0log.c'; then $(CYGPATH_W) 'log/log0log.c'; else $(CYGPATH_W) '$(srcdir)/log/log0log.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-log0log.Tpo $(DEPDIR)/libinnobase_a-log0log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0log.c' object='libinnobase_a-log0log.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-log0log.obj `if test -f 'log/log0log.c'; then $(CYGPATH_W) 'log/log0log.c'; else $(CYGPATH_W) '$(srcdir)/log/log0log.c'; fi` - -libinnobase_a-log0recv.o: log/log0recv.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-log0recv.o -MD -MP -MF $(DEPDIR)/libinnobase_a-log0recv.Tpo -c -o libinnobase_a-log0recv.o `test -f 'log/log0recv.c' || echo '$(srcdir)/'`log/log0recv.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-log0recv.Tpo $(DEPDIR)/libinnobase_a-log0recv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0recv.c' object='libinnobase_a-log0recv.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-log0recv.o `test -f 'log/log0recv.c' || echo '$(srcdir)/'`log/log0recv.c - -libinnobase_a-log0recv.obj: log/log0recv.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-log0recv.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-log0recv.Tpo -c -o libinnobase_a-log0recv.obj `if test -f 'log/log0recv.c'; then $(CYGPATH_W) 'log/log0recv.c'; else $(CYGPATH_W) '$(srcdir)/log/log0recv.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-log0recv.Tpo $(DEPDIR)/libinnobase_a-log0recv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0recv.c' object='libinnobase_a-log0recv.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-log0recv.obj `if test -f 'log/log0recv.c'; then $(CYGPATH_W) 'log/log0recv.c'; else $(CYGPATH_W) '$(srcdir)/log/log0recv.c'; fi` - -libinnobase_a-mach0data.o: mach/mach0data.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mach0data.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mach0data.Tpo -c -o libinnobase_a-mach0data.o `test -f 'mach/mach0data.c' || echo '$(srcdir)/'`mach/mach0data.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mach0data.Tpo $(DEPDIR)/libinnobase_a-mach0data.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mach/mach0data.c' object='libinnobase_a-mach0data.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mach0data.o `test -f 'mach/mach0data.c' || echo '$(srcdir)/'`mach/mach0data.c - -libinnobase_a-mach0data.obj: mach/mach0data.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mach0data.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mach0data.Tpo -c -o libinnobase_a-mach0data.obj `if test -f 'mach/mach0data.c'; then $(CYGPATH_W) 'mach/mach0data.c'; else $(CYGPATH_W) '$(srcdir)/mach/mach0data.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mach0data.Tpo $(DEPDIR)/libinnobase_a-mach0data.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mach/mach0data.c' object='libinnobase_a-mach0data.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mach0data.obj `if test -f 'mach/mach0data.c'; then $(CYGPATH_W) 'mach/mach0data.c'; else $(CYGPATH_W) '$(srcdir)/mach/mach0data.c'; fi` - -libinnobase_a-mem0mem.o: mem/mem0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mem0mem.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mem0mem.Tpo -c -o libinnobase_a-mem0mem.o `test -f 'mem/mem0mem.c' || echo '$(srcdir)/'`mem/mem0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mem0mem.Tpo $(DEPDIR)/libinnobase_a-mem0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0mem.c' object='libinnobase_a-mem0mem.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mem0mem.o `test -f 'mem/mem0mem.c' || echo '$(srcdir)/'`mem/mem0mem.c - -libinnobase_a-mem0mem.obj: mem/mem0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mem0mem.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mem0mem.Tpo -c -o libinnobase_a-mem0mem.obj `if test -f 'mem/mem0mem.c'; then $(CYGPATH_W) 'mem/mem0mem.c'; else $(CYGPATH_W) '$(srcdir)/mem/mem0mem.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mem0mem.Tpo $(DEPDIR)/libinnobase_a-mem0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0mem.c' object='libinnobase_a-mem0mem.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mem0mem.obj `if test -f 'mem/mem0mem.c'; then $(CYGPATH_W) 'mem/mem0mem.c'; else $(CYGPATH_W) '$(srcdir)/mem/mem0mem.c'; fi` - -libinnobase_a-mem0pool.o: mem/mem0pool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mem0pool.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mem0pool.Tpo -c -o libinnobase_a-mem0pool.o `test -f 'mem/mem0pool.c' || echo '$(srcdir)/'`mem/mem0pool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mem0pool.Tpo $(DEPDIR)/libinnobase_a-mem0pool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0pool.c' object='libinnobase_a-mem0pool.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mem0pool.o `test -f 'mem/mem0pool.c' || echo '$(srcdir)/'`mem/mem0pool.c - -libinnobase_a-mem0pool.obj: mem/mem0pool.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mem0pool.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mem0pool.Tpo -c -o libinnobase_a-mem0pool.obj `if test -f 'mem/mem0pool.c'; then $(CYGPATH_W) 'mem/mem0pool.c'; else $(CYGPATH_W) '$(srcdir)/mem/mem0pool.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mem0pool.Tpo $(DEPDIR)/libinnobase_a-mem0pool.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0pool.c' object='libinnobase_a-mem0pool.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mem0pool.obj `if test -f 'mem/mem0pool.c'; then $(CYGPATH_W) 'mem/mem0pool.c'; else $(CYGPATH_W) '$(srcdir)/mem/mem0pool.c'; fi` - -libinnobase_a-mtr0log.o: mtr/mtr0log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mtr0log.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mtr0log.Tpo -c -o libinnobase_a-mtr0log.o `test -f 'mtr/mtr0log.c' || echo '$(srcdir)/'`mtr/mtr0log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mtr0log.Tpo $(DEPDIR)/libinnobase_a-mtr0log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0log.c' object='libinnobase_a-mtr0log.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mtr0log.o `test -f 'mtr/mtr0log.c' || echo '$(srcdir)/'`mtr/mtr0log.c - -libinnobase_a-mtr0log.obj: mtr/mtr0log.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mtr0log.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mtr0log.Tpo -c -o libinnobase_a-mtr0log.obj `if test -f 'mtr/mtr0log.c'; then $(CYGPATH_W) 'mtr/mtr0log.c'; else $(CYGPATH_W) '$(srcdir)/mtr/mtr0log.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mtr0log.Tpo $(DEPDIR)/libinnobase_a-mtr0log.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0log.c' object='libinnobase_a-mtr0log.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mtr0log.obj `if test -f 'mtr/mtr0log.c'; then $(CYGPATH_W) 'mtr/mtr0log.c'; else $(CYGPATH_W) '$(srcdir)/mtr/mtr0log.c'; fi` - -libinnobase_a-mtr0mtr.o: mtr/mtr0mtr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mtr0mtr.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mtr0mtr.Tpo -c -o libinnobase_a-mtr0mtr.o `test -f 'mtr/mtr0mtr.c' || echo '$(srcdir)/'`mtr/mtr0mtr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mtr0mtr.Tpo $(DEPDIR)/libinnobase_a-mtr0mtr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0mtr.c' object='libinnobase_a-mtr0mtr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mtr0mtr.o `test -f 'mtr/mtr0mtr.c' || echo '$(srcdir)/'`mtr/mtr0mtr.c - -libinnobase_a-mtr0mtr.obj: mtr/mtr0mtr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-mtr0mtr.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mtr0mtr.Tpo -c -o libinnobase_a-mtr0mtr.obj `if test -f 'mtr/mtr0mtr.c'; then $(CYGPATH_W) 'mtr/mtr0mtr.c'; else $(CYGPATH_W) '$(srcdir)/mtr/mtr0mtr.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mtr0mtr.Tpo $(DEPDIR)/libinnobase_a-mtr0mtr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0mtr.c' object='libinnobase_a-mtr0mtr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-mtr0mtr.obj `if test -f 'mtr/mtr0mtr.c'; then $(CYGPATH_W) 'mtr/mtr0mtr.c'; else $(CYGPATH_W) '$(srcdir)/mtr/mtr0mtr.c'; fi` - -libinnobase_a-os0file.o: os/os0file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0file.o -MD -MP -MF $(DEPDIR)/libinnobase_a-os0file.Tpo -c -o libinnobase_a-os0file.o `test -f 'os/os0file.c' || echo '$(srcdir)/'`os/os0file.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0file.Tpo $(DEPDIR)/libinnobase_a-os0file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0file.c' object='libinnobase_a-os0file.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0file.o `test -f 'os/os0file.c' || echo '$(srcdir)/'`os/os0file.c - -libinnobase_a-os0file.obj: os/os0file.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0file.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-os0file.Tpo -c -o libinnobase_a-os0file.obj `if test -f 'os/os0file.c'; then $(CYGPATH_W) 'os/os0file.c'; else $(CYGPATH_W) '$(srcdir)/os/os0file.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0file.Tpo $(DEPDIR)/libinnobase_a-os0file.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0file.c' object='libinnobase_a-os0file.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0file.obj `if test -f 'os/os0file.c'; then $(CYGPATH_W) 'os/os0file.c'; else $(CYGPATH_W) '$(srcdir)/os/os0file.c'; fi` - -libinnobase_a-os0proc.o: os/os0proc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0proc.o -MD -MP -MF $(DEPDIR)/libinnobase_a-os0proc.Tpo -c -o libinnobase_a-os0proc.o `test -f 'os/os0proc.c' || echo '$(srcdir)/'`os/os0proc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0proc.Tpo $(DEPDIR)/libinnobase_a-os0proc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0proc.c' object='libinnobase_a-os0proc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0proc.o `test -f 'os/os0proc.c' || echo '$(srcdir)/'`os/os0proc.c - -libinnobase_a-os0proc.obj: os/os0proc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0proc.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-os0proc.Tpo -c -o libinnobase_a-os0proc.obj `if test -f 'os/os0proc.c'; then $(CYGPATH_W) 'os/os0proc.c'; else $(CYGPATH_W) '$(srcdir)/os/os0proc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0proc.Tpo $(DEPDIR)/libinnobase_a-os0proc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0proc.c' object='libinnobase_a-os0proc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0proc.obj `if test -f 'os/os0proc.c'; then $(CYGPATH_W) 'os/os0proc.c'; else $(CYGPATH_W) '$(srcdir)/os/os0proc.c'; fi` - -libinnobase_a-os0sync.o: os/os0sync.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0sync.o -MD -MP -MF $(DEPDIR)/libinnobase_a-os0sync.Tpo -c -o libinnobase_a-os0sync.o `test -f 'os/os0sync.c' || echo '$(srcdir)/'`os/os0sync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0sync.Tpo $(DEPDIR)/libinnobase_a-os0sync.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0sync.c' object='libinnobase_a-os0sync.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0sync.o `test -f 'os/os0sync.c' || echo '$(srcdir)/'`os/os0sync.c - -libinnobase_a-os0sync.obj: os/os0sync.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0sync.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-os0sync.Tpo -c -o libinnobase_a-os0sync.obj `if test -f 'os/os0sync.c'; then $(CYGPATH_W) 'os/os0sync.c'; else $(CYGPATH_W) '$(srcdir)/os/os0sync.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0sync.Tpo $(DEPDIR)/libinnobase_a-os0sync.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0sync.c' object='libinnobase_a-os0sync.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0sync.obj `if test -f 'os/os0sync.c'; then $(CYGPATH_W) 'os/os0sync.c'; else $(CYGPATH_W) '$(srcdir)/os/os0sync.c'; fi` - -libinnobase_a-os0thread.o: os/os0thread.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0thread.o -MD -MP -MF $(DEPDIR)/libinnobase_a-os0thread.Tpo -c -o libinnobase_a-os0thread.o `test -f 'os/os0thread.c' || echo '$(srcdir)/'`os/os0thread.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0thread.Tpo $(DEPDIR)/libinnobase_a-os0thread.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0thread.c' object='libinnobase_a-os0thread.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0thread.o `test -f 'os/os0thread.c' || echo '$(srcdir)/'`os/os0thread.c - -libinnobase_a-os0thread.obj: os/os0thread.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-os0thread.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-os0thread.Tpo -c -o libinnobase_a-os0thread.obj `if test -f 'os/os0thread.c'; then $(CYGPATH_W) 'os/os0thread.c'; else $(CYGPATH_W) '$(srcdir)/os/os0thread.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-os0thread.Tpo $(DEPDIR)/libinnobase_a-os0thread.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0thread.c' object='libinnobase_a-os0thread.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-os0thread.obj `if test -f 'os/os0thread.c'; then $(CYGPATH_W) 'os/os0thread.c'; else $(CYGPATH_W) '$(srcdir)/os/os0thread.c'; fi` - -libinnobase_a-page0cur.o: page/page0cur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0cur.o -MD -MP -MF $(DEPDIR)/libinnobase_a-page0cur.Tpo -c -o libinnobase_a-page0cur.o `test -f 'page/page0cur.c' || echo '$(srcdir)/'`page/page0cur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0cur.Tpo $(DEPDIR)/libinnobase_a-page0cur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0cur.c' object='libinnobase_a-page0cur.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0cur.o `test -f 'page/page0cur.c' || echo '$(srcdir)/'`page/page0cur.c - -libinnobase_a-page0cur.obj: page/page0cur.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0cur.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-page0cur.Tpo -c -o libinnobase_a-page0cur.obj `if test -f 'page/page0cur.c'; then $(CYGPATH_W) 'page/page0cur.c'; else $(CYGPATH_W) '$(srcdir)/page/page0cur.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0cur.Tpo $(DEPDIR)/libinnobase_a-page0cur.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0cur.c' object='libinnobase_a-page0cur.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0cur.obj `if test -f 'page/page0cur.c'; then $(CYGPATH_W) 'page/page0cur.c'; else $(CYGPATH_W) '$(srcdir)/page/page0cur.c'; fi` - -libinnobase_a-page0page.o: page/page0page.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0page.o -MD -MP -MF $(DEPDIR)/libinnobase_a-page0page.Tpo -c -o libinnobase_a-page0page.o `test -f 'page/page0page.c' || echo '$(srcdir)/'`page/page0page.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0page.Tpo $(DEPDIR)/libinnobase_a-page0page.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0page.c' object='libinnobase_a-page0page.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0page.o `test -f 'page/page0page.c' || echo '$(srcdir)/'`page/page0page.c - -libinnobase_a-page0page.obj: page/page0page.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0page.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-page0page.Tpo -c -o libinnobase_a-page0page.obj `if test -f 'page/page0page.c'; then $(CYGPATH_W) 'page/page0page.c'; else $(CYGPATH_W) '$(srcdir)/page/page0page.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0page.Tpo $(DEPDIR)/libinnobase_a-page0page.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0page.c' object='libinnobase_a-page0page.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0page.obj `if test -f 'page/page0page.c'; then $(CYGPATH_W) 'page/page0page.c'; else $(CYGPATH_W) '$(srcdir)/page/page0page.c'; fi` - -libinnobase_a-page0zip.o: page/page0zip.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0zip.o -MD -MP -MF $(DEPDIR)/libinnobase_a-page0zip.Tpo -c -o libinnobase_a-page0zip.o `test -f 'page/page0zip.c' || echo '$(srcdir)/'`page/page0zip.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0zip.Tpo $(DEPDIR)/libinnobase_a-page0zip.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0zip.c' object='libinnobase_a-page0zip.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0zip.o `test -f 'page/page0zip.c' || echo '$(srcdir)/'`page/page0zip.c - -libinnobase_a-page0zip.obj: page/page0zip.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-page0zip.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-page0zip.Tpo -c -o libinnobase_a-page0zip.obj `if test -f 'page/page0zip.c'; then $(CYGPATH_W) 'page/page0zip.c'; else $(CYGPATH_W) '$(srcdir)/page/page0zip.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-page0zip.Tpo $(DEPDIR)/libinnobase_a-page0zip.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0zip.c' object='libinnobase_a-page0zip.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-page0zip.obj `if test -f 'page/page0zip.c'; then $(CYGPATH_W) 'page/page0zip.c'; else $(CYGPATH_W) '$(srcdir)/page/page0zip.c'; fi` - -libinnobase_a-lexyy.o: pars/lexyy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lexyy.o -MD -MP -MF $(DEPDIR)/libinnobase_a-lexyy.Tpo -c -o libinnobase_a-lexyy.o `test -f 'pars/lexyy.c' || echo '$(srcdir)/'`pars/lexyy.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lexyy.Tpo $(DEPDIR)/libinnobase_a-lexyy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/lexyy.c' object='libinnobase_a-lexyy.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lexyy.o `test -f 'pars/lexyy.c' || echo '$(srcdir)/'`pars/lexyy.c - -libinnobase_a-lexyy.obj: pars/lexyy.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-lexyy.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-lexyy.Tpo -c -o libinnobase_a-lexyy.obj `if test -f 'pars/lexyy.c'; then $(CYGPATH_W) 'pars/lexyy.c'; else $(CYGPATH_W) '$(srcdir)/pars/lexyy.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-lexyy.Tpo $(DEPDIR)/libinnobase_a-lexyy.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/lexyy.c' object='libinnobase_a-lexyy.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-lexyy.obj `if test -f 'pars/lexyy.c'; then $(CYGPATH_W) 'pars/lexyy.c'; else $(CYGPATH_W) '$(srcdir)/pars/lexyy.c'; fi` - -libinnobase_a-pars0grm.o: pars/pars0grm.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0grm.o -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0grm.Tpo -c -o libinnobase_a-pars0grm.o `test -f 'pars/pars0grm.c' || echo '$(srcdir)/'`pars/pars0grm.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0grm.Tpo $(DEPDIR)/libinnobase_a-pars0grm.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0grm.c' object='libinnobase_a-pars0grm.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0grm.o `test -f 'pars/pars0grm.c' || echo '$(srcdir)/'`pars/pars0grm.c - -libinnobase_a-pars0grm.obj: pars/pars0grm.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0grm.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0grm.Tpo -c -o libinnobase_a-pars0grm.obj `if test -f 'pars/pars0grm.c'; then $(CYGPATH_W) 'pars/pars0grm.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0grm.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0grm.Tpo $(DEPDIR)/libinnobase_a-pars0grm.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0grm.c' object='libinnobase_a-pars0grm.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0grm.obj `if test -f 'pars/pars0grm.c'; then $(CYGPATH_W) 'pars/pars0grm.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0grm.c'; fi` - -libinnobase_a-pars0opt.o: pars/pars0opt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0opt.o -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0opt.Tpo -c -o libinnobase_a-pars0opt.o `test -f 'pars/pars0opt.c' || echo '$(srcdir)/'`pars/pars0opt.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0opt.Tpo $(DEPDIR)/libinnobase_a-pars0opt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0opt.c' object='libinnobase_a-pars0opt.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0opt.o `test -f 'pars/pars0opt.c' || echo '$(srcdir)/'`pars/pars0opt.c - -libinnobase_a-pars0opt.obj: pars/pars0opt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0opt.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0opt.Tpo -c -o libinnobase_a-pars0opt.obj `if test -f 'pars/pars0opt.c'; then $(CYGPATH_W) 'pars/pars0opt.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0opt.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0opt.Tpo $(DEPDIR)/libinnobase_a-pars0opt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0opt.c' object='libinnobase_a-pars0opt.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0opt.obj `if test -f 'pars/pars0opt.c'; then $(CYGPATH_W) 'pars/pars0opt.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0opt.c'; fi` - -libinnobase_a-pars0pars.o: pars/pars0pars.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0pars.o -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0pars.Tpo -c -o libinnobase_a-pars0pars.o `test -f 'pars/pars0pars.c' || echo '$(srcdir)/'`pars/pars0pars.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0pars.Tpo $(DEPDIR)/libinnobase_a-pars0pars.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0pars.c' object='libinnobase_a-pars0pars.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0pars.o `test -f 'pars/pars0pars.c' || echo '$(srcdir)/'`pars/pars0pars.c - -libinnobase_a-pars0pars.obj: pars/pars0pars.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0pars.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0pars.Tpo -c -o libinnobase_a-pars0pars.obj `if test -f 'pars/pars0pars.c'; then $(CYGPATH_W) 'pars/pars0pars.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0pars.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0pars.Tpo $(DEPDIR)/libinnobase_a-pars0pars.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0pars.c' object='libinnobase_a-pars0pars.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0pars.obj `if test -f 'pars/pars0pars.c'; then $(CYGPATH_W) 'pars/pars0pars.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0pars.c'; fi` - -libinnobase_a-pars0sym.o: pars/pars0sym.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0sym.o -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0sym.Tpo -c -o libinnobase_a-pars0sym.o `test -f 'pars/pars0sym.c' || echo '$(srcdir)/'`pars/pars0sym.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0sym.Tpo $(DEPDIR)/libinnobase_a-pars0sym.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0sym.c' object='libinnobase_a-pars0sym.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0sym.o `test -f 'pars/pars0sym.c' || echo '$(srcdir)/'`pars/pars0sym.c - -libinnobase_a-pars0sym.obj: pars/pars0sym.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-pars0sym.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-pars0sym.Tpo -c -o libinnobase_a-pars0sym.obj `if test -f 'pars/pars0sym.c'; then $(CYGPATH_W) 'pars/pars0sym.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0sym.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-pars0sym.Tpo $(DEPDIR)/libinnobase_a-pars0sym.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0sym.c' object='libinnobase_a-pars0sym.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-pars0sym.obj `if test -f 'pars/pars0sym.c'; then $(CYGPATH_W) 'pars/pars0sym.c'; else $(CYGPATH_W) '$(srcdir)/pars/pars0sym.c'; fi` - -libinnobase_a-que0que.o: que/que0que.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-que0que.o -MD -MP -MF $(DEPDIR)/libinnobase_a-que0que.Tpo -c -o libinnobase_a-que0que.o `test -f 'que/que0que.c' || echo '$(srcdir)/'`que/que0que.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-que0que.Tpo $(DEPDIR)/libinnobase_a-que0que.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='que/que0que.c' object='libinnobase_a-que0que.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-que0que.o `test -f 'que/que0que.c' || echo '$(srcdir)/'`que/que0que.c - -libinnobase_a-que0que.obj: que/que0que.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-que0que.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-que0que.Tpo -c -o libinnobase_a-que0que.obj `if test -f 'que/que0que.c'; then $(CYGPATH_W) 'que/que0que.c'; else $(CYGPATH_W) '$(srcdir)/que/que0que.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-que0que.Tpo $(DEPDIR)/libinnobase_a-que0que.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='que/que0que.c' object='libinnobase_a-que0que.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-que0que.obj `if test -f 'que/que0que.c'; then $(CYGPATH_W) 'que/que0que.c'; else $(CYGPATH_W) '$(srcdir)/que/que0que.c'; fi` - -libinnobase_a-read0read.o: read/read0read.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-read0read.o -MD -MP -MF $(DEPDIR)/libinnobase_a-read0read.Tpo -c -o libinnobase_a-read0read.o `test -f 'read/read0read.c' || echo '$(srcdir)/'`read/read0read.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-read0read.Tpo $(DEPDIR)/libinnobase_a-read0read.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read/read0read.c' object='libinnobase_a-read0read.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-read0read.o `test -f 'read/read0read.c' || echo '$(srcdir)/'`read/read0read.c - -libinnobase_a-read0read.obj: read/read0read.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-read0read.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-read0read.Tpo -c -o libinnobase_a-read0read.obj `if test -f 'read/read0read.c'; then $(CYGPATH_W) 'read/read0read.c'; else $(CYGPATH_W) '$(srcdir)/read/read0read.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-read0read.Tpo $(DEPDIR)/libinnobase_a-read0read.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read/read0read.c' object='libinnobase_a-read0read.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-read0read.obj `if test -f 'read/read0read.c'; then $(CYGPATH_W) 'read/read0read.c'; else $(CYGPATH_W) '$(srcdir)/read/read0read.c'; fi` - -libinnobase_a-rem0cmp.o: rem/rem0cmp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-rem0cmp.o -MD -MP -MF $(DEPDIR)/libinnobase_a-rem0cmp.Tpo -c -o libinnobase_a-rem0cmp.o `test -f 'rem/rem0cmp.c' || echo '$(srcdir)/'`rem/rem0cmp.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-rem0cmp.Tpo $(DEPDIR)/libinnobase_a-rem0cmp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0cmp.c' object='libinnobase_a-rem0cmp.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-rem0cmp.o `test -f 'rem/rem0cmp.c' || echo '$(srcdir)/'`rem/rem0cmp.c - -libinnobase_a-rem0cmp.obj: rem/rem0cmp.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-rem0cmp.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-rem0cmp.Tpo -c -o libinnobase_a-rem0cmp.obj `if test -f 'rem/rem0cmp.c'; then $(CYGPATH_W) 'rem/rem0cmp.c'; else $(CYGPATH_W) '$(srcdir)/rem/rem0cmp.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-rem0cmp.Tpo $(DEPDIR)/libinnobase_a-rem0cmp.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0cmp.c' object='libinnobase_a-rem0cmp.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-rem0cmp.obj `if test -f 'rem/rem0cmp.c'; then $(CYGPATH_W) 'rem/rem0cmp.c'; else $(CYGPATH_W) '$(srcdir)/rem/rem0cmp.c'; fi` - -libinnobase_a-rem0rec.o: rem/rem0rec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-rem0rec.o -MD -MP -MF $(DEPDIR)/libinnobase_a-rem0rec.Tpo -c -o libinnobase_a-rem0rec.o `test -f 'rem/rem0rec.c' || echo '$(srcdir)/'`rem/rem0rec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-rem0rec.Tpo $(DEPDIR)/libinnobase_a-rem0rec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0rec.c' object='libinnobase_a-rem0rec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-rem0rec.o `test -f 'rem/rem0rec.c' || echo '$(srcdir)/'`rem/rem0rec.c - -libinnobase_a-rem0rec.obj: rem/rem0rec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-rem0rec.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-rem0rec.Tpo -c -o libinnobase_a-rem0rec.obj `if test -f 'rem/rem0rec.c'; then $(CYGPATH_W) 'rem/rem0rec.c'; else $(CYGPATH_W) '$(srcdir)/rem/rem0rec.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-rem0rec.Tpo $(DEPDIR)/libinnobase_a-rem0rec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0rec.c' object='libinnobase_a-rem0rec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-rem0rec.obj `if test -f 'rem/rem0rec.c'; then $(CYGPATH_W) 'rem/rem0rec.c'; else $(CYGPATH_W) '$(srcdir)/rem/rem0rec.c'; fi` - -libinnobase_a-row0ext.o: row/row0ext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0ext.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0ext.Tpo -c -o libinnobase_a-row0ext.o `test -f 'row/row0ext.c' || echo '$(srcdir)/'`row/row0ext.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0ext.Tpo $(DEPDIR)/libinnobase_a-row0ext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ext.c' object='libinnobase_a-row0ext.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0ext.o `test -f 'row/row0ext.c' || echo '$(srcdir)/'`row/row0ext.c - -libinnobase_a-row0ext.obj: row/row0ext.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0ext.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0ext.Tpo -c -o libinnobase_a-row0ext.obj `if test -f 'row/row0ext.c'; then $(CYGPATH_W) 'row/row0ext.c'; else $(CYGPATH_W) '$(srcdir)/row/row0ext.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0ext.Tpo $(DEPDIR)/libinnobase_a-row0ext.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ext.c' object='libinnobase_a-row0ext.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0ext.obj `if test -f 'row/row0ext.c'; then $(CYGPATH_W) 'row/row0ext.c'; else $(CYGPATH_W) '$(srcdir)/row/row0ext.c'; fi` - -libinnobase_a-row0ins.o: row/row0ins.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0ins.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0ins.Tpo -c -o libinnobase_a-row0ins.o `test -f 'row/row0ins.c' || echo '$(srcdir)/'`row/row0ins.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0ins.Tpo $(DEPDIR)/libinnobase_a-row0ins.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ins.c' object='libinnobase_a-row0ins.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0ins.o `test -f 'row/row0ins.c' || echo '$(srcdir)/'`row/row0ins.c - -libinnobase_a-row0ins.obj: row/row0ins.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0ins.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0ins.Tpo -c -o libinnobase_a-row0ins.obj `if test -f 'row/row0ins.c'; then $(CYGPATH_W) 'row/row0ins.c'; else $(CYGPATH_W) '$(srcdir)/row/row0ins.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0ins.Tpo $(DEPDIR)/libinnobase_a-row0ins.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ins.c' object='libinnobase_a-row0ins.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0ins.obj `if test -f 'row/row0ins.c'; then $(CYGPATH_W) 'row/row0ins.c'; else $(CYGPATH_W) '$(srcdir)/row/row0ins.c'; fi` - -libinnobase_a-row0merge.o: row/row0merge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0merge.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0merge.Tpo -c -o libinnobase_a-row0merge.o `test -f 'row/row0merge.c' || echo '$(srcdir)/'`row/row0merge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0merge.Tpo $(DEPDIR)/libinnobase_a-row0merge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0merge.c' object='libinnobase_a-row0merge.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0merge.o `test -f 'row/row0merge.c' || echo '$(srcdir)/'`row/row0merge.c - -libinnobase_a-row0merge.obj: row/row0merge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0merge.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0merge.Tpo -c -o libinnobase_a-row0merge.obj `if test -f 'row/row0merge.c'; then $(CYGPATH_W) 'row/row0merge.c'; else $(CYGPATH_W) '$(srcdir)/row/row0merge.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0merge.Tpo $(DEPDIR)/libinnobase_a-row0merge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0merge.c' object='libinnobase_a-row0merge.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0merge.obj `if test -f 'row/row0merge.c'; then $(CYGPATH_W) 'row/row0merge.c'; else $(CYGPATH_W) '$(srcdir)/row/row0merge.c'; fi` - -libinnobase_a-row0mysql.o: row/row0mysql.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0mysql.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0mysql.Tpo -c -o libinnobase_a-row0mysql.o `test -f 'row/row0mysql.c' || echo '$(srcdir)/'`row/row0mysql.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0mysql.Tpo $(DEPDIR)/libinnobase_a-row0mysql.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0mysql.c' object='libinnobase_a-row0mysql.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0mysql.o `test -f 'row/row0mysql.c' || echo '$(srcdir)/'`row/row0mysql.c - -libinnobase_a-row0mysql.obj: row/row0mysql.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0mysql.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0mysql.Tpo -c -o libinnobase_a-row0mysql.obj `if test -f 'row/row0mysql.c'; then $(CYGPATH_W) 'row/row0mysql.c'; else $(CYGPATH_W) '$(srcdir)/row/row0mysql.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0mysql.Tpo $(DEPDIR)/libinnobase_a-row0mysql.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0mysql.c' object='libinnobase_a-row0mysql.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0mysql.obj `if test -f 'row/row0mysql.c'; then $(CYGPATH_W) 'row/row0mysql.c'; else $(CYGPATH_W) '$(srcdir)/row/row0mysql.c'; fi` - -libinnobase_a-row0purge.o: row/row0purge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0purge.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0purge.Tpo -c -o libinnobase_a-row0purge.o `test -f 'row/row0purge.c' || echo '$(srcdir)/'`row/row0purge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0purge.Tpo $(DEPDIR)/libinnobase_a-row0purge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0purge.c' object='libinnobase_a-row0purge.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0purge.o `test -f 'row/row0purge.c' || echo '$(srcdir)/'`row/row0purge.c - -libinnobase_a-row0purge.obj: row/row0purge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0purge.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0purge.Tpo -c -o libinnobase_a-row0purge.obj `if test -f 'row/row0purge.c'; then $(CYGPATH_W) 'row/row0purge.c'; else $(CYGPATH_W) '$(srcdir)/row/row0purge.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0purge.Tpo $(DEPDIR)/libinnobase_a-row0purge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0purge.c' object='libinnobase_a-row0purge.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0purge.obj `if test -f 'row/row0purge.c'; then $(CYGPATH_W) 'row/row0purge.c'; else $(CYGPATH_W) '$(srcdir)/row/row0purge.c'; fi` - -libinnobase_a-row0row.o: row/row0row.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0row.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0row.Tpo -c -o libinnobase_a-row0row.o `test -f 'row/row0row.c' || echo '$(srcdir)/'`row/row0row.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0row.Tpo $(DEPDIR)/libinnobase_a-row0row.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0row.c' object='libinnobase_a-row0row.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0row.o `test -f 'row/row0row.c' || echo '$(srcdir)/'`row/row0row.c - -libinnobase_a-row0row.obj: row/row0row.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0row.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0row.Tpo -c -o libinnobase_a-row0row.obj `if test -f 'row/row0row.c'; then $(CYGPATH_W) 'row/row0row.c'; else $(CYGPATH_W) '$(srcdir)/row/row0row.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0row.Tpo $(DEPDIR)/libinnobase_a-row0row.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0row.c' object='libinnobase_a-row0row.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0row.obj `if test -f 'row/row0row.c'; then $(CYGPATH_W) 'row/row0row.c'; else $(CYGPATH_W) '$(srcdir)/row/row0row.c'; fi` - -libinnobase_a-row0sel.o: row/row0sel.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0sel.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0sel.Tpo -c -o libinnobase_a-row0sel.o `test -f 'row/row0sel.c' || echo '$(srcdir)/'`row/row0sel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0sel.Tpo $(DEPDIR)/libinnobase_a-row0sel.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0sel.c' object='libinnobase_a-row0sel.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0sel.o `test -f 'row/row0sel.c' || echo '$(srcdir)/'`row/row0sel.c - -libinnobase_a-row0sel.obj: row/row0sel.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0sel.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0sel.Tpo -c -o libinnobase_a-row0sel.obj `if test -f 'row/row0sel.c'; then $(CYGPATH_W) 'row/row0sel.c'; else $(CYGPATH_W) '$(srcdir)/row/row0sel.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0sel.Tpo $(DEPDIR)/libinnobase_a-row0sel.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0sel.c' object='libinnobase_a-row0sel.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0sel.obj `if test -f 'row/row0sel.c'; then $(CYGPATH_W) 'row/row0sel.c'; else $(CYGPATH_W) '$(srcdir)/row/row0sel.c'; fi` - -libinnobase_a-row0uins.o: row/row0uins.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0uins.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0uins.Tpo -c -o libinnobase_a-row0uins.o `test -f 'row/row0uins.c' || echo '$(srcdir)/'`row/row0uins.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0uins.Tpo $(DEPDIR)/libinnobase_a-row0uins.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0uins.c' object='libinnobase_a-row0uins.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0uins.o `test -f 'row/row0uins.c' || echo '$(srcdir)/'`row/row0uins.c - -libinnobase_a-row0uins.obj: row/row0uins.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0uins.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0uins.Tpo -c -o libinnobase_a-row0uins.obj `if test -f 'row/row0uins.c'; then $(CYGPATH_W) 'row/row0uins.c'; else $(CYGPATH_W) '$(srcdir)/row/row0uins.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0uins.Tpo $(DEPDIR)/libinnobase_a-row0uins.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0uins.c' object='libinnobase_a-row0uins.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0uins.obj `if test -f 'row/row0uins.c'; then $(CYGPATH_W) 'row/row0uins.c'; else $(CYGPATH_W) '$(srcdir)/row/row0uins.c'; fi` - -libinnobase_a-row0umod.o: row/row0umod.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0umod.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0umod.Tpo -c -o libinnobase_a-row0umod.o `test -f 'row/row0umod.c' || echo '$(srcdir)/'`row/row0umod.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0umod.Tpo $(DEPDIR)/libinnobase_a-row0umod.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0umod.c' object='libinnobase_a-row0umod.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0umod.o `test -f 'row/row0umod.c' || echo '$(srcdir)/'`row/row0umod.c - -libinnobase_a-row0umod.obj: row/row0umod.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0umod.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0umod.Tpo -c -o libinnobase_a-row0umod.obj `if test -f 'row/row0umod.c'; then $(CYGPATH_W) 'row/row0umod.c'; else $(CYGPATH_W) '$(srcdir)/row/row0umod.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0umod.Tpo $(DEPDIR)/libinnobase_a-row0umod.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0umod.c' object='libinnobase_a-row0umod.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0umod.obj `if test -f 'row/row0umod.c'; then $(CYGPATH_W) 'row/row0umod.c'; else $(CYGPATH_W) '$(srcdir)/row/row0umod.c'; fi` - -libinnobase_a-row0undo.o: row/row0undo.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0undo.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0undo.Tpo -c -o libinnobase_a-row0undo.o `test -f 'row/row0undo.c' || echo '$(srcdir)/'`row/row0undo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0undo.Tpo $(DEPDIR)/libinnobase_a-row0undo.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0undo.c' object='libinnobase_a-row0undo.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0undo.o `test -f 'row/row0undo.c' || echo '$(srcdir)/'`row/row0undo.c - -libinnobase_a-row0undo.obj: row/row0undo.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0undo.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0undo.Tpo -c -o libinnobase_a-row0undo.obj `if test -f 'row/row0undo.c'; then $(CYGPATH_W) 'row/row0undo.c'; else $(CYGPATH_W) '$(srcdir)/row/row0undo.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0undo.Tpo $(DEPDIR)/libinnobase_a-row0undo.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0undo.c' object='libinnobase_a-row0undo.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0undo.obj `if test -f 'row/row0undo.c'; then $(CYGPATH_W) 'row/row0undo.c'; else $(CYGPATH_W) '$(srcdir)/row/row0undo.c'; fi` - -libinnobase_a-row0upd.o: row/row0upd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0upd.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0upd.Tpo -c -o libinnobase_a-row0upd.o `test -f 'row/row0upd.c' || echo '$(srcdir)/'`row/row0upd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0upd.Tpo $(DEPDIR)/libinnobase_a-row0upd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0upd.c' object='libinnobase_a-row0upd.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0upd.o `test -f 'row/row0upd.c' || echo '$(srcdir)/'`row/row0upd.c - -libinnobase_a-row0upd.obj: row/row0upd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0upd.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0upd.Tpo -c -o libinnobase_a-row0upd.obj `if test -f 'row/row0upd.c'; then $(CYGPATH_W) 'row/row0upd.c'; else $(CYGPATH_W) '$(srcdir)/row/row0upd.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0upd.Tpo $(DEPDIR)/libinnobase_a-row0upd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0upd.c' object='libinnobase_a-row0upd.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0upd.obj `if test -f 'row/row0upd.c'; then $(CYGPATH_W) 'row/row0upd.c'; else $(CYGPATH_W) '$(srcdir)/row/row0upd.c'; fi` - -libinnobase_a-row0vers.o: row/row0vers.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0vers.o -MD -MP -MF $(DEPDIR)/libinnobase_a-row0vers.Tpo -c -o libinnobase_a-row0vers.o `test -f 'row/row0vers.c' || echo '$(srcdir)/'`row/row0vers.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0vers.Tpo $(DEPDIR)/libinnobase_a-row0vers.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0vers.c' object='libinnobase_a-row0vers.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0vers.o `test -f 'row/row0vers.c' || echo '$(srcdir)/'`row/row0vers.c - -libinnobase_a-row0vers.obj: row/row0vers.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-row0vers.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-row0vers.Tpo -c -o libinnobase_a-row0vers.obj `if test -f 'row/row0vers.c'; then $(CYGPATH_W) 'row/row0vers.c'; else $(CYGPATH_W) '$(srcdir)/row/row0vers.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-row0vers.Tpo $(DEPDIR)/libinnobase_a-row0vers.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0vers.c' object='libinnobase_a-row0vers.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-row0vers.obj `if test -f 'row/row0vers.c'; then $(CYGPATH_W) 'row/row0vers.c'; else $(CYGPATH_W) '$(srcdir)/row/row0vers.c'; fi` - -libinnobase_a-srv0que.o: srv/srv0que.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0que.o -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0que.Tpo -c -o libinnobase_a-srv0que.o `test -f 'srv/srv0que.c' || echo '$(srcdir)/'`srv/srv0que.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0que.Tpo $(DEPDIR)/libinnobase_a-srv0que.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0que.c' object='libinnobase_a-srv0que.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0que.o `test -f 'srv/srv0que.c' || echo '$(srcdir)/'`srv/srv0que.c - -libinnobase_a-srv0que.obj: srv/srv0que.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0que.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0que.Tpo -c -o libinnobase_a-srv0que.obj `if test -f 'srv/srv0que.c'; then $(CYGPATH_W) 'srv/srv0que.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0que.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0que.Tpo $(DEPDIR)/libinnobase_a-srv0que.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0que.c' object='libinnobase_a-srv0que.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0que.obj `if test -f 'srv/srv0que.c'; then $(CYGPATH_W) 'srv/srv0que.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0que.c'; fi` - -libinnobase_a-srv0srv.o: srv/srv0srv.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0srv.o -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0srv.Tpo -c -o libinnobase_a-srv0srv.o `test -f 'srv/srv0srv.c' || echo '$(srcdir)/'`srv/srv0srv.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0srv.Tpo $(DEPDIR)/libinnobase_a-srv0srv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0srv.c' object='libinnobase_a-srv0srv.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0srv.o `test -f 'srv/srv0srv.c' || echo '$(srcdir)/'`srv/srv0srv.c - -libinnobase_a-srv0srv.obj: srv/srv0srv.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0srv.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0srv.Tpo -c -o libinnobase_a-srv0srv.obj `if test -f 'srv/srv0srv.c'; then $(CYGPATH_W) 'srv/srv0srv.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0srv.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0srv.Tpo $(DEPDIR)/libinnobase_a-srv0srv.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0srv.c' object='libinnobase_a-srv0srv.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0srv.obj `if test -f 'srv/srv0srv.c'; then $(CYGPATH_W) 'srv/srv0srv.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0srv.c'; fi` - -libinnobase_a-srv0start.o: srv/srv0start.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0start.o -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0start.Tpo -c -o libinnobase_a-srv0start.o `test -f 'srv/srv0start.c' || echo '$(srcdir)/'`srv/srv0start.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0start.Tpo $(DEPDIR)/libinnobase_a-srv0start.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0start.c' object='libinnobase_a-srv0start.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0start.o `test -f 'srv/srv0start.c' || echo '$(srcdir)/'`srv/srv0start.c - -libinnobase_a-srv0start.obj: srv/srv0start.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-srv0start.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-srv0start.Tpo -c -o libinnobase_a-srv0start.obj `if test -f 'srv/srv0start.c'; then $(CYGPATH_W) 'srv/srv0start.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0start.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-srv0start.Tpo $(DEPDIR)/libinnobase_a-srv0start.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0start.c' object='libinnobase_a-srv0start.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-srv0start.obj `if test -f 'srv/srv0start.c'; then $(CYGPATH_W) 'srv/srv0start.c'; else $(CYGPATH_W) '$(srcdir)/srv/srv0start.c'; fi` - -libinnobase_a-sync0arr.o: sync/sync0arr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0arr.o -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0arr.Tpo -c -o libinnobase_a-sync0arr.o `test -f 'sync/sync0arr.c' || echo '$(srcdir)/'`sync/sync0arr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0arr.Tpo $(DEPDIR)/libinnobase_a-sync0arr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0arr.c' object='libinnobase_a-sync0arr.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0arr.o `test -f 'sync/sync0arr.c' || echo '$(srcdir)/'`sync/sync0arr.c - -libinnobase_a-sync0arr.obj: sync/sync0arr.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0arr.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0arr.Tpo -c -o libinnobase_a-sync0arr.obj `if test -f 'sync/sync0arr.c'; then $(CYGPATH_W) 'sync/sync0arr.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0arr.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0arr.Tpo $(DEPDIR)/libinnobase_a-sync0arr.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0arr.c' object='libinnobase_a-sync0arr.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0arr.obj `if test -f 'sync/sync0arr.c'; then $(CYGPATH_W) 'sync/sync0arr.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0arr.c'; fi` - -libinnobase_a-sync0rw.o: sync/sync0rw.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0rw.o -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0rw.Tpo -c -o libinnobase_a-sync0rw.o `test -f 'sync/sync0rw.c' || echo '$(srcdir)/'`sync/sync0rw.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0rw.Tpo $(DEPDIR)/libinnobase_a-sync0rw.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0rw.c' object='libinnobase_a-sync0rw.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0rw.o `test -f 'sync/sync0rw.c' || echo '$(srcdir)/'`sync/sync0rw.c - -libinnobase_a-sync0rw.obj: sync/sync0rw.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0rw.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0rw.Tpo -c -o libinnobase_a-sync0rw.obj `if test -f 'sync/sync0rw.c'; then $(CYGPATH_W) 'sync/sync0rw.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0rw.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0rw.Tpo $(DEPDIR)/libinnobase_a-sync0rw.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0rw.c' object='libinnobase_a-sync0rw.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0rw.obj `if test -f 'sync/sync0rw.c'; then $(CYGPATH_W) 'sync/sync0rw.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0rw.c'; fi` - -libinnobase_a-sync0sync.o: sync/sync0sync.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0sync.o -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0sync.Tpo -c -o libinnobase_a-sync0sync.o `test -f 'sync/sync0sync.c' || echo '$(srcdir)/'`sync/sync0sync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0sync.Tpo $(DEPDIR)/libinnobase_a-sync0sync.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0sync.c' object='libinnobase_a-sync0sync.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0sync.o `test -f 'sync/sync0sync.c' || echo '$(srcdir)/'`sync/sync0sync.c - -libinnobase_a-sync0sync.obj: sync/sync0sync.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-sync0sync.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-sync0sync.Tpo -c -o libinnobase_a-sync0sync.obj `if test -f 'sync/sync0sync.c'; then $(CYGPATH_W) 'sync/sync0sync.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0sync.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-sync0sync.Tpo $(DEPDIR)/libinnobase_a-sync0sync.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0sync.c' object='libinnobase_a-sync0sync.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-sync0sync.obj `if test -f 'sync/sync0sync.c'; then $(CYGPATH_W) 'sync/sync0sync.c'; else $(CYGPATH_W) '$(srcdir)/sync/sync0sync.c'; fi` - -libinnobase_a-thr0loc.o: thr/thr0loc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-thr0loc.o -MD -MP -MF $(DEPDIR)/libinnobase_a-thr0loc.Tpo -c -o libinnobase_a-thr0loc.o `test -f 'thr/thr0loc.c' || echo '$(srcdir)/'`thr/thr0loc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-thr0loc.Tpo $(DEPDIR)/libinnobase_a-thr0loc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thr/thr0loc.c' object='libinnobase_a-thr0loc.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-thr0loc.o `test -f 'thr/thr0loc.c' || echo '$(srcdir)/'`thr/thr0loc.c - -libinnobase_a-thr0loc.obj: thr/thr0loc.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-thr0loc.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-thr0loc.Tpo -c -o libinnobase_a-thr0loc.obj `if test -f 'thr/thr0loc.c'; then $(CYGPATH_W) 'thr/thr0loc.c'; else $(CYGPATH_W) '$(srcdir)/thr/thr0loc.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-thr0loc.Tpo $(DEPDIR)/libinnobase_a-thr0loc.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thr/thr0loc.c' object='libinnobase_a-thr0loc.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-thr0loc.obj `if test -f 'thr/thr0loc.c'; then $(CYGPATH_W) 'thr/thr0loc.c'; else $(CYGPATH_W) '$(srcdir)/thr/thr0loc.c'; fi` - -libinnobase_a-trx0i_s.o: trx/trx0i_s.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0i_s.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0i_s.Tpo -c -o libinnobase_a-trx0i_s.o `test -f 'trx/trx0i_s.c' || echo '$(srcdir)/'`trx/trx0i_s.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0i_s.Tpo $(DEPDIR)/libinnobase_a-trx0i_s.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0i_s.c' object='libinnobase_a-trx0i_s.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0i_s.o `test -f 'trx/trx0i_s.c' || echo '$(srcdir)/'`trx/trx0i_s.c - -libinnobase_a-trx0i_s.obj: trx/trx0i_s.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0i_s.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0i_s.Tpo -c -o libinnobase_a-trx0i_s.obj `if test -f 'trx/trx0i_s.c'; then $(CYGPATH_W) 'trx/trx0i_s.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0i_s.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0i_s.Tpo $(DEPDIR)/libinnobase_a-trx0i_s.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0i_s.c' object='libinnobase_a-trx0i_s.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0i_s.obj `if test -f 'trx/trx0i_s.c'; then $(CYGPATH_W) 'trx/trx0i_s.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0i_s.c'; fi` - -libinnobase_a-trx0purge.o: trx/trx0purge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0purge.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0purge.Tpo -c -o libinnobase_a-trx0purge.o `test -f 'trx/trx0purge.c' || echo '$(srcdir)/'`trx/trx0purge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0purge.Tpo $(DEPDIR)/libinnobase_a-trx0purge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0purge.c' object='libinnobase_a-trx0purge.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0purge.o `test -f 'trx/trx0purge.c' || echo '$(srcdir)/'`trx/trx0purge.c - -libinnobase_a-trx0purge.obj: trx/trx0purge.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0purge.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0purge.Tpo -c -o libinnobase_a-trx0purge.obj `if test -f 'trx/trx0purge.c'; then $(CYGPATH_W) 'trx/trx0purge.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0purge.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0purge.Tpo $(DEPDIR)/libinnobase_a-trx0purge.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0purge.c' object='libinnobase_a-trx0purge.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0purge.obj `if test -f 'trx/trx0purge.c'; then $(CYGPATH_W) 'trx/trx0purge.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0purge.c'; fi` - -libinnobase_a-trx0rec.o: trx/trx0rec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0rec.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0rec.Tpo -c -o libinnobase_a-trx0rec.o `test -f 'trx/trx0rec.c' || echo '$(srcdir)/'`trx/trx0rec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0rec.Tpo $(DEPDIR)/libinnobase_a-trx0rec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rec.c' object='libinnobase_a-trx0rec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0rec.o `test -f 'trx/trx0rec.c' || echo '$(srcdir)/'`trx/trx0rec.c - -libinnobase_a-trx0rec.obj: trx/trx0rec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0rec.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0rec.Tpo -c -o libinnobase_a-trx0rec.obj `if test -f 'trx/trx0rec.c'; then $(CYGPATH_W) 'trx/trx0rec.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0rec.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0rec.Tpo $(DEPDIR)/libinnobase_a-trx0rec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rec.c' object='libinnobase_a-trx0rec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0rec.obj `if test -f 'trx/trx0rec.c'; then $(CYGPATH_W) 'trx/trx0rec.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0rec.c'; fi` - -libinnobase_a-trx0roll.o: trx/trx0roll.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0roll.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0roll.Tpo -c -o libinnobase_a-trx0roll.o `test -f 'trx/trx0roll.c' || echo '$(srcdir)/'`trx/trx0roll.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0roll.Tpo $(DEPDIR)/libinnobase_a-trx0roll.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0roll.c' object='libinnobase_a-trx0roll.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0roll.o `test -f 'trx/trx0roll.c' || echo '$(srcdir)/'`trx/trx0roll.c - -libinnobase_a-trx0roll.obj: trx/trx0roll.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0roll.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0roll.Tpo -c -o libinnobase_a-trx0roll.obj `if test -f 'trx/trx0roll.c'; then $(CYGPATH_W) 'trx/trx0roll.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0roll.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0roll.Tpo $(DEPDIR)/libinnobase_a-trx0roll.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0roll.c' object='libinnobase_a-trx0roll.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0roll.obj `if test -f 'trx/trx0roll.c'; then $(CYGPATH_W) 'trx/trx0roll.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0roll.c'; fi` - -libinnobase_a-trx0rseg.o: trx/trx0rseg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0rseg.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0rseg.Tpo -c -o libinnobase_a-trx0rseg.o `test -f 'trx/trx0rseg.c' || echo '$(srcdir)/'`trx/trx0rseg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0rseg.Tpo $(DEPDIR)/libinnobase_a-trx0rseg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rseg.c' object='libinnobase_a-trx0rseg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0rseg.o `test -f 'trx/trx0rseg.c' || echo '$(srcdir)/'`trx/trx0rseg.c - -libinnobase_a-trx0rseg.obj: trx/trx0rseg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0rseg.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0rseg.Tpo -c -o libinnobase_a-trx0rseg.obj `if test -f 'trx/trx0rseg.c'; then $(CYGPATH_W) 'trx/trx0rseg.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0rseg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0rseg.Tpo $(DEPDIR)/libinnobase_a-trx0rseg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rseg.c' object='libinnobase_a-trx0rseg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0rseg.obj `if test -f 'trx/trx0rseg.c'; then $(CYGPATH_W) 'trx/trx0rseg.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0rseg.c'; fi` - -libinnobase_a-trx0sys.o: trx/trx0sys.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0sys.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0sys.Tpo -c -o libinnobase_a-trx0sys.o `test -f 'trx/trx0sys.c' || echo '$(srcdir)/'`trx/trx0sys.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0sys.Tpo $(DEPDIR)/libinnobase_a-trx0sys.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0sys.c' object='libinnobase_a-trx0sys.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0sys.o `test -f 'trx/trx0sys.c' || echo '$(srcdir)/'`trx/trx0sys.c - -libinnobase_a-trx0sys.obj: trx/trx0sys.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0sys.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0sys.Tpo -c -o libinnobase_a-trx0sys.obj `if test -f 'trx/trx0sys.c'; then $(CYGPATH_W) 'trx/trx0sys.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0sys.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0sys.Tpo $(DEPDIR)/libinnobase_a-trx0sys.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0sys.c' object='libinnobase_a-trx0sys.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0sys.obj `if test -f 'trx/trx0sys.c'; then $(CYGPATH_W) 'trx/trx0sys.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0sys.c'; fi` - -libinnobase_a-trx0trx.o: trx/trx0trx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0trx.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0trx.Tpo -c -o libinnobase_a-trx0trx.o `test -f 'trx/trx0trx.c' || echo '$(srcdir)/'`trx/trx0trx.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0trx.Tpo $(DEPDIR)/libinnobase_a-trx0trx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0trx.c' object='libinnobase_a-trx0trx.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0trx.o `test -f 'trx/trx0trx.c' || echo '$(srcdir)/'`trx/trx0trx.c - -libinnobase_a-trx0trx.obj: trx/trx0trx.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0trx.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0trx.Tpo -c -o libinnobase_a-trx0trx.obj `if test -f 'trx/trx0trx.c'; then $(CYGPATH_W) 'trx/trx0trx.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0trx.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0trx.Tpo $(DEPDIR)/libinnobase_a-trx0trx.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0trx.c' object='libinnobase_a-trx0trx.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0trx.obj `if test -f 'trx/trx0trx.c'; then $(CYGPATH_W) 'trx/trx0trx.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0trx.c'; fi` - -libinnobase_a-trx0undo.o: trx/trx0undo.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0undo.o -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0undo.Tpo -c -o libinnobase_a-trx0undo.o `test -f 'trx/trx0undo.c' || echo '$(srcdir)/'`trx/trx0undo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0undo.Tpo $(DEPDIR)/libinnobase_a-trx0undo.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0undo.c' object='libinnobase_a-trx0undo.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0undo.o `test -f 'trx/trx0undo.c' || echo '$(srcdir)/'`trx/trx0undo.c - -libinnobase_a-trx0undo.obj: trx/trx0undo.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-trx0undo.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-trx0undo.Tpo -c -o libinnobase_a-trx0undo.obj `if test -f 'trx/trx0undo.c'; then $(CYGPATH_W) 'trx/trx0undo.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0undo.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-trx0undo.Tpo $(DEPDIR)/libinnobase_a-trx0undo.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0undo.c' object='libinnobase_a-trx0undo.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-trx0undo.obj `if test -f 'trx/trx0undo.c'; then $(CYGPATH_W) 'trx/trx0undo.c'; else $(CYGPATH_W) '$(srcdir)/trx/trx0undo.c'; fi` - -libinnobase_a-usr0sess.o: usr/usr0sess.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-usr0sess.o -MD -MP -MF $(DEPDIR)/libinnobase_a-usr0sess.Tpo -c -o libinnobase_a-usr0sess.o `test -f 'usr/usr0sess.c' || echo '$(srcdir)/'`usr/usr0sess.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-usr0sess.Tpo $(DEPDIR)/libinnobase_a-usr0sess.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usr/usr0sess.c' object='libinnobase_a-usr0sess.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-usr0sess.o `test -f 'usr/usr0sess.c' || echo '$(srcdir)/'`usr/usr0sess.c - -libinnobase_a-usr0sess.obj: usr/usr0sess.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-usr0sess.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-usr0sess.Tpo -c -o libinnobase_a-usr0sess.obj `if test -f 'usr/usr0sess.c'; then $(CYGPATH_W) 'usr/usr0sess.c'; else $(CYGPATH_W) '$(srcdir)/usr/usr0sess.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-usr0sess.Tpo $(DEPDIR)/libinnobase_a-usr0sess.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usr/usr0sess.c' object='libinnobase_a-usr0sess.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-usr0sess.obj `if test -f 'usr/usr0sess.c'; then $(CYGPATH_W) 'usr/usr0sess.c'; else $(CYGPATH_W) '$(srcdir)/usr/usr0sess.c'; fi` - -libinnobase_a-ut0byte.o: ut/ut0byte.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0byte.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0byte.Tpo -c -o libinnobase_a-ut0byte.o `test -f 'ut/ut0byte.c' || echo '$(srcdir)/'`ut/ut0byte.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0byte.Tpo $(DEPDIR)/libinnobase_a-ut0byte.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0byte.c' object='libinnobase_a-ut0byte.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0byte.o `test -f 'ut/ut0byte.c' || echo '$(srcdir)/'`ut/ut0byte.c - -libinnobase_a-ut0byte.obj: ut/ut0byte.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0byte.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0byte.Tpo -c -o libinnobase_a-ut0byte.obj `if test -f 'ut/ut0byte.c'; then $(CYGPATH_W) 'ut/ut0byte.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0byte.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0byte.Tpo $(DEPDIR)/libinnobase_a-ut0byte.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0byte.c' object='libinnobase_a-ut0byte.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0byte.obj `if test -f 'ut/ut0byte.c'; then $(CYGPATH_W) 'ut/ut0byte.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0byte.c'; fi` - -libinnobase_a-ut0dbg.o: ut/ut0dbg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0dbg.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0dbg.Tpo -c -o libinnobase_a-ut0dbg.o `test -f 'ut/ut0dbg.c' || echo '$(srcdir)/'`ut/ut0dbg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0dbg.Tpo $(DEPDIR)/libinnobase_a-ut0dbg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0dbg.c' object='libinnobase_a-ut0dbg.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0dbg.o `test -f 'ut/ut0dbg.c' || echo '$(srcdir)/'`ut/ut0dbg.c - -libinnobase_a-ut0dbg.obj: ut/ut0dbg.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0dbg.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0dbg.Tpo -c -o libinnobase_a-ut0dbg.obj `if test -f 'ut/ut0dbg.c'; then $(CYGPATH_W) 'ut/ut0dbg.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0dbg.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0dbg.Tpo $(DEPDIR)/libinnobase_a-ut0dbg.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0dbg.c' object='libinnobase_a-ut0dbg.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0dbg.obj `if test -f 'ut/ut0dbg.c'; then $(CYGPATH_W) 'ut/ut0dbg.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0dbg.c'; fi` - -libinnobase_a-ut0list.o: ut/ut0list.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0list.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0list.Tpo -c -o libinnobase_a-ut0list.o `test -f 'ut/ut0list.c' || echo '$(srcdir)/'`ut/ut0list.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0list.Tpo $(DEPDIR)/libinnobase_a-ut0list.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0list.c' object='libinnobase_a-ut0list.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0list.o `test -f 'ut/ut0list.c' || echo '$(srcdir)/'`ut/ut0list.c - -libinnobase_a-ut0list.obj: ut/ut0list.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0list.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0list.Tpo -c -o libinnobase_a-ut0list.obj `if test -f 'ut/ut0list.c'; then $(CYGPATH_W) 'ut/ut0list.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0list.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0list.Tpo $(DEPDIR)/libinnobase_a-ut0list.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0list.c' object='libinnobase_a-ut0list.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0list.obj `if test -f 'ut/ut0list.c'; then $(CYGPATH_W) 'ut/ut0list.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0list.c'; fi` - -libinnobase_a-ut0mem.o: ut/ut0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0mem.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0mem.Tpo -c -o libinnobase_a-ut0mem.o `test -f 'ut/ut0mem.c' || echo '$(srcdir)/'`ut/ut0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0mem.Tpo $(DEPDIR)/libinnobase_a-ut0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0mem.c' object='libinnobase_a-ut0mem.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0mem.o `test -f 'ut/ut0mem.c' || echo '$(srcdir)/'`ut/ut0mem.c - -libinnobase_a-ut0mem.obj: ut/ut0mem.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0mem.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0mem.Tpo -c -o libinnobase_a-ut0mem.obj `if test -f 'ut/ut0mem.c'; then $(CYGPATH_W) 'ut/ut0mem.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0mem.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0mem.Tpo $(DEPDIR)/libinnobase_a-ut0mem.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0mem.c' object='libinnobase_a-ut0mem.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0mem.obj `if test -f 'ut/ut0mem.c'; then $(CYGPATH_W) 'ut/ut0mem.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0mem.c'; fi` - -libinnobase_a-ut0rbt.o: ut/ut0rbt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0rbt.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0rbt.Tpo -c -o libinnobase_a-ut0rbt.o `test -f 'ut/ut0rbt.c' || echo '$(srcdir)/'`ut/ut0rbt.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0rbt.Tpo $(DEPDIR)/libinnobase_a-ut0rbt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rbt.c' object='libinnobase_a-ut0rbt.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0rbt.o `test -f 'ut/ut0rbt.c' || echo '$(srcdir)/'`ut/ut0rbt.c - -libinnobase_a-ut0rbt.obj: ut/ut0rbt.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0rbt.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0rbt.Tpo -c -o libinnobase_a-ut0rbt.obj `if test -f 'ut/ut0rbt.c'; then $(CYGPATH_W) 'ut/ut0rbt.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0rbt.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0rbt.Tpo $(DEPDIR)/libinnobase_a-ut0rbt.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rbt.c' object='libinnobase_a-ut0rbt.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0rbt.obj `if test -f 'ut/ut0rbt.c'; then $(CYGPATH_W) 'ut/ut0rbt.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0rbt.c'; fi` - -libinnobase_a-ut0rnd.o: ut/ut0rnd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0rnd.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0rnd.Tpo -c -o libinnobase_a-ut0rnd.o `test -f 'ut/ut0rnd.c' || echo '$(srcdir)/'`ut/ut0rnd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0rnd.Tpo $(DEPDIR)/libinnobase_a-ut0rnd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rnd.c' object='libinnobase_a-ut0rnd.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0rnd.o `test -f 'ut/ut0rnd.c' || echo '$(srcdir)/'`ut/ut0rnd.c - -libinnobase_a-ut0rnd.obj: ut/ut0rnd.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0rnd.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0rnd.Tpo -c -o libinnobase_a-ut0rnd.obj `if test -f 'ut/ut0rnd.c'; then $(CYGPATH_W) 'ut/ut0rnd.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0rnd.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0rnd.Tpo $(DEPDIR)/libinnobase_a-ut0rnd.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rnd.c' object='libinnobase_a-ut0rnd.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0rnd.obj `if test -f 'ut/ut0rnd.c'; then $(CYGPATH_W) 'ut/ut0rnd.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0rnd.c'; fi` - -libinnobase_a-ut0ut.o: ut/ut0ut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0ut.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0ut.Tpo -c -o libinnobase_a-ut0ut.o `test -f 'ut/ut0ut.c' || echo '$(srcdir)/'`ut/ut0ut.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0ut.Tpo $(DEPDIR)/libinnobase_a-ut0ut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0ut.c' object='libinnobase_a-ut0ut.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0ut.o `test -f 'ut/ut0ut.c' || echo '$(srcdir)/'`ut/ut0ut.c - -libinnobase_a-ut0ut.obj: ut/ut0ut.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0ut.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0ut.Tpo -c -o libinnobase_a-ut0ut.obj `if test -f 'ut/ut0ut.c'; then $(CYGPATH_W) 'ut/ut0ut.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0ut.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0ut.Tpo $(DEPDIR)/libinnobase_a-ut0ut.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0ut.c' object='libinnobase_a-ut0ut.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0ut.obj `if test -f 'ut/ut0ut.c'; then $(CYGPATH_W) 'ut/ut0ut.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0ut.c'; fi` - -libinnobase_a-ut0vec.o: ut/ut0vec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0vec.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0vec.Tpo -c -o libinnobase_a-ut0vec.o `test -f 'ut/ut0vec.c' || echo '$(srcdir)/'`ut/ut0vec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0vec.Tpo $(DEPDIR)/libinnobase_a-ut0vec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0vec.c' object='libinnobase_a-ut0vec.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0vec.o `test -f 'ut/ut0vec.c' || echo '$(srcdir)/'`ut/ut0vec.c - -libinnobase_a-ut0vec.obj: ut/ut0vec.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0vec.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0vec.Tpo -c -o libinnobase_a-ut0vec.obj `if test -f 'ut/ut0vec.c'; then $(CYGPATH_W) 'ut/ut0vec.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0vec.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0vec.Tpo $(DEPDIR)/libinnobase_a-ut0vec.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0vec.c' object='libinnobase_a-ut0vec.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0vec.obj `if test -f 'ut/ut0vec.c'; then $(CYGPATH_W) 'ut/ut0vec.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0vec.c'; fi` - -libinnobase_a-ut0wqueue.o: ut/ut0wqueue.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0wqueue.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0wqueue.Tpo -c -o libinnobase_a-ut0wqueue.o `test -f 'ut/ut0wqueue.c' || echo '$(srcdir)/'`ut/ut0wqueue.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0wqueue.Tpo $(DEPDIR)/libinnobase_a-ut0wqueue.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0wqueue.c' object='libinnobase_a-ut0wqueue.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0wqueue.o `test -f 'ut/ut0wqueue.c' || echo '$(srcdir)/'`ut/ut0wqueue.c - -libinnobase_a-ut0wqueue.obj: ut/ut0wqueue.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -MT libinnobase_a-ut0wqueue.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ut0wqueue.Tpo -c -o libinnobase_a-ut0wqueue.obj `if test -f 'ut/ut0wqueue.c'; then $(CYGPATH_W) 'ut/ut0wqueue.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0wqueue.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ut0wqueue.Tpo $(DEPDIR)/libinnobase_a-ut0wqueue.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0wqueue.c' object='libinnobase_a-ut0wqueue.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CFLAGS) $(CFLAGS) -c -o libinnobase_a-ut0wqueue.obj `if test -f 'ut/ut0wqueue.c'; then $(CYGPATH_W) 'ut/ut0wqueue.c'; else $(CYGPATH_W) '$(srcdir)/ut/ut0wqueue.c'; fi` - -ha_innodb_plugin_la-btr0btr.lo: btr/btr0btr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-btr0btr.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-btr0btr.Tpo -c -o ha_innodb_plugin_la-btr0btr.lo `test -f 'btr/btr0btr.c' || echo '$(srcdir)/'`btr/btr0btr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-btr0btr.Tpo $(DEPDIR)/ha_innodb_plugin_la-btr0btr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0btr.c' object='ha_innodb_plugin_la-btr0btr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-btr0btr.lo `test -f 'btr/btr0btr.c' || echo '$(srcdir)/'`btr/btr0btr.c - -ha_innodb_plugin_la-btr0cur.lo: btr/btr0cur.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-btr0cur.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-btr0cur.Tpo -c -o ha_innodb_plugin_la-btr0cur.lo `test -f 'btr/btr0cur.c' || echo '$(srcdir)/'`btr/btr0cur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-btr0cur.Tpo $(DEPDIR)/ha_innodb_plugin_la-btr0cur.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0cur.c' object='ha_innodb_plugin_la-btr0cur.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-btr0cur.lo `test -f 'btr/btr0cur.c' || echo '$(srcdir)/'`btr/btr0cur.c - -ha_innodb_plugin_la-btr0pcur.lo: btr/btr0pcur.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-btr0pcur.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-btr0pcur.Tpo -c -o ha_innodb_plugin_la-btr0pcur.lo `test -f 'btr/btr0pcur.c' || echo '$(srcdir)/'`btr/btr0pcur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-btr0pcur.Tpo $(DEPDIR)/ha_innodb_plugin_la-btr0pcur.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0pcur.c' object='ha_innodb_plugin_la-btr0pcur.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-btr0pcur.lo `test -f 'btr/btr0pcur.c' || echo '$(srcdir)/'`btr/btr0pcur.c - -ha_innodb_plugin_la-btr0sea.lo: btr/btr0sea.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-btr0sea.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-btr0sea.Tpo -c -o ha_innodb_plugin_la-btr0sea.lo `test -f 'btr/btr0sea.c' || echo '$(srcdir)/'`btr/btr0sea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-btr0sea.Tpo $(DEPDIR)/ha_innodb_plugin_la-btr0sea.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='btr/btr0sea.c' object='ha_innodb_plugin_la-btr0sea.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-btr0sea.lo `test -f 'btr/btr0sea.c' || echo '$(srcdir)/'`btr/btr0sea.c - -ha_innodb_plugin_la-buf0buddy.lo: buf/buf0buddy.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-buf0buddy.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-buf0buddy.Tpo -c -o ha_innodb_plugin_la-buf0buddy.lo `test -f 'buf/buf0buddy.c' || echo '$(srcdir)/'`buf/buf0buddy.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-buf0buddy.Tpo $(DEPDIR)/ha_innodb_plugin_la-buf0buddy.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buddy.c' object='ha_innodb_plugin_la-buf0buddy.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-buf0buddy.lo `test -f 'buf/buf0buddy.c' || echo '$(srcdir)/'`buf/buf0buddy.c - -ha_innodb_plugin_la-buf0buf.lo: buf/buf0buf.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-buf0buf.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-buf0buf.Tpo -c -o ha_innodb_plugin_la-buf0buf.lo `test -f 'buf/buf0buf.c' || echo '$(srcdir)/'`buf/buf0buf.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-buf0buf.Tpo $(DEPDIR)/ha_innodb_plugin_la-buf0buf.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0buf.c' object='ha_innodb_plugin_la-buf0buf.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-buf0buf.lo `test -f 'buf/buf0buf.c' || echo '$(srcdir)/'`buf/buf0buf.c - -ha_innodb_plugin_la-buf0flu.lo: buf/buf0flu.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-buf0flu.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-buf0flu.Tpo -c -o ha_innodb_plugin_la-buf0flu.lo `test -f 'buf/buf0flu.c' || echo '$(srcdir)/'`buf/buf0flu.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-buf0flu.Tpo $(DEPDIR)/ha_innodb_plugin_la-buf0flu.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0flu.c' object='ha_innodb_plugin_la-buf0flu.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-buf0flu.lo `test -f 'buf/buf0flu.c' || echo '$(srcdir)/'`buf/buf0flu.c - -ha_innodb_plugin_la-buf0lru.lo: buf/buf0lru.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-buf0lru.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-buf0lru.Tpo -c -o ha_innodb_plugin_la-buf0lru.lo `test -f 'buf/buf0lru.c' || echo '$(srcdir)/'`buf/buf0lru.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-buf0lru.Tpo $(DEPDIR)/ha_innodb_plugin_la-buf0lru.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0lru.c' object='ha_innodb_plugin_la-buf0lru.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-buf0lru.lo `test -f 'buf/buf0lru.c' || echo '$(srcdir)/'`buf/buf0lru.c - -ha_innodb_plugin_la-buf0rea.lo: buf/buf0rea.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-buf0rea.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-buf0rea.Tpo -c -o ha_innodb_plugin_la-buf0rea.lo `test -f 'buf/buf0rea.c' || echo '$(srcdir)/'`buf/buf0rea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-buf0rea.Tpo $(DEPDIR)/ha_innodb_plugin_la-buf0rea.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='buf/buf0rea.c' object='ha_innodb_plugin_la-buf0rea.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-buf0rea.lo `test -f 'buf/buf0rea.c' || echo '$(srcdir)/'`buf/buf0rea.c - -ha_innodb_plugin_la-data0data.lo: data/data0data.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-data0data.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-data0data.Tpo -c -o ha_innodb_plugin_la-data0data.lo `test -f 'data/data0data.c' || echo '$(srcdir)/'`data/data0data.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-data0data.Tpo $(DEPDIR)/ha_innodb_plugin_la-data0data.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0data.c' object='ha_innodb_plugin_la-data0data.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-data0data.lo `test -f 'data/data0data.c' || echo '$(srcdir)/'`data/data0data.c - -ha_innodb_plugin_la-data0type.lo: data/data0type.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-data0type.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-data0type.Tpo -c -o ha_innodb_plugin_la-data0type.lo `test -f 'data/data0type.c' || echo '$(srcdir)/'`data/data0type.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-data0type.Tpo $(DEPDIR)/ha_innodb_plugin_la-data0type.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data/data0type.c' object='ha_innodb_plugin_la-data0type.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-data0type.lo `test -f 'data/data0type.c' || echo '$(srcdir)/'`data/data0type.c - -ha_innodb_plugin_la-dict0boot.lo: dict/dict0boot.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dict0boot.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dict0boot.Tpo -c -o ha_innodb_plugin_la-dict0boot.lo `test -f 'dict/dict0boot.c' || echo '$(srcdir)/'`dict/dict0boot.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dict0boot.Tpo $(DEPDIR)/ha_innodb_plugin_la-dict0boot.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0boot.c' object='ha_innodb_plugin_la-dict0boot.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dict0boot.lo `test -f 'dict/dict0boot.c' || echo '$(srcdir)/'`dict/dict0boot.c - -ha_innodb_plugin_la-dict0crea.lo: dict/dict0crea.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dict0crea.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dict0crea.Tpo -c -o ha_innodb_plugin_la-dict0crea.lo `test -f 'dict/dict0crea.c' || echo '$(srcdir)/'`dict/dict0crea.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dict0crea.Tpo $(DEPDIR)/ha_innodb_plugin_la-dict0crea.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0crea.c' object='ha_innodb_plugin_la-dict0crea.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dict0crea.lo `test -f 'dict/dict0crea.c' || echo '$(srcdir)/'`dict/dict0crea.c - -ha_innodb_plugin_la-dict0dict.lo: dict/dict0dict.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dict0dict.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dict0dict.Tpo -c -o ha_innodb_plugin_la-dict0dict.lo `test -f 'dict/dict0dict.c' || echo '$(srcdir)/'`dict/dict0dict.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dict0dict.Tpo $(DEPDIR)/ha_innodb_plugin_la-dict0dict.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0dict.c' object='ha_innodb_plugin_la-dict0dict.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dict0dict.lo `test -f 'dict/dict0dict.c' || echo '$(srcdir)/'`dict/dict0dict.c - -ha_innodb_plugin_la-dict0load.lo: dict/dict0load.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dict0load.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dict0load.Tpo -c -o ha_innodb_plugin_la-dict0load.lo `test -f 'dict/dict0load.c' || echo '$(srcdir)/'`dict/dict0load.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dict0load.Tpo $(DEPDIR)/ha_innodb_plugin_la-dict0load.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0load.c' object='ha_innodb_plugin_la-dict0load.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dict0load.lo `test -f 'dict/dict0load.c' || echo '$(srcdir)/'`dict/dict0load.c - -ha_innodb_plugin_la-dict0mem.lo: dict/dict0mem.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dict0mem.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dict0mem.Tpo -c -o ha_innodb_plugin_la-dict0mem.lo `test -f 'dict/dict0mem.c' || echo '$(srcdir)/'`dict/dict0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dict0mem.Tpo $(DEPDIR)/ha_innodb_plugin_la-dict0mem.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dict/dict0mem.c' object='ha_innodb_plugin_la-dict0mem.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dict0mem.lo `test -f 'dict/dict0mem.c' || echo '$(srcdir)/'`dict/dict0mem.c - -ha_innodb_plugin_la-dyn0dyn.lo: dyn/dyn0dyn.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-dyn0dyn.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-dyn0dyn.Tpo -c -o ha_innodb_plugin_la-dyn0dyn.lo `test -f 'dyn/dyn0dyn.c' || echo '$(srcdir)/'`dyn/dyn0dyn.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-dyn0dyn.Tpo $(DEPDIR)/ha_innodb_plugin_la-dyn0dyn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dyn/dyn0dyn.c' object='ha_innodb_plugin_la-dyn0dyn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-dyn0dyn.lo `test -f 'dyn/dyn0dyn.c' || echo '$(srcdir)/'`dyn/dyn0dyn.c - -ha_innodb_plugin_la-eval0eval.lo: eval/eval0eval.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-eval0eval.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-eval0eval.Tpo -c -o ha_innodb_plugin_la-eval0eval.lo `test -f 'eval/eval0eval.c' || echo '$(srcdir)/'`eval/eval0eval.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-eval0eval.Tpo $(DEPDIR)/ha_innodb_plugin_la-eval0eval.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0eval.c' object='ha_innodb_plugin_la-eval0eval.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-eval0eval.lo `test -f 'eval/eval0eval.c' || echo '$(srcdir)/'`eval/eval0eval.c - -ha_innodb_plugin_la-eval0proc.lo: eval/eval0proc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-eval0proc.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-eval0proc.Tpo -c -o ha_innodb_plugin_la-eval0proc.lo `test -f 'eval/eval0proc.c' || echo '$(srcdir)/'`eval/eval0proc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-eval0proc.Tpo $(DEPDIR)/ha_innodb_plugin_la-eval0proc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eval/eval0proc.c' object='ha_innodb_plugin_la-eval0proc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-eval0proc.lo `test -f 'eval/eval0proc.c' || echo '$(srcdir)/'`eval/eval0proc.c - -ha_innodb_plugin_la-fil0fil.lo: fil/fil0fil.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-fil0fil.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-fil0fil.Tpo -c -o ha_innodb_plugin_la-fil0fil.lo `test -f 'fil/fil0fil.c' || echo '$(srcdir)/'`fil/fil0fil.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-fil0fil.Tpo $(DEPDIR)/ha_innodb_plugin_la-fil0fil.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fil/fil0fil.c' object='ha_innodb_plugin_la-fil0fil.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-fil0fil.lo `test -f 'fil/fil0fil.c' || echo '$(srcdir)/'`fil/fil0fil.c - -ha_innodb_plugin_la-fsp0fsp.lo: fsp/fsp0fsp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-fsp0fsp.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-fsp0fsp.Tpo -c -o ha_innodb_plugin_la-fsp0fsp.lo `test -f 'fsp/fsp0fsp.c' || echo '$(srcdir)/'`fsp/fsp0fsp.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-fsp0fsp.Tpo $(DEPDIR)/ha_innodb_plugin_la-fsp0fsp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsp/fsp0fsp.c' object='ha_innodb_plugin_la-fsp0fsp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-fsp0fsp.lo `test -f 'fsp/fsp0fsp.c' || echo '$(srcdir)/'`fsp/fsp0fsp.c - -ha_innodb_plugin_la-fut0fut.lo: fut/fut0fut.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-fut0fut.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-fut0fut.Tpo -c -o ha_innodb_plugin_la-fut0fut.lo `test -f 'fut/fut0fut.c' || echo '$(srcdir)/'`fut/fut0fut.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-fut0fut.Tpo $(DEPDIR)/ha_innodb_plugin_la-fut0fut.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0fut.c' object='ha_innodb_plugin_la-fut0fut.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-fut0fut.lo `test -f 'fut/fut0fut.c' || echo '$(srcdir)/'`fut/fut0fut.c - -ha_innodb_plugin_la-fut0lst.lo: fut/fut0lst.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-fut0lst.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-fut0lst.Tpo -c -o ha_innodb_plugin_la-fut0lst.lo `test -f 'fut/fut0lst.c' || echo '$(srcdir)/'`fut/fut0lst.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-fut0lst.Tpo $(DEPDIR)/ha_innodb_plugin_la-fut0lst.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fut/fut0lst.c' object='ha_innodb_plugin_la-fut0lst.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-fut0lst.lo `test -f 'fut/fut0lst.c' || echo '$(srcdir)/'`fut/fut0lst.c - -ha_innodb_plugin_la-ha0ha.lo: ha/ha0ha.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ha0ha.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ha0ha.Tpo -c -o ha_innodb_plugin_la-ha0ha.lo `test -f 'ha/ha0ha.c' || echo '$(srcdir)/'`ha/ha0ha.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ha0ha.Tpo $(DEPDIR)/ha_innodb_plugin_la-ha0ha.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0ha.c' object='ha_innodb_plugin_la-ha0ha.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ha0ha.lo `test -f 'ha/ha0ha.c' || echo '$(srcdir)/'`ha/ha0ha.c - -ha_innodb_plugin_la-ha0storage.lo: ha/ha0storage.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ha0storage.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ha0storage.Tpo -c -o ha_innodb_plugin_la-ha0storage.lo `test -f 'ha/ha0storage.c' || echo '$(srcdir)/'`ha/ha0storage.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ha0storage.Tpo $(DEPDIR)/ha_innodb_plugin_la-ha0storage.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/ha0storage.c' object='ha_innodb_plugin_la-ha0storage.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ha0storage.lo `test -f 'ha/ha0storage.c' || echo '$(srcdir)/'`ha/ha0storage.c - -ha_innodb_plugin_la-hash0hash.lo: ha/hash0hash.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-hash0hash.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-hash0hash.Tpo -c -o ha_innodb_plugin_la-hash0hash.lo `test -f 'ha/hash0hash.c' || echo '$(srcdir)/'`ha/hash0hash.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-hash0hash.Tpo $(DEPDIR)/ha_innodb_plugin_la-hash0hash.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ha/hash0hash.c' object='ha_innodb_plugin_la-hash0hash.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-hash0hash.lo `test -f 'ha/hash0hash.c' || echo '$(srcdir)/'`ha/hash0hash.c - -ha_innodb_plugin_la-ibuf0ibuf.lo: ibuf/ibuf0ibuf.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ibuf0ibuf.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ibuf0ibuf.Tpo -c -o ha_innodb_plugin_la-ibuf0ibuf.lo `test -f 'ibuf/ibuf0ibuf.c' || echo '$(srcdir)/'`ibuf/ibuf0ibuf.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ibuf0ibuf.Tpo $(DEPDIR)/ha_innodb_plugin_la-ibuf0ibuf.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ibuf/ibuf0ibuf.c' object='ha_innodb_plugin_la-ibuf0ibuf.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ibuf0ibuf.lo `test -f 'ibuf/ibuf0ibuf.c' || echo '$(srcdir)/'`ibuf/ibuf0ibuf.c - -ha_innodb_plugin_la-lock0iter.lo: lock/lock0iter.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-lock0iter.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-lock0iter.Tpo -c -o ha_innodb_plugin_la-lock0iter.lo `test -f 'lock/lock0iter.c' || echo '$(srcdir)/'`lock/lock0iter.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-lock0iter.Tpo $(DEPDIR)/ha_innodb_plugin_la-lock0iter.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0iter.c' object='ha_innodb_plugin_la-lock0iter.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-lock0iter.lo `test -f 'lock/lock0iter.c' || echo '$(srcdir)/'`lock/lock0iter.c - -ha_innodb_plugin_la-lock0lock.lo: lock/lock0lock.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-lock0lock.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-lock0lock.Tpo -c -o ha_innodb_plugin_la-lock0lock.lo `test -f 'lock/lock0lock.c' || echo '$(srcdir)/'`lock/lock0lock.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-lock0lock.Tpo $(DEPDIR)/ha_innodb_plugin_la-lock0lock.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lock/lock0lock.c' object='ha_innodb_plugin_la-lock0lock.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-lock0lock.lo `test -f 'lock/lock0lock.c' || echo '$(srcdir)/'`lock/lock0lock.c - -ha_innodb_plugin_la-log0log.lo: log/log0log.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-log0log.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-log0log.Tpo -c -o ha_innodb_plugin_la-log0log.lo `test -f 'log/log0log.c' || echo '$(srcdir)/'`log/log0log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-log0log.Tpo $(DEPDIR)/ha_innodb_plugin_la-log0log.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0log.c' object='ha_innodb_plugin_la-log0log.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-log0log.lo `test -f 'log/log0log.c' || echo '$(srcdir)/'`log/log0log.c - -ha_innodb_plugin_la-log0recv.lo: log/log0recv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-log0recv.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-log0recv.Tpo -c -o ha_innodb_plugin_la-log0recv.lo `test -f 'log/log0recv.c' || echo '$(srcdir)/'`log/log0recv.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-log0recv.Tpo $(DEPDIR)/ha_innodb_plugin_la-log0recv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log/log0recv.c' object='ha_innodb_plugin_la-log0recv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-log0recv.lo `test -f 'log/log0recv.c' || echo '$(srcdir)/'`log/log0recv.c - -ha_innodb_plugin_la-mach0data.lo: mach/mach0data.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-mach0data.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mach0data.Tpo -c -o ha_innodb_plugin_la-mach0data.lo `test -f 'mach/mach0data.c' || echo '$(srcdir)/'`mach/mach0data.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mach0data.Tpo $(DEPDIR)/ha_innodb_plugin_la-mach0data.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mach/mach0data.c' object='ha_innodb_plugin_la-mach0data.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-mach0data.lo `test -f 'mach/mach0data.c' || echo '$(srcdir)/'`mach/mach0data.c - -ha_innodb_plugin_la-mem0mem.lo: mem/mem0mem.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-mem0mem.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mem0mem.Tpo -c -o ha_innodb_plugin_la-mem0mem.lo `test -f 'mem/mem0mem.c' || echo '$(srcdir)/'`mem/mem0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mem0mem.Tpo $(DEPDIR)/ha_innodb_plugin_la-mem0mem.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0mem.c' object='ha_innodb_plugin_la-mem0mem.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-mem0mem.lo `test -f 'mem/mem0mem.c' || echo '$(srcdir)/'`mem/mem0mem.c - -ha_innodb_plugin_la-mem0pool.lo: mem/mem0pool.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-mem0pool.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mem0pool.Tpo -c -o ha_innodb_plugin_la-mem0pool.lo `test -f 'mem/mem0pool.c' || echo '$(srcdir)/'`mem/mem0pool.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mem0pool.Tpo $(DEPDIR)/ha_innodb_plugin_la-mem0pool.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mem/mem0pool.c' object='ha_innodb_plugin_la-mem0pool.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-mem0pool.lo `test -f 'mem/mem0pool.c' || echo '$(srcdir)/'`mem/mem0pool.c - -ha_innodb_plugin_la-mtr0log.lo: mtr/mtr0log.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-mtr0log.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mtr0log.Tpo -c -o ha_innodb_plugin_la-mtr0log.lo `test -f 'mtr/mtr0log.c' || echo '$(srcdir)/'`mtr/mtr0log.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mtr0log.Tpo $(DEPDIR)/ha_innodb_plugin_la-mtr0log.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0log.c' object='ha_innodb_plugin_la-mtr0log.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-mtr0log.lo `test -f 'mtr/mtr0log.c' || echo '$(srcdir)/'`mtr/mtr0log.c - -ha_innodb_plugin_la-mtr0mtr.lo: mtr/mtr0mtr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-mtr0mtr.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mtr0mtr.Tpo -c -o ha_innodb_plugin_la-mtr0mtr.lo `test -f 'mtr/mtr0mtr.c' || echo '$(srcdir)/'`mtr/mtr0mtr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mtr0mtr.Tpo $(DEPDIR)/ha_innodb_plugin_la-mtr0mtr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mtr/mtr0mtr.c' object='ha_innodb_plugin_la-mtr0mtr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-mtr0mtr.lo `test -f 'mtr/mtr0mtr.c' || echo '$(srcdir)/'`mtr/mtr0mtr.c - -ha_innodb_plugin_la-os0file.lo: os/os0file.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-os0file.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-os0file.Tpo -c -o ha_innodb_plugin_la-os0file.lo `test -f 'os/os0file.c' || echo '$(srcdir)/'`os/os0file.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-os0file.Tpo $(DEPDIR)/ha_innodb_plugin_la-os0file.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0file.c' object='ha_innodb_plugin_la-os0file.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-os0file.lo `test -f 'os/os0file.c' || echo '$(srcdir)/'`os/os0file.c - -ha_innodb_plugin_la-os0proc.lo: os/os0proc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-os0proc.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-os0proc.Tpo -c -o ha_innodb_plugin_la-os0proc.lo `test -f 'os/os0proc.c' || echo '$(srcdir)/'`os/os0proc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-os0proc.Tpo $(DEPDIR)/ha_innodb_plugin_la-os0proc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0proc.c' object='ha_innodb_plugin_la-os0proc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-os0proc.lo `test -f 'os/os0proc.c' || echo '$(srcdir)/'`os/os0proc.c - -ha_innodb_plugin_la-os0sync.lo: os/os0sync.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-os0sync.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-os0sync.Tpo -c -o ha_innodb_plugin_la-os0sync.lo `test -f 'os/os0sync.c' || echo '$(srcdir)/'`os/os0sync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-os0sync.Tpo $(DEPDIR)/ha_innodb_plugin_la-os0sync.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0sync.c' object='ha_innodb_plugin_la-os0sync.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-os0sync.lo `test -f 'os/os0sync.c' || echo '$(srcdir)/'`os/os0sync.c - -ha_innodb_plugin_la-os0thread.lo: os/os0thread.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-os0thread.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-os0thread.Tpo -c -o ha_innodb_plugin_la-os0thread.lo `test -f 'os/os0thread.c' || echo '$(srcdir)/'`os/os0thread.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-os0thread.Tpo $(DEPDIR)/ha_innodb_plugin_la-os0thread.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='os/os0thread.c' object='ha_innodb_plugin_la-os0thread.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-os0thread.lo `test -f 'os/os0thread.c' || echo '$(srcdir)/'`os/os0thread.c - -ha_innodb_plugin_la-page0cur.lo: page/page0cur.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-page0cur.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-page0cur.Tpo -c -o ha_innodb_plugin_la-page0cur.lo `test -f 'page/page0cur.c' || echo '$(srcdir)/'`page/page0cur.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-page0cur.Tpo $(DEPDIR)/ha_innodb_plugin_la-page0cur.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0cur.c' object='ha_innodb_plugin_la-page0cur.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-page0cur.lo `test -f 'page/page0cur.c' || echo '$(srcdir)/'`page/page0cur.c - -ha_innodb_plugin_la-page0page.lo: page/page0page.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-page0page.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-page0page.Tpo -c -o ha_innodb_plugin_la-page0page.lo `test -f 'page/page0page.c' || echo '$(srcdir)/'`page/page0page.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-page0page.Tpo $(DEPDIR)/ha_innodb_plugin_la-page0page.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0page.c' object='ha_innodb_plugin_la-page0page.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-page0page.lo `test -f 'page/page0page.c' || echo '$(srcdir)/'`page/page0page.c - -ha_innodb_plugin_la-page0zip.lo: page/page0zip.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-page0zip.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-page0zip.Tpo -c -o ha_innodb_plugin_la-page0zip.lo `test -f 'page/page0zip.c' || echo '$(srcdir)/'`page/page0zip.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-page0zip.Tpo $(DEPDIR)/ha_innodb_plugin_la-page0zip.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='page/page0zip.c' object='ha_innodb_plugin_la-page0zip.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-page0zip.lo `test -f 'page/page0zip.c' || echo '$(srcdir)/'`page/page0zip.c - -ha_innodb_plugin_la-lexyy.lo: pars/lexyy.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-lexyy.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-lexyy.Tpo -c -o ha_innodb_plugin_la-lexyy.lo `test -f 'pars/lexyy.c' || echo '$(srcdir)/'`pars/lexyy.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-lexyy.Tpo $(DEPDIR)/ha_innodb_plugin_la-lexyy.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/lexyy.c' object='ha_innodb_plugin_la-lexyy.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-lexyy.lo `test -f 'pars/lexyy.c' || echo '$(srcdir)/'`pars/lexyy.c - -ha_innodb_plugin_la-pars0grm.lo: pars/pars0grm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-pars0grm.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-pars0grm.Tpo -c -o ha_innodb_plugin_la-pars0grm.lo `test -f 'pars/pars0grm.c' || echo '$(srcdir)/'`pars/pars0grm.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-pars0grm.Tpo $(DEPDIR)/ha_innodb_plugin_la-pars0grm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0grm.c' object='ha_innodb_plugin_la-pars0grm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-pars0grm.lo `test -f 'pars/pars0grm.c' || echo '$(srcdir)/'`pars/pars0grm.c - -ha_innodb_plugin_la-pars0opt.lo: pars/pars0opt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-pars0opt.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-pars0opt.Tpo -c -o ha_innodb_plugin_la-pars0opt.lo `test -f 'pars/pars0opt.c' || echo '$(srcdir)/'`pars/pars0opt.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-pars0opt.Tpo $(DEPDIR)/ha_innodb_plugin_la-pars0opt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0opt.c' object='ha_innodb_plugin_la-pars0opt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-pars0opt.lo `test -f 'pars/pars0opt.c' || echo '$(srcdir)/'`pars/pars0opt.c - -ha_innodb_plugin_la-pars0pars.lo: pars/pars0pars.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-pars0pars.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-pars0pars.Tpo -c -o ha_innodb_plugin_la-pars0pars.lo `test -f 'pars/pars0pars.c' || echo '$(srcdir)/'`pars/pars0pars.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-pars0pars.Tpo $(DEPDIR)/ha_innodb_plugin_la-pars0pars.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0pars.c' object='ha_innodb_plugin_la-pars0pars.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-pars0pars.lo `test -f 'pars/pars0pars.c' || echo '$(srcdir)/'`pars/pars0pars.c - -ha_innodb_plugin_la-pars0sym.lo: pars/pars0sym.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-pars0sym.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-pars0sym.Tpo -c -o ha_innodb_plugin_la-pars0sym.lo `test -f 'pars/pars0sym.c' || echo '$(srcdir)/'`pars/pars0sym.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-pars0sym.Tpo $(DEPDIR)/ha_innodb_plugin_la-pars0sym.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pars/pars0sym.c' object='ha_innodb_plugin_la-pars0sym.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-pars0sym.lo `test -f 'pars/pars0sym.c' || echo '$(srcdir)/'`pars/pars0sym.c - -ha_innodb_plugin_la-que0que.lo: que/que0que.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-que0que.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-que0que.Tpo -c -o ha_innodb_plugin_la-que0que.lo `test -f 'que/que0que.c' || echo '$(srcdir)/'`que/que0que.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-que0que.Tpo $(DEPDIR)/ha_innodb_plugin_la-que0que.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='que/que0que.c' object='ha_innodb_plugin_la-que0que.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-que0que.lo `test -f 'que/que0que.c' || echo '$(srcdir)/'`que/que0que.c - -ha_innodb_plugin_la-read0read.lo: read/read0read.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-read0read.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-read0read.Tpo -c -o ha_innodb_plugin_la-read0read.lo `test -f 'read/read0read.c' || echo '$(srcdir)/'`read/read0read.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-read0read.Tpo $(DEPDIR)/ha_innodb_plugin_la-read0read.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read/read0read.c' object='ha_innodb_plugin_la-read0read.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-read0read.lo `test -f 'read/read0read.c' || echo '$(srcdir)/'`read/read0read.c - -ha_innodb_plugin_la-rem0cmp.lo: rem/rem0cmp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-rem0cmp.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-rem0cmp.Tpo -c -o ha_innodb_plugin_la-rem0cmp.lo `test -f 'rem/rem0cmp.c' || echo '$(srcdir)/'`rem/rem0cmp.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-rem0cmp.Tpo $(DEPDIR)/ha_innodb_plugin_la-rem0cmp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0cmp.c' object='ha_innodb_plugin_la-rem0cmp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-rem0cmp.lo `test -f 'rem/rem0cmp.c' || echo '$(srcdir)/'`rem/rem0cmp.c - -ha_innodb_plugin_la-rem0rec.lo: rem/rem0rec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-rem0rec.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-rem0rec.Tpo -c -o ha_innodb_plugin_la-rem0rec.lo `test -f 'rem/rem0rec.c' || echo '$(srcdir)/'`rem/rem0rec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-rem0rec.Tpo $(DEPDIR)/ha_innodb_plugin_la-rem0rec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rem/rem0rec.c' object='ha_innodb_plugin_la-rem0rec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-rem0rec.lo `test -f 'rem/rem0rec.c' || echo '$(srcdir)/'`rem/rem0rec.c - -ha_innodb_plugin_la-row0ext.lo: row/row0ext.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0ext.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0ext.Tpo -c -o ha_innodb_plugin_la-row0ext.lo `test -f 'row/row0ext.c' || echo '$(srcdir)/'`row/row0ext.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0ext.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0ext.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ext.c' object='ha_innodb_plugin_la-row0ext.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0ext.lo `test -f 'row/row0ext.c' || echo '$(srcdir)/'`row/row0ext.c - -ha_innodb_plugin_la-row0ins.lo: row/row0ins.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0ins.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0ins.Tpo -c -o ha_innodb_plugin_la-row0ins.lo `test -f 'row/row0ins.c' || echo '$(srcdir)/'`row/row0ins.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0ins.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0ins.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0ins.c' object='ha_innodb_plugin_la-row0ins.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0ins.lo `test -f 'row/row0ins.c' || echo '$(srcdir)/'`row/row0ins.c - -ha_innodb_plugin_la-row0merge.lo: row/row0merge.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0merge.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0merge.Tpo -c -o ha_innodb_plugin_la-row0merge.lo `test -f 'row/row0merge.c' || echo '$(srcdir)/'`row/row0merge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0merge.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0merge.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0merge.c' object='ha_innodb_plugin_la-row0merge.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0merge.lo `test -f 'row/row0merge.c' || echo '$(srcdir)/'`row/row0merge.c - -ha_innodb_plugin_la-row0mysql.lo: row/row0mysql.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0mysql.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0mysql.Tpo -c -o ha_innodb_plugin_la-row0mysql.lo `test -f 'row/row0mysql.c' || echo '$(srcdir)/'`row/row0mysql.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0mysql.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0mysql.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0mysql.c' object='ha_innodb_plugin_la-row0mysql.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0mysql.lo `test -f 'row/row0mysql.c' || echo '$(srcdir)/'`row/row0mysql.c - -ha_innodb_plugin_la-row0purge.lo: row/row0purge.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0purge.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0purge.Tpo -c -o ha_innodb_plugin_la-row0purge.lo `test -f 'row/row0purge.c' || echo '$(srcdir)/'`row/row0purge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0purge.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0purge.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0purge.c' object='ha_innodb_plugin_la-row0purge.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0purge.lo `test -f 'row/row0purge.c' || echo '$(srcdir)/'`row/row0purge.c - -ha_innodb_plugin_la-row0row.lo: row/row0row.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0row.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0row.Tpo -c -o ha_innodb_plugin_la-row0row.lo `test -f 'row/row0row.c' || echo '$(srcdir)/'`row/row0row.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0row.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0row.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0row.c' object='ha_innodb_plugin_la-row0row.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0row.lo `test -f 'row/row0row.c' || echo '$(srcdir)/'`row/row0row.c - -ha_innodb_plugin_la-row0sel.lo: row/row0sel.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0sel.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0sel.Tpo -c -o ha_innodb_plugin_la-row0sel.lo `test -f 'row/row0sel.c' || echo '$(srcdir)/'`row/row0sel.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0sel.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0sel.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0sel.c' object='ha_innodb_plugin_la-row0sel.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0sel.lo `test -f 'row/row0sel.c' || echo '$(srcdir)/'`row/row0sel.c - -ha_innodb_plugin_la-row0uins.lo: row/row0uins.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0uins.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0uins.Tpo -c -o ha_innodb_plugin_la-row0uins.lo `test -f 'row/row0uins.c' || echo '$(srcdir)/'`row/row0uins.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0uins.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0uins.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0uins.c' object='ha_innodb_plugin_la-row0uins.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0uins.lo `test -f 'row/row0uins.c' || echo '$(srcdir)/'`row/row0uins.c - -ha_innodb_plugin_la-row0umod.lo: row/row0umod.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0umod.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0umod.Tpo -c -o ha_innodb_plugin_la-row0umod.lo `test -f 'row/row0umod.c' || echo '$(srcdir)/'`row/row0umod.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0umod.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0umod.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0umod.c' object='ha_innodb_plugin_la-row0umod.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0umod.lo `test -f 'row/row0umod.c' || echo '$(srcdir)/'`row/row0umod.c - -ha_innodb_plugin_la-row0undo.lo: row/row0undo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0undo.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0undo.Tpo -c -o ha_innodb_plugin_la-row0undo.lo `test -f 'row/row0undo.c' || echo '$(srcdir)/'`row/row0undo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0undo.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0undo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0undo.c' object='ha_innodb_plugin_la-row0undo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0undo.lo `test -f 'row/row0undo.c' || echo '$(srcdir)/'`row/row0undo.c - -ha_innodb_plugin_la-row0upd.lo: row/row0upd.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0upd.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0upd.Tpo -c -o ha_innodb_plugin_la-row0upd.lo `test -f 'row/row0upd.c' || echo '$(srcdir)/'`row/row0upd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0upd.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0upd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0upd.c' object='ha_innodb_plugin_la-row0upd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0upd.lo `test -f 'row/row0upd.c' || echo '$(srcdir)/'`row/row0upd.c - -ha_innodb_plugin_la-row0vers.lo: row/row0vers.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-row0vers.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-row0vers.Tpo -c -o ha_innodb_plugin_la-row0vers.lo `test -f 'row/row0vers.c' || echo '$(srcdir)/'`row/row0vers.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-row0vers.Tpo $(DEPDIR)/ha_innodb_plugin_la-row0vers.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='row/row0vers.c' object='ha_innodb_plugin_la-row0vers.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-row0vers.lo `test -f 'row/row0vers.c' || echo '$(srcdir)/'`row/row0vers.c - -ha_innodb_plugin_la-srv0que.lo: srv/srv0que.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-srv0que.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-srv0que.Tpo -c -o ha_innodb_plugin_la-srv0que.lo `test -f 'srv/srv0que.c' || echo '$(srcdir)/'`srv/srv0que.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-srv0que.Tpo $(DEPDIR)/ha_innodb_plugin_la-srv0que.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0que.c' object='ha_innodb_plugin_la-srv0que.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-srv0que.lo `test -f 'srv/srv0que.c' || echo '$(srcdir)/'`srv/srv0que.c - -ha_innodb_plugin_la-srv0srv.lo: srv/srv0srv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-srv0srv.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-srv0srv.Tpo -c -o ha_innodb_plugin_la-srv0srv.lo `test -f 'srv/srv0srv.c' || echo '$(srcdir)/'`srv/srv0srv.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-srv0srv.Tpo $(DEPDIR)/ha_innodb_plugin_la-srv0srv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0srv.c' object='ha_innodb_plugin_la-srv0srv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-srv0srv.lo `test -f 'srv/srv0srv.c' || echo '$(srcdir)/'`srv/srv0srv.c - -ha_innodb_plugin_la-srv0start.lo: srv/srv0start.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-srv0start.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-srv0start.Tpo -c -o ha_innodb_plugin_la-srv0start.lo `test -f 'srv/srv0start.c' || echo '$(srcdir)/'`srv/srv0start.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-srv0start.Tpo $(DEPDIR)/ha_innodb_plugin_la-srv0start.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srv/srv0start.c' object='ha_innodb_plugin_la-srv0start.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-srv0start.lo `test -f 'srv/srv0start.c' || echo '$(srcdir)/'`srv/srv0start.c - -ha_innodb_plugin_la-sync0arr.lo: sync/sync0arr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-sync0arr.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-sync0arr.Tpo -c -o ha_innodb_plugin_la-sync0arr.lo `test -f 'sync/sync0arr.c' || echo '$(srcdir)/'`sync/sync0arr.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-sync0arr.Tpo $(DEPDIR)/ha_innodb_plugin_la-sync0arr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0arr.c' object='ha_innodb_plugin_la-sync0arr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-sync0arr.lo `test -f 'sync/sync0arr.c' || echo '$(srcdir)/'`sync/sync0arr.c - -ha_innodb_plugin_la-sync0rw.lo: sync/sync0rw.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-sync0rw.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-sync0rw.Tpo -c -o ha_innodb_plugin_la-sync0rw.lo `test -f 'sync/sync0rw.c' || echo '$(srcdir)/'`sync/sync0rw.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-sync0rw.Tpo $(DEPDIR)/ha_innodb_plugin_la-sync0rw.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0rw.c' object='ha_innodb_plugin_la-sync0rw.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-sync0rw.lo `test -f 'sync/sync0rw.c' || echo '$(srcdir)/'`sync/sync0rw.c - -ha_innodb_plugin_la-sync0sync.lo: sync/sync0sync.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-sync0sync.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-sync0sync.Tpo -c -o ha_innodb_plugin_la-sync0sync.lo `test -f 'sync/sync0sync.c' || echo '$(srcdir)/'`sync/sync0sync.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-sync0sync.Tpo $(DEPDIR)/ha_innodb_plugin_la-sync0sync.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync/sync0sync.c' object='ha_innodb_plugin_la-sync0sync.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-sync0sync.lo `test -f 'sync/sync0sync.c' || echo '$(srcdir)/'`sync/sync0sync.c - -ha_innodb_plugin_la-thr0loc.lo: thr/thr0loc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-thr0loc.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-thr0loc.Tpo -c -o ha_innodb_plugin_la-thr0loc.lo `test -f 'thr/thr0loc.c' || echo '$(srcdir)/'`thr/thr0loc.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-thr0loc.Tpo $(DEPDIR)/ha_innodb_plugin_la-thr0loc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thr/thr0loc.c' object='ha_innodb_plugin_la-thr0loc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-thr0loc.lo `test -f 'thr/thr0loc.c' || echo '$(srcdir)/'`thr/thr0loc.c - -ha_innodb_plugin_la-trx0i_s.lo: trx/trx0i_s.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0i_s.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0i_s.Tpo -c -o ha_innodb_plugin_la-trx0i_s.lo `test -f 'trx/trx0i_s.c' || echo '$(srcdir)/'`trx/trx0i_s.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0i_s.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0i_s.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0i_s.c' object='ha_innodb_plugin_la-trx0i_s.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0i_s.lo `test -f 'trx/trx0i_s.c' || echo '$(srcdir)/'`trx/trx0i_s.c - -ha_innodb_plugin_la-trx0purge.lo: trx/trx0purge.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0purge.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0purge.Tpo -c -o ha_innodb_plugin_la-trx0purge.lo `test -f 'trx/trx0purge.c' || echo '$(srcdir)/'`trx/trx0purge.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0purge.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0purge.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0purge.c' object='ha_innodb_plugin_la-trx0purge.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0purge.lo `test -f 'trx/trx0purge.c' || echo '$(srcdir)/'`trx/trx0purge.c - -ha_innodb_plugin_la-trx0rec.lo: trx/trx0rec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0rec.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0rec.Tpo -c -o ha_innodb_plugin_la-trx0rec.lo `test -f 'trx/trx0rec.c' || echo '$(srcdir)/'`trx/trx0rec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0rec.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0rec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rec.c' object='ha_innodb_plugin_la-trx0rec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0rec.lo `test -f 'trx/trx0rec.c' || echo '$(srcdir)/'`trx/trx0rec.c - -ha_innodb_plugin_la-trx0roll.lo: trx/trx0roll.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0roll.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0roll.Tpo -c -o ha_innodb_plugin_la-trx0roll.lo `test -f 'trx/trx0roll.c' || echo '$(srcdir)/'`trx/trx0roll.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0roll.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0roll.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0roll.c' object='ha_innodb_plugin_la-trx0roll.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0roll.lo `test -f 'trx/trx0roll.c' || echo '$(srcdir)/'`trx/trx0roll.c - -ha_innodb_plugin_la-trx0rseg.lo: trx/trx0rseg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0rseg.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0rseg.Tpo -c -o ha_innodb_plugin_la-trx0rseg.lo `test -f 'trx/trx0rseg.c' || echo '$(srcdir)/'`trx/trx0rseg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0rseg.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0rseg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0rseg.c' object='ha_innodb_plugin_la-trx0rseg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0rseg.lo `test -f 'trx/trx0rseg.c' || echo '$(srcdir)/'`trx/trx0rseg.c - -ha_innodb_plugin_la-trx0sys.lo: trx/trx0sys.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0sys.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0sys.Tpo -c -o ha_innodb_plugin_la-trx0sys.lo `test -f 'trx/trx0sys.c' || echo '$(srcdir)/'`trx/trx0sys.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0sys.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0sys.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0sys.c' object='ha_innodb_plugin_la-trx0sys.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0sys.lo `test -f 'trx/trx0sys.c' || echo '$(srcdir)/'`trx/trx0sys.c - -ha_innodb_plugin_la-trx0trx.lo: trx/trx0trx.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0trx.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0trx.Tpo -c -o ha_innodb_plugin_la-trx0trx.lo `test -f 'trx/trx0trx.c' || echo '$(srcdir)/'`trx/trx0trx.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0trx.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0trx.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0trx.c' object='ha_innodb_plugin_la-trx0trx.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0trx.lo `test -f 'trx/trx0trx.c' || echo '$(srcdir)/'`trx/trx0trx.c - -ha_innodb_plugin_la-trx0undo.lo: trx/trx0undo.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-trx0undo.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-trx0undo.Tpo -c -o ha_innodb_plugin_la-trx0undo.lo `test -f 'trx/trx0undo.c' || echo '$(srcdir)/'`trx/trx0undo.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-trx0undo.Tpo $(DEPDIR)/ha_innodb_plugin_la-trx0undo.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trx/trx0undo.c' object='ha_innodb_plugin_la-trx0undo.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-trx0undo.lo `test -f 'trx/trx0undo.c' || echo '$(srcdir)/'`trx/trx0undo.c - -ha_innodb_plugin_la-usr0sess.lo: usr/usr0sess.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-usr0sess.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-usr0sess.Tpo -c -o ha_innodb_plugin_la-usr0sess.lo `test -f 'usr/usr0sess.c' || echo '$(srcdir)/'`usr/usr0sess.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-usr0sess.Tpo $(DEPDIR)/ha_innodb_plugin_la-usr0sess.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='usr/usr0sess.c' object='ha_innodb_plugin_la-usr0sess.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-usr0sess.lo `test -f 'usr/usr0sess.c' || echo '$(srcdir)/'`usr/usr0sess.c - -ha_innodb_plugin_la-ut0byte.lo: ut/ut0byte.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0byte.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0byte.Tpo -c -o ha_innodb_plugin_la-ut0byte.lo `test -f 'ut/ut0byte.c' || echo '$(srcdir)/'`ut/ut0byte.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0byte.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0byte.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0byte.c' object='ha_innodb_plugin_la-ut0byte.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0byte.lo `test -f 'ut/ut0byte.c' || echo '$(srcdir)/'`ut/ut0byte.c - -ha_innodb_plugin_la-ut0dbg.lo: ut/ut0dbg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0dbg.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0dbg.Tpo -c -o ha_innodb_plugin_la-ut0dbg.lo `test -f 'ut/ut0dbg.c' || echo '$(srcdir)/'`ut/ut0dbg.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0dbg.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0dbg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0dbg.c' object='ha_innodb_plugin_la-ut0dbg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0dbg.lo `test -f 'ut/ut0dbg.c' || echo '$(srcdir)/'`ut/ut0dbg.c - -ha_innodb_plugin_la-ut0list.lo: ut/ut0list.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0list.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0list.Tpo -c -o ha_innodb_plugin_la-ut0list.lo `test -f 'ut/ut0list.c' || echo '$(srcdir)/'`ut/ut0list.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0list.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0list.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0list.c' object='ha_innodb_plugin_la-ut0list.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0list.lo `test -f 'ut/ut0list.c' || echo '$(srcdir)/'`ut/ut0list.c - -ha_innodb_plugin_la-ut0mem.lo: ut/ut0mem.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0mem.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0mem.Tpo -c -o ha_innodb_plugin_la-ut0mem.lo `test -f 'ut/ut0mem.c' || echo '$(srcdir)/'`ut/ut0mem.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0mem.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0mem.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0mem.c' object='ha_innodb_plugin_la-ut0mem.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0mem.lo `test -f 'ut/ut0mem.c' || echo '$(srcdir)/'`ut/ut0mem.c - -ha_innodb_plugin_la-ut0rbt.lo: ut/ut0rbt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0rbt.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0rbt.Tpo -c -o ha_innodb_plugin_la-ut0rbt.lo `test -f 'ut/ut0rbt.c' || echo '$(srcdir)/'`ut/ut0rbt.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0rbt.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0rbt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rbt.c' object='ha_innodb_plugin_la-ut0rbt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0rbt.lo `test -f 'ut/ut0rbt.c' || echo '$(srcdir)/'`ut/ut0rbt.c - -ha_innodb_plugin_la-ut0rnd.lo: ut/ut0rnd.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0rnd.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0rnd.Tpo -c -o ha_innodb_plugin_la-ut0rnd.lo `test -f 'ut/ut0rnd.c' || echo '$(srcdir)/'`ut/ut0rnd.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0rnd.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0rnd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0rnd.c' object='ha_innodb_plugin_la-ut0rnd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0rnd.lo `test -f 'ut/ut0rnd.c' || echo '$(srcdir)/'`ut/ut0rnd.c - -ha_innodb_plugin_la-ut0ut.lo: ut/ut0ut.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0ut.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0ut.Tpo -c -o ha_innodb_plugin_la-ut0ut.lo `test -f 'ut/ut0ut.c' || echo '$(srcdir)/'`ut/ut0ut.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0ut.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0ut.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0ut.c' object='ha_innodb_plugin_la-ut0ut.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0ut.lo `test -f 'ut/ut0ut.c' || echo '$(srcdir)/'`ut/ut0ut.c - -ha_innodb_plugin_la-ut0vec.lo: ut/ut0vec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0vec.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0vec.Tpo -c -o ha_innodb_plugin_la-ut0vec.lo `test -f 'ut/ut0vec.c' || echo '$(srcdir)/'`ut/ut0vec.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0vec.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0vec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0vec.c' object='ha_innodb_plugin_la-ut0vec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0vec.lo `test -f 'ut/ut0vec.c' || echo '$(srcdir)/'`ut/ut0vec.c - -ha_innodb_plugin_la-ut0wqueue.lo: ut/ut0wqueue.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -MT ha_innodb_plugin_la-ut0wqueue.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ut0wqueue.Tpo -c -o ha_innodb_plugin_la-ut0wqueue.lo `test -f 'ut/ut0wqueue.c' || echo '$(srcdir)/'`ut/ut0wqueue.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ut0wqueue.Tpo $(DEPDIR)/ha_innodb_plugin_la-ut0wqueue.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ut/ut0wqueue.c' object='ha_innodb_plugin_la-ut0wqueue.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CFLAGS) $(CFLAGS) -c -o ha_innodb_plugin_la-ut0wqueue.lo `test -f 'ut/ut0wqueue.c' || echo '$(srcdir)/'`ut/ut0wqueue.c - -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -libinnobase_a-ha_innodb.o: handler/ha_innodb.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-ha_innodb.o -MD -MP -MF $(DEPDIR)/libinnobase_a-ha_innodb.Tpo -c -o libinnobase_a-ha_innodb.o `test -f 'handler/ha_innodb.cc' || echo '$(srcdir)/'`handler/ha_innodb.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha_innodb.Tpo $(DEPDIR)/libinnobase_a-ha_innodb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/ha_innodb.cc' object='libinnobase_a-ha_innodb.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-ha_innodb.o `test -f 'handler/ha_innodb.cc' || echo '$(srcdir)/'`handler/ha_innodb.cc - -libinnobase_a-ha_innodb.obj: handler/ha_innodb.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-ha_innodb.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-ha_innodb.Tpo -c -o libinnobase_a-ha_innodb.obj `if test -f 'handler/ha_innodb.cc'; then $(CYGPATH_W) 'handler/ha_innodb.cc'; else $(CYGPATH_W) '$(srcdir)/handler/ha_innodb.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-ha_innodb.Tpo $(DEPDIR)/libinnobase_a-ha_innodb.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/ha_innodb.cc' object='libinnobase_a-ha_innodb.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-ha_innodb.obj `if test -f 'handler/ha_innodb.cc'; then $(CYGPATH_W) 'handler/ha_innodb.cc'; else $(CYGPATH_W) '$(srcdir)/handler/ha_innodb.cc'; fi` - -libinnobase_a-handler0alter.o: handler/handler0alter.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-handler0alter.o -MD -MP -MF $(DEPDIR)/libinnobase_a-handler0alter.Tpo -c -o libinnobase_a-handler0alter.o `test -f 'handler/handler0alter.cc' || echo '$(srcdir)/'`handler/handler0alter.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-handler0alter.Tpo $(DEPDIR)/libinnobase_a-handler0alter.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/handler0alter.cc' object='libinnobase_a-handler0alter.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-handler0alter.o `test -f 'handler/handler0alter.cc' || echo '$(srcdir)/'`handler/handler0alter.cc - -libinnobase_a-handler0alter.obj: handler/handler0alter.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-handler0alter.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-handler0alter.Tpo -c -o libinnobase_a-handler0alter.obj `if test -f 'handler/handler0alter.cc'; then $(CYGPATH_W) 'handler/handler0alter.cc'; else $(CYGPATH_W) '$(srcdir)/handler/handler0alter.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-handler0alter.Tpo $(DEPDIR)/libinnobase_a-handler0alter.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/handler0alter.cc' object='libinnobase_a-handler0alter.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-handler0alter.obj `if test -f 'handler/handler0alter.cc'; then $(CYGPATH_W) 'handler/handler0alter.cc'; else $(CYGPATH_W) '$(srcdir)/handler/handler0alter.cc'; fi` - -libinnobase_a-i_s.o: handler/i_s.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-i_s.o -MD -MP -MF $(DEPDIR)/libinnobase_a-i_s.Tpo -c -o libinnobase_a-i_s.o `test -f 'handler/i_s.cc' || echo '$(srcdir)/'`handler/i_s.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-i_s.Tpo $(DEPDIR)/libinnobase_a-i_s.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/i_s.cc' object='libinnobase_a-i_s.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-i_s.o `test -f 'handler/i_s.cc' || echo '$(srcdir)/'`handler/i_s.cc - -libinnobase_a-i_s.obj: handler/i_s.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-i_s.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-i_s.Tpo -c -o libinnobase_a-i_s.obj `if test -f 'handler/i_s.cc'; then $(CYGPATH_W) 'handler/i_s.cc'; else $(CYGPATH_W) '$(srcdir)/handler/i_s.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-i_s.Tpo $(DEPDIR)/libinnobase_a-i_s.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/i_s.cc' object='libinnobase_a-i_s.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-i_s.obj `if test -f 'handler/i_s.cc'; then $(CYGPATH_W) 'handler/i_s.cc'; else $(CYGPATH_W) '$(srcdir)/handler/i_s.cc'; fi` - -libinnobase_a-mysql_addons.o: handler/mysql_addons.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-mysql_addons.o -MD -MP -MF $(DEPDIR)/libinnobase_a-mysql_addons.Tpo -c -o libinnobase_a-mysql_addons.o `test -f 'handler/mysql_addons.cc' || echo '$(srcdir)/'`handler/mysql_addons.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mysql_addons.Tpo $(DEPDIR)/libinnobase_a-mysql_addons.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/mysql_addons.cc' object='libinnobase_a-mysql_addons.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-mysql_addons.o `test -f 'handler/mysql_addons.cc' || echo '$(srcdir)/'`handler/mysql_addons.cc - -libinnobase_a-mysql_addons.obj: handler/mysql_addons.cc -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -MT libinnobase_a-mysql_addons.obj -MD -MP -MF $(DEPDIR)/libinnobase_a-mysql_addons.Tpo -c -o libinnobase_a-mysql_addons.obj `if test -f 'handler/mysql_addons.cc'; then $(CYGPATH_W) 'handler/mysql_addons.cc'; else $(CYGPATH_W) '$(srcdir)/handler/mysql_addons.cc'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libinnobase_a-mysql_addons.Tpo $(DEPDIR)/libinnobase_a-mysql_addons.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/mysql_addons.cc' object='libinnobase_a-mysql_addons.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libinnobase_a_CXXFLAGS) $(CXXFLAGS) -c -o libinnobase_a-mysql_addons.obj `if test -f 'handler/mysql_addons.cc'; then $(CYGPATH_W) 'handler/mysql_addons.cc'; else $(CYGPATH_W) '$(srcdir)/handler/mysql_addons.cc'; fi` - -ha_innodb_plugin_la-ha_innodb.lo: handler/ha_innodb.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -MT ha_innodb_plugin_la-ha_innodb.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-ha_innodb.Tpo -c -o ha_innodb_plugin_la-ha_innodb.lo `test -f 'handler/ha_innodb.cc' || echo '$(srcdir)/'`handler/ha_innodb.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-ha_innodb.Tpo $(DEPDIR)/ha_innodb_plugin_la-ha_innodb.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/ha_innodb.cc' object='ha_innodb_plugin_la-ha_innodb.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -c -o ha_innodb_plugin_la-ha_innodb.lo `test -f 'handler/ha_innodb.cc' || echo '$(srcdir)/'`handler/ha_innodb.cc - -ha_innodb_plugin_la-handler0alter.lo: handler/handler0alter.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -MT ha_innodb_plugin_la-handler0alter.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-handler0alter.Tpo -c -o ha_innodb_plugin_la-handler0alter.lo `test -f 'handler/handler0alter.cc' || echo '$(srcdir)/'`handler/handler0alter.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-handler0alter.Tpo $(DEPDIR)/ha_innodb_plugin_la-handler0alter.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/handler0alter.cc' object='ha_innodb_plugin_la-handler0alter.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -c -o ha_innodb_plugin_la-handler0alter.lo `test -f 'handler/handler0alter.cc' || echo '$(srcdir)/'`handler/handler0alter.cc - -ha_innodb_plugin_la-i_s.lo: handler/i_s.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -MT ha_innodb_plugin_la-i_s.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-i_s.Tpo -c -o ha_innodb_plugin_la-i_s.lo `test -f 'handler/i_s.cc' || echo '$(srcdir)/'`handler/i_s.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-i_s.Tpo $(DEPDIR)/ha_innodb_plugin_la-i_s.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/i_s.cc' object='ha_innodb_plugin_la-i_s.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -c -o ha_innodb_plugin_la-i_s.lo `test -f 'handler/i_s.cc' || echo '$(srcdir)/'`handler/i_s.cc - -ha_innodb_plugin_la-mysql_addons.lo: handler/mysql_addons.cc -@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -MT ha_innodb_plugin_la-mysql_addons.lo -MD -MP -MF $(DEPDIR)/ha_innodb_plugin_la-mysql_addons.Tpo -c -o ha_innodb_plugin_la-mysql_addons.lo `test -f 'handler/mysql_addons.cc' || echo '$(srcdir)/'`handler/mysql_addons.cc -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/ha_innodb_plugin_la-mysql_addons.Tpo $(DEPDIR)/ha_innodb_plugin_la-mysql_addons.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='handler/mysql_addons.cc' object='ha_innodb_plugin_la-mysql_addons.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ha_innodb_plugin_la_CXXFLAGS) $(CXXFLAGS) -c -o ha_innodb_plugin_la-mysql_addons.lo `test -f 'handler/mysql_addons.cc' || echo '$(srcdir)/'`handler/mysql_addons.cc - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(pkgplugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-pkgpluginLTLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pkgpluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pkgpluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-pkgpluginLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-pkgpluginLTLIBRARIES install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-pkgpluginLTLIBRARIES - - -# Don't update the files from bitkeeper -%::SCCS/s.% -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/README b/README deleted file mode 100644 index c74c93e4663..00000000000 --- a/README +++ /dev/null @@ -1,32 +0,0 @@ -This is the source of the InnoDB Plugin 1.0.6 for MySQL 5.1 -=========================================================== - -Instructions for compiling the plugin: --------------------------------------- - -1. Get the latest MySQL 5.1 sources from - http://dev.mysql.com/downloads/mysql/5.1.html#source - -2. Replace the contents of the mysql-5.1.N/storage/innobase/ directory - with the contents of this directory. - -3. Optional (only necessary if you are going to run tests from the - mysql-test suite): cd into the innobase directory and run ./setup.sh - -4. Compile MySQL as usual. - If compiling MySQL 5.1.38 or newer, disable the InnoDB Plugin that comes - with MySQL in storage/innodb_plugin with the configure option - --without-plugin-innodb_plugin - -5. Enjoy! - -See the online documentation for more detailed instructions: -http://www.innodb.com/doc/innodb_plugin-1.0/innodb-plugin-installation.html - -For more information about InnoDB visit -http://www.innodb.com - -Please report any problems or issues with the plugin in the InnoDB Forums -http://forums.innodb.com/ or in the MySQL Bugs database http://bugs.mysql.com - -Thank you for using the InnoDB plugin! diff --git a/btr/btr0btr.c b/btr/btr0btr.c index 2fb14b06a7b..c0c27128441 100644 --- a/btr/btr0btr.c +++ b/btr/btr0btr.c @@ -42,6 +42,560 @@ Created 6/2/1994 Heikki Tuuri #include "ibuf0ibuf.h" #include "trx0trx.h" +#ifdef UNIV_BLOB_DEBUG +# include "srv0srv.h" +# include "ut0rbt.h" + +/** TRUE when messages about index->blobs modification are enabled. */ +static ibool btr_blob_dbg_msg; + +/** Issue a message about an operation on index->blobs. +@param op operation +@param b the entry being subjected to the operation +@param ctx the context of the operation */ +#define btr_blob_dbg_msg_issue(op, b, ctx) \ + fprintf(stderr, op " %u:%u:%u->%u %s(%u,%u,%u)\n", \ + (b)->ref_page_no, (b)->ref_heap_no, \ + (b)->ref_field_no, (b)->blob_page_no, ctx, \ + (b)->owner, (b)->always_owner, (b)->del) + +/** Insert to index->blobs a reference to an off-page column. +@param index the index tree +@param b the reference +@param ctx context (for logging) */ +UNIV_INTERN +void +btr_blob_dbg_rbt_insert( +/*====================*/ + dict_index_t* index, /*!< in/out: index tree */ + const btr_blob_dbg_t* b, /*!< in: the reference */ + const char* ctx) /*!< in: context (for logging) */ +{ + if (btr_blob_dbg_msg) { + btr_blob_dbg_msg_issue("insert", b, ctx); + } + mutex_enter(&index->blobs_mutex); + rbt_insert(index->blobs, b, b); + mutex_exit(&index->blobs_mutex); +} + +/** Remove from index->blobs a reference to an off-page column. +@param index the index tree +@param b the reference +@param ctx context (for logging) */ +UNIV_INTERN +void +btr_blob_dbg_rbt_delete( +/*====================*/ + dict_index_t* index, /*!< in/out: index tree */ + const btr_blob_dbg_t* b, /*!< in: the reference */ + const char* ctx) /*!< in: context (for logging) */ +{ + if (btr_blob_dbg_msg) { + btr_blob_dbg_msg_issue("delete", b, ctx); + } + mutex_enter(&index->blobs_mutex); + ut_a(rbt_delete(index->blobs, b)); + mutex_exit(&index->blobs_mutex); +} + +/**************************************************************//** +Comparator for items (btr_blob_dbg_t) in index->blobs. +The key in index->blobs is (ref_page_no, ref_heap_no, ref_field_no). +@return negative, 0 or positive if *a<*b, *a=*b, *a>*b */ +static +int +btr_blob_dbg_cmp( +/*=============*/ + const void* a, /*!< in: first btr_blob_dbg_t to compare */ + const void* b) /*!< in: second btr_blob_dbg_t to compare */ +{ + const btr_blob_dbg_t* aa = a; + const btr_blob_dbg_t* bb = b; + + ut_ad(aa != NULL); + ut_ad(bb != NULL); + + if (aa->ref_page_no != bb->ref_page_no) { + return(aa->ref_page_no < bb->ref_page_no ? -1 : 1); + } + if (aa->ref_heap_no != bb->ref_heap_no) { + return(aa->ref_heap_no < bb->ref_heap_no ? -1 : 1); + } + if (aa->ref_field_no != bb->ref_field_no) { + return(aa->ref_field_no < bb->ref_field_no ? -1 : 1); + } + return(0); +} + +/**************************************************************//** +Add a reference to an off-page column to the index->blobs map. */ +UNIV_INTERN +void +btr_blob_dbg_add_blob( +/*==================*/ + const rec_t* rec, /*!< in: clustered index record */ + ulint field_no, /*!< in: off-page column number */ + ulint page_no, /*!< in: start page of the column */ + dict_index_t* index, /*!< in/out: index tree */ + const char* ctx) /*!< in: context (for logging) */ +{ + btr_blob_dbg_t b; + const page_t* page = page_align(rec); + + ut_a(index->blobs); + + b.blob_page_no = page_no; + b.ref_page_no = page_get_page_no(page); + b.ref_heap_no = page_rec_get_heap_no(rec); + b.ref_field_no = field_no; + ut_a(b.ref_field_no >= index->n_uniq); + b.always_owner = b.owner = TRUE; + b.del = FALSE; + ut_a(!rec_get_deleted_flag(rec, page_is_comp(page))); + btr_blob_dbg_rbt_insert(index, &b, ctx); +} + +/**************************************************************//** +Add to index->blobs any references to off-page columns from a record. +@return number of references added */ +UNIV_INTERN +ulint +btr_blob_dbg_add_rec( +/*=================*/ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in/out: index */ + const ulint* offsets,/*!< in: offsets */ + const char* ctx) /*!< in: context (for logging) */ +{ + ulint count = 0; + ulint i; + btr_blob_dbg_t b; + ibool del; + + ut_ad(rec_offs_validate(rec, index, offsets)); + + if (!rec_offs_any_extern(offsets)) { + return(0); + } + + b.ref_page_no = page_get_page_no(page_align(rec)); + b.ref_heap_no = page_rec_get_heap_no(rec); + del = (rec_get_deleted_flag(rec, rec_offs_comp(offsets)) != 0); + + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (rec_offs_nth_extern(offsets, i)) { + ulint len; + const byte* field_ref = rec_get_nth_field( + rec, offsets, i, &len); + + ut_a(len != UNIV_SQL_NULL); + ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); + field_ref += len - BTR_EXTERN_FIELD_REF_SIZE; + + if (!memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)) { + /* the column has not been stored yet */ + continue; + } + + b.ref_field_no = i; + b.blob_page_no = mach_read_from_4( + field_ref + BTR_EXTERN_PAGE_NO); + ut_a(b.ref_field_no >= index->n_uniq); + b.always_owner = b.owner + = !(field_ref[BTR_EXTERN_LEN] + & BTR_EXTERN_OWNER_FLAG); + b.del = del; + + btr_blob_dbg_rbt_insert(index, &b, ctx); + count++; + } + } + + return(count); +} + +/**************************************************************//** +Display the references to off-page columns. +This function is to be called from a debugger, +for example when a breakpoint on ut_dbg_assertion_failed is hit. */ +UNIV_INTERN +void +btr_blob_dbg_print( +/*===============*/ + const dict_index_t* index) /*!< in: index tree */ +{ + const ib_rbt_node_t* node; + + if (!index->blobs) { + return; + } + + /* We intentionally do not acquire index->blobs_mutex here. + This function is to be called from a debugger, and the caller + should make sure that the index->blobs_mutex is held. */ + + for (node = rbt_first(index->blobs); + node != NULL; node = rbt_next(index->blobs, node)) { + const btr_blob_dbg_t* b + = rbt_value(btr_blob_dbg_t, node); + fprintf(stderr, "%u:%u:%u->%u%s%s%s\n", + b->ref_page_no, b->ref_heap_no, b->ref_field_no, + b->blob_page_no, + b->owner ? "" : "(disowned)", + b->always_owner ? "" : "(has disowned)", + b->del ? "(deleted)" : ""); + } +} + +/**************************************************************//** +Remove from index->blobs any references to off-page columns from a record. +@return number of references removed */ +UNIV_INTERN +ulint +btr_blob_dbg_remove_rec( +/*====================*/ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in/out: index */ + const ulint* offsets,/*!< in: offsets */ + const char* ctx) /*!< in: context (for logging) */ +{ + ulint i; + ulint count = 0; + btr_blob_dbg_t b; + + ut_ad(rec_offs_validate(rec, index, offsets)); + + if (!rec_offs_any_extern(offsets)) { + return(0); + } + + b.ref_page_no = page_get_page_no(page_align(rec)); + b.ref_heap_no = page_rec_get_heap_no(rec); + + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (rec_offs_nth_extern(offsets, i)) { + ulint len; + const byte* field_ref = rec_get_nth_field( + rec, offsets, i, &len); + + ut_a(len != UNIV_SQL_NULL); + ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); + field_ref += len - BTR_EXTERN_FIELD_REF_SIZE; + + b.ref_field_no = i; + b.blob_page_no = mach_read_from_4( + field_ref + BTR_EXTERN_PAGE_NO); + + switch (b.blob_page_no) { + case 0: + /* The column has not been stored yet. + The BLOB pointer must be all zero. + There cannot be a BLOB starting at + page 0, because page 0 is reserved for + the tablespace header. */ + ut_a(!memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); + /* fall through */ + case FIL_NULL: + /* the column has been freed already */ + continue; + } + + btr_blob_dbg_rbt_delete(index, &b, ctx); + count++; + } + } + + return(count); +} + +/**************************************************************//** +Check that there are no references to off-page columns from or to +the given page. Invoked when freeing or clearing a page. +@return TRUE when no orphan references exist */ +UNIV_INTERN +ibool +btr_blob_dbg_is_empty( +/*==================*/ + dict_index_t* index, /*!< in: index */ + ulint page_no) /*!< in: page number */ +{ + const ib_rbt_node_t* node; + ibool success = TRUE; + + if (!index->blobs) { + return(success); + } + + mutex_enter(&index->blobs_mutex); + + for (node = rbt_first(index->blobs); + node != NULL; node = rbt_next(index->blobs, node)) { + const btr_blob_dbg_t* b + = rbt_value(btr_blob_dbg_t, node); + + if (b->ref_page_no != page_no && b->blob_page_no != page_no) { + continue; + } + + fprintf(stderr, + "InnoDB: orphan BLOB ref%s%s%s %u:%u:%u->%u\n", + b->owner ? "" : "(disowned)", + b->always_owner ? "" : "(has disowned)", + b->del ? "(deleted)" : "", + b->ref_page_no, b->ref_heap_no, b->ref_field_no, + b->blob_page_no); + + if (b->blob_page_no != page_no || b->owner || !b->del) { + success = FALSE; + } + } + + mutex_exit(&index->blobs_mutex); + return(success); +} + +/**************************************************************//** +Count and process all references to off-page columns on a page. +@return number of references processed */ +UNIV_INTERN +ulint +btr_blob_dbg_op( +/*============*/ + const page_t* page, /*!< in: B-tree leaf page */ + const rec_t* rec, /*!< in: record to start from + (NULL to process the whole page) */ + dict_index_t* index, /*!< in/out: index */ + const char* ctx, /*!< in: context (for logging) */ + const btr_blob_dbg_op_f op) /*!< in: operation on records */ +{ + ulint count = 0; + mem_heap_t* heap = NULL; + ulint offsets_[REC_OFFS_NORMAL_SIZE]; + ulint* offsets = offsets_; + rec_offs_init(offsets_); + + ut_a(fil_page_get_type(page) == FIL_PAGE_INDEX); + ut_a(!rec || page_align(rec) == page); + + if (!index->blobs || !page_is_leaf(page) + || !dict_index_is_clust(index)) { + return(0); + } + + if (rec == NULL) { + rec = page_get_infimum_rec(page); + } + + do { + offsets = rec_get_offsets(rec, index, offsets, + ULINT_UNDEFINED, &heap); + count += op(rec, index, offsets, ctx); + rec = page_rec_get_next_const(rec); + } while (!page_rec_is_supremum(rec)); + + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + + return(count); +} + +/**************************************************************//** +Count and add to index->blobs any references to off-page columns +from records on a page. +@return number of references added */ +UNIV_INTERN +ulint +btr_blob_dbg_add( +/*=============*/ + const page_t* page, /*!< in: rewritten page */ + dict_index_t* index, /*!< in/out: index */ + const char* ctx) /*!< in: context (for logging) */ +{ + btr_blob_dbg_assert_empty(index, page_get_page_no(page)); + + return(btr_blob_dbg_op(page, NULL, index, ctx, btr_blob_dbg_add_rec)); +} + +/**************************************************************//** +Count and remove from index->blobs any references to off-page columns +from records on a page. +Used when reorganizing a page, before copying the records. +@return number of references removed */ +UNIV_INTERN +ulint +btr_blob_dbg_remove( +/*================*/ + const page_t* page, /*!< in: b-tree page */ + dict_index_t* index, /*!< in/out: index */ + const char* ctx) /*!< in: context (for logging) */ +{ + ulint count; + + count = btr_blob_dbg_op(page, NULL, index, ctx, + btr_blob_dbg_remove_rec); + + /* Check that no references exist. */ + btr_blob_dbg_assert_empty(index, page_get_page_no(page)); + + return(count); +} + +/**************************************************************//** +Restore in index->blobs any references to off-page columns +Used when page reorganize fails due to compressed page overflow. */ +UNIV_INTERN +void +btr_blob_dbg_restore( +/*=================*/ + const page_t* npage, /*!< in: page that failed to compress */ + const page_t* page, /*!< in: copy of original page */ + dict_index_t* index, /*!< in/out: index */ + const char* ctx) /*!< in: context (for logging) */ +{ + ulint removed; + ulint added; + + ut_a(page_get_page_no(npage) == page_get_page_no(page)); + ut_a(page_get_space_id(npage) == page_get_space_id(page)); + + removed = btr_blob_dbg_remove(npage, index, ctx); + added = btr_blob_dbg_add(page, index, ctx); + ut_a(added == removed); +} + +/**************************************************************//** +Modify the 'deleted' flag of a record. */ +UNIV_INTERN +void +btr_blob_dbg_set_deleted_flag( +/*==========================*/ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in/out: index */ + const ulint* offsets,/*!< in: rec_get_offs(rec, index) */ + ibool del) /*!< in: TRUE=deleted, FALSE=exists */ +{ + const ib_rbt_node_t* node; + btr_blob_dbg_t b; + btr_blob_dbg_t* c; + ulint i; + + ut_ad(rec_offs_validate(rec, index, offsets)); + ut_a(dict_index_is_clust(index)); + ut_a(del == !!del);/* must be FALSE==0 or TRUE==1 */ + + if (!rec_offs_any_extern(offsets) || !index->blobs) { + + return; + } + + b.ref_page_no = page_get_page_no(page_align(rec)); + b.ref_heap_no = page_rec_get_heap_no(rec); + + for (i = 0; i < rec_offs_n_fields(offsets); i++) { + if (rec_offs_nth_extern(offsets, i)) { + ulint len; + const byte* field_ref = rec_get_nth_field( + rec, offsets, i, &len); + + ut_a(len != UNIV_SQL_NULL); + ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); + field_ref += len - BTR_EXTERN_FIELD_REF_SIZE; + + b.ref_field_no = i; + b.blob_page_no = mach_read_from_4( + field_ref + BTR_EXTERN_PAGE_NO); + + switch (b.blob_page_no) { + case 0: + ut_a(memcmp(field_ref, field_ref_zero, + BTR_EXTERN_FIELD_REF_SIZE)); + /* page number 0 is for the + page allocation bitmap */ + case FIL_NULL: + /* the column has been freed already */ + ut_error; + } + + mutex_enter(&index->blobs_mutex); + node = rbt_lookup(index->blobs, &b); + ut_a(node); + + c = rbt_value(btr_blob_dbg_t, node); + /* The flag should be modified. */ + c->del = del; + if (btr_blob_dbg_msg) { + b = *c; + mutex_exit(&index->blobs_mutex); + btr_blob_dbg_msg_issue("del_mk", &b, ""); + } else { + mutex_exit(&index->blobs_mutex); + } + } + } +} + +/**************************************************************//** +Change the ownership of an off-page column. */ +UNIV_INTERN +void +btr_blob_dbg_owner( +/*===============*/ + const rec_t* rec, /*!< in: record */ + dict_index_t* index, /*!< in/out: index */ + const ulint* offsets,/*!< in: rec_get_offs(rec, index) */ + ulint i, /*!< in: ith field in rec */ + ibool own) /*!< in: TRUE=owned, FALSE=disowned */ +{ + const ib_rbt_node_t* node; + btr_blob_dbg_t b; + const byte* field_ref; + ulint len; + + ut_ad(rec_offs_validate(rec, index, offsets)); + ut_a(rec_offs_nth_extern(offsets, i)); + + field_ref = rec_get_nth_field(rec, offsets, i, &len); + ut_a(len != UNIV_SQL_NULL); + ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE); + field_ref += len - BTR_EXTERN_FIELD_REF_SIZE; + + b.ref_page_no = page_get_page_no(page_align(rec)); + b.ref_heap_no = page_rec_get_heap_no(rec); + b.ref_field_no = i; + b.owner = !(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG); + b.blob_page_no = mach_read_from_4(field_ref + BTR_EXTERN_PAGE_NO); + + ut_a(b.owner == own); + + mutex_enter(&index->blobs_mutex); + node = rbt_lookup(index->blobs, &b); + /* row_ins_clust_index_entry_by_modify() invokes + btr_cur_unmark_extern_fields() also for the newly inserted + references, which are all zero bytes until the columns are stored. + The node lookup must fail if and only if that is the case. */ + ut_a(!memcmp(field_ref, field_ref_zero, BTR_EXTERN_FIELD_REF_SIZE) + == !node); + + if (node) { + btr_blob_dbg_t* c = rbt_value(btr_blob_dbg_t, node); + /* Some code sets ownership from TRUE to TRUE. + We do not allow changing ownership from FALSE to FALSE. */ + ut_a(own || c->owner); + + c->owner = own; + if (!own) { + c->always_owner = FALSE; + } + } + + mutex_exit(&index->blobs_mutex); +} +#endif /* UNIV_BLOB_DEBUG */ + /* Latching strategy of the InnoDB B-tree -------------------------------------- @@ -289,7 +843,7 @@ btr_get_next_user_rec( /**************************************************************//** Creates a new index page (not the root, and also not used in page reorganization). @see btr_page_empty(). */ -static +UNIV_INTERN void btr_page_create( /*============*/ @@ -302,6 +856,7 @@ btr_page_create( page_t* page = buf_block_get_frame(block); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); + btr_blob_dbg_assert_empty(index, buf_block_get_page_no(block)); if (UNIV_LIKELY_NULL(page_zip)) { page_create_zip(block, index, level, mtr); @@ -501,6 +1056,7 @@ btr_page_free_low( modify clock */ buf_block_modify_clock_inc(block); + btr_blob_dbg_assert_empty(index, buf_block_get_page_no(block)); if (dict_index_is_ibuf(index)) { @@ -631,6 +1187,7 @@ btr_page_get_father_node_ptr_func( ut_ad(dict_index_get_page(index) != page_no); level = btr_page_get_level(btr_cur_get_page(cursor), mtr); + user_rec = btr_cur_get_rec(cursor); ut_a(page_rec_is_user_rec(user_rec)); tuple = dict_index_build_node_ptr(index, user_rec, 0, heap, level); @@ -746,7 +1303,7 @@ btr_create( ulint space, /*!< in: space where created */ ulint zip_size,/*!< in: compressed page size in bytes or 0 for uncompressed pages */ - dulint index_id,/*!< in: index id */ + index_id_t index_id,/*!< in: index id */ dict_index_t* index, /*!< in: index */ mtr_t* mtr) /*!< in: mini-transaction handle */ { @@ -785,6 +1342,14 @@ btr_create( block = buf_page_get(space, zip_size, page_no, RW_X_LATCH, mtr); } else { +#ifdef UNIV_BLOB_DEBUG + if ((type & DICT_CLUSTERED) && !index->blobs) { + mutex_create(PFS_NOT_INSTRUMENTED, + &index->blobs_mutex, SYNC_ANY_LATCH); + index->blobs = rbt_create(sizeof(btr_blob_dbg_t), + btr_blob_dbg_cmp); + } +#endif /* UNIV_BLOB_DEBUG */ block = fseg_create(space, 0, PAGE_HEADER + PAGE_BTR_SEG_TOP, mtr); } @@ -953,7 +1518,7 @@ btr_free_root( } ut_a(block); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, NULL); header = buf_block_get_frame(block) + PAGE_HEADER + PAGE_BTR_SEG_TOP; #ifdef UNIV_BTR_DEBUG @@ -979,6 +1544,7 @@ btr_page_reorganize_low( dict_index_t* index, /*!< in: record descriptor */ mtr_t* mtr) /*!< in: mtr */ { + buf_pool_t* buf_pool = buf_pool_from_bpage(&block->page); page_t* page = buf_block_get_frame(block); page_zip_des_t* page_zip = buf_block_get_page_zip(block); buf_block_t* temp_block; @@ -1009,7 +1575,7 @@ btr_page_reorganize_low( log_mode = mtr_set_log_mode(mtr, MTR_LOG_NONE); #ifndef UNIV_HOTBACKUP - temp_block = buf_block_alloc(); + temp_block = buf_block_alloc(buf_pool); #else /* !UNIV_HOTBACKUP */ ut_ad(block == back_block1); temp_block = back_block2; @@ -1021,11 +1587,12 @@ btr_page_reorganize_low( #ifndef UNIV_HOTBACKUP if (UNIV_LIKELY(!recovery)) { - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); } block->check_index_page_at_flush = TRUE; #endif /* !UNIV_HOTBACKUP */ + btr_blob_dbg_remove(page, index, "btr_page_reorganize"); /* Recreate the page: note that global data on page (possible segment headers, next page-field, etc.) is preserved intact */ @@ -1046,7 +1613,7 @@ btr_page_reorganize_low( /* In crash recovery, dict_index_is_sec_or_ibuf() always returns TRUE, even for clustered indexes. max_trx_id is unused in clustered index pages. */ - ut_ad(!ut_dulint_is_zero(max_trx_id) || recovery); + ut_ad(max_trx_id != 0 || recovery); } if (UNIV_LIKELY_NULL(page_zip) @@ -1054,6 +1621,8 @@ btr_page_reorganize_low( (!page_zip_compress(page_zip, page, index, NULL))) { /* Restore the old page and exit. */ + btr_blob_dbg_restore(page, temp_page, index, + "btr_page_reorganize_compress_fail"); #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG /* Check that the bytes that we skip are identical. */ @@ -1168,7 +1737,7 @@ btr_parse_page_reorganize( #ifndef UNIV_HOTBACKUP /*************************************************************//** Empties an index page. @see btr_page_create(). */ -static +UNIV_INTERN void btr_page_empty( /*===========*/ @@ -1186,7 +1755,8 @@ btr_page_empty( ut_a(!page_zip || page_zip_validate(page_zip, page)); #endif /* UNIV_ZIP_DEBUG */ - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); + btr_blob_dbg_remove(page, index, "btr_page_empty"); /* Recreate the page: note that global data on page (possible segment headers, next page-field, etc.) is preserved intact */ @@ -1729,7 +2299,7 @@ btr_insert_on_non_leaf_level_func( /**************************************************************//** Attaches the halves of an index page on the appropriate level in an index tree. */ -static +UNIV_INTERN void btr_attach_half_pages( /*==================*/ @@ -2495,7 +3065,7 @@ btr_lift_page_up( mem_heap_free(heap); } - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); /* Make the father empty */ btr_page_empty(father_block, father_page_zip, index, page_level, mtr); @@ -2527,6 +3097,7 @@ btr_lift_page_up( index); } + btr_blob_dbg_remove(page, index, "btr_lift_page_up"); lock_update_copy_and_discard(father_block, block); /* Go upward to root page, decrementing levels by one. */ @@ -2718,7 +3289,7 @@ err_exit: goto err_exit; } - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); /* Remove the page from the level list */ btr_level_list_remove(space, zip_size, page, mtr); @@ -2759,7 +3330,7 @@ err_exit: goto err_exit; } - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); #ifdef UNIV_BTR_DEBUG if (UNIV_LIKELY_NULL(merge_page_zip)) { @@ -2788,6 +3359,7 @@ err_exit: lock_update_merge_right(merge_block, orig_succ, block); } + btr_blob_dbg_remove(page, index, "btr_compress"); mem_heap_free(heap); if (!dict_index_is_clust(index) && page_is_leaf(merge_page)) { @@ -2873,7 +3445,7 @@ btr_discard_only_page_on_level( ut_a(btr_page_get_next(page, mtr) == FIL_NULL); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); btr_page_get_father(index, block, mtr, &cursor); father = btr_cur_get_block(&cursor); @@ -2908,7 +3480,7 @@ btr_discard_only_page_on_level( ibuf_reset_free_bits(block); if (page_is_leaf(buf_block_get_frame(block))) { - ut_a(!ut_dulint_is_zero(max_trx_id)); + ut_a(max_trx_id); page_set_max_trx_id(block, buf_block_get_page_zip(block), max_trx_id, mtr); @@ -2978,7 +3550,7 @@ btr_discard_page( page = buf_block_get_frame(block); ut_a(page_is_comp(merge_page) == page_is_comp(page)); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); if (left_page_no == FIL_NULL && !page_is_leaf(page)) { @@ -3018,6 +3590,8 @@ btr_discard_page( block); } + btr_blob_dbg_remove(page, index, "btr_discard_page"); + /* Free the file page */ btr_page_free(index, block, mtr); diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 9b306ea2864..1d8c7904dc1 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -57,6 +57,8 @@ Created 10/16/1994 Heikki Tuuri #include "buf0lru.h" #include "btr0btr.h" #include "btr0sea.h" +#include "row0purge.h" +#include "row0upd.h" #include "trx0rec.h" #include "trx0roll.h" /* trx_is_recv() */ #include "que0que.h" @@ -66,6 +68,15 @@ Created 10/16/1994 Heikki Tuuri #include "lock0lock.h" #include "zlib.h" +/** Buffered B-tree operation types, introduced as part of delete buffering. */ +typedef enum btr_op_enum { + BTR_NO_OP = 0, /*!< Not buffered */ + BTR_INSERT_OP, /*!< Insert, do not ignore UNIQUE */ + BTR_INSERT_IGNORE_UNIQUE_OP, /*!< Insert, ignoring UNIQUE */ + BTR_DELETE_OP, /*!< Purge a delete-marked record */ + BTR_DELMARK_OP /*!< Mark a record for deletion */ +} btr_op_t; + #ifdef UNIV_DEBUG /** If the following is set to TRUE, this module prints a lot of trace information of individual record operations */ @@ -370,7 +381,8 @@ btr_cur_search_to_nth_level( Inserts should always be made using PAGE_CUR_LE to search the position! */ ulint latch_mode, /*!< in: BTR_SEARCH_LEAF, ..., ORed with - BTR_INSERT and BTR_ESTIMATE; + at most one of BTR_INSERT, BTR_DELETE_MARK, + BTR_DELETE, or BTR_ESTIMATE; cursor->left_block is used to store a pointer to the left neighbor page, in the cases BTR_SEARCH_PREV and BTR_MODIFY_PREV; @@ -388,23 +400,26 @@ btr_cur_search_to_nth_level( ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mtr */ { - page_cur_t* page_cursor; page_t* page; - buf_block_t* guess; - rec_t* node_ptr; - ulint page_no; + buf_block_t* block; ulint space; + buf_block_t* guess; + ulint height; + ulint page_no; ulint up_match; ulint up_bytes; ulint low_match; ulint low_bytes; - ulint height; ulint savepoint; + ulint rw_latch; ulint page_mode; - ulint insert_planned; + ulint buf_mode; ulint estimate; - ulint ignore_sec_unique; + ulint zip_size; + page_cur_t* page_cursor; + btr_op_t btr_op; ulint root_height = 0; /* remove warning */ + #ifdef BTR_CUR_ADAPT btr_search_t* info; #endif @@ -417,24 +432,60 @@ btr_cur_search_to_nth_level( ut_ad(level == 0 || mode == PAGE_CUR_LE); ut_ad(dict_index_check_search_tuple(index, tuple)); - ut_ad(!dict_index_is_ibuf(index) || ibuf_inside()); + ut_ad(!dict_index_is_ibuf(index) || ibuf_inside(mtr)); ut_ad(dtuple_check_typed(tuple)); #ifdef UNIV_DEBUG cursor->up_match = ULINT_UNDEFINED; cursor->low_match = ULINT_UNDEFINED; #endif - insert_planned = latch_mode & BTR_INSERT; - estimate = latch_mode & BTR_ESTIMATE; - ignore_sec_unique = latch_mode & BTR_IGNORE_SEC_UNIQUE; - latch_mode = latch_mode & ~(BTR_INSERT | BTR_ESTIMATE - | BTR_IGNORE_SEC_UNIQUE); - ut_ad(!insert_planned || (mode == PAGE_CUR_LE)); + /* These flags are mutually exclusive, they are lumped together + with the latch mode for historical reasons. It's possible for + none of the flags to be set. */ + switch (UNIV_EXPECT(latch_mode + & (BTR_INSERT | BTR_DELETE | BTR_DELETE_MARK), + 0)) { + case 0: + btr_op = BTR_NO_OP; + break; + case BTR_INSERT: + btr_op = (latch_mode & BTR_IGNORE_SEC_UNIQUE) + ? BTR_INSERT_IGNORE_UNIQUE_OP + : BTR_INSERT_OP; + break; + case BTR_DELETE: + btr_op = BTR_DELETE_OP; + ut_a(cursor->purge_node); + break; + case BTR_DELETE_MARK: + btr_op = BTR_DELMARK_OP; + break; + default: + /* only one of BTR_INSERT, BTR_DELETE, BTR_DELETE_MARK + should be specified at a time */ + ut_error; + } + + /* Operations on the insert buffer tree cannot be buffered. */ + ut_ad(btr_op == BTR_NO_OP || !dict_index_is_ibuf(index)); + /* Operations on the clustered index cannot be buffered. */ + ut_ad(btr_op == BTR_NO_OP || !dict_index_is_clust(index)); + + estimate = latch_mode & BTR_ESTIMATE; + + /* Turn the flags unrelated to the latch mode off. */ + latch_mode &= ~(BTR_INSERT + | BTR_DELETE_MARK + | BTR_DELETE + | BTR_ESTIMATE + | BTR_IGNORE_SEC_UNIQUE); cursor->flag = BTR_CUR_BINARY; cursor->index = index; + cursor->ibuf_cnt = ULINT_UNDEFINED; + #ifndef BTR_CUR_ADAPT guess = NULL; #else @@ -447,8 +498,9 @@ btr_cur_search_to_nth_level( #ifdef UNIV_SEARCH_PERF_STAT info->n_searches++; #endif - if (rw_lock_get_writer(&btr_search_latch) == RW_LOCK_NOT_LOCKED - && latch_mode <= BTR_MODIFY_LEAF && info->last_hash_succ + if (rw_lock_get_writer(btr_search_get_latch(cursor->index->id)) == RW_LOCK_NOT_LOCKED + && latch_mode <= BTR_MODIFY_LEAF + && info->last_hash_succ && !estimate #ifdef PAGE_CUR_LE_OR_EXTENDS && mode != PAGE_CUR_LE_OR_EXTENDS @@ -482,7 +534,7 @@ btr_cur_search_to_nth_level( if (has_search_latch) { /* Release possible search latch to obey latching order */ - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(cursor->index->id)); } /* Store the position of the tree latch we push to mtr so that we @@ -537,176 +589,242 @@ btr_cur_search_to_nth_level( /* Loop and search until we arrive at the desired level */ - for (;;) { - ulint zip_size; - buf_block_t* block; - ulint rw_latch; - ulint buf_mode; +search_loop: + buf_mode = BUF_GET; + rw_latch = RW_NO_LATCH; - zip_size = dict_table_zip_size(index->table); - rw_latch = RW_NO_LATCH; - buf_mode = BUF_GET; + if (height != 0) { + /* We are about to fetch the root or a non-leaf page. */ + } else if (latch_mode <= BTR_MODIFY_LEAF) { + rw_latch = latch_mode; - if (height == 0 && latch_mode <= BTR_MODIFY_LEAF) { + if (btr_op != BTR_NO_OP + && ibuf_should_try(index, btr_op != BTR_INSERT_OP)) { - rw_latch = latch_mode; + /* Try to buffer the operation if the leaf + page is not in the buffer pool. */ - if (insert_planned - && ibuf_should_try(index, ignore_sec_unique)) { - - /* Try insert to the insert buffer if the - page is not in the buffer pool */ - - buf_mode = BUF_GET_IF_IN_POOL; - } + buf_mode = btr_op == BTR_DELETE_OP + ? BUF_GET_IF_IN_POOL_OR_WATCH + : BUF_GET_IF_IN_POOL; } + } + + zip_size = dict_table_zip_size(index->table); retry_page_get: - block = buf_page_get_gen(space, zip_size, page_no, - rw_latch, guess, buf_mode, - file, line, mtr); - if (block == NULL) { - if (srv_pass_corrupt_table && buf_mode != BUF_GET_IF_IN_POOL) { - page_cursor->block = 0; - page_cursor->rec = 0; - if (estimate) { - cursor->path_arr->nth_rec = ULINT_UNDEFINED; - } - break; - } - ut_a(buf_mode == BUF_GET_IF_IN_POOL); + block = buf_page_get_gen( + space, zip_size, page_no, rw_latch, guess, buf_mode, + file, line, mtr); - /* This must be a search to perform an insert; - try insert to the insert buffer */ - - ut_ad(buf_mode == BUF_GET_IF_IN_POOL); - ut_ad(insert_planned); - ut_ad(cursor->thr); - - if (ibuf_insert(tuple, index, space, zip_size, - page_no, cursor->thr)) { - /* Insertion to the insert buffer succeeded */ - cursor->flag = BTR_CUR_INSERT_TO_IBUF; - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } - goto func_exit; - } - - /* Insert to the insert buffer did not succeed: - retry page get */ - - buf_mode = BUF_GET; - - goto retry_page_get; - } - - page = buf_block_get_frame(block); - - if (srv_pass_corrupt_table && !page) { + if (block == NULL) { + if (srv_pass_corrupt_table + && buf_mode != BUF_GET_IF_IN_POOL + && buf_mode != BUF_GET_IF_IN_POOL_OR_WATCH) { page_cursor->block = 0; page_cursor->rec = 0; if (estimate) { cursor->path_arr->nth_rec = ULINT_UNDEFINED; } - break; + goto func_exit; } - ut_a(page); + ut_a(buf_mode == BUF_GET_IF_IN_POOL + || buf_mode == BUF_GET_IF_IN_POOL_OR_WATCH); - block->check_index_page_at_flush = TRUE; + /* This must be a search to perform an insert/delete + mark/ delete; try using the insert/delete buffer */ - if (rw_latch != RW_NO_LATCH) { + ut_ad(height == 0); + ut_ad(cursor->thr); + + switch (btr_op) { + case BTR_INSERT_OP: + case BTR_INSERT_IGNORE_UNIQUE_OP: + ut_ad(buf_mode == BUF_GET_IF_IN_POOL); + + if (ibuf_insert(IBUF_OP_INSERT, tuple, index, + space, zip_size, page_no, + cursor->thr)) { + + cursor->flag = BTR_CUR_INSERT_TO_IBUF; + + goto func_exit; + } + break; + + case BTR_DELMARK_OP: + ut_ad(buf_mode == BUF_GET_IF_IN_POOL); + + if (ibuf_insert(IBUF_OP_DELETE_MARK, tuple, + index, space, zip_size, + page_no, cursor->thr)) { + + cursor->flag = BTR_CUR_DEL_MARK_IBUF; + + goto func_exit; + } + + break; + + case BTR_DELETE_OP: + ut_ad(buf_mode == BUF_GET_IF_IN_POOL_OR_WATCH); + + if (!row_purge_poss_sec(cursor->purge_node, + index, tuple)) { + + /* The record cannot be purged yet. */ + cursor->flag = BTR_CUR_DELETE_REF; + } else if (ibuf_insert(IBUF_OP_DELETE, tuple, + index, space, zip_size, + page_no, + cursor->thr)) { + + /* The purge was buffered. */ + cursor->flag = BTR_CUR_DELETE_IBUF; + } else { + /* The purge could not be buffered. */ + buf_pool_watch_unset(space, page_no); + break; + } + + buf_pool_watch_unset(space, page_no); + goto func_exit; + + default: + ut_error; + } + + /* Insert to the insert/delete buffer did not succeed, we + must read the page from disk. */ + + buf_mode = BUF_GET; + + goto retry_page_get; + } + + block->check_index_page_at_flush = TRUE; + page = buf_block_get_frame(block); + + if (srv_pass_corrupt_table && !page) { + page_cursor->block = 0; + page_cursor->rec = 0; + if (estimate) { + cursor->path_arr->nth_rec = ULINT_UNDEFINED; + } + goto func_exit; + } + ut_a(page); + + if (rw_latch != RW_NO_LATCH) { #ifdef UNIV_ZIP_DEBUG - const page_zip_des_t* page_zip - = buf_block_get_page_zip(block); - ut_a(!page_zip || page_zip_validate(page_zip, page)); + const page_zip_des_t* page_zip + = buf_block_get_page_zip(block); + ut_a(!page_zip || page_zip_validate(page_zip, page)); #endif /* UNIV_ZIP_DEBUG */ - buf_block_dbg_add_level(block, SYNC_TREE_NODE); - } + buf_block_dbg_add_level(block, SYNC_TREE_NODE); + } - ut_ad(0 == ut_dulint_cmp(index->id, - btr_page_get_index_id(page))); + ut_ad(index->id == btr_page_get_index_id(page)); - if (UNIV_UNLIKELY(height == ULINT_UNDEFINED)) { - /* We are in the root node */ + if (UNIV_UNLIKELY(height == ULINT_UNDEFINED)) { + /* We are in the root node */ + + height = btr_page_get_level(page, mtr); + root_height = height; + cursor->tree_height = root_height + 1; - height = btr_page_get_level(page, mtr); - root_height = height; - cursor->tree_height = root_height + 1; #ifdef BTR_CUR_ADAPT - if (block != guess) { - info->root_guess = block; - } + if (block != guess) { + info->root_guess = block; + } #endif + } + + if (height == 0) { + if (rw_latch == RW_NO_LATCH) { + + btr_cur_latch_leaves( + page, space, zip_size, page_no, latch_mode, + cursor, mtr); } - if (height == 0) { - if (rw_latch == RW_NO_LATCH) { + if (latch_mode != BTR_MODIFY_TREE + && latch_mode != BTR_CONT_MODIFY_TREE) { - btr_cur_latch_leaves(page, space, zip_size, - page_no, latch_mode, - cursor, mtr); - } + /* Release the tree s-latch */ - if ((latch_mode != BTR_MODIFY_TREE) - && (latch_mode != BTR_CONT_MODIFY_TREE)) { - - /* Release the tree s-latch */ - - mtr_release_s_latch_at_savepoint( - mtr, savepoint, - dict_index_get_lock(index)); - } - - page_mode = mode; + mtr_release_s_latch_at_savepoint( + mtr, savepoint, dict_index_get_lock(index)); } - page_cur_search_with_match(block, index, tuple, page_mode, - &up_match, &up_bytes, - &low_match, &low_bytes, - page_cursor); + page_mode = mode; + } - if (estimate) { - btr_cur_add_path_info(cursor, height, root_height); - } + page_cur_search_with_match( + block, index, tuple, page_mode, &up_match, &up_bytes, + &low_match, &low_bytes, page_cursor); - /* If this is the desired level, leave the loop */ + if (estimate) { + btr_cur_add_path_info(cursor, height, root_height); + } - ut_ad(height == btr_page_get_level( - page_cur_get_page(page_cursor), mtr)); + /* If this is the desired level, leave the loop */ - if (level == height) { + ut_ad(height == btr_page_get_level(page_cur_get_page(page_cursor), + mtr)); - if (level > 0) { - /* x-latch the page */ - page = btr_page_get(space, zip_size, - page_no, RW_X_LATCH, mtr); - ut_a((ibool)!!page_is_comp(page) - == dict_table_is_comp(index->table)); - } - - break; - } + if (level != height) { + const rec_t* node_ptr; ut_ad(height > 0); height--; - guess = NULL; node_ptr = page_cur_get_rec(page_cursor); - offsets = rec_get_offsets(node_ptr, cursor->index, offsets, - ULINT_UNDEFINED, &heap); + + offsets = rec_get_offsets( + node_ptr, index, offsets, ULINT_UNDEFINED, &heap); + /* Go to the child node */ page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets); + + if (UNIV_UNLIKELY(height == 0 && dict_index_is_ibuf(index))) { + /* We're doing a search on an ibuf tree and we're one + level above the leaf page. */ + + ulint is_min_rec; + + ut_ad(level == 0); + + is_min_rec = rec_get_info_bits(node_ptr, 0) + & REC_INFO_MIN_REC_FLAG; + + if (!is_min_rec) { + cursor->ibuf_cnt + = ibuf_rec_get_counter(node_ptr); + + ut_a(cursor->ibuf_cnt <= 0xFFFF + || cursor->ibuf_cnt == ULINT_UNDEFINED); + } + + buf_mode = BUF_GET; + rw_latch = RW_NO_LATCH; + goto retry_page_get; + } + + goto search_loop; } - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_free(heap); - } + if (level != 0) { + /* x-latch the page */ + page = btr_page_get( + space, zip_size, page_no, RW_X_LATCH, mtr); - if (level == 0) { + ut_a((ibool)!!page_is_comp(page) + == dict_table_is_comp(index->table)); + } else { cursor->low_match = low_match; cursor->low_bytes = low_bytes; cursor->up_match = up_match; @@ -731,9 +849,14 @@ retry_page_get: } func_exit: + + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + if (has_search_latch) { - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(cursor->index->id)); } } @@ -807,8 +930,7 @@ btr_cur_open_at_index_side_func( } ut_a(page); - ut_ad(0 == ut_dulint_cmp(index->id, - btr_page_get_index_id(page))); + ut_ad(index->id == btr_page_get_index_id(page)); block->check_index_page_at_flush = TRUE; @@ -936,8 +1058,7 @@ btr_cur_open_at_rnd_pos_func( } ut_a(page); - ut_ad(0 == ut_dulint_cmp(index->id, - btr_page_get_index_id(page))); + ut_ad(index->id == btr_page_get_index_id(page)); if (height == ULINT_UNDEFINED) { /* We are in the root node */ @@ -1096,7 +1217,7 @@ btr_cur_trx_report( const char* op) /*!< in: operation */ { fprintf(stderr, "Trx with id " TRX_ID_FMT " going to ", - TRX_ID_PREP_PRINTF(trx->id)); + (ullint) trx->id); fputs(op, stderr); dict_index_name_print(stderr, trx, index); putc('\n', stderr); @@ -1793,7 +1914,7 @@ btr_cur_update_in_place( page_zip_des_t* page_zip; ulint err; rec_t* rec; - roll_ptr_t roll_ptr = ut_dulint_zero; + roll_ptr_t roll_ptr = 0; trx_t* trx; ulint was_delete_marked; mem_heap_t* heap = NULL; @@ -1850,7 +1971,7 @@ btr_cur_update_in_place( btr_search_update_hash_on_delete(cursor); } - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); } if (!(flags & BTR_KEEP_SYS_FLAG)) { @@ -1864,7 +1985,7 @@ btr_cur_update_in_place( row_upd_rec_in_place(rec, index, offsets, update, page_zip); if (block->is_hashed) { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); } if (page_zip && !dict_index_is_clust(index) @@ -2386,8 +2507,8 @@ make_external: record on its page? */ was_first = page_cur_is_before_first(page_cursor); - /* The first parameter means that no lock checking and undo logging - is made in the insert */ + /* Lock checks and undo logging were already performed by + btr_cur_upd_lock_and_undo(). */ err = btr_cur_pessimistic_insert(BTR_NO_UNDO_LOG_FLAG | BTR_NO_LOCKING_FLAG @@ -2642,11 +2763,12 @@ btr_cur_del_mark_set_clust_rec( } if (block->is_hashed) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index->id)); } page_zip = buf_block_get_page_zip(block); + btr_blob_dbg_set_deleted_flag(rec, index, offsets, val); btr_rec_set_deleted_flag(rec, page_zip, val); trx = thr_get_trx(thr); @@ -2657,7 +2779,7 @@ btr_cur_del_mark_set_clust_rec( } if (block->is_hashed) { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); } btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx, @@ -2784,13 +2906,13 @@ btr_cur_del_mark_set_sec_rec( == dict_table_is_comp(cursor->index->table)); if (block->is_hashed) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); } btr_rec_set_deleted_flag(rec, buf_block_get_page_zip(block), val); if (block->is_hashed) { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); } btr_cur_del_mark_set_sec_rec_log(rec, val, mtr); @@ -2799,25 +2921,26 @@ btr_cur_del_mark_set_sec_rec( } /***********************************************************//** -Clear a secondary index record's delete mark. This function is only -used by the insert buffer insert merge mechanism. */ +Sets a secondary index record's delete mark to the given value. This +function is only used by the insert buffer merge mechanism. */ UNIV_INTERN void -btr_cur_del_unmark_for_ibuf( -/*========================*/ - rec_t* rec, /*!< in/out: record to delete unmark */ +btr_cur_set_deleted_flag_for_ibuf( +/*==============================*/ + rec_t* rec, /*!< in/out: record */ page_zip_des_t* page_zip, /*!< in/out: compressed page corresponding to rec, or NULL when the tablespace is uncompressed */ + ibool val, /*!< in: value to set */ mtr_t* mtr) /*!< in: mtr */ { /* We do not need to reserve btr_search_latch, as the page has just been read to the buffer pool and there cannot be a hash index to it. */ - btr_rec_set_deleted_flag(rec, page_zip, FALSE); + btr_rec_set_deleted_flag(rec, page_zip, val); - btr_cur_del_mark_set_sec_rec_log(rec, FALSE, mtr); + btr_cur_del_mark_set_sec_rec_log(rec, val, mtr); } /*==================== B-TREE RECORD REMOVE =========================*/ @@ -3116,6 +3239,7 @@ btr_cur_add_path_info( { btr_path_t* slot; rec_t* rec; + page_t* page; ut_a(cursor->path_arr); @@ -3138,8 +3262,156 @@ btr_cur_add_path_info( slot = cursor->path_arr + (root_height - height); + page = page_align(rec); + slot->nth_rec = page_rec_get_n_recs_before(rec); - slot->n_recs = page_get_n_recs(page_align(rec)); + slot->n_recs = page_get_n_recs(page); + slot->page_no = page_get_page_no(page); + slot->page_level = btr_page_get_level_low(page); +} + +/*******************************************************************//** +Estimate the number of rows between slot1 and slot2 for any level on a +B-tree. This function starts from slot1->page and reads a few pages to +the right, counting their records. If we reach slot2->page quickly then +we know exactly how many records there are between slot1 and slot2 and +we set is_n_rows_exact to TRUE. If we cannot reach slot2->page quickly +then we calculate the average number of records in the pages scanned +so far and assume that all pages that we did not scan up to slot2->page +contain the same number of records, then we multiply that average to +the number of pages between slot1->page and slot2->page (which is +n_rows_on_prev_level). In this case we set is_n_rows_exact to FALSE. +@return number of rows (exact or estimated) */ +static +ib_int64_t +btr_estimate_n_rows_in_range_on_level( +/*==================================*/ + dict_index_t* index, /*!< in: index */ + btr_path_t* slot1, /*!< in: left border */ + btr_path_t* slot2, /*!< in: right border */ + ib_int64_t n_rows_on_prev_level, /*!< in: number of rows + on the previous level for the + same descend paths; used to + determine the numbe of pages + on this level */ + ibool* is_n_rows_exact) /*!< out: TRUE if the returned + value is exact i.e. not an + estimation */ +{ + ulint space; + ib_int64_t n_rows; + ulint n_pages_read; + ulint page_no; + ulint zip_size; + ulint level; + + space = dict_index_get_space(index); + + n_rows = 0; + n_pages_read = 0; + + /* Assume by default that we will scan all pages between + slot1->page_no and slot2->page_no */ + *is_n_rows_exact = TRUE; + + /* add records from slot1->page_no which are to the right of + the record which serves as a left border of the range, if any */ + if (slot1->nth_rec < slot1->n_recs) { + n_rows += slot1->n_recs - slot1->nth_rec; + } + + /* add records from slot2->page_no which are to the left of + the record which servers as a right border of the range, if any */ + if (slot2->nth_rec > 1) { + n_rows += slot2->nth_rec - 1; + } + + /* count the records in the pages between slot1->page_no and + slot2->page_no (non inclusive), if any */ + + zip_size = fil_space_get_zip_size(space); + + /* Do not read more than this number of pages in order not to hurt + performance with this code which is just an estimation. If we read + this many pages before reaching slot2->page_no then we estimate the + average from the pages scanned so far */ +# define N_PAGES_READ_LIMIT 10 + + page_no = slot1->page_no; + level = slot1->page_level; + + do { + mtr_t mtr; + page_t* page; + buf_block_t* block; + + mtr_start(&mtr); + + /* fetch the page */ + block = buf_page_get(space, zip_size, page_no, RW_S_LATCH, + &mtr); + + page = buf_block_get_frame(block); + + /* It is possible that the tree has been reorganized in the + meantime and this is a different page. If this happens the + calculated estimate will be bogus, which is not fatal as + this is only an estimate. We are sure that a page with + page_no exists because InnoDB never frees pages, only + reuses them. */ + if (fil_page_get_type(page) != FIL_PAGE_INDEX + || btr_page_get_index_id(page) != index->id + || btr_page_get_level_low(page) != level) { + + /* The page got reused for something else */ + mtr_commit(&mtr); + goto inexact; + } + + n_pages_read++; + + if (page_no != slot1->page_no) { + /* Do not count the records on slot1->page_no, + we already counted them before this loop. */ + n_rows += page_get_n_recs(page); + } + + page_no = btr_page_get_next(page, &mtr); + + mtr_commit(&mtr); + + if (n_pages_read == N_PAGES_READ_LIMIT + || page_no == FIL_NULL) { + /* Either we read too many pages or + we reached the end of the level without passing + through slot2->page_no, the tree must have changed + in the meantime */ + goto inexact; + } + + } while (page_no != slot2->page_no); + + return(n_rows); + +inexact: + + *is_n_rows_exact = FALSE; + + /* We did interrupt before reaching slot2->page */ + + if (n_pages_read > 0) { + /* The number of pages on this level is + n_rows_on_prev_level, multiply it by the + average number of recs per page so far */ + n_rows = n_rows_on_prev_level + * n_rows / n_pages_read; + } else { + /* The tree changed before we could even + start with slot1->page_no */ + n_rows = 10; + } + + return(n_rows); } /*******************************************************************//** @@ -3164,6 +3436,7 @@ btr_estimate_n_rows_in_range( ibool diverged_lot; ulint divergence_level; ib_int64_t n_rows; + ibool is_n_rows_exact; ulint i; mtr_t mtr; @@ -3206,6 +3479,7 @@ btr_estimate_n_rows_in_range( /* We have the path information for the range in path1 and path2 */ n_rows = 1; + is_n_rows_exact = TRUE; diverged = FALSE; /* This becomes true when the path is not the same any more */ diverged_lot = FALSE; /* This becomes true when the paths are @@ -3221,7 +3495,7 @@ btr_estimate_n_rows_in_range( if (slot1->nth_rec == ULINT_UNDEFINED || slot2->nth_rec == ULINT_UNDEFINED) { - if (i > divergence_level + 1) { + if (i > divergence_level + 1 && !is_n_rows_exact) { /* In trees whose height is > 1 our algorithm tends to underestimate: multiply the estimate by 2: */ @@ -3233,7 +3507,9 @@ btr_estimate_n_rows_in_range( to over 1 / 2 of the estimated rows in the whole table */ - if (n_rows > index->table->stat_n_rows / 2) { + if (n_rows > index->table->stat_n_rows / 2 + && !is_n_rows_exact) { + n_rows = index->table->stat_n_rows / 2; /* If there are just 0 or 1 rows in the table, @@ -3259,10 +3535,15 @@ btr_estimate_n_rows_in_range( divergence_level = i; } } else { - /* Maybe the tree has changed between - searches */ - - return(10); + /* It is possible that + slot1->nth_rec >= slot2->nth_rec + if, for example, we have a single page + tree which contains (inf, 5, 6, supr) + and we select where x > 20 and x < 30; + in this case slot1->nth_rec will point + to the supr record and slot2->nth_rec + will point to 6 */ + n_rows = 0; } } else if (diverged && !diverged_lot) { @@ -3286,8 +3567,9 @@ btr_estimate_n_rows_in_range( } } else if (diverged_lot) { - n_rows = (n_rows * (slot1->n_recs + slot2->n_recs)) - / 2; + n_rows = btr_estimate_n_rows_in_range_on_level( + index, slot1, slot2, n_rows, + &is_n_rows_exact); } } } @@ -3680,6 +3962,8 @@ btr_cur_set_ownership_of_extern_field( } else { mach_write_to_1(data + local_len + BTR_EXTERN_LEN, byte_val); } + + btr_blob_dbg_owner(rec, index, offsets, i, val); } /*******************************************************************//** @@ -3865,15 +4149,16 @@ btr_blob_free( if there is one */ mtr_t* mtr) /*!< in: mini-transaction to commit */ { - ulint space = buf_block_get_space(block); - ulint page_no = buf_block_get_page_no(block); + buf_pool_t* buf_pool = buf_pool_from_block(block); + ulint space = buf_block_get_space(block); + ulint page_no = buf_block_get_page_no(block); ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX)); mtr_commit(mtr); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); mutex_enter(&block->mutex); /* Only free the block if it is still allocated to @@ -3897,8 +4182,8 @@ btr_blob_free( } } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); mutex_exit(&block->mutex); } @@ -4185,6 +4470,11 @@ btr_store_big_rec_extern_fields_func( } if (prev_page_no == FIL_NULL) { + btr_blob_dbg_add_blob( + rec, big_rec_vec->fields[i] + .field_no, page_no, index, + "store"); + mach_write_to_4(field_ref + BTR_EXTERN_SPACE_ID, space_id); @@ -4260,6 +4550,11 @@ next_zip_page: MLOG_4BYTES, &mtr); if (prev_page_no == FIL_NULL) { + btr_blob_dbg_add_blob( + rec, big_rec_vec->fields[i] + .field_no, page_no, index, + "store"); + mlog_write_ulint(field_ref + BTR_EXTERN_SPACE_ID, space_id, @@ -4428,6 +4723,37 @@ btr_free_externally_stored_field( rec_zip_size = 0; } +#ifdef UNIV_BLOB_DEBUG + if (!(field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_OWNER_FLAG) + && !((field_ref[BTR_EXTERN_LEN] & BTR_EXTERN_INHERITED_FLAG) + && (rb_ctx == RB_NORMAL || rb_ctx == RB_RECOVERY))) { + /* This off-page column will be freed. + Check that no references remain. */ + + btr_blob_dbg_t b; + + b.blob_page_no = mach_read_from_4( + field_ref + BTR_EXTERN_PAGE_NO); + + if (rec) { + /* Remove the reference from the record to the + BLOB. If the BLOB were not freed, the + reference would be removed when the record is + removed. Freeing the BLOB will overwrite the + BTR_EXTERN_PAGE_NO in the field_ref of the + record with FIL_NULL, which would make the + btr_blob_dbg information inconsistent with the + record. */ + b.ref_page_no = page_get_page_no(page_align(rec)); + b.ref_heap_no = page_rec_get_heap_no(rec); + b.ref_field_no = i; + btr_blob_dbg_rbt_delete(index, &b, "free"); + } + + btr_blob_dbg_assert_empty(index, b.blob_page_no); + } +#endif /* UNIV_BLOB_DEBUG */ + for (;;) { #ifdef UNIV_SYNC_DEBUG buf_block_t* rec_block; @@ -4439,12 +4765,10 @@ btr_free_externally_stored_field( #ifdef UNIV_SYNC_DEBUG rec_block = #endif /* UNIV_SYNC_DEBUG */ - buf_page_get(page_get_space_id( - page_align(field_ref)), - rec_zip_size, - page_get_page_no( - page_align(field_ref)), - RW_X_LATCH, &mtr); + buf_page_get(page_get_space_id(page_align(field_ref)), + rec_zip_size, + page_get_page_no(page_align(field_ref)), + RW_X_LATCH, &mtr); buf_block_dbg_add_level(rec_block, SYNC_NO_ORDER_CHECK); page_no = mach_read_from_4(field_ref + BTR_EXTERN_PAGE_NO); @@ -4674,27 +4998,45 @@ btr_copy_blob_prefix( /*******************************************************************//** Copies the prefix of a compressed BLOB. The clustered index record -that points to this BLOB must be protected by a lock or a page latch. */ +that points to this BLOB must be protected by a lock or a page latch. +@return number of bytes written to buf */ static -void +ulint btr_copy_zblob_prefix( /*==================*/ - z_stream* d_stream,/*!< in/out: the decompressing stream */ + byte* buf, /*!< out: the externally stored part of + the field, or a prefix of it */ + ulint len, /*!< in: length of buf, in bytes */ ulint zip_size,/*!< in: compressed BLOB page size */ ulint space_id,/*!< in: space id of the BLOB pages */ ulint page_no,/*!< in: page number of the first BLOB page */ ulint offset) /*!< in: offset on the first BLOB page */ { - ulint page_type = FIL_PAGE_TYPE_ZBLOB; + ulint page_type = FIL_PAGE_TYPE_ZBLOB; + mem_heap_t* heap; + int err; + z_stream d_stream; + + d_stream.next_out = buf; + d_stream.avail_out = len; + d_stream.next_in = Z_NULL; + d_stream.avail_in = 0; + + /* Zlib inflate needs 32 kilobytes for the default + window size, plus a few kilobytes for small objects. */ + heap = mem_heap_create(40000); + page_zip_set_alloc(&d_stream, heap); ut_ad(ut_is_2pow(zip_size)); ut_ad(zip_size >= PAGE_ZIP_MIN_SIZE); ut_ad(zip_size <= UNIV_PAGE_SIZE); ut_ad(space_id); + err = inflateInit(&d_stream); + ut_a(err == Z_OK); + for (;;) { buf_page_t* bpage; - int err; ulint next_page_no; /* There is no latch on bpage directly. Instead, @@ -4710,7 +5052,7 @@ btr_copy_zblob_prefix( " compressed BLOB" " page %lu space %lu\n", (ulong) page_no, (ulong) space_id); - return; + goto func_exit; } if (UNIV_UNLIKELY @@ -4736,13 +5078,13 @@ btr_copy_zblob_prefix( offset += 4; } - d_stream->next_in = bpage->zip.data + offset; - d_stream->avail_in = zip_size - offset; + d_stream.next_in = bpage->zip.data + offset; + d_stream.avail_in = zip_size - offset; - err = inflate(d_stream, Z_NO_FLUSH); + err = inflate(&d_stream, Z_NO_FLUSH); switch (err) { case Z_OK: - if (!d_stream->avail_out) { + if (!d_stream.avail_out) { goto end_of_blob; } break; @@ -4759,13 +5101,13 @@ inflate_error: " compressed BLOB" " page %lu space %lu returned %d (%s)\n", (ulong) page_no, (ulong) space_id, - err, d_stream->msg); + err, d_stream.msg); case Z_BUF_ERROR: goto end_of_blob; } if (next_page_no == FIL_NULL) { - if (!d_stream->avail_in) { + if (!d_stream.avail_in) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB: unexpected end of" @@ -4774,7 +5116,7 @@ inflate_error: (ulong) page_no, (ulong) space_id); } else { - err = inflate(d_stream, Z_FINISH); + err = inflate(&d_stream, Z_FINISH); switch (err) { case Z_STREAM_END: case Z_BUF_ERROR: @@ -4786,7 +5128,7 @@ inflate_error: end_of_blob: buf_page_release_zip(bpage); - return; + goto func_exit; } buf_page_release_zip(bpage); @@ -4798,6 +5140,12 @@ end_of_blob: offset = FIL_PAGE_NEXT; page_type = FIL_PAGE_TYPE_ZBLOB2; } + +func_exit: + inflateEnd(&d_stream); + mem_heap_free(heap); + UNIV_MEM_ASSERT_RW(buf, d_stream.total_out); + return(d_stream.total_out); } /*******************************************************************//** @@ -4823,28 +5171,8 @@ btr_copy_externally_stored_field_prefix_low( } if (UNIV_UNLIKELY(zip_size)) { - int err; - z_stream d_stream; - mem_heap_t* heap; - - /* Zlib inflate needs 32 kilobytes for the default - window size, plus a few kilobytes for small objects. */ - heap = mem_heap_create(40000); - page_zip_set_alloc(&d_stream, heap); - - err = inflateInit(&d_stream); - ut_a(err == Z_OK); - - d_stream.next_out = buf; - d_stream.avail_out = len; - d_stream.avail_in = 0; - - btr_copy_zblob_prefix(&d_stream, zip_size, - space_id, page_no, offset); - inflateEnd(&d_stream); - mem_heap_free(heap); - UNIV_MEM_ASSERT_RW(buf, d_stream.total_out); - return(d_stream.total_out); + return(btr_copy_zblob_prefix(buf, len, zip_size, + space_id, page_no, offset)); } else { return(btr_copy_blob_prefix(buf, len, space_id, page_no, offset)); diff --git a/btr/btr0sea.c b/btr/btr0sea.c index 3b38e2799c2..0630b634b53 100644 --- a/btr/btr0sea.c +++ b/btr/btr0sea.c @@ -48,9 +48,16 @@ Protected by btr_search_latch and btr_search_enabled_mutex. */ UNIV_INTERN char btr_search_enabled = TRUE; UNIV_INTERN ibool btr_search_fully_disabled = FALSE; +UNIV_INTERN ulint btr_search_index_num = 1; + /** Mutex protecting btr_search_enabled */ static mutex_t btr_search_enabled_mutex; +#ifdef UNIV_PFS_MUTEX +/* Key to register btr_search_enabled_mutex with performance schema */ +UNIV_INTERN mysql_pfs_key_t btr_search_enabled_mutex_key; +#endif /* UNIV_PFS_MUTEX */ + /** A dummy variable to fool the compiler */ UNIV_INTERN ulint btr_search_this_is_zero = 0; @@ -74,7 +81,9 @@ indexes. */ /* We will allocate the latch from dynamic memory to get it to the same DRAM page as other hotspot semaphores */ -UNIV_INTERN rw_lock_t* btr_search_latch_temp; +//UNIV_INTERN rw_lock_t* btr_search_latch_temp; + +UNIV_INTERN rw_lock_t** btr_search_latch_part; /** padding to prevent other memory update hotspots from residing on the same memory cache line */ @@ -83,6 +92,11 @@ UNIV_INTERN byte btr_sea_pad2[64]; /** The adaptive hash index */ UNIV_INTERN btr_search_sys_t* btr_search_sys; +#ifdef UNIV_PFS_RWLOCK +/* Key to register btr_search_sys with performance schema */ +UNIV_INTERN mysql_pfs_key_t btr_search_latch_key; +#endif /* UNIV_PFS_RWLOCK */ + /** If the number of records on the page divided by this parameter would have been successfully accessed using a hash index, the index is then built on the page, assuming the global limit has been reached */ @@ -121,18 +135,19 @@ allocate a new node to the hash table, it will succeed. However, the check will not guarantee success. */ static void -btr_search_check_free_space_in_heap(void) +btr_search_check_free_space_in_heap( /*=====================================*/ + index_id_t key) { hash_table_t* table; mem_heap_t* heap; #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(key), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(key), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(key); heap = table->heap; @@ -141,9 +156,9 @@ btr_search_check_free_space_in_heap(void) be enough free space in the hash table. */ if (heap->free_block == NULL) { - buf_block_t* block = buf_block_alloc(); + buf_block_t* block = buf_block_alloc(NULL); - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(key)); if (heap->free_block == NULL) { heap->free_block = block; @@ -151,7 +166,7 @@ btr_search_check_free_space_in_heap(void) buf_block_free(block); } - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(key)); } } @@ -163,17 +178,30 @@ btr_search_sys_create( /*==================*/ ulint hash_size) /*!< in: hash index hash table size */ { + ulint i; /* We allocate the search latch from dynamic memory: see above at the global variable definition */ - btr_search_latch_temp = mem_alloc(sizeof(rw_lock_t)); + //btr_search_latch_temp = mem_alloc(sizeof(rw_lock_t)); - rw_lock_create(&btr_search_latch, SYNC_SEARCH_SYS); - mutex_create(&btr_search_enabled_mutex, SYNC_SEARCH_SYS_CONF); + //rw_lock_create(btr_search_latch_key, &btr_search_latch, + // SYNC_SEARCH_SYS); + mutex_create(btr_search_enabled_mutex_key, + &btr_search_enabled_mutex, SYNC_SEARCH_SYS_CONF); btr_search_sys = mem_alloc(sizeof(btr_search_sys_t)); - btr_search_sys->hash_index = ha_create(hash_size, 0, 0); + /* btr_search_index_num should be <= 32. (bits of trx->has_search_latch) */ + btr_search_latch_part = mem_alloc(sizeof(rw_lock_t*) * btr_search_index_num); + btr_search_sys->hash_index = mem_alloc(sizeof(hash_table_t*) * btr_search_index_num); + for (i = 0; i < btr_search_index_num; i++) { + btr_search_latch_part[i] = mem_alloc(sizeof(rw_lock_t)); + + rw_lock_create(btr_search_latch_key, + btr_search_latch_part[i], SYNC_SEARCH_SYS); + + btr_search_sys->hash_index[i] = ha_create(hash_size, 0, 0); + } } /*****************************************************************//** @@ -183,11 +211,22 @@ void btr_search_sys_free(void) /*=====================*/ { - rw_lock_free(&btr_search_latch); - mem_free(btr_search_latch_temp); - btr_search_latch_temp = NULL; - mem_heap_free(btr_search_sys->hash_index->heap); - hash_table_free(btr_search_sys->hash_index); + ulint i; + + for (i = 0; i < btr_search_index_num; i++) { + mem_heap_free(btr_search_sys->hash_index[i]->heap); + hash_table_free(btr_search_sys->hash_index[i]); + + rw_lock_free(btr_search_latch_part[i]); + + mem_free(btr_search_latch_part[i]); + } + mem_free(btr_search_sys->hash_index); + mem_free(btr_search_latch_part); + + //rw_lock_free(&btr_search_latch); + //mem_free(btr_search_latch_temp); + //btr_search_latch_temp = NULL; mem_free(btr_search_sys); btr_search_sys = NULL; } @@ -200,7 +239,7 @@ btr_search_disable(void) /*====================*/ { mutex_enter(&btr_search_enabled_mutex); - rw_lock_x_lock(&btr_search_latch); + btr_search_x_lock_all(); /* Disable access to hash index, also tell ha_insert_for_fold() stop adding new nodes to hash index, but still allow updating @@ -218,7 +257,7 @@ btr_search_disable(void) /* btr_search_enabled_mutex should guarantee this. */ ut_ad(!btr_search_enabled); - rw_lock_x_unlock(&btr_search_latch); + btr_search_x_unlock_all(); mutex_exit(&btr_search_enabled_mutex); } @@ -230,12 +269,12 @@ btr_search_enable(void) /*====================*/ { mutex_enter(&btr_search_enabled_mutex); - rw_lock_x_lock(&btr_search_latch); + btr_search_x_lock_all(); btr_search_enabled = TRUE; btr_search_fully_disabled = FALSE; - rw_lock_x_unlock(&btr_search_latch); + btr_search_x_unlock_all(); mutex_exit(&btr_search_enabled_mutex); } @@ -288,20 +327,21 @@ UNIV_INTERN ulint btr_search_info_get_ref_count( /*==========================*/ - btr_search_t* info) /*!< in: search info. */ + btr_search_t* info, /*!< in: search info. */ + index_id_t key) { ulint ret; ut_ad(info); #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(key), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(key), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(key)); ret = info->ref_count; - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(key)); return(ret); } @@ -322,8 +362,8 @@ btr_search_info_update_hash( int cmp; #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ index = cursor->index; @@ -441,8 +481,8 @@ btr_search_update_block_hash_info( /*!< in: cursor */ { #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_EX)); ut_ad(rw_lock_own(&block->lock, RW_LOCK_SHARED) || rw_lock_own(&block->lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ @@ -520,13 +560,13 @@ btr_search_update_hash_ref( buf_block_t* block, /*!< in: buffer block where cursor positioned */ btr_cur_t* cursor) /*!< in: cursor */ { - ulint fold; - rec_t* rec; - dulint index_id; + ulint fold; + rec_t* rec; + index_id_t index_id; ut_ad(cursor->flag == BTR_CUR_HASH_FAIL); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_EX)); ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) || rw_lock_own(&(block->lock), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ @@ -566,10 +606,10 @@ btr_search_update_hash_ref( mem_heap_free(heap); } #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - ha_insert_for_fold(btr_search_sys->hash_index, fold, + ha_insert_for_fold(btr_search_get_hash_index(cursor->index->id), fold, block, rec); } } @@ -589,8 +629,8 @@ btr_search_info_update_slow( ulint* params2; #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(cursor->index->id), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ block = btr_cur_get_block(cursor); @@ -611,7 +651,7 @@ btr_search_info_update_slow( if (build_index || (cursor->flag == BTR_CUR_HASH_FAIL)) { - btr_search_check_free_space_in_heap(); + btr_search_check_free_space_in_heap(cursor->index->id); } if (cursor->flag == BTR_CUR_HASH_FAIL) { @@ -621,11 +661,11 @@ btr_search_info_update_slow( btr_search_n_hash_fail++; #endif /* UNIV_SEARCH_PERF_STAT */ - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); btr_search_update_hash_ref(info, block, cursor); - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); } if (build_index) { @@ -828,10 +868,11 @@ btr_search_guess_on_hash( RW_S_LATCH, RW_X_LATCH, or 0 */ mtr_t* mtr) /*!< in: mtr */ { + buf_pool_t* buf_pool; buf_block_t* block; rec_t* rec; ulint fold; - dulint index_id; + index_id_t index_id; #ifdef notdefined btr_cur_t cursor2; btr_pcur_t pcur; @@ -868,17 +909,17 @@ btr_search_guess_on_hash( cursor->flag = BTR_CUR_HASH; if (UNIV_LIKELY(!has_search_latch)) { - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(index_id)); if (UNIV_UNLIKELY(!btr_search_enabled)) { goto failure_unlock; } } - ut_ad(rw_lock_get_writer(&btr_search_latch) != RW_LOCK_EX); - ut_ad(rw_lock_get_reader_count(&btr_search_latch) > 0); + ut_ad(rw_lock_get_writer(btr_search_get_latch(index_id)) != RW_LOCK_EX); + ut_ad(rw_lock_get_reader_count(btr_search_get_latch(index_id)) > 0); - rec = ha_search_and_get_data(btr_search_sys->hash_index, fold); + rec = ha_search_and_get_data(btr_search_get_hash_index(index_id), fold); if (UNIV_UNLIKELY(!rec)) { goto failure_unlock; @@ -896,7 +937,7 @@ btr_search_guess_on_hash( goto failure_unlock; } - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index_id)); buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH); } @@ -923,8 +964,7 @@ btr_search_guess_on_hash( is positioned on. We cannot look at the next of the previous record to determine if our guess for the cursor position is right. */ - if (UNIV_EXPECT - (ut_dulint_cmp(index_id, btr_page_get_index_id(block->frame)), 0) + if (UNIV_UNLIKELY(index_id != btr_page_get_index_id(block->frame)) || !btr_search_check_guess(cursor, has_search_latch, tuple, mode, mtr)) { @@ -986,7 +1026,7 @@ btr_search_guess_on_hash( /* Increment the page get statistics though we did not really fix the page: for user info only */ - + buf_pool = buf_pool_from_bpage(&block->page); buf_pool->stat.n_page_gets++; return(TRUE); @@ -994,7 +1034,7 @@ btr_search_guess_on_hash( /*-------------------------------------------*/ failure_unlock: if (UNIV_LIKELY(!has_search_latch)) { - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index_id)); } failure: cursor->flag = BTR_CUR_HASH_FAIL; @@ -1017,10 +1057,11 @@ UNIV_INTERN void btr_search_drop_page_hash_index( /*============================*/ - buf_block_t* block) /*!< in: block containing index page, + buf_block_t* block, /*!< in: block containing index page, s- or x-latched, or an index page for which we know that block->buf_fix_count == 0 */ + dict_index_t* index_in) { hash_table_t* table; ulint n_fields; @@ -1029,7 +1070,7 @@ btr_search_drop_page_hash_index( const rec_t* rec; ulint fold; ulint prev_fold; - dulint index_id; + index_id_t index_id; ulint n_cached; ulint n_recs; ulint* folds; @@ -1039,22 +1080,60 @@ btr_search_drop_page_hash_index( ulint* offsets; #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + if (index_in) { + ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_SHARED)); + ut_ad(!rw_lock_own(btr_search_get_latch(index_in->id), RW_LOCK_EX)); + } #endif /* UNIV_SYNC_DEBUG */ retry: - rw_lock_s_lock(&btr_search_latch); + if (index_in) { + index = index_in; + rw_lock_s_lock(btr_search_get_latch(index->id)); + } else if (btr_search_index_num > 1) { + rw_lock_t* btr_search_latch; + + /* FIXME: This may be optimistic implementation still. */ + btr_search_latch = (rw_lock_t*)(block->btr_search_latch); + if (UNIV_LIKELY(!btr_search_latch)) { + if (block->is_hashed) { + goto retry; + } + return; + } + rw_lock_s_lock(btr_search_latch); + if (UNIV_LIKELY(btr_search_latch != block->btr_search_latch)) { + rw_lock_s_unlock(btr_search_latch); + goto retry; + } + if (UNIV_LIKELY(!block->is_hashed)) { + rw_lock_s_unlock(btr_search_latch); + goto retry; + } + index = block->index; + ut_a(btr_search_latch == btr_search_get_latch(index->id)); + } else { + /* btr_search_index_num == 1 */ + /* btr_search_latch is only one and able to obtain + before evaluating block->is_hashed. */ + rw_lock_s_lock(btr_search_latch_part[0]); + if (UNIV_LIKELY(!block->is_hashed)) { + rw_lock_s_unlock(btr_search_latch_part[0]); + return; + } + index = block->index; + } + page = block->frame; if (UNIV_LIKELY(!block->is_hashed)) { - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); return; } - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(index->id); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) @@ -1064,14 +1143,14 @@ retry: n_fields = block->curr_n_fields; n_bytes = block->curr_n_bytes; - index = block->index; + ut_a(index == block->index); ut_a(!dict_index_is_ibuf(index)); /* NOTE: The fields of block must not be accessed after releasing btr_search_latch, as the index page might only be s-latched! */ - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); ut_a(n_fields + n_bytes > 0); @@ -1089,7 +1168,7 @@ retry: index_id = btr_page_get_index_id(page); - ut_a(0 == ut_dulint_cmp(index_id, index->id)); + ut_a(index_id == index->id); prev_fold = 0; @@ -1121,7 +1200,7 @@ next_rec: mem_heap_free(heap); } - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index->id)); if (UNIV_UNLIKELY(!block->is_hashed)) { /* Someone else has meanwhile dropped the hash index */ @@ -1137,7 +1216,7 @@ next_rec: /* Someone else has meanwhile built a new hash index on the page, with different parameters */ - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); mem_free(folds); goto retry; @@ -1153,6 +1232,7 @@ next_rec: block->is_hashed = FALSE; block->index = NULL; + block->btr_search_latch = NULL; cleanup: #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG @@ -1165,14 +1245,14 @@ cleanup: "InnoDB: the hash index to a page of %s," " still %lu hash nodes remain.\n", index->name, (ulong) block->n_pointers); - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); btr_search_validate(); } else { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); } #else /* UNIV_AHI_DEBUG || UNIV_DEBUG */ - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ mem_free(folds); @@ -1195,150 +1275,157 @@ btr_search_drop_page_hash_index_on_index( const rec_t* rec; ulint fold; ulint prev_fold; - dulint index_id; + index_id_t index_id; ulint n_cached; ulint n_recs; ulint* folds; - ulint i; + ulint i, j; mem_heap_t* heap = NULL; ulint* offsets; ibool released_search_latch; - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(index->id)); - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(index->id); - do { - buf_chunk_t* chunks = buf_pool->chunks; - buf_chunk_t* chunk = chunks + buf_pool->n_chunks; + for (j = 0; j < srv_buf_pool_instances; j++) { + buf_pool_t* buf_pool; - released_search_latch = FALSE; + buf_pool = buf_pool_from_array(j); - while (--chunk >= chunks) { - block = chunk->blocks; - i = chunk->size; + do { + buf_chunk_t* chunks = buf_pool->chunks; + buf_chunk_t* chunk = chunks + buf_pool->n_chunks; + + released_search_latch = FALSE; + + while (--chunk >= chunks) { + block = chunk->blocks; + i = chunk->size; retry: - for (; i--; block++) { - if (buf_block_get_state(block) - != BUF_BLOCK_FILE_PAGE - || block->index != index - || !block->is_hashed) { - continue; - } - - page = block->frame; - - /* from btr_search_drop_page_hash_index() */ - n_fields = block->curr_n_fields; - n_bytes = block->curr_n_bytes; - - - /* keeping latch order */ - rw_lock_s_unlock(&btr_search_latch); - released_search_latch = TRUE; - rw_lock_x_lock(&block->lock); - - - ut_a(n_fields + n_bytes > 0); - - n_recs = page_get_n_recs(page); - - /* Calculate and cache fold values into an array for fast deletion - from the hash index */ - - folds = mem_alloc(n_recs * sizeof(ulint)); - - n_cached = 0; - - rec = page_get_infimum_rec(page); - rec = page_rec_get_next_low(rec, page_is_comp(page)); - - index_id = btr_page_get_index_id(page); - - ut_a(0 == ut_dulint_cmp(index_id, index->id)); - - prev_fold = 0; - - offsets = NULL; - - while (!page_rec_is_supremum(rec)) { - offsets = rec_get_offsets(rec, index, offsets, - n_fields + (n_bytes > 0), &heap); - ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); - fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); - - if (fold == prev_fold && prev_fold != 0) { - - goto next_rec; + for (; i--; block++) { + if (buf_block_get_state(block) + != BUF_BLOCK_FILE_PAGE + || block->index != index + || !block->is_hashed) { + continue; } - /* Remove all hash nodes pointing to this page from the - hash chain */ + page = block->frame; - folds[n_cached] = fold; - n_cached++; + /* from btr_search_drop_page_hash_index() */ + n_fields = block->curr_n_fields; + n_bytes = block->curr_n_bytes; + + + /* keeping latch order */ + rw_lock_s_unlock(btr_search_get_latch(index->id)); + released_search_latch = TRUE; + rw_lock_x_lock(&block->lock); + + + ut_a(n_fields + n_bytes > 0); + + n_recs = page_get_n_recs(page); + + /* Calculate and cache fold values into an array for fast deletion + from the hash index */ + + folds = mem_alloc(n_recs * sizeof(ulint)); + + n_cached = 0; + + rec = page_get_infimum_rec(page); + rec = page_rec_get_next_low(rec, page_is_comp(page)); + + index_id = btr_page_get_index_id(page); + + ut_a(index_id == index->id); + + prev_fold = 0; + + offsets = NULL; + + while (!page_rec_is_supremum(rec)) { + offsets = rec_get_offsets(rec, index, offsets, + n_fields + (n_bytes > 0), &heap); + ut_a(rec_offs_n_fields(offsets) == n_fields + (n_bytes > 0)); + fold = rec_fold(rec, offsets, n_fields, n_bytes, index_id); + + if (fold == prev_fold && prev_fold != 0) { + + goto next_rec; + } + + /* Remove all hash nodes pointing to this page from the + hash chain */ + + folds[n_cached] = fold; + n_cached++; next_rec: - rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); - prev_fold = fold; - } + rec = page_rec_get_next_low(rec, page_rec_is_comp(rec)); + prev_fold = fold; + } - if (UNIV_LIKELY_NULL(heap)) { - mem_heap_empty(heap); - } + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_empty(heap); + } - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index->id)); - if (UNIV_UNLIKELY(!block->is_hashed)) { - goto cleanup; - } + if (UNIV_UNLIKELY(!block->is_hashed)) { + goto cleanup; + } - ut_a(block->index == index); + ut_a(block->index == index); - if (UNIV_UNLIKELY(block->curr_n_fields != n_fields) - || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) { - rw_lock_x_unlock(&btr_search_latch); + if (UNIV_UNLIKELY(block->curr_n_fields != n_fields) + || UNIV_UNLIKELY(block->curr_n_bytes != n_bytes)) { + rw_lock_x_unlock(btr_search_get_latch(index->id)); + rw_lock_x_unlock(&block->lock); + + mem_free(folds); + + rw_lock_s_lock(btr_search_get_latch(index->id)); + goto retry; + } + + for (i = 0; i < n_cached; i++) { + + ha_remove_all_nodes_to_page(table, folds[i], page); + } + + ut_a(index->search_info->ref_count > 0); + index->search_info->ref_count--; + + block->is_hashed = FALSE; + block->index = NULL; + block->btr_search_latch = NULL; + +cleanup: +#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG + if (UNIV_UNLIKELY(block->n_pointers)) { + /* Corruption */ + ut_print_timestamp(stderr); + fprintf(stderr, +"InnoDB: The adaptive hash index is corrupted. After dropping\n" +"InnoDB: the hash index to a page of %s, %lu hash nodes still remain.\n", + index->name, (ulong) block->n_pointers); + } +#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ + rw_lock_x_unlock(btr_search_get_latch(index->id)); rw_lock_x_unlock(&block->lock); mem_free(folds); - rw_lock_s_lock(&btr_search_latch); - goto retry; + rw_lock_s_lock(btr_search_get_latch(index->id)); } - - for (i = 0; i < n_cached; i++) { - - ha_remove_all_nodes_to_page(table, folds[i], page); - } - - ut_a(index->search_info->ref_count > 0); - index->search_info->ref_count--; - - block->is_hashed = FALSE; - block->index = NULL; - -cleanup: -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG - if (UNIV_UNLIKELY(block->n_pointers)) { - /* Corruption */ - ut_print_timestamp(stderr); - fprintf(stderr, -" InnoDB: Corruption of adaptive hash index. After dropping\n" -"InnoDB: the hash index to a page of %s, still %lu hash nodes remain.\n", - index->name, (ulong) block->n_pointers); - } -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ - rw_lock_x_unlock(&btr_search_latch); - rw_lock_x_unlock(&block->lock); - - mem_free(folds); - - rw_lock_s_lock(&btr_search_latch); } - } - } while (released_search_latch); + } while (released_search_latch); + } - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); @@ -1373,8 +1460,8 @@ btr_search_drop_page_hash_when_freed( having to fear a deadlock. */ block = buf_page_get_gen(space, zip_size, page_no, RW_S_LATCH, NULL, - BUF_GET_IF_IN_POOL, __FILE__, __LINE__, - &mtr); + BUF_PEEK_IF_IN_POOL, __FILE__, __LINE__, + &mtr); /* Because the buffer pool mutex was released by buf_page_peek_if_search_hashed(), it is possible that the block was removed from the buffer pool by another thread @@ -1385,7 +1472,7 @@ btr_search_drop_page_hash_when_freed( buf_block_dbg_add_level(block, SYNC_TREE_NODE_FROM_HASH); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, NULL); } mtr_commit(&mtr); @@ -1413,7 +1500,7 @@ btr_search_build_page_hash_index( rec_t* next_rec; ulint fold; ulint next_fold; - dulint index_id; + index_id_t index_id; ulint n_cached; ulint n_recs; ulint* folds; @@ -1427,26 +1514,26 @@ btr_search_build_page_hash_index( ut_ad(index); ut_a(!dict_index_is_ibuf(index)); - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(index->id); page = buf_block_get_frame(block); #ifdef UNIV_SYNC_DEBUG - ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ut_ad(!rw_lock_own(btr_search_get_latch(index->id), RW_LOCK_EX)); ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) || rw_lock_own(&(block->lock), RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(index->id)); if (block->is_hashed && ((block->curr_n_fields != n_fields) || (block->curr_n_bytes != n_bytes) || (block->curr_left_side != left_side))) { - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); } else { - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); } n_recs = page_get_n_recs(page); @@ -1540,9 +1627,9 @@ btr_search_build_page_hash_index( fold = next_fold; } - btr_search_check_free_space_in_heap(); + btr_search_check_free_space_in_heap(index->id); - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index->id)); if (UNIV_UNLIKELY(btr_search_fully_disabled)) { goto exit_func; @@ -1570,6 +1657,7 @@ btr_search_build_page_hash_index( block->curr_n_bytes = n_bytes; block->curr_left_side = left_side; block->index = index; + block->btr_search_latch = btr_search_get_latch(index->id); for (i = 0; i < n_cached; i++) { @@ -1577,7 +1665,7 @@ btr_search_build_page_hash_index( } exit_func: - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index->id)); mem_free(folds); mem_free(recs); @@ -1616,13 +1704,13 @@ btr_search_move_or_delete_hash_entries( ut_a(!(new_block->is_hashed || block->is_hashed) || !dict_index_is_ibuf(index)); - rw_lock_s_lock(&btr_search_latch); + rw_lock_s_lock(btr_search_get_latch(index->id)); if (new_block->is_hashed) { - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); - btr_search_drop_page_hash_index(block); + btr_search_drop_page_hash_index(block, index); return; } @@ -1637,7 +1725,7 @@ btr_search_move_or_delete_hash_entries( new_block->n_bytes = block->curr_n_bytes; new_block->left_side = left_side; - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); ut_a(n_fields + n_bytes > 0); @@ -1649,7 +1737,7 @@ btr_search_move_or_delete_hash_entries( return; } - rw_lock_s_unlock(&btr_search_latch); + rw_lock_s_unlock(btr_search_get_latch(index->id)); } /********************************************************************//** @@ -1666,7 +1754,7 @@ btr_search_update_hash_on_delete( buf_block_t* block; rec_t* rec; ulint fold; - dulint index_id; + index_id_t index_id; ulint offsets_[REC_OFFS_NORMAL_SIZE]; mem_heap_t* heap = NULL; rec_offs_init(offsets_); @@ -1688,7 +1776,7 @@ btr_search_update_hash_on_delete( ut_a(block->curr_n_fields + block->curr_n_bytes > 0); ut_a(!dict_index_is_ibuf(cursor->index)); - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(cursor->index->id); index_id = cursor->index->id; fold = rec_fold(rec, rec_get_offsets(rec, cursor->index, offsets_, @@ -1697,11 +1785,11 @@ btr_search_update_hash_on_delete( if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); } - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); ha_search_and_delete_if_found(table, fold, rec); - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); } /********************************************************************//** @@ -1735,21 +1823,21 @@ btr_search_update_hash_node_on_insert( ut_a(block->index == cursor->index); ut_a(!dict_index_is_ibuf(cursor->index)); - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(cursor->index->id)); if ((cursor->flag == BTR_CUR_HASH) && (cursor->n_fields == block->curr_n_fields) && (cursor->n_bytes == block->curr_n_bytes) && !block->curr_left_side) { - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(cursor->index->id); ha_search_and_update_if_found(table, cursor->fold, rec, block, page_rec_get_next(rec)); - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); } else { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(cursor->index->id)); btr_search_update_hash_on_insert(cursor); } @@ -1771,7 +1859,7 @@ btr_search_update_hash_on_insert( rec_t* rec; rec_t* ins_rec; rec_t* next_rec; - dulint index_id; + index_id_t index_id; ulint fold; ulint ins_fold; ulint next_fold = 0; /* remove warning (??? bug ???) */ @@ -1784,9 +1872,9 @@ btr_search_update_hash_on_insert( ulint* offsets = offsets_; rec_offs_init(offsets_); - table = btr_search_sys->hash_index; + table = btr_search_get_hash_index(cursor->index->id); - btr_search_check_free_space_in_heap(); + btr_search_check_free_space_in_heap(cursor->index->id); rec = btr_cur_get_rec(cursor); @@ -1831,7 +1919,7 @@ btr_search_update_hash_on_insert( } else { if (left_side) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index_id)); locked = TRUE; @@ -1845,7 +1933,7 @@ btr_search_update_hash_on_insert( if (!locked) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index_id)); locked = TRUE; } @@ -1863,7 +1951,7 @@ check_next_rec: if (!left_side) { if (!locked) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index_id)); locked = TRUE; } @@ -1878,7 +1966,7 @@ check_next_rec: if (!locked) { - rw_lock_x_lock(&btr_search_latch); + rw_lock_x_lock(btr_search_get_latch(index_id)); locked = TRUE; } @@ -1901,7 +1989,7 @@ function_exit: mem_heap_free(heap); } if (locked) { - rw_lock_x_unlock(&btr_search_latch); + rw_lock_x_unlock(btr_search_get_latch(index_id)); } } @@ -1917,7 +2005,7 @@ btr_search_validate(void) ha_node_t* node; ulint n_page_dumps = 0; ibool ok = TRUE; - ulint i; + ulint i,j; ulint cell_count; mem_heap_t* heap = NULL; ulint offsets_[REC_OFFS_NORMAL_SIZE]; @@ -1929,31 +2017,34 @@ btr_search_validate(void) rec_offs_init(offsets_); - rw_lock_x_lock(&btr_search_latch); - //buf_pool_mutex_enter(); - rw_lock_x_lock(&page_hash_latch); + btr_search_x_lock_all(); + buf_pool_page_hash_x_lock_all(); - cell_count = hash_get_n_cells(btr_search_sys->hash_index); + for (j = 0; j < btr_search_index_num; j++) { + + cell_count = hash_get_n_cells(btr_search_sys->hash_index[j]); for (i = 0; i < cell_count; i++) { /* We release btr_search_latch every once in a while to give other queries a chance to run. */ if ((i != 0) && ((i % chunk_size) == 0)) { - //buf_pool_mutex_exit(); - rw_lock_x_unlock(&page_hash_latch); - rw_lock_x_unlock(&btr_search_latch); + buf_pool_page_hash_x_unlock_all(); + btr_search_x_unlock_all(); os_thread_yield(); - rw_lock_x_lock(&btr_search_latch); - //buf_pool_mutex_enter(); - rw_lock_x_lock(&page_hash_latch); + btr_search_x_lock_all(); + buf_pool_page_hash_x_lock_all(); } - node = hash_get_nth_cell(btr_search_sys->hash_index, i)->node; + node = hash_get_nth_cell(btr_search_sys->hash_index[j], i)->node; for (; node != NULL; node = node->next) { const buf_block_t* block = buf_block_align(node->data); const buf_block_t* hash_block; + buf_pool_t* buf_pool; + index_id_t page_index_id; + + buf_pool = buf_pool_from_bpage((buf_page_t*) block); if (UNIV_LIKELY(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE)) { @@ -1964,6 +2055,7 @@ btr_search_validate(void) (BUF_BLOCK_REMOVE_HASH, see the assertion and the comment below) */ hash_block = buf_block_hash_get( + buf_pool, buf_block_get_space(block), buf_block_get_page_no(block)); } else { @@ -1995,12 +2087,15 @@ btr_search_validate(void) + (block->curr_n_bytes > 0), &heap); - if (!block->is_hashed || node->fold - != rec_fold((rec_t*)(node->data), - offsets, - block->curr_n_fields, - block->curr_n_bytes, - btr_page_get_index_id(block->frame))) { + page_index_id = btr_page_get_index_id(block->frame); + + if (UNIV_UNLIKELY + (!block->is_hashed || node->fold + != rec_fold((rec_t*)(node->data), + offsets, + block->curr_n_fields, + block->curr_n_bytes, + page_index_id))) { const page_t* page = block->frame; ok = FALSE; @@ -2010,21 +2105,17 @@ btr_search_validate(void) " InnoDB: Error in an adaptive hash" " index pointer to page %lu\n" "InnoDB: ptr mem address %p" - " index id %lu %lu," + " index id %llu," " node fold %lu, rec fold %lu\n", (ulong) page_get_page_no(page), node->data, - (ulong) ut_dulint_get_high( - btr_page_get_index_id(page)), - (ulong) ut_dulint_get_low( - btr_page_get_index_id(page)), + (ullint) page_index_id, (ulong) node->fold, (ulong) rec_fold((rec_t*)(node->data), offsets, block->curr_n_fields, block->curr_n_bytes, - btr_page_get_index_id( - page))); + page_index_id)); fputs("InnoDB: Record ", stderr); rec_print_new(stderr, (rec_t*)node->data, @@ -2052,23 +2143,22 @@ btr_search_validate(void) /* We release btr_search_latch every once in a while to give other queries a chance to run. */ if (i != 0) { - //buf_pool_mutex_exit(); - rw_lock_x_unlock(&page_hash_latch); - rw_lock_x_unlock(&btr_search_latch); + buf_pool_page_hash_x_unlock_all(); + btr_search_x_unlock_all(); os_thread_yield(); - rw_lock_x_lock(&btr_search_latch); - //buf_pool_mutex_enter(); - rw_lock_x_lock(&page_hash_latch); + btr_search_x_lock_all(); + buf_pool_page_hash_x_lock_all(); } - if (!ha_validate(btr_search_sys->hash_index, i, end_index)) { + if (!ha_validate(btr_search_sys->hash_index[j], i, end_index)) { ok = FALSE; } } - //buf_pool_mutex_exit(); - rw_lock_x_unlock(&page_hash_latch); - rw_lock_x_unlock(&btr_search_latch); + } /*for (j = 0; j < btr_search_index_num; j++)*/ + + buf_pool_page_hash_x_unlock_all(); + btr_search_x_unlock_all(); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); } diff --git a/buf/buf0buddy.c b/buf/buf0buddy.c index db94b4bed24..07898950fab 100644 --- a/buf/buf0buddy.c +++ b/buf/buf0buddy.c @@ -34,17 +34,6 @@ Created December 2006 by Marko Makela #include "buf0flu.h" #include "page0zip.h" -/* Statistic counters */ - -#ifdef UNIV_DEBUG -/** Number of frames allocated from the buffer pool to the buddy system. -Protected by buf_pool_mutex. */ -static ulint buf_buddy_n_frames; -#endif /* UNIV_DEBUG */ -/** Statistics of the buddy system, indexed by block size. -Protected by buf_pool_mutex. */ -UNIV_INTERN buf_buddy_stat_t buf_buddy_stat[BUF_BUDDY_SIZES_MAX + 1]; - /**********************************************************************//** Get the offset of the buddy of a compressed page frame. @return the buddy relative of page */ @@ -73,8 +62,10 @@ UNIV_INLINE void buf_buddy_add_to_free( /*==================*/ - buf_page_t* bpage, /*!< in,own: block to be freed */ - ulint i) /*!< in: index of buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_page_t* bpage, /*!< in,own: block to be freed */ + ulint i) /*!< in: index of + buf_pool->zip_free[] */ { #ifdef UNIV_DEBUG_VALGRIND buf_page_t* b = UT_LIST_GET_FIRST(buf_pool->zip_free[i]); @@ -82,8 +73,8 @@ buf_buddy_add_to_free( if (b) UNIV_MEM_VALID(b, BUF_BUDDY_LOW << i); #endif /* UNIV_DEBUG_VALGRIND */ - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&zip_free_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); ut_ad(buf_pool->zip_free[i].start != bpage); UT_LIST_ADD_FIRST(zip_list, buf_pool->zip_free[i], bpage); @@ -100,8 +91,10 @@ UNIV_INLINE void buf_buddy_remove_from_free( /*=======================*/ - buf_page_t* bpage, /*!< in: block to be removed */ - ulint i) /*!< in: index of buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_page_t* bpage, /*!< in: block to be removed */ + ulint i) /*!< in: index of + buf_pool->zip_free[] */ { #ifdef UNIV_DEBUG_VALGRIND buf_page_t* prev = UT_LIST_GET_PREV(zip_list, bpage); @@ -114,8 +107,8 @@ buf_buddy_remove_from_free( ut_ad(!next || buf_page_get_state(next) == BUF_BLOCK_ZIP_FREE); #endif /* UNIV_DEBUG_VALGRIND */ - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&zip_free_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); UT_LIST_REMOVE(zip_list, buf_pool->zip_free[i], bpage); @@ -132,12 +125,13 @@ static void* buf_buddy_alloc_zip( /*================*/ - ulint i) /*!< in: index of buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint i) /*!< in: index of buf_pool->zip_free[] */ { buf_page_t* bpage; - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&zip_free_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); ut_a(i < BUF_BUDDY_SIZES); #ifndef UNIV_DEBUG_VALGRIND @@ -152,19 +146,19 @@ buf_buddy_alloc_zip( UNIV_MEM_VALID(bpage, BUF_BUDDY_LOW << i); ut_a(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_FREE); - buf_buddy_remove_from_free(bpage, i); + buf_buddy_remove_from_free(buf_pool, bpage, i); } else if (i + 1 < BUF_BUDDY_SIZES) { /* Attempt to split. */ - bpage = buf_buddy_alloc_zip(i + 1); + bpage = buf_buddy_alloc_zip(buf_pool, i + 1); if (bpage) { buf_page_t* buddy = (buf_page_t*) (((char*) bpage) + (BUF_BUDDY_LOW << i)); - ut_ad(!buf_pool_contains_zip(buddy)); + ut_ad(!buf_pool_contains_zip(buf_pool, buddy)); ut_d(memset(buddy, i, BUF_BUDDY_LOW << i)); buddy->state = BUF_BLOCK_ZIP_FREE; - buf_buddy_add_to_free(buddy, i); + buf_buddy_add_to_free(buf_pool, buddy, i); } } @@ -185,18 +179,19 @@ static void buf_buddy_block_free( /*=================*/ - void* buf, /*!< in: buffer frame to deallocate */ - ibool have_page_hash_mutex) + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + void* buf, /*!< in: buffer frame to deallocate */ + ibool have_page_hash_mutex) { const ulint fold = BUF_POOL_ZIP_FOLD_PTR(buf); buf_page_t* bpage; buf_block_t* block; - //ut_ad(buf_pool_mutex_own()); - ut_ad(!mutex_own(&buf_pool_zip_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(!mutex_own(&buf_pool->zip_mutex)); ut_a(!ut_align_offset(buf, UNIV_PAGE_SIZE)); - mutex_enter(&zip_hash_mutex); + mutex_enter(&buf_pool->zip_hash_mutex); HASH_SEARCH(hash, buf_pool->zip_hash, fold, buf_page_t*, bpage, ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_MEMORY @@ -209,7 +204,7 @@ buf_buddy_block_free( ut_d(bpage->in_zip_hash = FALSE); HASH_DELETE(buf_page_t, hash, buf_pool->zip_hash, fold, bpage); - mutex_exit(&zip_hash_mutex); + mutex_exit(&buf_pool->zip_hash_mutex); ut_d(memset(buf, 0, UNIV_PAGE_SIZE)); UNIV_MEM_INVALID(buf, UNIV_PAGE_SIZE); @@ -219,8 +214,8 @@ buf_buddy_block_free( buf_LRU_block_free_non_file_page(block, have_page_hash_mutex); mutex_exit(&block->mutex); - ut_ad(buf_buddy_n_frames > 0); - ut_d(buf_buddy_n_frames--); + ut_ad(buf_pool->buddy_n_frames > 0); + ut_d(buf_pool->buddy_n_frames--); } /**********************************************************************//** @@ -231,9 +226,10 @@ buf_buddy_block_register( /*=====================*/ buf_block_t* block) /*!< in: buffer frame to allocate */ { + buf_pool_t* buf_pool = buf_pool_from_block(block); const ulint fold = BUF_POOL_ZIP_FOLD(block); - //ut_ad(buf_pool_mutex_own()); - ut_ad(!mutex_own(&buf_pool_zip_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(!mutex_own(&buf_pool->zip_mutex)); ut_ad(buf_block_get_state(block) == BUF_BLOCK_READY_FOR_USE); buf_block_set_state(block, BUF_BLOCK_MEMORY); @@ -245,11 +241,11 @@ buf_buddy_block_register( ut_ad(!block->page.in_zip_hash); ut_d(block->page.in_zip_hash = TRUE); - mutex_enter(&zip_hash_mutex); + mutex_enter(&buf_pool->zip_hash_mutex); HASH_INSERT(buf_page_t, hash, buf_pool->zip_hash, fold, &block->page); - mutex_exit(&zip_hash_mutex); + mutex_exit(&buf_pool->zip_hash_mutex); - ut_d(buf_buddy_n_frames++); + ut_d(buf_pool->buddy_n_frames++); } /**********************************************************************//** @@ -259,10 +255,12 @@ static void* buf_buddy_alloc_from( /*=================*/ - void* buf, /*!< in: a block that is free to use */ - ulint i, /*!< in: index of buf_pool->zip_free[] */ - ulint j) /*!< in: size of buf as an index - of buf_pool->zip_free[] */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + void* buf, /*!< in: a block that is free to use */ + ulint i, /*!< in: index of + buf_pool->zip_free[] */ + ulint j) /*!< in: size of buf as an index + of buf_pool->zip_free[] */ { ulint offs = BUF_BUDDY_LOW << j; ut_ad(j <= BUF_BUDDY_SIZES); @@ -286,7 +284,7 @@ buf_buddy_alloc_from( ut_list_node_313) == BUF_BLOCK_ZIP_FREE))); #endif /* !UNIV_DEBUG_VALGRIND */ - buf_buddy_add_to_free(bpage, j); + buf_buddy_add_to_free(buf_pool, bpage, j); } return(buf); @@ -294,41 +292,43 @@ buf_buddy_alloc_from( /**********************************************************************//** Allocate a block. The thread calling this function must hold -buf_pool_mutex and must not hold buf_pool_zip_mutex or any block->mutex. -The buf_pool_mutex may only be released and reacquired if lru != NULL. +buf_pool->mutex and must not hold buf_pool->zip_mutex or any block->mutex. +The buf_pool->mutex may only be released and reacquired if lru != NULL. @return allocated block, possibly NULL if lru==NULL */ UNIV_INTERN void* buf_buddy_alloc_low( /*================*/ - ulint i, /*!< in: index of buf_pool->zip_free[], - or BUF_BUDDY_SIZES */ - ibool* lru, /*!< in: pointer to a variable that will be assigned - TRUE if storage was allocated from the LRU list - and buf_pool_mutex was temporarily released, - or NULL if the LRU list should not be used */ - ibool have_page_hash_mutex) + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint i, /*!< in: index of buf_pool->zip_free[], + or BUF_BUDDY_SIZES */ + ibool* lru, /*!< in: pointer to a variable that + will be assigned TRUE if storage was + allocated from the LRU list and + buf_pool->mutex was temporarily + released, or NULL if the LRU list + should not be used */ + ibool have_page_hash_mutex) { buf_block_t* block; - //ut_ad(buf_pool_mutex_own()); - ut_ad(!mutex_own(&buf_pool_zip_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + ut_ad(!mutex_own(&buf_pool->zip_mutex)); if (i < BUF_BUDDY_SIZES) { /* Try to allocate from the buddy system. */ - mutex_enter(&zip_free_mutex); - block = buf_buddy_alloc_zip(i); + mutex_enter(&buf_pool->zip_free_mutex); + block = buf_buddy_alloc_zip(buf_pool, i); if (block) { - goto func_exit; } - - mutex_exit(&zip_free_mutex); + mutex_exit(&buf_pool->zip_free_mutex); } /* Try allocating from the buf_pool->free list. */ - block = buf_LRU_get_free_only(); + block = buf_LRU_get_free_only(buf_pool); if (block) { @@ -341,28 +341,29 @@ buf_buddy_alloc_low( } /* Try replacing an uncompressed page in the buffer pool. */ - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); if (have_page_hash_mutex) { - rw_lock_x_unlock(&page_hash_latch); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } - block = buf_LRU_get_free_block(); + block = buf_LRU_get_free_block(buf_pool); *lru = TRUE; - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); if (have_page_hash_mutex) { - rw_lock_x_lock(&page_hash_latch); + rw_lock_x_lock(&buf_pool->page_hash_latch); } alloc_big: buf_buddy_block_register(block); - mutex_enter(&zip_free_mutex); - block = buf_buddy_alloc_from(block->frame, i, BUF_BUDDY_SIZES); + mutex_enter(&buf_pool->zip_free_mutex); + block = buf_buddy_alloc_from( + buf_pool, block->frame, i, BUF_BUDDY_SIZES); func_exit: - buf_buddy_stat[i].used++; - mutex_exit(&zip_free_mutex); + buf_pool->buddy_stat[i].used++; + mutex_exit(&buf_pool->zip_free_mutex); return(block); } @@ -378,10 +379,11 @@ buf_buddy_relocate_block( buf_page_t* dpage) /*!< in: free block to relocate to */ { buf_page_t* b; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_EX)); #endif switch (buf_page_get_state(bpage)) { @@ -400,18 +402,19 @@ buf_buddy_relocate_block( break; } - mutex_enter(&buf_pool_zip_mutex); - mutex_enter(&zip_free_mutex); + mutex_enter(&buf_pool->zip_mutex); + mutex_enter(&buf_pool->zip_free_mutex); if (!buf_page_can_relocate(bpage)) { - mutex_exit(&buf_pool_zip_mutex); - mutex_exit(&zip_free_mutex); + mutex_exit(&buf_pool->zip_mutex); + mutex_exit(&buf_pool->zip_free_mutex); return(FALSE); } - if (bpage != buf_page_hash_get(bpage->space, bpage->offset)) { - mutex_exit(&buf_pool_zip_mutex); - mutex_exit(&zip_free_mutex); + if (bpage != buf_page_hash_get(buf_pool, + bpage->space, bpage->offset)) { + mutex_exit(&buf_pool->zip_mutex); + mutex_exit(&buf_pool->zip_free_mutex); return(FALSE); } @@ -419,7 +422,6 @@ buf_buddy_relocate_block( ut_d(bpage->state = BUF_BLOCK_ZIP_FREE); /* relocate buf_pool->zip_clean */ - mutex_enter(&flush_list_mutex); b = UT_LIST_GET_PREV(zip_list, dpage); UT_LIST_REMOVE(zip_list, buf_pool->zip_clean, dpage); @@ -428,12 +430,11 @@ buf_buddy_relocate_block( } else { UT_LIST_ADD_FIRST(zip_list, buf_pool->zip_clean, dpage); } - mutex_exit(&flush_list_mutex); UNIV_MEM_INVALID(bpage, sizeof *bpage); - mutex_exit(&buf_pool_zip_mutex); - mutex_exit(&zip_free_mutex); + mutex_exit(&buf_pool->zip_mutex); + mutex_exit(&buf_pool->zip_free_mutex); return(TRUE); } @@ -444,18 +445,20 @@ static ibool buf_buddy_relocate( /*===============*/ - void* src, /*!< in: block to relocate */ - void* dst, /*!< in: free block to relocate to */ - ulint i, /*!< in: index of buf_pool->zip_free[] */ - ibool have_page_hash_mutex) + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + void* src, /*!< in: block to relocate */ + void* dst, /*!< in: free block to relocate to */ + ulint i, /*!< in: index of + buf_pool->zip_free[] */ + ibool have_page_hash_mutex) { buf_page_t* bpage; const ulint size = BUF_BUDDY_LOW << i; ullint usec = ut_time_us(NULL); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&zip_free_mutex)); - ut_ad(!mutex_own(&buf_pool_zip_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); + ut_ad(!mutex_own(&buf_pool->zip_mutex)); ut_ad(!ut_align_offset(src, size)); ut_ad(!ut_align_offset(dst, size)); UNIV_MEM_ASSERT_W(dst, size); @@ -478,9 +481,9 @@ buf_buddy_relocate( ulint space, page_no; if (!have_page_hash_mutex) { - mutex_exit(&zip_free_mutex); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + mutex_exit(&buf_pool->zip_free_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); } /* The src block may be split into smaller blocks, @@ -499,7 +502,7 @@ buf_buddy_relocate( on uninitialized value. */ UNIV_MEM_VALID(&space, sizeof space); UNIV_MEM_VALID(&page_no, sizeof page_no); - bpage = buf_page_hash_get(space, page_no); + bpage = buf_page_hash_get(buf_pool, space, page_no); if (!bpage || bpage->zip.data != src) { /* The block has probably been freshly @@ -508,13 +511,15 @@ buf_buddy_relocate( it cannot be relocated. */ if (!have_page_hash_mutex) { - mutex_enter(&zip_free_mutex); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_enter(&buf_pool->zip_free_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } return(FALSE); } + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); + if (page_zip_get_size(&bpage->zip) != size) { /* The block is of different size. We would have to relocate all blocks covered by src. @@ -522,16 +527,16 @@ buf_buddy_relocate( ut_ad(page_zip_get_size(&bpage->zip) < size); if (!have_page_hash_mutex) { - mutex_enter(&zip_free_mutex); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_enter(&buf_pool->zip_free_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } return(FALSE); } /* To keep latch order */ if (have_page_hash_mutex) - mutex_exit(&zip_free_mutex); + mutex_exit(&buf_pool->zip_free_mutex); /* The block must have been allocated, but it may contain uninitialized data. */ @@ -539,7 +544,7 @@ buf_buddy_relocate( mutex = buf_page_get_mutex_enter(bpage); - mutex_enter(&zip_free_mutex); + mutex_enter(&buf_pool->zip_free_mutex); if (mutex && buf_page_can_relocate(bpage)) { /* Relocate the compressed page. */ @@ -551,22 +556,22 @@ success: UNIV_MEM_INVALID(src, size); { buf_buddy_stat_t* buddy_stat - = &buf_buddy_stat[i]; + = &buf_pool->buddy_stat[i]; buddy_stat->relocated++; buddy_stat->relocated_usec += ut_time_us(NULL) - usec; } if (!have_page_hash_mutex) { - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } return(TRUE); } if (!have_page_hash_mutex) { - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } if (mutex) { @@ -581,29 +586,29 @@ success: UNIV_MEM_ASSERT_RW(src, size); #endif - mutex_exit(&zip_free_mutex); + mutex_exit(&buf_pool->zip_free_mutex); if (!have_page_hash_mutex) { - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); } if (buf_buddy_relocate_block(src, dst)) { - mutex_enter(&zip_free_mutex); + mutex_enter(&buf_pool->zip_free_mutex); if (!have_page_hash_mutex) { - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } goto success; } - mutex_enter(&zip_free_mutex); + mutex_enter(&buf_pool->zip_free_mutex); if (!have_page_hash_mutex) { - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } } @@ -616,36 +621,37 @@ UNIV_INTERN void buf_buddy_free_low( /*===============*/ - void* buf, /*!< in: block to be freed, must not be - pointed to by the buffer pool */ - ulint i, /*!< in: index of buf_pool->zip_free[], - or BUF_BUDDY_SIZES */ - ibool have_page_hash_mutex) + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + void* buf, /*!< in: block to be freed, must not be + pointed to by the buffer pool */ + ulint i, /*!< in: index of buf_pool->zip_free[], + or BUF_BUDDY_SIZES */ + ibool have_page_hash_mutex) { buf_page_t* bpage; buf_page_t* buddy; - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&zip_free_mutex)); - ut_ad(!mutex_own(&buf_pool_zip_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); + ut_ad(!mutex_own(&buf_pool->zip_mutex)); ut_ad(i <= BUF_BUDDY_SIZES); - ut_ad(buf_buddy_stat[i].used > 0); + ut_ad(buf_pool->buddy_stat[i].used > 0); - buf_buddy_stat[i].used--; + buf_pool->buddy_stat[i].used--; recombine: UNIV_MEM_ASSERT_AND_ALLOC(buf, BUF_BUDDY_LOW << i); ut_d(((buf_page_t*) buf)->state = BUF_BLOCK_ZIP_FREE); if (i == BUF_BUDDY_SIZES) { - mutex_exit(&zip_free_mutex); - buf_buddy_block_free(buf, have_page_hash_mutex); - mutex_enter(&zip_free_mutex); + mutex_exit(&buf_pool->zip_free_mutex); + buf_buddy_block_free(buf_pool, buf, have_page_hash_mutex); + mutex_enter(&buf_pool->zip_free_mutex); return; } ut_ad(i < BUF_BUDDY_SIZES); ut_ad(buf == ut_align_down(buf, BUF_BUDDY_LOW << i)); - ut_ad(!buf_pool_contains_zip(buf)); + ut_ad(!buf_pool_contains_zip(buf_pool, buf)); /* Try to combine adjacent blocks. */ @@ -671,10 +677,10 @@ recombine: if (bpage == buddy) { buddy_free: /* The buddy is free: recombine */ - buf_buddy_remove_from_free(bpage, i); + buf_buddy_remove_from_free(buf_pool, bpage, i); buddy_free2: ut_ad(buf_page_get_state(buddy) == BUF_BLOCK_ZIP_FREE); - ut_ad(!buf_pool_contains_zip(buddy)); + ut_ad(!buf_pool_contains_zip(buf_pool, buddy)); i++; buf = ut_align_down(buf, BUF_BUDDY_LOW << i); @@ -706,16 +712,16 @@ buddy_nonfree: buf_buddy_relocate() will overwrite bpage->list. */ UNIV_MEM_VALID(bpage, BUF_BUDDY_LOW << i); - buf_buddy_remove_from_free(bpage, i); + buf_buddy_remove_from_free(buf_pool, bpage, i); /* Try to relocate the buddy of buf to the free block. */ - if (buf_buddy_relocate(buddy, bpage, i, have_page_hash_mutex)) { + if (buf_buddy_relocate(buf_pool, buddy, bpage, i, have_page_hash_mutex)) { ut_d(buddy->state = BUF_BLOCK_ZIP_FREE); goto buddy_free2; } - buf_buddy_add_to_free(bpage, i); + buf_buddy_add_to_free(buf_pool, bpage, i); /* Try to relocate the buddy of the free block to buf. */ buddy = (buf_page_t*) buf_buddy_get(((byte*) bpage), @@ -736,7 +742,7 @@ buddy_nonfree: && ut_list_node_313 != buddy))); #endif /* !UNIV_DEBUG_VALGRIND */ - if (buf_buddy_relocate(buddy, buf, i, have_page_hash_mutex)) { + if (buf_buddy_relocate(buf_pool, buddy, buf, i, have_page_hash_mutex)) { buf = bpage; UNIV_MEM_VALID(bpage, BUF_BUDDY_LOW << i); @@ -799,5 +805,5 @@ buddy_nonfree: } #endif /* UNIV_DEBUG */ bpage->state = BUF_BLOCK_ZIP_FREE; - buf_buddy_add_to_free(bpage, i); + buf_buddy_add_to_free(buf_pool, bpage, i); } diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 07dc09f572b..76b8f04e978 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -53,10 +53,6 @@ Created 11/5/1995 Heikki Tuuri #include "page0zip.h" #include "trx0trx.h" #include "srv0start.h" -#include "que0que.h" -#include "read0read.h" -#include "row0row.h" -#include "ha_prototypes.h" /* prototypes for new functions added to ha_innodb.cc */ trx_t* innobase_get_trx(); @@ -123,21 +119,21 @@ in the file along with the file page, resides in the control block. The buffer buf_pool contains a single mutex which protects all the control data structures of the buf_pool. The content of a buffer frame is protected by a separate read-write lock in its control block, though. -These locks can be locked and unlocked without owning the buf_pool mutex. +These locks can be locked and unlocked without owning the buf_pool->mutex. The OS events in the buf_pool struct can be waited for without owning the -buf_pool mutex. +buf_pool->mutex. -The buf_pool mutex is a hot-spot in main memory, causing a lot of +The buf_pool->mutex is a hot-spot in main memory, causing a lot of memory bus traffic on multiprocessor systems when processors alternately access the mutex. On our Pentium, the mutex is accessed maybe every 10 microseconds. We gave up the solution to have mutexes for each control block, for instance, because it seemed to be complicated. -A solution to reduce mutex contention of the buf_pool mutex is to +A solution to reduce mutex contention of the buf_pool->mutex is to create a separate mutex for the page hash table. On Pentium, accessing the hash table takes 2 microseconds, about half -of the total buf_pool mutex hold time. +of the total buf_pool->mutex hold time. Control blocks -------------- @@ -192,12 +188,12 @@ list. We also keep a pointer to near the end of the LRU list, which we can use when we want to artificially age a page in the buf_pool. This is used if we know that some page is not needed again for some time: we insert the block right after the pointer, -causing it to be replaced sooner than would noramlly be the case. +causing it to be replaced sooner than would normally be the case. Currently this aging mechanism is used for read-ahead mechanism of pages, and it can also be used when there is a scan of a full table which cannot fit in the memory. Putting the pages near the -of the LRU list, we make sure that most of the buf_pool stays in the -main memory, undisturbed. +end of the LRU list, we make sure that most of the buf_pool stays +in the main memory, undisturbed. The unzip_LRU list contains a subset of the common LRU list. The blocks on the unzip_LRU list hold a compressed file page and the @@ -211,6 +207,7 @@ The chain of modified blocks (buf_pool->flush_list) contains the blocks holding file pages that have been modified in the memory but not written to disk yet. The block with the oldest modification which has not yet been written to disk is at the end of the chain. +The access to this list is protected by buf_pool->flush_list_mutex. The chain of unmodified compressed blocks (buf_pool->zip_clean) contains the control blocks (buf_page_t) of those compressed pages @@ -284,29 +281,13 @@ static const int WAIT_FOR_READ = 5000; /** Number of attemtps made to read in a page in the buffer pool */ static const ulint BUF_PAGE_READ_MAX_RETRIES = 100; -/** The buffer buf_pool of the database */ -UNIV_INTERN buf_pool_t* buf_pool = NULL; - -/** mutex protecting the buffer pool struct and control blocks, except the -read-write lock in them */ -UNIV_INTERN mutex_t buf_pool_mutex; -UNIV_INTERN mutex_t LRU_list_mutex; -UNIV_INTERN mutex_t flush_list_mutex; -UNIV_INTERN rw_lock_t page_hash_latch; -UNIV_INTERN mutex_t free_list_mutex; -UNIV_INTERN mutex_t zip_free_mutex; -UNIV_INTERN mutex_t zip_hash_mutex; -/** mutex protecting the control blocks of compressed-only pages -(of type buf_page_t, not buf_block_t) */ -UNIV_INTERN mutex_t buf_pool_zip_mutex; +/** The buffer pools of the database */ +UNIV_INTERN buf_pool_t* buf_pool_ptr; #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG static ulint buf_dbg_counter = 0; /*!< This is used to insert validation - operations in excution in the + operations in execution in the debug version */ -/** Flag to forbid the release of the buffer pool mutex. -Protected by buf_pool_mutex. */ -UNIV_INTERN ulint buf_pool_mutex_exit_forbidden = 0; #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #ifdef UNIV_DEBUG /** If this is set TRUE, the program prints info whenever @@ -314,32 +295,191 @@ read-ahead or flush occurs */ UNIV_INTERN ibool buf_debug_prints = FALSE; #endif /* UNIV_DEBUG */ -/* Buffer pool shared memory segment information */ -typedef struct buf_shm_info_struct buf_shm_info_t; +#ifdef UNIV_PFS_RWLOCK +/* Keys to register buffer block related rwlocks and mutexes with +performance schema */ +UNIV_INTERN mysql_pfs_key_t buf_pool_page_hash_key; +UNIV_INTERN mysql_pfs_key_t buf_block_lock_key; +# ifdef UNIV_SYNC_DEBUG +UNIV_INTERN mysql_pfs_key_t buf_block_debug_latch_key; +# endif /* UNIV_SYNC_DEBUG */ +#endif /* UNIV_PFS_RWLOCK */ -struct buf_shm_info_struct { - char head_str[8]; - ulint binary_id; - ibool is_new; /* during initializing */ - ibool clean; /* clean shutdowned and free */ - ibool reusable; /* reusable */ - ulint buf_pool_size; /* backup value */ - ulint page_size; /* backup value */ - ulint frame_offset; /* offset of the first frame based on chunk->mem */ - ulint zip_hash_offset; - ulint zip_hash_n; +#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_LRU_list_mutex_key; +UNIV_INTERN mysql_pfs_key_t buf_pool_free_list_mutex_key; +UNIV_INTERN mysql_pfs_key_t buf_pool_zip_free_mutex_key; +UNIV_INTERN mysql_pfs_key_t buf_pool_zip_hash_mutex_key; +UNIV_INTERN mysql_pfs_key_t flush_list_mutex_key; +#endif /* UNIV_PFS_MUTEX */ - ulint checksum; +#if defined UNIV_PFS_MUTEX || defined UNIV_PFS_RWLOCK +# ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK - buf_pool_t buf_pool_backup; - buf_chunk_t chunk_backup; +/* Buffer block mutexes and rwlocks can be registered +in one group rather than individually. If PFS_GROUP_BUFFER_SYNC +is defined, register buffer block mutex and rwlock +in one group after their initialization. */ +# define PFS_GROUP_BUFFER_SYNC - ib_uint64_t dummy; -}; +/* This define caps the number of mutexes/rwlocks can +be registered with performance schema. Developers can +modify this define if necessary. Please note, this would +be effective only if PFS_GROUP_BUFFER_SYNC is defined. */ +# define PFS_MAX_BUFFER_MUTEX_LOCK_REGISTER ULINT_MAX -#define BUF_SHM_INFO_HEAD "XTRA_SHM" +# endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */ +#endif /* UNIV_PFS_MUTEX || UNIV_PFS_RWLOCK */ + +/** A chunk of buffers. The buffer pool is allocated in chunks. (moved to buf0buf.h)*/ +//struct buf_chunk_struct{ +// ulint mem_size; /*!< allocated size of the chunk */ +// ulint size; /*!< size of frames[] and blocks[] */ +// void* mem; /*!< pointer to the memory area which +// was allocated for the frames */ +// buf_block_t* blocks; /*!< array of buffer control blocks */ +//}; #endif /* !UNIV_HOTBACKUP */ +/********************************************************************//** +Gets the smallest oldest_modification lsn for any page in the pool. Returns +zero if all modified pages have been flushed to disk. +@return oldest modification in pool, zero if none */ +UNIV_INTERN +ib_uint64_t +buf_pool_get_oldest_modification(void) +/*==================================*/ +{ + ulint i; + buf_page_t* bpage; + ib_uint64_t lsn = 0; + ib_uint64_t oldest_lsn = 0; + + /* When we traverse all the flush lists we don't want another + thread to add a dirty page to any flush list. */ + if (srv_buf_pool_instances > 1) + log_flush_order_mutex_enter(); + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_flush_list_mutex_enter(buf_pool); + + bpage = UT_LIST_GET_LAST(buf_pool->flush_list); + + if (bpage != NULL) { + ut_ad(bpage->in_flush_list); + lsn = bpage->oldest_modification; + } + + buf_flush_list_mutex_exit(buf_pool); + + if (!oldest_lsn || oldest_lsn > lsn) { + oldest_lsn = lsn; + } + } + + if (srv_buf_pool_instances > 1) + log_flush_order_mutex_exit(); + + /* The returned answer may be out of date: the flush_list can + change after the mutex has been released. */ + + return(oldest_lsn); +} + +/********************************************************************//** +Get total buffer pool statistics. */ +UNIV_INTERN +void +buf_get_total_list_len( +/*===================*/ + ulint* LRU_len, /*!< out: length of all LRU lists */ + ulint* free_len, /*!< out: length of all free lists */ + ulint* flush_list_len) /*!< out: length of all flush lists */ +{ + ulint i; + + *LRU_len = 0; + *free_len = 0; + *flush_list_len = 0; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + *LRU_len += UT_LIST_GET_LEN(buf_pool->LRU); + *free_len += UT_LIST_GET_LEN(buf_pool->free); + *flush_list_len += UT_LIST_GET_LEN(buf_pool->flush_list); + } +} + +/********************************************************************//** +Get total buffer pool statistics. */ +UNIV_INTERN +void +buf_get_total_stat( +/*===============*/ + buf_pool_stat_t* tot_stat) /*!< out: buffer pool stats */ +{ + ulint i; + + memset(tot_stat, 0, sizeof(*tot_stat)); + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_stat_t*buf_stat; + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_stat = &buf_pool->stat; + tot_stat->n_page_gets += buf_stat->n_page_gets; + tot_stat->n_pages_read += buf_stat->n_pages_read; + tot_stat->n_pages_written += buf_stat->n_pages_written; + tot_stat->n_pages_created += buf_stat->n_pages_created; + tot_stat->n_ra_pages_read += buf_stat->n_ra_pages_read; + tot_stat->n_ra_pages_evicted += buf_stat->n_ra_pages_evicted; + tot_stat->n_pages_made_young += buf_stat->n_pages_made_young; + + tot_stat->n_pages_not_made_young += + buf_stat->n_pages_not_made_young; + } +} + +/********************************************************************//** +Allocates a buffer block. +@return own: the allocated block, in state BUF_BLOCK_MEMORY */ +UNIV_INTERN +buf_block_t* +buf_block_alloc( +/*============*/ + buf_pool_t* buf_pool) /*!< in/out: buffer pool instance, + or NULL for round-robin selection + of the buffer pool */ +{ + buf_block_t* block; + ulint index; + static ulint buf_pool_index; + + if (buf_pool == NULL) { + /* We are allocating memory from any buffer pool, ensure + we spread the grace on all buffer pool instances. */ + index = buf_pool_index++ % srv_buf_pool_instances; + buf_pool = buf_pool_from_array(index); + } + + block = buf_LRU_get_free_block(buf_pool); + + buf_block_set_state(block, BUF_BLOCK_MEMORY); + + return(block); +} + /********************************************************************//** Calculates a page checksum which is stored to the page when it is written to a file. Note that we must be careful to calculate the same value on @@ -445,7 +585,9 @@ buf_page_is_corrupted( ib_uint64_t current_lsn; if (log_peek_lsn(¤t_lsn) - && current_lsn < mach_read_ull(read_buf + FIL_PAGE_LSN)) { + && UNIV_UNLIKELY + (current_lsn + < mach_read_from_8(read_buf + FIL_PAGE_LSN))) { ut_print_timestamp(stderr); fprintf(stderr, @@ -461,7 +603,7 @@ buf_page_is_corrupted( "InnoDB: for more information.\n", (ulong) mach_read_from_4(read_buf + FIL_PAGE_OFFSET), - mach_read_ull(read_buf + FIL_PAGE_LSN), + mach_read_from_8(read_buf + FIL_PAGE_LSN), current_lsn); } } @@ -673,17 +815,15 @@ buf_page_print( #endif /* !UNIV_HOTBACKUP */ switch (fil_page_get_type(read_buf)) { + index_id_t index_id; case FIL_PAGE_INDEX: + index_id = btr_page_get_index_id(read_buf); fprintf(stderr, "InnoDB: Page may be an index page where" - " index id is %lu %lu\n", - (ulong) ut_dulint_get_high( - btr_page_get_index_id(read_buf)), - (ulong) ut_dulint_get_low( - btr_page_get_index_id(read_buf))); + " index id is %llu\n", + (ullint) index_id); #ifndef UNIV_HOTBACKUP - index = dict_index_find_on_id_low( - btr_page_get_index_id(read_buf)); + index = dict_index_find_on_id_low(index_id); if (index) { fputs("InnoDB: (", stderr); dict_index_name_print(stderr, NULL, index); @@ -735,19 +875,68 @@ buf_page_print( } #ifndef UNIV_HOTBACKUP + +# ifdef PFS_GROUP_BUFFER_SYNC +/********************************************************************//** +This function registers mutexes and rwlocks in buffer blocks with +performance schema. If PFS_MAX_BUFFER_MUTEX_LOCK_REGISTER is +defined to be a value less than chunk->size, then only mutexes +and rwlocks in the first PFS_MAX_BUFFER_MUTEX_LOCK_REGISTER +blocks are registered. */ +static +void +pfs_register_buffer_block( +/*======================*/ + buf_chunk_t* chunk) /*!< in/out: chunk of buffers */ +{ + ulint i; + ulint num_to_register; + buf_block_t* block; + + block = chunk->blocks; + + num_to_register = ut_min(chunk->size, + PFS_MAX_BUFFER_MUTEX_LOCK_REGISTER); + + for (i = 0; i < num_to_register; i++) { + mutex_t* mutex; + rw_lock_t* rwlock; + +# ifdef UNIV_PFS_MUTEX + mutex = &block->mutex; + ut_a(!mutex->pfs_psi); + mutex->pfs_psi = (PSI_server) + ? PSI_server->init_mutex(buffer_block_mutex_key, mutex) + : NULL; +# endif /* UNIV_PFS_MUTEX */ + +# ifdef UNIV_PFS_RWLOCK + rwlock = &block->lock; + ut_a(!rwlock->pfs_psi); + rwlock->pfs_psi = (PSI_server) + ? PSI_server->init_rwlock(buf_block_lock_key, rwlock) + : NULL; +# endif /* UNIV_PFS_RWLOCK */ + block++; + } +} +# endif /* PFS_GROUP_BUFFER_SYNC */ + /********************************************************************//** Initializes a buffer control block when the buf_pool is created. */ static void buf_block_init( /*===========*/ - buf_block_t* block, /*!< in: pointer to control block */ - byte* frame) /*!< in: pointer to buffer frame */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_block_t* block, /*!< in: pointer to control block */ + byte* frame) /*!< in: pointer to buffer frame */ { UNIV_MEM_DESC(frame, UNIV_PAGE_SIZE, block); block->frame = frame; + block->page.buf_pool_index = buf_pool_index(buf_pool); block->page.state = BUF_BLOCK_NOT_USED; block->page.buf_fix_count = 0; block->page.io_fix = BUF_IO_NONE; @@ -760,6 +949,9 @@ buf_block_init( block->check_index_page_at_flush = FALSE; block->index = NULL; + block->btr_search_latch = NULL; + + block->is_hashed = FALSE; #ifdef UNIV_DEBUG block->page.in_page_hash = FALSE; @@ -767,6 +959,10 @@ buf_block_init( block->page.in_flush_list = FALSE; block->page.in_free_list = FALSE; #endif /* UNIV_DEBUG */ + block->page.flush_list.prev = NULL; + block->page.flush_list.next = NULL; + block->page.zip_list.prev = NULL; + block->page.zip_list.next = NULL; block->page.in_LRU_list = FALSE; block->in_unzip_LRU_list = FALSE; #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG @@ -774,52 +970,25 @@ buf_block_init( #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ page_zip_des_init(&block->page.zip); - mutex_create(&block->mutex, SYNC_BUF_BLOCK); +#if defined PFS_SKIP_BUFFER_MUTEX_RWLOCK || defined PFS_GROUP_BUFFER_SYNC + /* If PFS_SKIP_BUFFER_MUTEX_RWLOCK is defined, skip registration + of buffer block mutex/rwlock with performance schema. If + PFS_GROUP_BUFFER_SYNC is defined, skip the registration + since buffer block mutex/rwlock will be registered later in + pfs_register_buffer_block() */ + + mutex_create(PFS_NOT_INSTRUMENTED, &block->mutex, SYNC_BUF_BLOCK); + rw_lock_create(PFS_NOT_INSTRUMENTED, &block->lock, SYNC_LEVEL_VARYING); +#else /* PFS_SKIP_BUFFER_MUTEX_RWLOCK || PFS_GROUP_BUFFER_SYNC */ + mutex_create(buffer_block_mutex_key, &block->mutex, SYNC_BUF_BLOCK); + rw_lock_create(buf_block_lock_key, &block->lock, SYNC_LEVEL_VARYING); +#endif /* PFS_SKIP_BUFFER_MUTEX_RWLOCK || PFS_GROUP_BUFFER_SYNC */ - rw_lock_create(&block->lock, SYNC_LEVEL_VARYING); ut_ad(rw_lock_validate(&(block->lock))); #ifdef UNIV_SYNC_DEBUG - rw_lock_create(&block->debug_latch, SYNC_NO_ORDER_CHECK); -#endif /* UNIV_SYNC_DEBUG */ -} - -static -void -buf_block_reuse( -/*============*/ - buf_block_t* block, - ptrdiff_t frame_offset) -{ - /* block_init */ - block->frame += frame_offset; - - UNIV_MEM_DESC(block->frame, UNIV_PAGE_SIZE, block); - - block->index = NULL; - -#ifdef UNIV_DEBUG - /* recreate later */ - block->page.in_page_hash = FALSE; - block->page.in_zip_hash = FALSE; -#endif /* UNIV_DEBUG */ - -#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG - block->n_pointers = 0; -#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ - - if (block->page.zip.data) - block->page.zip.data += frame_offset; - - block->is_hashed = FALSE; - - mutex_create(&block->mutex, SYNC_BUF_BLOCK); - - rw_lock_create(&block->lock, SYNC_LEVEL_VARYING); - ut_ad(rw_lock_validate(&(block->lock))); - -#ifdef UNIV_SYNC_DEBUG - rw_lock_create(&block->debug_latch, SYNC_NO_ORDER_CHECK); + rw_lock_create(buf_block_debug_latch_key, + &block->debug_latch, SYNC_NO_ORDER_CHECK); #endif /* UNIV_SYNC_DEBUG */ } @@ -830,195 +999,34 @@ static buf_chunk_t* buf_chunk_init( /*===========*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ buf_chunk_t* chunk, /*!< out: chunk of buffers */ ulint mem_size) /*!< in: requested size in bytes */ { buf_block_t* block; byte* frame; - ulint zip_hash_n = 0; - ulint zip_hash_mem_size = 0; - hash_table_t* zip_hash_tmp = NULL; ulint i; ulint size_target; - buf_shm_info_t* shm_info = NULL; /* Round down to a multiple of page size, although it already should be. */ mem_size = ut_2pow_round(mem_size, UNIV_PAGE_SIZE); size_target = (mem_size / UNIV_PAGE_SIZE) - 1; - - srv_buffer_pool_shm_is_reused = FALSE; - - if (srv_buffer_pool_shm_key) { - /* zip_hash size */ - zip_hash_n = (mem_size / UNIV_PAGE_SIZE) * 2; - zip_hash_mem_size = ut_2pow_round(hash_create_needed(zip_hash_n) - + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - } - /* Reserve space for the block descriptors. */ mem_size += ut_2pow_round((mem_size / UNIV_PAGE_SIZE) * (sizeof *block) + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - if (srv_buffer_pool_shm_key) { - mem_size += ut_2pow_round(sizeof(buf_shm_info_t) - + (UNIV_PAGE_SIZE - 1), UNIV_PAGE_SIZE); - mem_size += zip_hash_mem_size; - } chunk->mem_size = mem_size; - - if (srv_buffer_pool_shm_key) { - ulint binary_id; - ibool is_new; - - ut_a(buf_pool->n_chunks == 1); - - fprintf(stderr, - "InnoDB: Warning: The innodb_buffer_pool_shm_key option has been specified.\n" - "InnoDB: Do not change the following between restarts of the server while this option is being used:\n" - "InnoDB: * the mysqld executable between restarts of the server.\n" - "InnoDB: * the value of innodb_buffer_pool_size.\n" - "InnoDB: * the value of innodb_page_size.\n" - "InnoDB: * datafiles created by InnoDB during this session.\n" - "InnoDB: Otherwise, data corruption in datafiles may result.\n"); - - /* FIXME: This is vague id still */ - binary_id = (ulint) ((byte*)mtr_commit - (byte*)btr_root_get) - + (ulint) ((byte*)os_get_os_version - (byte*)buf_calc_page_new_checksum) - + (ulint) ((byte*)page_dir_find_owner_slot - (byte*)dfield_data_is_binary_equal) - + (ulint) ((byte*)que_graph_publish - (byte*)dict_casedn_str) - + (ulint) ((byte*)read_view_oldest_copy_or_open_new - (byte*)fil_space_get_version) - + (ulint) ((byte*)rec_get_n_extern_new - (byte*)fsp_get_size_low) - + (ulint) ((byte*)row_get_trx_id_offset - (byte*)ha_create_func) - + (ulint) ((byte*)srv_set_io_thread_op_info - (byte*)thd_is_replication_slave_thread) - + (ulint) ((byte*)mutex_create_func - (byte*)ibuf_inside) - + (ulint) ((byte*)trx_set_detailed_error - (byte*)lock_check_trx_id_sanity) - + (ulint) ((byte*)ut_time - (byte*)mem_heap_strdup); - - chunk->mem = os_shm_alloc(&chunk->mem_size, srv_buffer_pool_shm_key, &is_new); - - if (UNIV_UNLIKELY(chunk->mem == NULL)) { - return(NULL); - } -init_again: -#ifdef UNIV_SET_MEM_TO_ZERO - if (is_new) { - memset(chunk->mem, '\0', chunk->mem_size); - } -#endif - /* for ut_fold_binary_32(), these values should be 32-bit aligned */ - ut_a(sizeof(buf_shm_info_t) % 4 == 0); - ut_a((ulint)chunk->mem % 4 == 0); - ut_a(chunk->mem_size % 4 == 0); - - shm_info = chunk->mem; - - zip_hash_tmp = (hash_table_t*)((byte*)chunk->mem + chunk->mem_size - zip_hash_mem_size); - - if (is_new) { - strncpy(shm_info->head_str, BUF_SHM_INFO_HEAD, 8); - shm_info->binary_id = binary_id; - shm_info->is_new = TRUE; /* changed to FALSE when the initialization is finished */ - shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ - shm_info->reusable = FALSE; /* changed to TRUE when validation is finished. */ - shm_info->buf_pool_size = srv_buf_pool_size; - shm_info->page_size = srv_page_size; - shm_info->zip_hash_offset = chunk->mem_size - zip_hash_mem_size; - shm_info->zip_hash_n = zip_hash_n; - } else { - ulint checksum; - - if (strncmp(shm_info->head_str, BUF_SHM_INFO_HEAD, 8)) { - fprintf(stderr, - "InnoDB: Error: The shared memory segment seems not to be for buffer pool.\n"); - return(NULL); - } - if (shm_info->binary_id != binary_id) { - fprintf(stderr, - "InnoDB: Error: The shared memory segment seems not to be for this binary.\n"); - return(NULL); - } - if (shm_info->is_new) { - fprintf(stderr, - "InnoDB: Error: The shared memory was not initialized yet.\n"); - return(NULL); - } - if (shm_info->buf_pool_size != srv_buf_pool_size) { - fprintf(stderr, - "InnoDB: Error: srv_buf_pool_size is different (shm=%lu current=%lu).\n", - shm_info->buf_pool_size, srv_buf_pool_size); - return(NULL); - } - if (shm_info->page_size != srv_page_size) { - fprintf(stderr, - "InnoDB: Error: srv_page_size is different (shm=%lu current=%lu).\n", - shm_info->page_size, srv_page_size); - return(NULL); - } - if (!shm_info->reusable) { - fprintf(stderr, - "InnoDB: Warning: The shared memory has unrecoverable contents.\n" - "InnoDB: The shared memory segment is initialized.\n"); - is_new = TRUE; - goto init_again; - } - if (!shm_info->clean) { - fprintf(stderr, - "InnoDB: Warning: The shared memory was not shut down cleanly.\n" - "InnoDB: The shared memory segment is initialized.\n"); - is_new = TRUE; - goto init_again; - } - - ut_a(shm_info->zip_hash_offset == chunk->mem_size - zip_hash_mem_size); - ut_a(shm_info->zip_hash_n == zip_hash_n); - - /* check checksum */ - if (srv_buffer_pool_shm_checksum) { - checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), - chunk->mem_size - sizeof(buf_shm_info_t)); - } else { - checksum = BUF_NO_CHECKSUM_MAGIC; - } - - if (shm_info->checksum != BUF_NO_CHECKSUM_MAGIC - && shm_info->checksum != checksum) { - fprintf(stderr, - "InnoDB: Error: checksum of the shared memory is not match. " - "(stored=%lu calculated=%lu)\n", - shm_info->checksum, checksum); - return(NULL); - } - - /* flag to use the segment. */ - shm_info->clean = FALSE; /* changed to TRUE when free the segment. */ - } - - /* init zip_hash contents */ - if (is_new) { - hash_create_init(zip_hash_tmp, zip_hash_n); - } else { - /* adjust offset is done later */ - hash_create_reuse(zip_hash_tmp); - - srv_buffer_pool_shm_is_reused = TRUE; - } - } else { chunk->mem = os_mem_alloc_large(&chunk->mem_size); if (UNIV_UNLIKELY(chunk->mem == NULL)) { return(NULL); } - } /* Allocate the block descriptors from the start of the memory block. */ - if (srv_buffer_pool_shm_key) { - chunk->blocks = (buf_block_t*)((byte*)chunk->mem + sizeof(buf_shm_info_t)); - } else { chunk->blocks = chunk->mem; - } /* Align a pointer to the first frame. Note that when os_large_page_size is smaller than UNIV_PAGE_SIZE, @@ -1026,13 +1034,8 @@ init_again: it is bigger, we may allocate more blocks than requested. */ frame = ut_align(chunk->mem, UNIV_PAGE_SIZE); - if (srv_buffer_pool_shm_key) { - /* reserve zip_hash space and always -1 for reproductibity */ - chunk->size = (chunk->mem_size - zip_hash_mem_size) / UNIV_PAGE_SIZE - 1; - } else { chunk->size = chunk->mem_size / UNIV_PAGE_SIZE - (frame != chunk->mem); - } /* Subtract the space needed for block descriptors. */ { @@ -1050,98 +1053,6 @@ init_again: chunk->size = size_target; } - if (shm_info && !(shm_info->is_new)) { - /* convert the shared memory segment for reuse */ - ptrdiff_t phys_offset; - ptrdiff_t logi_offset; - ptrdiff_t blocks_offset; - void* previous_frame_address; - - if (chunk->size < shm_info->chunk_backup.size) { - fprintf(stderr, - "InnoDB: Error: The buffer pool became smaller because of allocated address.\n" - "InnoDB: Retrying may avoid this situation.\n"); - shm_info->clean = TRUE; /* release the flag for retrying */ - return(NULL); - } - - chunk->size = shm_info->chunk_backup.size; - phys_offset = frame - ((byte*)chunk->mem + shm_info->frame_offset); - logi_offset = frame - chunk->blocks[0].frame; - previous_frame_address = chunk->blocks[0].frame; - blocks_offset = (byte*)chunk->blocks - (byte*)shm_info->chunk_backup.blocks; - - if (phys_offset || logi_offset || blocks_offset) { - fprintf(stderr, - "InnoDB: Buffer pool in the shared memory segment should be converted.\n" - "InnoDB: Previous frames in address : %p\n" - "InnoDB: Previous frames were located : %p\n" - "InnoDB: Current frames should be located: %p\n" - "InnoDB: Pysical offset : %ld (%#lx)\n" - "InnoDB: Logical offset (frames) : %ld (%#lx)\n" - "InnoDB: Logical offset (blocks) : %ld (%#lx)\n", - (byte*)chunk->mem + shm_info->frame_offset, - chunk->blocks[0].frame, frame, - phys_offset, phys_offset, logi_offset, logi_offset, - blocks_offset, blocks_offset); - } else { - fprintf(stderr, - "InnoDB: Buffer pool in the shared memory segment can be used as it is.\n"); - } - - if (phys_offset) { - fprintf(stderr, - "InnoDB: Aligning physical offset..."); - - memmove(frame, (byte*)chunk->mem + shm_info->frame_offset, - chunk->size * UNIV_PAGE_SIZE); - - fprintf(stderr, - " Done.\n"); - } - - /* buf_block_t */ - block = chunk->blocks; - for (i = chunk->size; i--; ) { - buf_block_reuse(block, logi_offset); - block++; - } - - if (logi_offset || blocks_offset) { - fprintf(stderr, - "InnoDB: Aligning logical offset..."); - - - /* buf_pool_t buf_pool_backup */ - UT_LIST_OFFSET(flush_list, buf_page_t, shm_info->buf_pool_backup.flush_list, - previous_frame_address, logi_offset, blocks_offset); - UT_LIST_OFFSET(free, buf_page_t, shm_info->buf_pool_backup.free, - previous_frame_address, logi_offset, blocks_offset); - UT_LIST_OFFSET(LRU, buf_page_t, shm_info->buf_pool_backup.LRU, - previous_frame_address, logi_offset, blocks_offset); - if (shm_info->buf_pool_backup.LRU_old) - shm_info->buf_pool_backup.LRU_old = - (buf_page_t*)((byte*)(shm_info->buf_pool_backup.LRU_old) - + (((void*)shm_info->buf_pool_backup.LRU_old > previous_frame_address) - ? logi_offset : blocks_offset)); - - UT_LIST_OFFSET(unzip_LRU, buf_block_t, shm_info->buf_pool_backup.unzip_LRU, - previous_frame_address, logi_offset, blocks_offset); - - UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_clean, - previous_frame_address, logi_offset, blocks_offset); - for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { - UT_LIST_OFFSET(zip_list, buf_page_t, shm_info->buf_pool_backup.zip_free[i], - previous_frame_address, logi_offset, blocks_offset); - } - - HASH_OFFSET(zip_hash_tmp, buf_page_t, hash, - previous_frame_address, logi_offset, blocks_offset); - - fprintf(stderr, - " Done.\n"); - } - } else { /* Init block structs and assign frames for them. Then we assign the frames to the first blocks (we already mapped the memory above). */ @@ -1150,27 +1061,27 @@ init_again: for (i = chunk->size; i--; ) { - buf_block_init(block, frame); + buf_block_init(buf_pool, block, frame); #ifdef HAVE_purify /* Wipe contents of frame to eliminate a Purify warning */ memset(block->frame, '\0', UNIV_PAGE_SIZE); #endif /* Add the block to the free list */ - mutex_enter(&free_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); UT_LIST_ADD_LAST(free, buf_pool->free, (&block->page)); + ut_d(block->page.in_free_list = TRUE); - mutex_exit(&free_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); + ut_ad(buf_pool_from_block(block) == buf_pool); block++; frame += UNIV_PAGE_SIZE; } - } - - if (shm_info) { - shm_info->frame_offset = chunk->blocks[0].frame - (byte*)chunk->mem; - } +#ifdef PFS_GROUP_BUFFER_SYNC + pfs_register_buffer_block(chunk); +#endif return(chunk); } @@ -1189,9 +1100,6 @@ buf_chunk_contains_zip( buf_block_t* block; ulint i; - ut_ad(buf_pool); - //ut_ad(buf_pool_mutex_own()); - block = chunk->blocks; for (i = chunk->size; i--; block++) { @@ -1212,12 +1120,17 @@ UNIV_INTERN buf_block_t* buf_pool_contains_zip( /*==================*/ - const void* data) /*!< in: pointer to compressed page */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + const void* data) /*!< in: pointer to compressed page */ { ulint n; buf_chunk_t* chunk = buf_pool->chunks; + ut_ad(buf_pool); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->zip_free_mutex)); for (n = buf_pool->n_chunks; n--; chunk++) { + buf_block_t* block = buf_chunk_contains_zip(chunk, data); if (block) { @@ -1241,9 +1154,6 @@ buf_chunk_not_freed( buf_block_t* block; ulint i; - ut_ad(buf_pool); - //ut_ad(buf_pool_mutex_own()); /*optimistic...*/ - block = chunk->blocks; for (i = chunk->size; i--; block++) { @@ -1298,9 +1208,6 @@ buf_chunk_all_free( const buf_block_t* block; ulint i; - ut_ad(buf_pool); - ut_ad(buf_pool_mutex_own()); /* but we need all mutex here */ - block = chunk->blocks; for (i = chunk->size; i--; block++) { @@ -1320,12 +1227,13 @@ static void buf_chunk_free( /*===========*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ buf_chunk_t* chunk) /*!< out: chunk of buffers */ { buf_block_t* block; const buf_block_t* block_end; - ut_ad(buf_pool_mutex_own()); /* but we need all mutex here */ + //ut_ad(buf_pool_mutex_own(buf_pool)); /* but we need all mutex here */ block_end = chunk->blocks + chunk->size; @@ -1337,10 +1245,10 @@ buf_chunk_free( ut_ad(!block->in_unzip_LRU_list); ut_ad(!block->page.in_flush_list); /* Remove the block from the free list. */ - mutex_enter(&free_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); ut_ad(block->page.in_free_list); UT_LIST_REMOVE(free, buf_pool->free, (&block->page)); - mutex_exit(&free_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); /* Free the latches. */ mutex_free(&block->mutex); @@ -1351,207 +1259,130 @@ buf_chunk_free( UNIV_MEM_UNDESC(block); } - ut_a(!srv_buffer_pool_shm_key); - os_mem_free_large(chunk->mem, chunk->mem_size); } /********************************************************************//** -Creates the buffer pool. -@return own: buf_pool object, NULL if not enough memory or error */ -UNIV_INTERN -buf_pool_t* -buf_pool_init(void) -/*===============*/ +Set buffer pool size variables after resizing it */ +static +void +buf_pool_set_sizes(void) +/*====================*/ { - buf_chunk_t* chunk; - ulint i; + ulint i; + ulint curr_size = 0; - buf_pool = mem_zalloc(sizeof(buf_pool_t)); + buf_pool_mutex_enter_all(); + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + curr_size += buf_pool->curr_pool_size; + } + + srv_buf_pool_curr_size = curr_size; + srv_buf_pool_old_size = srv_buf_pool_size; + + buf_pool_mutex_exit_all(); +} + +/********************************************************************//** +Initialize a buffer pool instance. +@return DB_SUCCESS if all goes well. */ +UNIV_INTERN +ulint +buf_pool_init_instance( +/*===================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint buf_pool_size, /*!< in: size in bytes */ + ulint instance_no) /*!< in: id of the instance */ +{ + ulint i; + buf_chunk_t* chunk; /* 1. Initialize general fields ------------------------------- */ - mutex_create(&buf_pool_mutex, SYNC_BUF_POOL); - mutex_create(&LRU_list_mutex, SYNC_BUF_LRU_LIST); - mutex_create(&flush_list_mutex, SYNC_BUF_FLUSH_LIST); - rw_lock_create(&page_hash_latch, SYNC_BUF_PAGE_HASH); - mutex_create(&free_list_mutex, SYNC_BUF_FREE_LIST); - mutex_create(&zip_free_mutex, SYNC_BUF_ZIP_FREE); - mutex_create(&zip_hash_mutex, SYNC_BUF_ZIP_HASH); + mutex_create(buf_pool_mutex_key, + &buf_pool->mutex, SYNC_BUF_POOL); + mutex_create(buf_pool_LRU_list_mutex_key, + &buf_pool->LRU_list_mutex, SYNC_BUF_LRU_LIST); + rw_lock_create(buf_pool_page_hash_key, + &buf_pool->page_hash_latch, SYNC_BUF_PAGE_HASH); + mutex_create(buf_pool_free_list_mutex_key, + &buf_pool->free_list_mutex, SYNC_BUF_FREE_LIST); + mutex_create(buf_pool_zip_free_mutex_key, + &buf_pool->zip_free_mutex, SYNC_BUF_ZIP_FREE); + mutex_create(buf_pool_zip_hash_mutex_key, + &buf_pool->zip_hash_mutex, SYNC_BUF_ZIP_HASH); + mutex_create(buf_pool_zip_mutex_key, + &buf_pool->zip_mutex, SYNC_BUF_BLOCK); - mutex_create(&buf_pool_zip_mutex, SYNC_BUF_BLOCK); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); + buf_pool_mutex_enter(buf_pool); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); - buf_pool_mutex_enter(); + if (buf_pool_size > 0) { + buf_pool->n_chunks = 1; + buf_pool->chunks = chunk = mem_zalloc(sizeof *chunk); - buf_pool->n_chunks = 1; - buf_pool->chunks = chunk = mem_alloc(sizeof *chunk); + UT_LIST_INIT(buf_pool->free); - UT_LIST_INIT(buf_pool->free); + if (!buf_chunk_init(buf_pool, chunk, buf_pool_size)) { + mem_free(chunk); + mem_free(buf_pool); - if (!buf_chunk_init(chunk, srv_buf_pool_size)) { - mem_free(chunk); - mem_free(buf_pool); - buf_pool = NULL; - return(NULL); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + buf_pool_mutex_exit(buf_pool); + + return(DB_ERROR); + } + + buf_pool->instance_no = instance_no; + buf_pool->old_pool_size = buf_pool_size; + buf_pool->curr_size = chunk->size; + buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE; + + buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); + buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size); + + buf_pool->last_printout_time = ut_time(); } - - srv_buf_pool_old_size = srv_buf_pool_size; - buf_pool->curr_size = chunk->size; - srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; - - buf_pool->page_hash = hash_create(2 * buf_pool->curr_size); - /* zip_hash is allocated to shm when srv_buffer_pool_shm_key is enabled */ - if (!srv_buffer_pool_shm_key) { - buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size); - } - - buf_pool->last_printout_time = time(NULL); - /* 2. Initialize flushing fields -------------------------------- */ + mutex_create(flush_list_mutex_key, &buf_pool->flush_list_mutex, + SYNC_BUF_FLUSH_LIST); + for (i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; i++) { buf_pool->no_flush[i] = os_event_create(NULL); } /* 3. Initialize LRU fields --------------------------- */ + /* All fields are initialized by mem_zalloc(). */ - if (srv_buffer_pool_shm_key) { - buf_shm_info_t* shm_info; + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + buf_pool_mutex_exit(buf_pool); - ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); - shm_info = chunk->mem; - - buf_pool->zip_hash = (hash_table_t*)((byte*)chunk->mem + shm_info->zip_hash_offset); - - if(shm_info->is_new) { - shm_info->is_new = FALSE; /* initialization was finished */ - } else { - buf_block_t* block = chunk->blocks; - buf_page_t* b; - - /* shm_info->buf_pool_backup should be converted */ - /* at buf_chunk_init(). So copy simply. */ - buf_pool->flush_list = shm_info->buf_pool_backup.flush_list; - buf_pool->freed_page_clock = shm_info->buf_pool_backup.freed_page_clock; - buf_pool->free = shm_info->buf_pool_backup.free; - buf_pool->LRU = shm_info->buf_pool_backup.LRU; - buf_pool->LRU_old = shm_info->buf_pool_backup.LRU_old; - buf_pool->LRU_old_len = shm_info->buf_pool_backup.LRU_old_len; - buf_pool->unzip_LRU = shm_info->buf_pool_backup.unzip_LRU; - buf_pool->zip_clean = shm_info->buf_pool_backup.zip_clean; - for (i = 0; i < BUF_BUDDY_SIZES_MAX; i++) { - buf_pool->zip_free[i] = shm_info->buf_pool_backup.zip_free[i]; - } - - for (i = 0; i < chunk->size; i++, block++) { - if (buf_block_get_state(block) - == BUF_BLOCK_FILE_PAGE) { - ut_d(block->page.in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold( - block->page.space, - block->page.offset), - &block->page); - } - } - - for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; - b = UT_LIST_GET_NEXT(zip_list, b)) { - ut_ad(!b->in_flush_list); - ut_ad(b->in_LRU_list); - - ut_d(b->in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(b->space, b->offset), b); - } - - for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; - b = UT_LIST_GET_NEXT(flush_list, b)) { - ut_ad(b->in_flush_list); - ut_ad(b->in_LRU_list); - - switch (buf_page_get_state(b)) { - case BUF_BLOCK_ZIP_DIRTY: - ut_d(b->in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(b->space, - b->offset), b); - break; - case BUF_BLOCK_FILE_PAGE: - /* uncompressed page */ - break; - case BUF_BLOCK_ZIP_FREE: - case BUF_BLOCK_ZIP_PAGE: - case BUF_BLOCK_NOT_USED: - case BUF_BLOCK_READY_FOR_USE: - case BUF_BLOCK_MEMORY: - case BUF_BLOCK_REMOVE_HASH: - ut_error; - break; - } - } - - - } - } - - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); - buf_pool_mutex_exit(); - - btr_search_sys_create(buf_pool->curr_size - * UNIV_PAGE_SIZE / sizeof(void*) / 64); - - /* 4. Initialize the buddy allocator fields */ - /* All fields are initialized by mem_zalloc(). */ - - return(buf_pool); + return(DB_SUCCESS); } /********************************************************************//** -Frees the buffer pool at shutdown. This must not be invoked before -freeing all mutexes. */ -UNIV_INTERN +free one buffer pool instance */ +static void -buf_pool_free(void) -/*===============*/ +buf_pool_free_instance( +/*===================*/ + buf_pool_t* buf_pool) /* in,own: buffer pool instance + to free */ { buf_chunk_t* chunk; buf_chunk_t* chunks; - if (srv_buffer_pool_shm_key) { - buf_shm_info_t* shm_info; - - ut_a(buf_pool->n_chunks == 1); - - chunk = buf_pool->chunks; - shm_info = chunk->mem; - ut_a((byte*)chunk->blocks == (byte*)chunk->mem + sizeof(buf_shm_info_t)); - - /* validation the shared memory segment doesn't have unrecoverable contents. */ - /* Currently, validation became not needed */ - shm_info->reusable = TRUE; - - memcpy(&(shm_info->buf_pool_backup), buf_pool, sizeof(buf_pool_t)); - memcpy(&(shm_info->chunk_backup), chunk, sizeof(buf_chunk_t)); - - if (srv_fast_shutdown < 2) { - if (srv_buffer_pool_shm_checksum) { - shm_info->checksum = ut_fold_binary_32((byte*)chunk->mem + sizeof(buf_shm_info_t), - chunk->mem_size - sizeof(buf_shm_info_t)); - } else { - shm_info->checksum = BUF_NO_CHECKSUM_MAGIC; - } - shm_info->clean = TRUE; - } - - os_shm_free(chunk->mem, chunk->mem_size); - } else { chunks = buf_pool->chunks; chunk = chunks + buf_pool->n_chunks; @@ -1560,15 +1391,143 @@ buf_pool_free(void) would fail at shutdown. */ os_mem_free_large(chunk->mem, chunk->mem_size); } - } mem_free(buf_pool->chunks); hash_table_free(buf_pool->page_hash); - if (!srv_buffer_pool_shm_key) { hash_table_free(buf_pool->zip_hash); +} + +/********************************************************************//** +Creates the buffer pool. +@return DB_SUCCESS if success, DB_ERROR if not enough memory or error */ +UNIV_INTERN +ulint +buf_pool_init( +/*==========*/ + ulint total_size, /*!< in: size of the total pool in bytes */ + ulint n_instances) /*!< in: number of instances */ +{ + ulint i; + const ulint size = total_size / n_instances; + + ut_ad(n_instances > 0); + ut_ad(n_instances <= MAX_BUFFER_POOLS); + ut_ad(n_instances == srv_buf_pool_instances); + + /* We create an extra buffer pool instance, this instance is used + for flushing the flush lists, to keep track of n_flush for all + the buffer pools and also used as a waiting object during flushing. */ + buf_pool_ptr = mem_zalloc(n_instances * sizeof *buf_pool_ptr); + + for (i = 0; i < n_instances; i++) { + buf_pool_t* ptr = &buf_pool_ptr[i]; + + if (buf_pool_init_instance(ptr, size, i) != DB_SUCCESS) { + + /* Free all the instances created so far. */ + buf_pool_free(i); + + return(DB_ERROR); + } + } + + buf_pool_set_sizes(); + buf_LRU_old_ratio_update(100 * 3/ 8, FALSE); + + btr_search_sys_create(buf_pool_get_curr_size() / sizeof(void*) / 64); + + return(DB_SUCCESS); +} + +/********************************************************************//** +Frees the buffer pool at shutdown. This must not be invoked before +freeing all mutexes. */ +UNIV_INTERN +void +buf_pool_free( +/*==========*/ + ulint n_instances) /*!< in: numbere of instances to free */ +{ + ulint i; + + for (i = 0; i < n_instances; i++) { + buf_pool_free_instance(buf_pool_from_array(i)); + } + + mem_free(buf_pool_ptr); + buf_pool_ptr = NULL; +} + +/********************************************************************//** +Drops adaptive hash index for a buffer pool instance. */ +static +void +buf_pool_drop_hash_index_instance( +/*==============================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ibool* released_search_latch) /*!< out: flag for signalling + whether the search latch was + released */ +{ + buf_chunk_t* chunks = buf_pool->chunks; + buf_chunk_t* chunk = chunks + buf_pool->n_chunks; + + while (--chunk >= chunks) { + ulint i; + buf_block_t* block = chunk->blocks; + + for (i = chunk->size; i--; block++) { + /* block->is_hashed cannot be modified + when we have an x-latch on btr_search_latch; + see the comment in buf0buf.h */ + + if (!block->is_hashed) { + continue; + } + + /* To follow the latching order, we + have to release btr_search_latch + before acquiring block->latch. */ + btr_search_x_unlock_all(); + /* When we release the search latch, + we must rescan all blocks, because + some may become hashed again. */ + *released_search_latch = TRUE; + + rw_lock_x_lock(&block->lock); + + /* This should be guaranteed by the + callers, which will be holding + btr_search_enabled_mutex. */ + ut_ad(!btr_search_enabled); + + /* Because we did not buffer-fix the + block by calling buf_block_get_gen(), + it is possible that the block has been + allocated for some other use after + btr_search_latch was released above. + We do not care which file page the + block is mapped to. All we want to do + is to drop any hash entries referring + to the page. */ + + /* It is possible that + block->page.state != BUF_FILE_PAGE. + Even that does not matter, because + btr_search_drop_page_hash_index() will + check block->is_hashed before doing + anything. block->is_hashed can only + be set on uncompressed file pages. */ + + btr_search_drop_page_hash_index(block, NULL); + + rw_lock_x_unlock(&block->lock); + + btr_search_x_lock_all(); + + ut_ad(!btr_search_enabled); + } } - mem_free(buf_pool); - buf_pool = NULL; } /********************************************************************//** @@ -1583,74 +1542,28 @@ buf_pool_drop_hash_index(void) ibool released_search_latch; #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + ulint j; + + for (j = 0; j < btr_search_index_num; j++) { + ut_ad(rw_lock_own(btr_search_latch_part[j], RW_LOCK_EX)); + } #endif /* UNIV_SYNC_DEBUG */ ut_ad(!btr_search_enabled); do { - buf_chunk_t* chunks = buf_pool->chunks; - buf_chunk_t* chunk = chunks + buf_pool->n_chunks; + ulint i; released_search_latch = FALSE; - while (--chunk >= chunks) { - buf_block_t* block = chunk->blocks; - ulint i = chunk->size; + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; - for (; i--; block++) { - /* block->is_hashed cannot be modified - when we have an x-latch on btr_search_latch; - see the comment in buf0buf.h */ + buf_pool = buf_pool_from_array(i); - if (buf_block_get_state(block) - != BUF_BLOCK_FILE_PAGE - || !block->is_hashed) { - continue; - } - - /* To follow the latching order, we - have to release btr_search_latch - before acquiring block->latch. */ - rw_lock_x_unlock(&btr_search_latch); - /* When we release the search latch, - we must rescan all blocks, because - some may become hashed again. */ - released_search_latch = TRUE; - - rw_lock_x_lock(&block->lock); - - /* This should be guaranteed by the - callers, which will be holding - btr_search_enabled_mutex. */ - ut_ad(!btr_search_enabled); - - /* Because we did not buffer-fix the - block by calling buf_block_get_gen(), - it is possible that the block has been - allocated for some other use after - btr_search_latch was released above. - We do not care which file page the - block is mapped to. All we want to do - is to drop any hash entries referring - to the page. */ - - /* It is possible that - block->page.state != BUF_FILE_PAGE. - Even that does not matter, because - btr_search_drop_page_hash_index() will - check block->is_hashed before doing - anything. block->is_hashed can only - be set on uncompressed file pages. */ - - btr_search_drop_page_hash_index(block); - - rw_lock_x_unlock(&block->lock); - - rw_lock_x_lock(&btr_search_latch); - - ut_ad(!btr_search_enabled); - } + buf_pool_drop_hash_index_instance( + buf_pool, &released_search_latch); } + } while (released_search_latch); } @@ -1669,11 +1582,12 @@ buf_relocate( { buf_page_t* b; ulint fold; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_EX)); #endif ut_ad(mutex_own(buf_page_get_mutex(bpage))); ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE); @@ -1681,7 +1595,9 @@ buf_relocate( ut_ad(bpage->in_LRU_list); ut_ad(!bpage->in_zip_hash); ut_ad(bpage->in_page_hash); - ut_ad(bpage == buf_page_hash_get(bpage->space, bpage->offset)); + ut_ad(bpage == buf_page_hash_get(buf_pool, + bpage->space, bpage->offset)); + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); #ifdef UNIV_DEBUG switch (buf_page_get_state(bpage)) { case BUF_BLOCK_ZIP_FREE: @@ -1740,12 +1656,13 @@ buf_relocate( } /********************************************************************//** -Shrinks the buffer pool. */ +Shrinks a buffer pool instance. */ static void -buf_pool_shrink( -/*============*/ - ulint chunk_size) /*!< in: number of pages to remove */ +buf_pool_shrink_instance( +/*=====================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint chunk_size) /*!< in: number of pages to remove */ { buf_chunk_t* chunks; buf_chunk_t* chunk; @@ -1754,17 +1671,12 @@ buf_pool_shrink( buf_chunk_t* max_chunk; buf_chunk_t* max_free_chunk; - ut_ad(!buf_pool_mutex_own()); + ut_ad(!buf_pool_mutex_own(buf_pool)); try_again: btr_search_disable(); /* Empty the adaptive hash index again */ - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - - if (srv_buffer_pool_shm_key) { - /* Cannot support shrink */ - goto func_done; - } + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); shrink_again: if (buf_pool->n_chunks <= 1) { @@ -1827,7 +1739,7 @@ shrink_again: mutex_enter(&block->mutex); /* The following calls will temporarily - release block->mutex and buf_pool_mutex. + release block->mutex and buf_pool->mutex. Therefore, we have to always retry, even if !dirty && !nonfree. */ @@ -1835,7 +1747,7 @@ shrink_again: buf_LRU_make_block_old(&block->page); dirty++; - } else if (buf_LRU_free_block(&block->page, TRUE, FALSE) + } else if (buf_LRU_free_block(&block->page, TRUE, TRUE) != BUF_LRU_FREED) { nonfree++; } @@ -1843,8 +1755,8 @@ shrink_again: mutex_exit(&block->mutex); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); /* Request for a flush of the chunk if it helps. Do not flush if there are non-free blocks, since @@ -1853,10 +1765,10 @@ shrink_again: /* Avoid busy-waiting. */ os_thread_sleep(100000); } else if (dirty - && buf_flush_batch(BUF_FLUSH_LRU, dirty, 0) - == ULINT_UNDEFINED) { + && buf_flush_LRU(buf_pool, dirty) + == ULINT_UNDEFINED) { - buf_flush_wait_batch_end(BUF_FLUSH_LRU); + buf_flush_wait_batch_end(buf_pool, BUF_FLUSH_LRU); } goto try_again; @@ -1865,7 +1777,7 @@ shrink_again: max_size = max_free_size; max_chunk = max_free_chunk; - srv_buf_pool_old_size = srv_buf_pool_size; + buf_pool->old_pool_size = buf_pool->curr_pool_size; /* Rewrite buf_pool->chunks. Copy everything but max_chunk. */ chunks = mem_alloc((buf_pool->n_chunks - 1) * sizeof *chunks); @@ -1877,9 +1789,9 @@ shrink_again: - (max_chunk + 1)); ut_a(buf_pool->curr_size > max_chunk->size); buf_pool->curr_size -= max_chunk->size; - srv_buf_pool_curr_size = buf_pool->curr_size * UNIV_PAGE_SIZE; + buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE; chunk_size -= max_chunk->size; - buf_chunk_free(max_chunk); + buf_chunk_free(buf_pool, max_chunk); mem_free(buf_pool->chunks); buf_pool->chunks = chunks; buf_pool->n_chunks--; @@ -1889,34 +1801,56 @@ shrink_again: goto shrink_again; } + goto func_exit; func_done: - srv_buf_pool_old_size = srv_buf_pool_size; + buf_pool->old_pool_size = buf_pool->curr_pool_size; func_exit: - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); btr_search_enable(); } /********************************************************************//** -Rebuild buf_pool->page_hash. */ +Shrinks the buffer pool. */ static void -buf_pool_page_hash_rebuild(void) -/*============================*/ +buf_pool_shrink( +/*============*/ + ulint chunk_size) /*!< in: number of pages to remove */ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + ulint instance_chunk_size; + + instance_chunk_size = chunk_size / srv_buf_pool_instances; + buf_pool = buf_pool_from_array(i); + buf_pool_shrink_instance(buf_pool, instance_chunk_size); + } + + buf_pool_set_sizes(); +} + +/********************************************************************//** +Rebuild buf_pool->page_hash for a buffer pool instance. */ +static +void +buf_pool_page_hash_rebuild_instance( +/*================================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { ulint i; - ulint n_chunks; - buf_chunk_t* chunk; - hash_table_t* page_hash; - hash_table_t* zip_hash; buf_page_t* b; + buf_chunk_t* chunk; + ulint n_chunks; + hash_table_t* zip_hash; + hash_table_t* page_hash; - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); - mutex_enter(&flush_list_mutex); - + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); /* Free, create, and populate the hash table. */ hash_table_free(buf_pool->page_hash); @@ -1957,6 +1891,7 @@ buf_pool_page_hash_rebuild(void) All such blocks are either in buf_pool->zip_clean or in buf_pool->flush_list. */ + mutex_enter(&buf_pool->zip_mutex); for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b; b = UT_LIST_GET_NEXT(zip_list, b)) { ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE); @@ -1968,7 +1903,9 @@ buf_pool_page_hash_rebuild(void) HASH_INSERT(buf_page_t, hash, page_hash, buf_page_address_fold(b->space, b->offset), b); } + mutex_exit(&buf_pool->zip_mutex); + buf_flush_list_mutex_enter(buf_pool); for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; b = UT_LIST_GET_NEXT(flush_list, b)) { ut_ad(b->in_flush_list); @@ -1996,10 +1933,201 @@ buf_pool_page_hash_rebuild(void) } } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); - mutex_exit(&flush_list_mutex); + buf_flush_list_mutex_exit(buf_pool); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); +} + +/******************************************************************** +Determine if a block is a sentinel for a buffer pool watch. +@return TRUE if a sentinel for a buffer pool watch, FALSE if not */ +UNIV_INTERN +ibool +buf_pool_watch_is_sentinel( +/*=======================*/ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + const buf_page_t* bpage) /*!< in: block */ +{ + ut_ad(buf_page_in_file(bpage)); + + if (bpage < &buf_pool->watch[0] + || bpage >= &buf_pool->watch[BUF_POOL_WATCH_SIZE]) { + + ut_ad(buf_page_get_state(bpage) != BUF_BLOCK_ZIP_PAGE + || bpage->zip.data != NULL); + + return(FALSE); + } + + ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_PAGE); + ut_ad(!bpage->in_zip_hash); + ut_ad(bpage->in_page_hash); + ut_ad(bpage->zip.data == NULL); + ut_ad(bpage->buf_fix_count > 0); + return(TRUE); +} + +/****************************************************************//** +Add watch for the given page to be read in. Caller must have the buffer pool +mutex reserved. +@return NULL if watch set, block if the page is in the buffer pool */ +UNIV_INTERN +buf_page_t* +buf_pool_watch_set( +/*===============*/ + ulint space, /*!< in: space id */ + ulint offset, /*!< in: page number */ + ulint fold) /*!< in: buf_page_address_fold(space, offset) */ +{ + buf_page_t* bpage; + ulint i; + buf_pool_t* buf_pool = buf_pool_get(space, offset); + mutex_t* block_mutex; + + //ut_ad(buf_pool_mutex_own(buf_pool)); + + rw_lock_x_lock(&buf_pool->page_hash_latch); + bpage = buf_page_hash_get_low(buf_pool, space, offset, fold); + if (bpage) { + block_mutex = buf_page_get_mutex_enter(bpage); + ut_a(block_mutex); + } + + if (UNIV_LIKELY_NULL(bpage)) { + if (!buf_pool_watch_is_sentinel(buf_pool, bpage)) { + /* The page was loaded meanwhile. */ + rw_lock_x_unlock(&buf_pool->page_hash_latch); + return(bpage); + } + /* Add to an existing watch. */ + bpage->buf_fix_count++; + rw_lock_x_unlock(&buf_pool->page_hash_latch); + mutex_exit(block_mutex); + return(NULL); + } + + /* buf_pool->watch is protected by zip_mutex for now */ + mutex_enter(&buf_pool->zip_mutex); + for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) { + bpage = &buf_pool->watch[i]; + + ut_ad(bpage->access_time == 0); + ut_ad(bpage->newest_modification == 0); + ut_ad(bpage->oldest_modification == 0); + ut_ad(bpage->zip.data == NULL); + ut_ad(!bpage->in_zip_hash); + + switch (bpage->state) { + case BUF_BLOCK_POOL_WATCH: + ut_ad(!bpage->in_page_hash); + ut_ad(bpage->buf_fix_count == 0); + + /* bpage is pointing to buf_pool->watch[], + which is protected by buf_pool->mutex. + Normally, buf_page_t objects are protected by + buf_block_t::mutex or buf_pool->zip_mutex or both. */ + + bpage->state = BUF_BLOCK_ZIP_PAGE; + bpage->space = space; + bpage->offset = offset; + bpage->buf_fix_count = 1; + bpage->buf_pool_index = buf_pool_index(buf_pool); + ut_d(bpage->in_page_hash = TRUE); + HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, + fold, bpage); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + mutex_exit(&buf_pool->zip_mutex); + return(NULL); + case BUF_BLOCK_ZIP_PAGE: + ut_ad(bpage->in_page_hash); + ut_ad(bpage->buf_fix_count > 0); + break; + default: + ut_error; + } + } + + /* Allocation failed. Either the maximum number of purge + threads should never exceed BUF_POOL_WATCH_SIZE, or this code + should be modified to return a special non-NULL value and the + caller should purge the record directly. */ + ut_error; + + /* Fix compiler warning */ + rw_lock_x_unlock(&buf_pool->page_hash_latch); + mutex_exit(&buf_pool->zip_mutex); + return(NULL); +} + +/********************************************************************//** +Rebuild buf_pool->page_hash. */ +static +void +buf_pool_page_hash_rebuild(void) +/*============================*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_page_hash_rebuild_instance(buf_pool_from_array(i)); + } +} + +/********************************************************************//** +Increase the buffer pool size of one buffer pool instance. */ +static +void +buf_pool_increase_instance( +/*=======================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instane */ + ulint change_size) /*!< in: new size of the pool */ +{ + buf_chunk_t* chunks; + buf_chunk_t* chunk; + + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); + buf_pool_mutex_enter(buf_pool); + chunks = mem_alloc((buf_pool->n_chunks + 1) * sizeof *chunks); + + memcpy(chunks, buf_pool->chunks, buf_pool->n_chunks * sizeof *chunks); + + chunk = &chunks[buf_pool->n_chunks]; + + if (!buf_chunk_init(buf_pool, chunk, change_size)) { + mem_free(chunks); + } else { + buf_pool->old_pool_size = buf_pool->curr_pool_size; + buf_pool->curr_size += chunk->size; + buf_pool->curr_pool_size = buf_pool->curr_size * UNIV_PAGE_SIZE; + mem_free(buf_pool->chunks); + buf_pool->chunks = chunks; + buf_pool->n_chunks++; + } + + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + buf_pool_mutex_exit(buf_pool); +} + +/********************************************************************//** +Increase the buffer pool size. */ +static +void +buf_pool_increase( +/*==============*/ + ulint change_size) +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_increase_instance( + buf_pool_from_array(i), + change_size / srv_buf_pool_instances); + } + + buf_pool_set_sizes(); } /********************************************************************//** @@ -2009,63 +2137,146 @@ void buf_pool_resize(void) /*=================*/ { - if (srv_buffer_pool_shm_key) { - /* Cannot support resize */ + ulint change_size; + ulint min_change_size = 1048576 * srv_buf_pool_instances; + + buf_pool_mutex_enter_all(); + + if (srv_buf_pool_old_size == srv_buf_pool_size) { + + buf_pool_mutex_exit_all(); + + return; + + } else if (srv_buf_pool_curr_size + min_change_size + > srv_buf_pool_size) { + + change_size = (srv_buf_pool_curr_size - srv_buf_pool_size) + / UNIV_PAGE_SIZE; + + buf_pool_mutex_exit_all(); + + /* Disable adaptive hash indexes and empty the index + in order to free up memory in the buffer pool chunks. */ + buf_pool_shrink(change_size); + + } else if (srv_buf_pool_curr_size + min_change_size + < srv_buf_pool_size) { + + /* Enlarge the buffer pool by at least one megabyte */ + + change_size = srv_buf_pool_size - srv_buf_pool_curr_size; + + buf_pool_mutex_exit_all(); + + buf_pool_increase(change_size); + } else { + srv_buf_pool_size = srv_buf_pool_old_size; + + buf_pool_mutex_exit_all(); + return; } - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + buf_pool_page_hash_rebuild(); +} - if (srv_buf_pool_old_size == srv_buf_pool_size) { +/****************************************************************//** +Remove the sentinel block for the watch before replacing it with a real block. +buf_page_watch_clear() or buf_page_watch_occurred() will notice that +the block has been replaced with the real block. +@return reference count, to be added to the replacement block */ +static +void +buf_pool_watch_remove( +/*==================*/ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + ulint fold, /*!< in: buf_page_address_fold( + space, offset) */ + buf_page_t* watch) /*!< in/out: sentinel for watch */ +{ + //ut_ad(buf_pool_mutex_own(buf_pool)); +#ifdef UNIV_SYNC_DEBUG + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_EX)); +#endif + ut_ad(mutex_own(&buf_pool->zip_mutex)); /* for now */ - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - return; - } + HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, watch); + ut_d(watch->in_page_hash = FALSE); + watch->buf_fix_count = 0; + watch->state = BUF_BLOCK_POOL_WATCH; +} - if (srv_buf_pool_curr_size + 1048576 > srv_buf_pool_size) { +/****************************************************************//** +Stop watching if the page has been read in. +buf_pool_watch_set(space,offset) must have returned NULL before. */ +UNIV_INTERN +void +buf_pool_watch_unset( +/*=================*/ + ulint space, /*!< in: space id */ + ulint offset) /*!< in: page number */ +{ + buf_page_t* bpage; + buf_pool_t* buf_pool = buf_pool_get(space, offset); + ulint fold = buf_page_address_fold(space, offset); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + rw_lock_x_lock(&buf_pool->page_hash_latch); + bpage = buf_page_hash_get_low(buf_pool, space, offset, fold); + /* The page must exist because buf_pool_watch_set() + increments buf_fix_count. */ + ut_a(bpage); - /* Disable adaptive hash indexes and empty the index - in order to free up memory in the buffer pool chunks. */ - buf_pool_shrink((srv_buf_pool_curr_size - srv_buf_pool_size) - / UNIV_PAGE_SIZE); - } else if (srv_buf_pool_curr_size + 1048576 < srv_buf_pool_size) { + if (UNIV_UNLIKELY(!buf_pool_watch_is_sentinel(buf_pool, bpage))) { + mutex_t* mutex = buf_page_get_mutex_enter(bpage); - /* Enlarge the buffer pool by at least one megabyte */ + ut_a(bpage->buf_fix_count > 0); + bpage->buf_fix_count--; + mutex_exit(mutex); + } else { + mutex_enter(&buf_pool->zip_mutex); + ut_a(bpage->buf_fix_count > 0); - ulint mem_size - = srv_buf_pool_size - srv_buf_pool_curr_size; - buf_chunk_t* chunks; - buf_chunk_t* chunk; - - chunks = mem_alloc((buf_pool->n_chunks + 1) * sizeof *chunks); - - memcpy(chunks, buf_pool->chunks, buf_pool->n_chunks - * sizeof *chunks); - - chunk = &chunks[buf_pool->n_chunks]; - - if (!buf_chunk_init(chunk, mem_size)) { - mem_free(chunks); - } else { - buf_pool->curr_size += chunk->size; - srv_buf_pool_curr_size = buf_pool->curr_size - * UNIV_PAGE_SIZE; - mem_free(buf_pool->chunks); - buf_pool->chunks = chunks; - buf_pool->n_chunks++; + if (UNIV_LIKELY(!--bpage->buf_fix_count)) { + buf_pool_watch_remove(buf_pool, fold, bpage); } - - srv_buf_pool_old_size = srv_buf_pool_size; - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->zip_mutex); } - buf_pool_page_hash_rebuild(); + //buf_pool_mutex_exit(buf_pool); + rw_lock_x_unlock(&buf_pool->page_hash_latch); +} + +/****************************************************************//** +Check if the page has been read in. +This may only be called after buf_pool_watch_set(space,offset) +has returned NULL and before invoking buf_pool_watch_unset(space,offset). +@return FALSE if the given page was not read in, TRUE if it was */ +UNIV_INTERN +ibool +buf_pool_watch_occurred( +/*====================*/ + ulint space, /*!< in: space id */ + ulint offset) /*!< in: page number */ +{ + ibool ret; + buf_page_t* bpage; + buf_pool_t* buf_pool = buf_pool_get(space, offset); + ulint fold = buf_page_address_fold(space, offset); + + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); + + bpage = buf_page_hash_get_low(buf_pool, space, offset, fold); + /* The page must exist because buf_pool_watch_set() + increments buf_fix_count. */ + ut_a(bpage); + ret = !buf_pool_watch_is_sentinel(buf_pool, bpage); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); + + return(ret); } /********************************************************************//** @@ -2078,15 +2289,17 @@ buf_page_make_young( /*================*/ buf_page_t* bpage) /*!< in: buffer block of a file page */ { - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); ut_a(buf_page_in_file(bpage)); buf_LRU_make_block_young(bpage); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); } /********************************************************************//** @@ -2104,24 +2317,26 @@ buf_page_set_accessed_make_young( read under mutex protection, or 0 if unknown */ { - ut_ad(!buf_pool_mutex_own()); + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + + ut_ad(!buf_pool_mutex_own(buf_pool)); ut_a(buf_page_in_file(bpage)); if (buf_page_peek_if_too_old(bpage)) { - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); buf_LRU_make_block_young(bpage); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); } else if (!access_time) { ulint time_ms = ut_time_ms(); mutex_t* block_mutex = buf_page_get_mutex_enter(bpage); - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (block_mutex) { buf_page_set_accessed(bpage, time_ms); mutex_exit(block_mutex); } - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); } } @@ -2136,18 +2351,20 @@ buf_reset_check_index_page_at_flush( ulint offset) /*!< in: page number */ { buf_block_t* block; + buf_pool_t* buf_pool = buf_pool_get(space, offset); - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); - block = (buf_block_t*) buf_page_hash_get(space, offset); + block = (buf_block_t*) buf_page_hash_get(buf_pool, space, offset); if (block && buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE) { + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, &block->page)); block->check_index_page_at_flush = FALSE; } - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); } /********************************************************************//** @@ -2164,20 +2381,22 @@ buf_page_peek_if_search_hashed( { buf_block_t* block; ibool is_hashed; + buf_pool_t* buf_pool = buf_pool_get(space, offset); - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); - block = (buf_block_t*) buf_page_hash_get(space, offset); + block = (buf_block_t*) buf_page_hash_get(buf_pool, space, offset); if (!block || buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE) { is_hashed = FALSE; } else { + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, &block->page)); is_hashed = block->is_hashed; } - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(is_hashed); } @@ -2197,20 +2416,22 @@ buf_page_set_file_page_was_freed( ulint offset) /*!< in: page number */ { buf_page_t* bpage; + buf_pool_t* buf_pool = buf_pool_get(space, offset); - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); - bpage = buf_page_hash_get(space, offset); + bpage = buf_page_hash_get(buf_pool, space, offset); if (bpage) { + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); /* bpage->file_page_was_freed can already hold when this code is invoked from dict_drop_index_tree() */ bpage->file_page_was_freed = TRUE; } - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(bpage); } @@ -2229,18 +2450,20 @@ buf_page_reset_file_page_was_freed( ulint offset) /*!< in: page number */ { buf_page_t* bpage; + buf_pool_t* buf_pool = buf_pool_get(space, offset); - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); - bpage = buf_page_hash_get(space, offset); + bpage = buf_page_hash_get(buf_pool, space, offset); if (bpage) { + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); bpage->file_page_was_freed = FALSE; } - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(bpage); } @@ -2272,28 +2495,27 @@ buf_page_get_zip( ulint ms; ib_uint64_t start_time; ib_uint64_t finish_time; + buf_pool_t* buf_pool = buf_pool_get(space, offset); -#ifndef UNIV_LOG_DEBUG - ut_ad(!ibuf_inside()); -#endif if (innobase_get_slow_log()) { trx = innobase_get_trx(); } buf_pool->stat.n_page_gets++; for (;;) { - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); lookup: - rw_lock_s_lock(&page_hash_latch); - bpage = buf_page_hash_get(space, offset); + rw_lock_s_lock(&buf_pool->page_hash_latch); + bpage = buf_page_hash_get(buf_pool, space, offset); if (bpage) { + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); break; } /* Page not in buf_pool: needs to be read from file */ - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); buf_read_page(space, zip_size, offset, trx); @@ -2305,22 +2527,23 @@ lookup: if (UNIV_UNLIKELY(!bpage->zip.data)) { /* There is no compressed page. */ err_exit: - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(NULL); } - if (srv_pass_corrupt_table) { + if (srv_pass_corrupt_table <= 1) { if (bpage->is_corrupt) { - rw_lock_s_unlock(&page_hash_latch); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(NULL); } } - ut_a(!(bpage->is_corrupt)); block_mutex = buf_page_get_mutex_enter(bpage); - rw_lock_s_unlock(&page_hash_latch); + rw_lock_s_unlock(&buf_pool->page_hash_latch); + + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage)); switch (buf_page_get_state(bpage)) { case BUF_BLOCK_NOT_USED: @@ -2333,19 +2556,38 @@ err_exit: break; case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: - ut_a(block_mutex == &buf_pool_zip_mutex); + ut_a(block_mutex == &buf_pool->zip_mutex); bpage->buf_fix_count++; goto got_block; case BUF_BLOCK_FILE_PAGE: ut_a(block_mutex == &((buf_block_t*) bpage)->mutex); - /* Discard the uncompressed page frame if possible. */ - if (buf_LRU_free_block(bpage, FALSE, FALSE) == BUF_LRU_FREED) { + /* release mutex to obey to latch-order */ + mutex_exit(block_mutex); + /* get LRU_list_mutex for buf_LRU_free_block() */ + mutex_enter(&buf_pool->LRU_list_mutex); + mutex_enter(block_mutex); + + if (UNIV_UNLIKELY(bpage->space != space + || bpage->offset != offset + || !bpage->in_LRU_list + || !bpage->zip.data)) { + /* someone should interrupt, retry */ + mutex_exit(&buf_pool->LRU_list_mutex); mutex_exit(block_mutex); goto lookup; } + /* Discard the uncompressed page frame if possible. */ + if (buf_LRU_free_block(bpage, FALSE, TRUE) == BUF_LRU_FREED) { + mutex_exit(&buf_pool->LRU_list_mutex); + mutex_exit(block_mutex); + goto lookup; + } + + mutex_exit(&buf_pool->LRU_list_mutex); + buf_block_buf_fix_inc((buf_block_t*) bpage, __FILE__, __LINE__); goto got_block; @@ -2358,7 +2600,7 @@ got_block: must_read = buf_page_get_io_fix(bpage) == BUF_IO_READ; access_time = buf_page_is_accessed(bpage); - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); @@ -2424,6 +2666,7 @@ buf_block_init_low( { block->check_index_page_at_flush = FALSE; block->index = NULL; + block->btr_search_latch = NULL; block->n_hash_helps = 0; block->is_hashed = FALSE; @@ -2501,13 +2744,16 @@ buf_zip_decompress( #ifndef UNIV_HOTBACKUP /*******************************************************************//** -Gets the block to whose frame the pointer is pointing to. -@return pointer to block, never NULL */ +Gets the block to whose frame the pointer is pointing to if found +in this buffer pool instance. +@return pointer to block */ UNIV_INTERN buf_block_t* -buf_block_align( -/*============*/ - const byte* ptr) /*!< in: pointer to a frame */ +buf_block_align_instance( +/*=====================*/ + buf_pool_t* buf_pool, /*!< in: buffer in which the block + resides */ + const byte* ptr) /*!< in: pointer to a frame */ { buf_chunk_t* chunk; ulint i; @@ -2515,16 +2761,19 @@ buf_block_align( /* TODO: protect buf_pool->chunks with a mutex (it will currently remain constant after buf_pool_init()) */ for (chunk = buf_pool->chunks, i = buf_pool->n_chunks; i--; chunk++) { - lint offs = ptr - chunk->blocks->frame; + ulint offs; - if (UNIV_UNLIKELY(offs < 0)) { + if (UNIV_UNLIKELY(ptr < chunk->blocks->frame)) { continue; } + /* else */ + + offs = ptr - chunk->blocks->frame; offs >>= UNIV_PAGE_SIZE_SHIFT; - if (UNIV_LIKELY((ulint) offs < chunk->size)) { + if (UNIV_LIKELY(offs < chunk->size)) { buf_block_t* block = &chunk->blocks[offs]; /* The function buf_chunk_init() invokes @@ -2533,7 +2782,7 @@ buf_block_align( ut_ad(block->frame == page_align(ptr)); #ifdef UNIV_DEBUG /* A thread that updates these fields must - hold buf_pool_mutex and block->mutex. Acquire + hold buf_pool->mutex and block->mutex. Acquire only the latter. */ mutex_enter(&block->mutex); @@ -2582,6 +2831,30 @@ buf_block_align( } } + return(NULL); +} + +/*******************************************************************//** +Gets the block to whose frame the pointer is pointing to. +@return pointer to block, never NULL */ +UNIV_INTERN +buf_block_t* +buf_block_align( +/*============*/ + const byte* ptr) /*!< in: pointer to a frame */ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_block_t* block; + + block = buf_block_align_instance( + buf_pool_from_array(i), ptr); + if (block) { + return(block); + } + } + /* The block should always be found. */ ut_error; return(NULL); @@ -2589,14 +2862,15 @@ buf_block_align( /********************************************************************//** Find out if a pointer belongs to a buf_block_t. It can be a pointer to -the buf_block_t itself or a member of it +the buf_block_t itself or a member of it. This functions checks one of +the buffer pool instances. @return TRUE if ptr belongs to a buf_block_t struct */ -UNIV_INTERN +static ibool -buf_pointer_is_block_field( -/*=======================*/ - const void* ptr) /*!< in: pointer not - dereferenced */ +buf_pointer_is_block_field_instance( +/*================================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + const void* ptr) /*!< in: pointer not dereferenced */ { const buf_chunk_t* chunk = buf_pool->chunks; const buf_chunk_t* const echunk = chunk + buf_pool->n_chunks; @@ -2616,6 +2890,31 @@ buf_pointer_is_block_field( return(FALSE); } +/********************************************************************//** +Find out if a pointer belongs to a buf_block_t. It can be a pointer to +the buf_block_t itself or a member of it +@return TRUE if ptr belongs to a buf_block_t struct */ +UNIV_INTERN +ibool +buf_pointer_is_block_field( +/*=======================*/ + const void* ptr) /*!< in: pointer not dereferenced */ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + ibool found; + + found = buf_pointer_is_block_field_instance( + buf_pool_from_array(i), ptr); + if (found) { + return(TRUE); + } + } + + return(FALSE); +} + /********************************************************************//** Find out if a buffer block was created by buf_chunk_init(). @return TRUE if "block" has been added to buf_pool->free by buf_chunk_init() */ @@ -2623,17 +2922,18 @@ static ibool buf_block_is_uncompressed( /*======================*/ - const buf_block_t* block) /*!< in: pointer to block, - not dereferenced */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + const buf_block_t* block) /*!< in: pointer to block, + not dereferenced */ { - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); if (UNIV_UNLIKELY((((ulint) block) % sizeof *block) != 0)) { /* The pointer should be aligned. */ return(FALSE); } - return(buf_pointer_is_block_field((void *)block)); + return(buf_pointer_is_block_field_instance(buf_pool, (void *)block)); } /********************************************************************//** @@ -2650,43 +2950,60 @@ buf_page_get_gen( ulint rw_latch,/*!< in: RW_S_LATCH, RW_X_LATCH, RW_NO_LATCH */ buf_block_t* guess, /*!< in: guessed block or NULL */ ulint mode, /*!< in: BUF_GET, BUF_GET_IF_IN_POOL, - BUF_GET_NO_LATCH */ + BUF_PEEK_IF_IN_POOL, BUF_GET_NO_LATCH, or + BUF_GET_IF_IN_POOL_OR_WATCH */ const char* file, /*!< in: file name */ ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mini-transaction */ { buf_block_t* block; + ulint fold; unsigned access_time; ulint fix_type; ibool must_read; ulint retries = 0; - mutex_t* block_mutex; - trx_t* trx = NULL; - ulint sec; - ulint ms; - ib_uint64_t start_time; - ib_uint64_t finish_time; + mutex_t* block_mutex = NULL; + trx_t* trx = NULL; + ulint sec; + ulint ms; + ib_uint64_t start_time; + ib_uint64_t finish_time; + buf_pool_t* buf_pool = buf_pool_get(space, offset); ut_ad(mtr); ut_ad(mtr->state == MTR_ACTIVE); ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH) || (rw_latch == RW_NO_LATCH)); - ut_ad((mode != BUF_GET_NO_LATCH) || (rw_latch == RW_NO_LATCH)); - ut_ad((mode == BUF_GET) || (mode == BUF_GET_IF_IN_POOL) - || (mode == BUF_GET_NO_LATCH)); +#ifdef UNIV_DEBUG + switch (mode) { + case BUF_GET_NO_LATCH: + ut_ad(rw_latch == RW_NO_LATCH); + break; + case BUF_GET: + case BUF_GET_IF_IN_POOL: + case BUF_PEEK_IF_IN_POOL: + case BUF_GET_IF_IN_POOL_OR_WATCH: + break; + default: + ut_error; + } +#endif /* UNIV_DEBUG */ ut_ad(zip_size == fil_space_get_zip_size(space)); ut_ad(ut_is_2pow(zip_size)); #ifndef UNIV_LOG_DEBUG - ut_ad(!ibuf_inside() || ibuf_page(space, zip_size, offset, NULL)); + ut_ad(!ibuf_inside(mtr) + || ibuf_page_low(space, zip_size, offset, + FALSE, file, line, NULL)); #endif if (innobase_get_slow_log()) { trx = innobase_get_trx(); } buf_pool->stat.n_page_gets++; + fold = buf_page_address_fold(space, offset); loop: block = guess; - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (block) { block_mutex = buf_page_get_mutex_enter((buf_page_t*)block); @@ -2701,7 +3018,7 @@ loop: if (!block_mutex) { block = guess = NULL; - } else if (!buf_block_is_uncompressed(block) + } else if (!buf_block_is_uncompressed(buf_pool, block) || offset != block->page.offset || space != block->page.space || buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE) { @@ -2716,22 +3033,42 @@ loop: } if (block == NULL) { - rw_lock_s_lock(&page_hash_latch); - block = (buf_block_t*) buf_page_hash_get(space, offset); + rw_lock_s_lock(&buf_pool->page_hash_latch); + block = (buf_block_t*) buf_page_hash_get_low( + buf_pool, space, offset, fold); if (block) { block_mutex = buf_page_get_mutex_enter((buf_page_t*)block); ut_a(block_mutex); } - rw_lock_s_unlock(&page_hash_latch); + rw_lock_s_unlock(&buf_pool->page_hash_latch); } loop2: + if (block && buf_pool_watch_is_sentinel(buf_pool, &block->page)) { + mutex_exit(block_mutex); + block = NULL; + } + if (block == NULL) { /* Page not in buf_pool: needs to be read from file */ - //buf_pool_mutex_exit(); + if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) { + block = (buf_block_t*) buf_pool_watch_set( + space, offset, fold); - if (mode == BUF_GET_IF_IN_POOL) { + if (UNIV_LIKELY_NULL(block)) { + block_mutex = buf_page_get_mutex((buf_page_t*)block); + ut_a(block_mutex); + ut_ad(mutex_own(block_mutex)); + goto got_block; + } + } + + //buf_pool_mutex_exit(buf_pool); + + if (mode == BUF_GET_IF_IN_POOL + || mode == BUF_PEEK_IF_IN_POOL + || mode == BUF_GET_IF_IN_POOL_OR_WATCH) { return(NULL); } @@ -2766,32 +3103,36 @@ loop2: goto loop; } +got_block: ut_ad(page_zip_get_size(&block->page.zip) == zip_size); must_read = buf_block_get_io_fix(block) == BUF_IO_READ; - if (must_read && mode == BUF_GET_IF_IN_POOL) { - /* The page is only being read to buffer */ - //buf_pool_mutex_exit(); + if (must_read && (mode == BUF_GET_IF_IN_POOL + || mode == BUF_PEEK_IF_IN_POOL)) { + + /* The page is being read to buffer pool, + but we cannot wait around for the read to + complete. */ + //buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); return(NULL); } - if (srv_pass_corrupt_table) { + if (srv_pass_corrupt_table <= 1) { if (block->page.is_corrupt) { mutex_exit(block_mutex); return(NULL); } } - ut_a(!(block->page.is_corrupt)); switch (buf_block_get_state(block)) { buf_page_t* bpage; ibool success; case BUF_BLOCK_FILE_PAGE: - if (block_mutex == &buf_pool_zip_mutex) { + if (block_mutex == &buf_pool->zip_mutex) { /* it is wrong mutex... */ mutex_exit(block_mutex); goto loop; @@ -2800,22 +3141,21 @@ loop2: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: - ut_ad(block_mutex == &buf_pool_zip_mutex); + ut_ad(block_mutex == &buf_pool->zip_mutex); bpage = &block->page; /* Protect bpage->buf_fix_count. */ - /* Already proteced here. */ - //mutex_enter(&buf_pool_zip_mutex); + //mutex_enter(&buf_pool->zip_mutex); if (bpage->buf_fix_count || buf_page_get_io_fix(bpage) != BUF_IO_NONE) { /* This condition often occurs when the buffer is not buffer-fixed, but I/O-fixed by buf_page_init_for_read(). */ - //mutex_exit(&buf_pool_zip_mutex); + //mutex_exit(&buf_pool->zip_mutex); wait_until_unfixed: /* The block is buffer-fixed or I/O-fixed. Try again later. */ - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); os_thread_sleep(WAIT_FOR_READ); @@ -2823,26 +3163,28 @@ wait_until_unfixed: } /* Allocate an uncompressed page. */ - //buf_pool_mutex_exit(); - //mutex_exit(&buf_pool_zip_mutex); + //buf_pool_mutex_exit(buf_pool); + //mutex_exit(&buf_pool->zip_mutex); mutex_exit(block_mutex); - block = buf_LRU_get_free_block(); + block = buf_LRU_get_free_block(buf_pool); ut_a(block); block_mutex = &block->mutex; - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); mutex_enter(block_mutex); { - buf_page_t* hash_bpage - = buf_page_hash_get(space, offset); + buf_page_t* hash_bpage; + + hash_bpage = buf_page_hash_get_low( + buf_pool, space, offset, fold); if (UNIV_UNLIKELY(bpage != hash_bpage)) { /* The buf_pool->page_hash was modified - while buf_pool_mutex was released. + while buf_pool->mutex was released. Free the block that was allocated. */ buf_LRU_block_free_non_file_page(block, TRUE); @@ -2853,40 +3195,38 @@ wait_until_unfixed: block_mutex = buf_page_get_mutex_enter((buf_page_t*)block); ut_a(block_mutex); } - rw_lock_x_unlock(&page_hash_latch); - mutex_exit(&LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); goto loop2; } } - mutex_enter(&buf_pool_zip_mutex); + mutex_enter(&buf_pool->zip_mutex); if (UNIV_UNLIKELY (bpage->buf_fix_count || buf_page_get_io_fix(bpage) != BUF_IO_NONE)) { - mutex_exit(&buf_pool_zip_mutex); + mutex_exit(&buf_pool->zip_mutex); /* The block was buffer-fixed or I/O-fixed - while buf_pool_mutex was not held by this thread. + while buf_pool->mutex was not held by this thread. Free the block that was allocated and try again. This should be extremely unlikely. */ buf_LRU_block_free_non_file_page(block, TRUE); //mutex_exit(&block->mutex); - rw_lock_x_unlock(&page_hash_latch); - mutex_exit(&LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); goto wait_until_unfixed; } /* Move the compressed page from bpage to block, and uncompress it. */ - mutex_enter(&flush_list_mutex); - buf_relocate(bpage, &block->page); - rw_lock_x_unlock(&page_hash_latch); + rw_lock_x_unlock(&buf_pool->page_hash_latch); buf_block_init_low(block); block->lock_hash_val = lock_rec_hash(space, offset); @@ -2905,8 +3245,6 @@ wait_until_unfixed: &block->page); } - mutex_exit(&flush_list_mutex); - /* Buffer-fix, I/O-fix, and X-latch the block for the duration of the decompression. Also add the block to the unzip_LRU list. */ @@ -2915,7 +3253,7 @@ wait_until_unfixed: /* Insert at the front of unzip_LRU list */ buf_unzip_LRU_add_block(block, FALSE); - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); block->page.buf_fix_count = 1; buf_block_set_io_fix(block, BUF_IO_READ); @@ -2924,18 +3262,19 @@ wait_until_unfixed: UNIV_MEM_INVALID(bpage, sizeof *bpage); mutex_exit(block_mutex); - mutex_exit(&buf_pool_zip_mutex); + mutex_exit(&buf_pool->zip_mutex); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); buf_pool->n_pend_unzip++; - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); - buf_buddy_free(bpage, sizeof *bpage, FALSE); + bpage->state = BUF_BLOCK_ZIP_FREE; + buf_buddy_free(buf_pool, bpage, sizeof *bpage, FALSE); - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); /* Decompress the page and apply buffered operations - while not holding buf_pool_mutex or block->mutex. */ + while not holding buf_pool->mutex or block->mutex. */ success = buf_zip_decompress(block, srv_use_checksums); ut_a(success); @@ -2945,16 +3284,17 @@ wait_until_unfixed: } /* Unfix and unlatch the block. */ - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); block_mutex = &block->mutex; mutex_enter(block_mutex); block->page.buf_fix_count--; buf_block_set_io_fix(block, BUF_IO_NONE); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); buf_pool->n_pend_unzip--; - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); rw_lock_x_unlock(&block->lock); + break; case BUF_BLOCK_ZIP_FREE: @@ -2976,18 +3316,37 @@ wait_until_unfixed: UNIV_MEM_ASSERT_RW(&block->page, sizeof block->page); #endif #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG - if (mode == BUF_GET_IF_IN_POOL && ibuf_debug) { + if ((mode == BUF_GET_IF_IN_POOL || mode == BUF_GET_IF_IN_POOL_OR_WATCH) + && ibuf_debug) { /* Try to evict the block from the buffer pool, to use the - insert buffer as much as possible. */ + insert buffer (change buffer) as much as possible. */ if (buf_LRU_free_block(&block->page, TRUE, FALSE) == BUF_LRU_FREED) { - buf_pool_mutex_exit(); - mutex_exit(&block->mutex); + mutex_exit(block_mutex); + if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) { + /* Set the watch, as it would have + been set if the page were not in the + buffer pool in the first place. */ + block = (buf_block_t*) buf_pool_watch_set( + space, offset, fold); + + if (UNIV_LIKELY_NULL(block)) { + block_mutex = buf_page_get_mutex((buf_page_t*)block); + ut_a(block_mutex); + ut_ad(mutex_own(block_mutex)); + + /* The page entered the buffer + pool for some reason. Try to + evict it again. */ + goto got_block; + } + } + //buf_pool_mutex_exit(buf_pool); fprintf(stderr, "innodb_change_buffering_debug evict %u %u\n", (unsigned) space, (unsigned) offset); return(NULL); - } else if (buf_flush_page_try(block)) { + } else if (buf_flush_page_try(buf_pool, block)) { fprintf(stderr, "innodb_change_buffering_debug flush %u %u\n", (unsigned) space, (unsigned) offset); @@ -3007,10 +3366,12 @@ wait_until_unfixed: access_time = buf_page_is_accessed(&block->page); - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); - buf_page_set_accessed_make_young(&block->page, access_time); + if (UNIV_LIKELY(mode != BUF_PEEK_IF_IN_POOL)) { + buf_page_set_accessed_make_young(&block->page, access_time); + } #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG ut_a(!block->page.file_page_was_freed); @@ -3076,11 +3437,12 @@ wait_until_unfixed: mtr_memo_push(mtr, block, fix_type); - if (!access_time) { + if (UNIV_LIKELY(mode != BUF_PEEK_IF_IN_POOL) && !access_time) { /* In the case of a first access, try to apply linear read-ahead */ - buf_read_ahead_linear(space, zip_size, offset, trx); + buf_read_ahead_linear(space, zip_size, offset, + ibuf_inside(mtr), trx); } #ifdef UNIV_IBUF_COUNT_DEBUG @@ -3110,6 +3472,7 @@ buf_page_optimistic_get( ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mini-transaction */ { + buf_pool_t* buf_pool; unsigned access_time; ibool success; ulint fix_type; @@ -3141,7 +3504,7 @@ buf_page_optimistic_get( access_time = buf_page_is_accessed(&block->page); buf_page_set_accessed_make_young(&block->page, access_time); - ut_ad(!ibuf_inside() + ut_ad(!ibuf_inside(mtr) || ibuf_page(buf_block_get_space(block), buf_block_get_zip_size(block), buf_block_get_page_no(block), NULL)); @@ -3201,13 +3564,15 @@ buf_page_optimistic_get( buf_read_ahead_linear(buf_block_get_space(block), buf_block_get_zip_size(block), - buf_block_get_page_no(block), trx); + buf_block_get_page_no(block), + ibuf_inside(mtr), trx); } #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(buf_block_get_space(block), buf_block_get_page_no(block)) == 0); #endif + buf_pool = buf_pool_from_block(block); buf_pool->stat.n_page_gets++; if (innobase_get_slow_log()) { @@ -3232,6 +3597,7 @@ buf_page_get_known_nowait( ulint line, /*!< in: line where called */ mtr_t* mtr) /*!< in: mini-transaction */ { + buf_pool_t* buf_pool; ibool success; ulint fix_type; trx_t* trx = NULL; @@ -3261,12 +3627,14 @@ buf_page_get_known_nowait( mutex_exit(&block->mutex); + buf_pool = buf_pool_from_block(block); + if (mode == BUF_MAKE_YOUNG && buf_page_peek_if_too_old(&block->page)) { - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); buf_LRU_make_block_young(&block->page); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); } else if (!buf_page_is_accessed(&block->page)) { /* Above, we do a dirty read on purpose, to avoid mutex contention. The field buf_page_t::access_time @@ -3274,14 +3642,14 @@ buf_page_get_known_nowait( field must be protected by mutex, however. */ ulint time_ms = ut_time_ms(); - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); mutex_enter(&block->mutex); buf_page_set_accessed(&block->page, time_ms); - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); mutex_exit(&block->mutex); } - ut_ad(!ibuf_inside() || (mode == BUF_KEEP_OLD)); + ut_ad(!ibuf_inside(mtr) || mode == BUF_KEEP_OLD); if (rw_latch == RW_S_LATCH) { success = rw_lock_s_lock_nowait(&(block->lock), @@ -3345,23 +3713,26 @@ buf_page_try_get_func( buf_block_t* block; ibool success; ulint fix_type; + buf_pool_t* buf_pool = buf_pool_get(space_id, page_no); ut_ad(mtr); ut_ad(mtr->state == MTR_ACTIVE); - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); - block = buf_block_hash_get(space_id, page_no); + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); + block = buf_block_hash_get(buf_pool, space_id, page_no); - if (!block) { - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + if (!block || buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE) { + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(NULL); } + ut_ad(!buf_pool_watch_is_sentinel(buf_pool, &block->page)); + mutex_enter(&block->mutex); - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG ut_a(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); @@ -3445,13 +3816,15 @@ buf_page_init( ulint space, /*!< in: space id */ ulint offset, /*!< in: offset of the page within space in units of a page */ + ulint fold, /*!< in: buf_page_address_fold(space,offset) */ buf_block_t* block) /*!< in: block to init */ { buf_page_t* hash_page; + buf_pool_t* buf_pool = buf_pool_get(space, offset); - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_EX)); #endif ut_ad(mutex_own(&(block->mutex))); ut_a(buf_block_get_state(block) != BUF_BLOCK_FILE_PAGE); @@ -3470,13 +3843,26 @@ buf_page_init( buf_block_init_low(block); - block->lock_hash_val = lock_rec_hash(space, offset); + block->lock_hash_val = lock_rec_hash(space, offset); + + buf_page_init_low(&block->page); /* Insert into the hash table of file pages */ - hash_page = buf_page_hash_get(space, offset); + hash_page = buf_page_hash_get_low(buf_pool, space, offset, fold); - if (UNIV_LIKELY_NULL(hash_page)) { + if (UNIV_LIKELY(!hash_page)) { + } else if (buf_pool_watch_is_sentinel(buf_pool, hash_page)) { + /* Preserve the reference count. */ + ulint buf_fix_count; + + mutex_enter(&buf_pool->zip_mutex); + buf_fix_count = hash_page->buf_fix_count; + ut_a(buf_fix_count > 0); + block->page.buf_fix_count += buf_fix_count; + buf_pool_watch_remove(buf_pool, fold, hash_page); + mutex_exit(&buf_pool->zip_mutex); + } else { fprintf(stderr, "InnoDB: Error: page %lu %lu already found" " in the hash table: %p, %p\n", @@ -3485,8 +3871,8 @@ buf_page_init( (const void*) hash_page, (const void*) block); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG mutex_exit(&block->mutex); - //buf_pool_mutex_exit(); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_x_unlock(&buf_pool->page_hash_latch); buf_print(); buf_LRU_print(); buf_validate(); @@ -3495,13 +3881,11 @@ buf_page_init( ut_error; } - buf_page_init_low(&block->page); - ut_ad(!block->page.in_zip_hash); ut_ad(!block->page.in_page_hash); ut_d(block->page.in_page_hash = TRUE); HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(space, offset), &block->page); + fold, &block->page); } /********************************************************************//** @@ -3523,16 +3907,20 @@ buf_page_init_for_read( ulint space, /*!< in: space id */ ulint zip_size,/*!< in: compressed page size, or 0 */ ibool unzip, /*!< in: TRUE=request uncompressed page */ - ib_int64_t tablespace_version,/*!< in: prevents reading from a wrong + ib_int64_t tablespace_version, + /*!< in: prevents reading from a wrong version of the tablespace in case we have done DISCARD + IMPORT */ ulint offset) /*!< in: page number */ { buf_block_t* block; - buf_page_t* bpage; + buf_page_t* bpage = NULL; + buf_page_t* watch_page; mtr_t mtr; + ulint fold; ibool lru = FALSE; void* data; + buf_pool_t* buf_pool = buf_pool_get(space, offset); ut_ad(buf_pool); @@ -3542,14 +3930,13 @@ buf_page_init_for_read( /* It is a read-ahead within an ibuf routine */ ut_ad(!ibuf_bitmap_page(zip_size, offset)); - ut_ad(ibuf_inside()); - mtr_start(&mtr); + ibuf_mtr_start(&mtr); if (!recv_no_ibuf_operations && !ibuf_page(space, zip_size, offset, &mtr)) { - mtr_commit(&mtr); + ibuf_mtr_commit(&mtr); return(NULL); } @@ -3561,27 +3948,32 @@ buf_page_init_for_read( && UNIV_LIKELY(!recv_recovery_is_on())) { block = NULL; } else { - block = buf_LRU_get_free_block(); + block = buf_LRU_get_free_block(buf_pool); ut_ad(block); + ut_ad(buf_pool_from_block(block) == buf_pool); } - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + fold = buf_page_address_fold(space, offset); - if (buf_page_hash_get(space, offset)) { + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); + + watch_page = buf_page_hash_get_low(buf_pool, space, offset, fold); + if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) { /* The page is already in the buffer pool. */ + watch_page = NULL; err_exit: if (block) { mutex_enter(&block->mutex); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); buf_LRU_block_free_non_file_page(block, FALSE); mutex_exit(&block->mutex); } else { - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } bpage = NULL; @@ -3600,9 +3992,12 @@ err_exit: if (block) { bpage = &block->page; mutex_enter(&block->mutex); - buf_page_init(space, offset, block); - rw_lock_x_unlock(&page_hash_latch); + ut_ad(buf_pool_from_bpage(bpage) == buf_pool); + + buf_page_init(space, offset, fold, block); + + rw_lock_x_unlock(&buf_pool->page_hash_latch); /* The block must be put to the LRU list, to the old blocks */ buf_LRU_add_block(bpage, TRUE/* to old blocks */); @@ -3622,16 +4017,16 @@ err_exit: if (UNIV_UNLIKELY(zip_size)) { page_zip_set_size(&block->page.zip, zip_size); - /* buf_pool_mutex may be released and + /* buf_pool->mutex may be released and reacquired by buf_buddy_alloc(). Thus, we must release block->mutex in order not to break the latching order in the reacquisition - of buf_pool_mutex. We also must defer this + of buf_pool->mutex. We also must defer this operation until after the block descriptor has been added to buf_pool->LRU and buf_pool->page_hash. */ mutex_exit(&block->mutex); - data = buf_buddy_alloc(zip_size, &lru, FALSE); + data = buf_buddy_alloc(buf_pool, zip_size, &lru, FALSE); mutex_enter(&block->mutex); block->page.zip.data = data; @@ -3644,7 +4039,7 @@ err_exit: buf_unzip_LRU_add_block(block, TRUE); } - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); mutex_exit(&block->mutex); } else { /* Defer buf_buddy_alloc() until after the block has @@ -3656,39 +4051,54 @@ err_exit: control block (bpage), in order to avoid the invocation of buf_buddy_relocate_block() on uninitialized data. */ - data = buf_buddy_alloc(zip_size, &lru, TRUE); - bpage = buf_buddy_alloc(sizeof *bpage, &lru, TRUE); + data = buf_buddy_alloc(buf_pool, zip_size, &lru, TRUE); + bpage = buf_buddy_alloc(buf_pool, sizeof *bpage, &lru, TRUE); + + /* Initialize the buf_pool pointer. */ + bpage->buf_pool_index = buf_pool_index(buf_pool); /* If buf_buddy_alloc() allocated storage from the LRU list, - it released and reacquired buf_pool_mutex. Thus, we must + it released and reacquired buf_pool->mutex. Thus, we must check the page_hash again, as it may have been modified. */ - if (UNIV_UNLIKELY(lru) - && UNIV_LIKELY_NULL(buf_page_hash_get(space, offset))) { + if (UNIV_UNLIKELY(lru)) { - /* The block was added by some other thread. */ - buf_buddy_free(bpage, sizeof *bpage, TRUE); - buf_buddy_free(data, zip_size, TRUE); + watch_page = buf_page_hash_get_low( + buf_pool, space, offset, fold); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + if (watch_page + && !buf_pool_watch_is_sentinel(buf_pool, + watch_page)) { - bpage = NULL; - goto func_exit; + /* The block was added by some other thread. */ + watch_page = NULL; + bpage->state = BUF_BLOCK_ZIP_FREE; + buf_buddy_free(buf_pool, bpage, sizeof *bpage, TRUE); + buf_buddy_free(buf_pool, data, zip_size, TRUE); + + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + + bpage = NULL; + goto func_exit; + } } page_zip_des_init(&bpage->zip); page_zip_set_size(&bpage->zip, zip_size); bpage->zip.data = data; - mutex_enter(&buf_pool_zip_mutex); + mutex_enter(&buf_pool->zip_mutex); UNIV_MEM_DESC(bpage->zip.data, page_zip_get_size(&bpage->zip), bpage); + buf_page_init_low(bpage); + bpage->state = BUF_BLOCK_ZIP_PAGE; bpage->space = space; bpage->offset = offset; bpage->space_was_being_deleted = FALSE; + #ifdef UNIV_DEBUG bpage->in_page_hash = FALSE; bpage->in_zip_hash = FALSE; @@ -3698,33 +4108,41 @@ err_exit: bpage->in_LRU_list = FALSE; ut_d(bpage->in_page_hash = TRUE); - HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(space, offset), bpage); - rw_lock_x_unlock(&page_hash_latch); + if (UNIV_LIKELY_NULL(watch_page)) { + /* Preserve the reference count. */ + ulint buf_fix_count = watch_page->buf_fix_count; + ut_a(buf_fix_count > 0); + bpage->buf_fix_count += buf_fix_count; + ut_ad(buf_pool_watch_is_sentinel(buf_pool, watch_page)); + buf_pool_watch_remove(buf_pool, fold, watch_page); + } + + HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, + bpage); + + rw_lock_x_unlock(&buf_pool->page_hash_latch); /* The block must be put to the LRU list, to the old blocks */ buf_LRU_add_block(bpage, TRUE/* to old blocks */); - mutex_enter(&flush_list_mutex); buf_LRU_insert_zip_clean(bpage); - mutex_exit(&flush_list_mutex); - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); buf_page_set_io_fix(bpage, BUF_IO_READ); - mutex_exit(&buf_pool_zip_mutex); + mutex_exit(&buf_pool->zip_mutex); } - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); buf_pool->n_pend_reads++; - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); func_exit: - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); if (mode == BUF_READ_IBUF_PAGES_ONLY) { - mtr_commit(&mtr); + ibuf_mtr_commit(&mtr); } ut_ad(!bpage || buf_page_in_file(bpage)); @@ -3749,22 +4167,29 @@ buf_page_create( { buf_frame_t* frame; buf_block_t* block; + ulint fold; buf_block_t* free_block = NULL; ulint time_ms = ut_time_ms(); + buf_pool_t* buf_pool = buf_pool_get(space, offset); ut_ad(mtr); ut_ad(mtr->state == MTR_ACTIVE); ut_ad(space || !zip_size); - free_block = buf_LRU_get_free_block(); + free_block = buf_LRU_get_free_block(buf_pool); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + fold = buf_page_address_fold(space, offset); - block = (buf_block_t*) buf_page_hash_get(space, offset); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); - if (block && buf_page_in_file(&block->page)) { + block = (buf_block_t*) buf_page_hash_get_low( + buf_pool, space, offset, fold); + + if (block + && buf_page_in_file(&block->page) + && !buf_pool_watch_is_sentinel(buf_pool, &block->page)) { #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(space, offset) == 0); #endif @@ -3773,9 +4198,9 @@ buf_page_create( #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */ /* Page can be found in buf_pool */ - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); buf_block_free(free_block); @@ -3796,8 +4221,8 @@ buf_page_create( mutex_enter(&block->mutex); - buf_page_init(space, offset, block); - rw_lock_x_unlock(&page_hash_latch); + buf_page_init(space, offset, fold, block); + rw_lock_x_unlock(&buf_pool->page_hash_latch); /* The block must be put to the LRU list */ buf_LRU_add_block(&block->page, FALSE); @@ -3810,7 +4235,7 @@ buf_page_create( ibool lru; /* Prevent race conditions during buf_buddy_alloc(), - which may release and reacquire buf_pool_mutex, + which may release and reacquire buf_pool->mutex, by IO-fixing and X-latching the block. */ buf_page_set_io_fix(&block->page, BUF_IO_READ); @@ -3818,13 +4243,13 @@ buf_page_create( page_zip_set_size(&block->page.zip, zip_size); mutex_exit(&block->mutex); - /* buf_pool_mutex may be released and reacquired by + /* buf_pool->mutex may be released and reacquired by buf_buddy_alloc(). Thus, we must release block->mutex in order not to break the latching order in - the reacquisition of buf_pool_mutex. We also must + the reacquisition of buf_pool->mutex. We also must defer this operation until after the block descriptor has been added to buf_pool->LRU and buf_pool->page_hash. */ - data = buf_buddy_alloc(zip_size, &lru, FALSE); + data = buf_buddy_alloc(buf_pool, zip_size, &lru, FALSE); mutex_enter(&block->mutex); block->page.zip.data = data; @@ -3842,8 +4267,8 @@ buf_page_create( buf_page_set_accessed(&block->page, time_ms); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX); @@ -3855,7 +4280,7 @@ buf_page_create( ibuf_merge_or_delete_for_page(NULL, space, offset, zip_size, TRUE); /* Flush pages from the end of the LRU list if necessary */ - buf_flush_free_margin(FALSE); + buf_flush_free_margin(buf_pool, FALSE); frame = block->frame; @@ -3888,13 +4313,13 @@ UNIV_INTERN void buf_page_io_complete( /*=================*/ - buf_page_t* bpage, /*!< in: pointer to the block in question */ - trx_t* trx) + buf_page_t* bpage) /*!< in: pointer to the block in question */ { enum buf_io_fix io_type; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); const ibool uncompressed = (buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE); - enum buf_flush flush_type; + ibool have_LRU_mutex = FALSE; mutex_t* block_mutex; ut_a(buf_page_in_file(bpage)); @@ -4011,14 +4436,18 @@ corrupt: if (srv_pass_corrupt_table && !trx_sys_sys_space(bpage->space) && bpage->space < SRV_LOG_SPACE_FIRST_ID) { + trx_t* trx; + fprintf(stderr, "InnoDB: space %u will be treated as corrupt.\n", bpage->space); fil_space_set_corrupt(bpage->space); - if (trx && trx->dict_operation_lock_mode == 0) { - dict_table_set_corrupt_by_space(bpage->space, TRUE); - } else { + + trx = innobase_get_trx(); + if (trx && trx->dict_operation_lock_mode == RW_X_LATCH) { dict_table_set_corrupt_by_space(bpage->space, FALSE); + } else { + dict_table_set_corrupt_by_space(bpage->space, TRUE); } bpage->is_corrupt = TRUE; } else @@ -4048,17 +4477,26 @@ corrupt: } } - //buf_pool_mutex_enter(); - if (io_type == BUF_IO_WRITE) { - flush_type = buf_page_get_flush_type(bpage); + if (io_type == BUF_IO_WRITE + && (buf_page_get_state(bpage) == BUF_BLOCK_ZIP_DIRTY + || buf_page_get_flush_type(bpage) == BUF_FLUSH_LRU)) { /* to keep consistency at buf_LRU_insert_zip_clean() */ - //if (flush_type == BUF_FLUSH_LRU) { /* optimistic! */ - mutex_enter(&LRU_list_mutex); - //} + have_LRU_mutex = TRUE; /* optimistic */ } +retry_mutex: + if (have_LRU_mutex) + mutex_enter(&buf_pool->LRU_list_mutex); block_mutex = buf_page_get_mutex_enter(bpage); ut_a(block_mutex); - mutex_enter(&buf_pool_mutex); + if (io_type == BUF_IO_WRITE + && (buf_page_get_state(bpage) == BUF_BLOCK_ZIP_DIRTY + || buf_page_get_flush_type(bpage) == BUF_FLUSH_LRU) + && !have_LRU_mutex) { + mutex_exit(block_mutex); + have_LRU_mutex = TRUE; + goto retry_mutex; + } + buf_pool_mutex_enter(buf_pool); #ifdef UNIV_IBUF_COUNT_DEBUG if (io_type == BUF_IO_WRITE || uncompressed) { @@ -4081,6 +4519,7 @@ corrupt: the x-latch to this OS thread: do not let this confuse you in debugging! */ + ut_a(!have_LRU_mutex); ut_ad(buf_pool->n_pend_reads > 0); buf_pool->n_pend_reads--; buf_pool->stat.n_pages_read++; @@ -4098,10 +4537,8 @@ corrupt: buf_flush_write_complete(bpage); - /* to keep consistency at buf_LRU_insert_zip_clean() */ - //if (flush_type == BUF_FLUSH_LRU) { /* optimistic! */ - mutex_exit(&LRU_list_mutex); - //} + if (have_LRU_mutex) + mutex_exit(&buf_pool->LRU_list_mutex); if (uncompressed) { rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock, @@ -4125,24 +4562,92 @@ corrupt: } #endif /* UNIV_DEBUG */ - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); - //buf_pool_mutex_exit(); +} + +/********************************************************************//** +*/ +UNIV_INTERN +buf_block_t* +buf_page_from_array( +/*================*/ + buf_pool_t* buf_pool, + ulint n_block) +{ + ulint n_chunks, offset; + buf_chunk_t* chunk; + + ut_a(n_block < buf_pool->curr_size); + + chunk = buf_pool->chunks; + offset = n_block; + + for (n_chunks = buf_pool->n_chunks; n_chunks--; chunk++) { + if (offset < chunk->size) { + return(&chunk->blocks[offset]); + } + + offset -= chunk->size; + } + + ut_error; + + return(NULL); } /*********************************************************************//** -Invalidates the file pages in the buffer pool when an archive recovery is -completed. All the file pages buffered must be in a replaceable state when -this function is called: not latched and not modified. */ -UNIV_INTERN +Asserts that all file pages in the buffer are in a replaceable state. +@return TRUE */ +static +ibool +buf_all_freed_instance( +/*===================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instancce */ +{ + ulint i; + buf_chunk_t* chunk; + + ut_ad(buf_pool); + + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); + + chunk = buf_pool->chunks; + + for (i = buf_pool->n_chunks; i--; chunk++) { + + const buf_block_t* block = buf_chunk_not_freed(chunk); + + if (UNIV_LIKELY_NULL(block)) { + fprintf(stderr, + "Page %lu %lu still fixed or dirty\n", + (ulong) block->page.space, + (ulong) block->page.offset); + ut_error; + } + } + + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); + + return(TRUE); +} + +/*********************************************************************//** +Invalidates file pages in one buffer pool instance */ +static void -buf_pool_invalidate(void) -/*=====================*/ +buf_pool_invalidate_instance( +/*=========================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { ibool freed; enum buf_flush i; - buf_pool_mutex_enter(); + buf_pool_mutex_enter(buf_pool); for (i = BUF_FLUSH_LRU; i < BUF_FLUSH_N_TYPES; i++) { @@ -4158,24 +4663,24 @@ buf_pool_invalidate(void) pool invalidation to proceed we must ensure there is NO write activity happening. */ if (buf_pool->n_flush[i] > 0) { - buf_pool_mutex_exit(); - buf_flush_wait_batch_end(i); - buf_pool_mutex_enter(); + buf_pool_mutex_exit(buf_pool); + buf_flush_wait_batch_end(buf_pool, i); + buf_pool_mutex_enter(buf_pool); } } - buf_pool_mutex_exit(); + buf_pool_mutex_exit(buf_pool); - ut_ad(buf_all_freed()); + ut_ad(buf_all_freed_instance(buf_pool)); freed = TRUE; while (freed) { - freed = buf_LRU_search_and_free_block(100); + freed = buf_LRU_search_and_free_block(buf_pool, 100); } - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); ut_ad(UT_LIST_GET_LEN(buf_pool->LRU) == 0); ut_ad(UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0); @@ -4186,20 +4691,37 @@ buf_pool_invalidate(void) buf_pool->LRU_flush_ended = 0; memset(&buf_pool->stat, 0x00, sizeof(buf_pool->stat)); - buf_refresh_io_stats(); + buf_refresh_io_stats(buf_pool); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); +} + +/*********************************************************************//** +Invalidates the file pages in the buffer pool when an archive recovery is +completed. All the file pages buffered must be in a replaceable state when +this function is called: not latched and not modified. */ +UNIV_INTERN +void +buf_pool_invalidate(void) +/*=====================*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_invalidate_instance(buf_pool_from_array(i)); + } } #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /*********************************************************************//** -Validates the buffer buf_pool data structure. +Validates data in one buffer pool instance @return TRUE */ -UNIV_INTERN +static ibool -buf_validate(void) -/*==============*/ +buf_pool_validate_instance( +/*=======================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { buf_page_t* b; buf_chunk_t* chunk; @@ -4214,9 +4736,9 @@ buf_validate(void) ut_ad(buf_pool); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); /* for keep the new latch order, it cannot validate correctly... */ chunk = buf_pool->chunks; @@ -4242,7 +4764,8 @@ buf_validate(void) break; case BUF_BLOCK_FILE_PAGE: - ut_a(buf_page_hash_get(buf_block_get_space( + ut_a(buf_page_hash_get(buf_pool, + buf_block_get_space( block), buf_block_get_page_no( block)) @@ -4289,11 +4812,6 @@ buf_validate(void) } n_lru++; - - if (block->page.oldest_modification > 0) { - n_flush++; - } - break; case BUF_BLOCK_NOT_USED: @@ -4311,7 +4829,7 @@ buf_validate(void) } } - mutex_enter(&buf_pool_zip_mutex); + mutex_enter(&buf_pool->zip_mutex); /* Check clean compressed-only blocks. */ @@ -4332,31 +4850,34 @@ buf_validate(void) ut_error; break; } + + /* It is OK to read oldest_modification here because + we have acquired buf_pool->zip_mutex above which acts + as the 'block->mutex' for these bpages. */ ut_a(!b->oldest_modification); - ut_a(buf_page_hash_get(b->space, b->offset) == b); + ut_a(buf_page_hash_get(buf_pool, b->space, b->offset) == b); n_lru++; n_zip++; } - /* Check dirty compressed-only blocks. */ + /* Check dirty blocks. */ - mutex_enter(&flush_list_mutex); + buf_flush_list_mutex_enter(buf_pool); for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; b = UT_LIST_GET_NEXT(flush_list, b)) { ut_ad(b->in_flush_list); + ut_a(b->oldest_modification); + n_flush++; switch (buf_page_get_state(b)) { case BUF_BLOCK_ZIP_DIRTY: - ut_a(b->oldest_modification); n_lru++; - n_flush++; n_zip++; switch (buf_page_get_io_fix(b)) { case BUF_IO_NONE: case BUF_IO_READ: break; - case BUF_IO_WRITE: switch (buf_page_get_flush_type(b)) { case BUF_FLUSH_LRU: @@ -4386,11 +4907,14 @@ buf_validate(void) ut_error; break; } - ut_a(buf_page_hash_get(b->space, b->offset) == b); + ut_a(buf_page_hash_get(buf_pool, b->space, b->offset) == b); } - mutex_exit(&flush_list_mutex); - mutex_exit(&buf_pool_zip_mutex); + ut_a(UT_LIST_GET_LEN(buf_pool->flush_list) == n_flush); + + buf_flush_list_mutex_exit(buf_pool); + + mutex_exit(&buf_pool->zip_mutex); if (n_lru + n_free > buf_pool->curr_size + n_zip) { fprintf(stderr, "n LRU %lu, n free %lu, pool %lu zip %lu\n", @@ -4400,7 +4924,7 @@ buf_validate(void) } ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru); - /* because of latching order with block->mutex, we cannot get free_list_mutex before that */ + /* because of latching order with block->mutex, we cannot get needed mutexes before that */ /* if (UT_LIST_GET_LEN(buf_pool->free) != n_free) { fprintf(stderr, "Free list len %lu, free blocks %lu\n", @@ -4408,41 +4932,59 @@ buf_validate(void) (ulong) n_free); ut_error; } -*/ - /* because of latching order with block->mutex, we cannot get flush_list_mutex before that */ -/* - ut_a(UT_LIST_GET_LEN(buf_pool->flush_list) == n_flush); ut_a(buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE] == n_single_flush); ut_a(buf_pool->n_flush[BUF_FLUSH_LIST] == n_list_flush); ut_a(buf_pool->n_flush[BUF_FLUSH_LRU] == n_lru_flush); */ - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); ut_a(buf_LRU_validate()); - ut_a(buf_flush_validate()); + ut_a(buf_flush_validate(buf_pool)); return(TRUE); } + +/*********************************************************************//** +Validates the buffer buf_pool data structure. +@return TRUE */ +UNIV_INTERN +ibool +buf_validate(void) +/*==============*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_pool_validate_instance(buf_pool); + } + return(TRUE); +} + #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /*********************************************************************//** -Prints info of the buffer buf_pool data structure. */ -UNIV_INTERN +Prints info of the buffer buf_pool data structure for one instance. */ +static void -buf_print(void) -/*===========*/ +buf_print_instance( +/*===============*/ + buf_pool_t* buf_pool) { - dulint* index_ids; + index_id_t* index_ids; ulint* counts; ulint size; ulint i; ulint j; - dulint id; + index_id_t id; ulint n_found; buf_chunk_t* chunk; dict_index_t* index; @@ -4451,13 +4993,13 @@ buf_print(void) size = buf_pool->curr_size; - index_ids = mem_alloc(sizeof(dulint) * size); + index_ids = mem_alloc(size * sizeof *index_ids); counts = mem_alloc(sizeof(ulint) * size); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - mutex_enter(&free_list_mutex); - mutex_enter(&flush_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); + buf_flush_list_mutex_enter(buf_pool); fprintf(stderr, "buf_pool size %lu\n" @@ -4484,6 +5026,8 @@ buf_print(void) (ulong) buf_pool->stat.n_pages_created, (ulong) buf_pool->stat.n_pages_written); + buf_flush_list_mutex_exit(buf_pool); + /* Count the number of blocks belonging to each index in the buffer */ n_found = 0; @@ -4506,8 +5050,7 @@ buf_print(void) while (j < n_found) { - if (ut_dulint_cmp(index_ids[j], - id) == 0) { + if (index_ids[j] == id) { counts[j]++; break; @@ -4524,17 +5067,16 @@ buf_print(void) } } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - mutex_exit(&free_list_mutex); - mutex_exit(&flush_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); for (i = 0; i < n_found; i++) { index = dict_index_get_if_in_cache(index_ids[i]); fprintf(stderr, - "Block count for index %lu in buffer is about %lu", - (ulong) ut_dulint_get_low(index_ids[i]), + "Block count for index %llu in buffer is about %lu", + (ullint) index_ids[i], (ulong) counts[i]); if (index) { @@ -4548,7 +5090,24 @@ buf_print(void) mem_free(index_ids); mem_free(counts); - ut_a(buf_validate()); + ut_a(buf_pool_validate_instance(buf_pool)); +} + +/*********************************************************************//** +Prints info of the buffer buf_pool data structure. */ +UNIV_INTERN +void +buf_print(void) +/*===========*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + buf_print_instance(buf_pool); + } } #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ @@ -4558,15 +5117,16 @@ Returns the number of latched pages in the buffer pool. @return number of latched pages */ UNIV_INTERN ulint -buf_get_latched_pages_number(void) -/*==============================*/ +buf_get_latched_pages_number_instance( +/*==================================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { - buf_chunk_t* chunk; buf_page_t* b; ulint i; + buf_chunk_t* chunk; ulint fixed_pages_number = 0; - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); chunk = buf_pool->chunks; @@ -4595,7 +5155,7 @@ buf_get_latched_pages_number(void) } } - mutex_enter(&buf_pool_zip_mutex); + mutex_enter(&buf_pool->zip_mutex); /* Traverse the lists of clean and dirty compressed-only blocks. */ @@ -4610,7 +5170,7 @@ buf_get_latched_pages_number(void) } } - mutex_enter(&flush_list_mutex); + buf_flush_list_mutex_enter(buf_pool); for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b; b = UT_LIST_GET_NEXT(flush_list, b)) { ut_ad(b->in_flush_list); @@ -4635,13 +5195,37 @@ buf_get_latched_pages_number(void) break; } } - mutex_exit(&flush_list_mutex); - mutex_exit(&buf_pool_zip_mutex); - //buf_pool_mutex_exit(); + buf_flush_list_mutex_exit(buf_pool); + mutex_exit(&buf_pool->zip_mutex); + //buf_pool_mutex_exit(buf_pool); return(fixed_pages_number); } + +/*********************************************************************//** +Returns the number of latched pages in all the buffer pools. +@return number of latched pages */ +UNIV_INTERN +ulint +buf_get_latched_pages_number(void) +/*==============================*/ +{ + ulint i; + ulint total_latched_pages = 0; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + total_latched_pages += buf_get_latched_pages_number_instance( + buf_pool); + } + + return(total_latched_pages); +} + #endif /* UNIV_DEBUG */ /*********************************************************************//** @@ -4652,10 +5236,22 @@ ulint buf_get_n_pending_ios(void) /*=======================*/ { - return(buf_pool->n_pend_reads - + buf_pool->n_flush[BUF_FLUSH_LRU] - + buf_pool->n_flush[BUF_FLUSH_LIST] - + buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); + ulint i; + ulint pend_ios = 0; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + pend_ios += + buf_pool->n_pend_reads + + buf_pool->n_flush[BUF_FLUSH_LRU] + + buf_pool->n_flush[BUF_FLUSH_LIST] + + buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]; + } + + return(pend_ios); } /*********************************************************************//** @@ -4667,40 +5263,224 @@ ulint buf_get_modified_ratio_pct(void) /*============================*/ { - ulint ratio; + ulint ratio; + ulint lru_len = 0; + ulint free_len = 0; + ulint flush_list_len = 0; - //buf_pool_mutex_enter(); /* optimistic */ + buf_get_total_list_len(&lru_len, &free_len, &flush_list_len); - ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list)) - / (1 + UT_LIST_GET_LEN(buf_pool->LRU) - + UT_LIST_GET_LEN(buf_pool->free)); + ratio = (100 * flush_list_len) / (1 + lru_len + free_len); /* 1 + is there to avoid division by zero */ - //buf_pool_mutex_exit(); /* optimistic */ - return(ratio); } +/*******************************************************************//** +Aggregates a pool stats information with the total buffer pool stats */ +static +void +buf_stats_aggregate_pool_info( +/*==========================*/ + buf_pool_info_t* total_info, /*!< in/out: the buffer pool + info to store aggregated + result */ + const buf_pool_info_t* pool_info) /*!< in: individual buffer pool + stats info */ +{ + ut_a(total_info && pool_info); + + /* Nothing to copy if total_info is the same as pool_info */ + if (total_info == pool_info) { + return; + } + + total_info->pool_size += pool_info->pool_size; + total_info->pool_size_bytes += pool_info->pool_size_bytes; + total_info->lru_len += pool_info->lru_len; + total_info->old_lru_len += pool_info->old_lru_len; + total_info->free_list_len += pool_info->free_list_len; + total_info->flush_list_len += pool_info->flush_list_len; + total_info->n_pend_unzip += pool_info->n_pend_unzip; + total_info->n_pend_reads += pool_info->n_pend_reads; + total_info->n_pending_flush_lru += pool_info->n_pending_flush_lru; + total_info->n_pending_flush_list += pool_info->n_pending_flush_list; + total_info->n_pending_flush_single_page += + pool_info->n_pending_flush_single_page; + total_info->n_pages_made_young += pool_info->n_pages_made_young; + total_info->n_pages_not_made_young += pool_info->n_pages_not_made_young; + total_info->n_pages_read += pool_info->n_pages_read; + total_info->n_pages_created += pool_info->n_pages_created; + total_info->n_pages_written += pool_info->n_pages_written; + total_info->n_page_gets += pool_info->n_page_gets; + total_info->n_ra_pages_read += pool_info->n_ra_pages_read; + total_info->n_ra_pages_evicted += pool_info->n_ra_pages_evicted; + total_info->page_made_young_rate += pool_info->page_made_young_rate; + total_info->page_not_made_young_rate += + pool_info->page_not_made_young_rate; + total_info->pages_read_rate += pool_info->pages_read_rate; + total_info->pages_created_rate += pool_info->pages_created_rate; + total_info->pages_written_rate += pool_info->pages_written_rate; + total_info->n_page_get_delta += pool_info->n_page_get_delta; + total_info->page_read_delta += pool_info->page_read_delta; + total_info->young_making_delta += pool_info->young_making_delta; + total_info->not_young_making_delta += pool_info->not_young_making_delta; + total_info->pages_readahead_rate += pool_info->pages_readahead_rate; + total_info->pages_evicted_rate += pool_info->pages_evicted_rate; + total_info->unzip_lru_len += pool_info->unzip_lru_len; + total_info->io_sum += pool_info->io_sum; + total_info->io_cur += pool_info->io_cur; + total_info->unzip_sum += pool_info->unzip_sum; + total_info->unzip_cur += pool_info->unzip_cur; +} +/*******************************************************************//** +Collect buffer pool stats information for a buffer pool. Also +record aggregated stats if there are more than one buffer pool +in the server */ +static +void +buf_stats_get_pool_info( +/*====================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool */ + ulint pool_id, /*!< in: buffer pool ID */ + buf_pool_info_t* all_pool_info) /*!< in/out: buffer pool info + to fill */ +{ + buf_pool_info_t* pool_info; + time_t current_time; + double time_elapsed; + + /* Find appropriate pool_info to store stats for this buffer pool */ + pool_info = &all_pool_info[pool_id]; + + mutex_enter(&buf_pool->LRU_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); + buf_pool_mutex_enter(buf_pool); + buf_flush_list_mutex_enter(buf_pool); + + pool_info->pool_unique_id = pool_id; + + pool_info->pool_size = buf_pool->curr_size; + + pool_info->pool_size_bytes = buf_pool->curr_pool_size; + + pool_info->lru_len = UT_LIST_GET_LEN(buf_pool->LRU); + + pool_info->old_lru_len = buf_pool->LRU_old_len; + + pool_info->free_list_len = UT_LIST_GET_LEN(buf_pool->free); + + pool_info->flush_list_len = UT_LIST_GET_LEN(buf_pool->flush_list); + + pool_info->n_pend_unzip = UT_LIST_GET_LEN(buf_pool->unzip_LRU); + + pool_info->n_pend_reads = buf_pool->n_pend_reads; + + pool_info->n_pending_flush_lru = + (buf_pool->n_flush[BUF_FLUSH_LRU] + + buf_pool->init_flush[BUF_FLUSH_LRU]); + + pool_info->n_pending_flush_list = + (buf_pool->n_flush[BUF_FLUSH_LIST] + + buf_pool->init_flush[BUF_FLUSH_LIST]); + + pool_info->n_pending_flush_single_page = + buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]; + + buf_flush_list_mutex_exit(buf_pool); + + current_time = time(NULL); + time_elapsed = 0.001 + difftime(current_time, + buf_pool->last_printout_time); + + pool_info->n_pages_made_young = buf_pool->stat.n_pages_made_young; + + pool_info->n_pages_not_made_young = + buf_pool->stat.n_pages_not_made_young; + + pool_info->n_pages_read = buf_pool->stat.n_pages_read; + + pool_info->n_pages_created = buf_pool->stat.n_pages_created; + + pool_info->n_pages_written = buf_pool->stat.n_pages_written; + + pool_info->n_page_gets = buf_pool->stat.n_page_gets; + + pool_info->n_ra_pages_read = buf_pool->stat.n_ra_pages_read; + + pool_info->n_ra_pages_evicted = buf_pool->stat.n_ra_pages_evicted; + + pool_info->page_made_young_rate = + (buf_pool->stat.n_pages_made_young + - buf_pool->old_stat.n_pages_made_young) / time_elapsed; + + pool_info->page_not_made_young_rate = + (buf_pool->stat.n_pages_not_made_young + - buf_pool->old_stat.n_pages_not_made_young) / time_elapsed; + + pool_info->pages_read_rate = + (buf_pool->stat.n_pages_read + - buf_pool->old_stat.n_pages_read) / time_elapsed; + + pool_info->pages_created_rate = + (buf_pool->stat.n_pages_created + - buf_pool->old_stat.n_pages_created) / time_elapsed; + + pool_info->pages_written_rate = + (buf_pool->stat.n_pages_written + - buf_pool->old_stat.n_pages_written) / time_elapsed; + + pool_info->n_page_get_delta = buf_pool->stat.n_page_gets + - buf_pool->old_stat.n_page_gets; + + if (pool_info->n_page_get_delta) { + pool_info->page_read_delta = buf_pool->stat.n_pages_read + - buf_pool->old_stat.n_pages_read; + + pool_info->young_making_delta = + buf_pool->stat.n_pages_made_young + - buf_pool->old_stat.n_pages_made_young; + + pool_info->not_young_making_delta = + buf_pool->stat.n_pages_not_made_young + - buf_pool->old_stat.n_pages_not_made_young; + } + + pool_info->pages_readahead_rate = + (buf_pool->stat.n_ra_pages_read + - buf_pool->old_stat.n_ra_pages_read) / time_elapsed; + + pool_info->pages_evicted_rate = + (buf_pool->stat.n_ra_pages_evicted + - buf_pool->old_stat.n_ra_pages_evicted) / time_elapsed; + + pool_info->unzip_lru_len = UT_LIST_GET_LEN(buf_pool->unzip_LRU); + + pool_info->io_sum = buf_LRU_stat_sum.io; + + pool_info->io_cur = buf_LRU_stat_cur.io; + + pool_info->unzip_sum = buf_LRU_stat_sum.unzip; + + pool_info->unzip_cur = buf_LRU_stat_cur.unzip; + + buf_refresh_io_stats(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); + buf_pool_mutex_exit(buf_pool); +} + /*********************************************************************//** Prints info of the buffer i/o. */ UNIV_INTERN void -buf_print_io( -/*=========*/ - FILE* file) /*!< in/out: buffer where to print */ +buf_print_io_instance( +/*==================*/ + buf_pool_info_t*pool_info, /*!< in: buffer pool info */ + FILE* file) /*!< in/out: buffer where to print */ { - time_t current_time; - double time_elapsed; - ulint n_gets_diff; - - ut_ad(buf_pool); - - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - mutex_enter(&free_list_mutex); - mutex_enter(&buf_pool_mutex); - mutex_enter(&flush_list_mutex); + ut_ad(pool_info); fprintf(file, "Buffer pool size %lu\n" @@ -4711,68 +5491,43 @@ buf_print_io( "Modified db pages %lu\n" "Pending reads %lu\n" "Pending writes: LRU %lu, flush list %lu, single page %lu\n", - (ulong) buf_pool->curr_size, - (ulong) buf_pool->curr_size * UNIV_PAGE_SIZE, - (ulong) UT_LIST_GET_LEN(buf_pool->free), - (ulong) UT_LIST_GET_LEN(buf_pool->LRU), - (ulong) buf_pool->LRU_old_len, - (ulong) UT_LIST_GET_LEN(buf_pool->flush_list), - (ulong) buf_pool->n_pend_reads, - (ulong) buf_pool->n_flush[BUF_FLUSH_LRU] - + buf_pool->init_flush[BUF_FLUSH_LRU], - (ulong) buf_pool->n_flush[BUF_FLUSH_LIST] - + buf_pool->init_flush[BUF_FLUSH_LIST], - (ulong) buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]); - - current_time = time(NULL); - time_elapsed = 0.001 + difftime(current_time, - buf_pool->last_printout_time); + pool_info->pool_size, + pool_info->pool_size_bytes, + pool_info->free_list_len, + pool_info->lru_len, + pool_info->old_lru_len, + pool_info->flush_list_len, + pool_info->n_pend_reads, + pool_info->n_pending_flush_lru, + pool_info->n_pending_flush_list, + pool_info->n_pending_flush_single_page); fprintf(file, "Pages made young %lu, not young %lu\n" "%.2f youngs/s, %.2f non-youngs/s\n" "Pages read %lu, created %lu, written %lu\n" "%.2f reads/s, %.2f creates/s, %.2f writes/s\n", - (ulong) buf_pool->stat.n_pages_made_young, - (ulong) buf_pool->stat.n_pages_not_made_young, - (buf_pool->stat.n_pages_made_young - - buf_pool->old_stat.n_pages_made_young) - / time_elapsed, - (buf_pool->stat.n_pages_not_made_young - - buf_pool->old_stat.n_pages_not_made_young) - / time_elapsed, - (ulong) buf_pool->stat.n_pages_read, - (ulong) buf_pool->stat.n_pages_created, - (ulong) buf_pool->stat.n_pages_written, - (buf_pool->stat.n_pages_read - - buf_pool->old_stat.n_pages_read) - / time_elapsed, - (buf_pool->stat.n_pages_created - - buf_pool->old_stat.n_pages_created) - / time_elapsed, - (buf_pool->stat.n_pages_written - - buf_pool->old_stat.n_pages_written) - / time_elapsed); + pool_info->n_pages_made_young, + pool_info->n_pages_not_made_young, + pool_info->page_made_young_rate, + pool_info->page_not_made_young_rate, + pool_info->n_pages_read, + pool_info->n_pages_created, + pool_info->n_pages_written, + pool_info->pages_read_rate, + pool_info->pages_created_rate, + pool_info->pages_written_rate); - n_gets_diff = buf_pool->stat.n_page_gets - buf_pool->old_stat.n_page_gets; - - if (n_gets_diff) { + if (pool_info->n_page_get_delta) { fprintf(file, "Buffer pool hit rate %lu / 1000," " young-making rate %lu / 1000 not %lu / 1000\n", - (ulong) - (1000 - ((1000 * (buf_pool->stat.n_pages_read - - buf_pool->old_stat.n_pages_read)) - / (buf_pool->stat.n_page_gets - - buf_pool->old_stat.n_page_gets))), - (ulong) - (1000 * (buf_pool->stat.n_pages_made_young - - buf_pool->old_stat.n_pages_made_young) - / n_gets_diff), - (ulong) - (1000 * (buf_pool->stat.n_pages_not_made_young - - buf_pool->old_stat.n_pages_not_made_young) - / n_gets_diff)); + (ulong) (1000 - (1000 * pool_info->page_read_delta + / pool_info->n_page_get_delta)), + (ulong) (1000 * pool_info->young_making_delta + / pool_info->n_page_get_delta), + (ulong) (1000 * pool_info->not_young_making_delta + / pool_info->n_page_get_delta)); } else { fputs("No buffer pool page gets since the last printout\n", file); @@ -4781,73 +5536,130 @@ buf_print_io( /* Statistics about read ahead algorithm */ fprintf(file, "Pages read ahead %.2f/s," " evicted without access %.2f/s\n", - (buf_pool->stat.n_ra_pages_read - - buf_pool->old_stat.n_ra_pages_read) - / time_elapsed, - (buf_pool->stat.n_ra_pages_evicted - - buf_pool->old_stat.n_ra_pages_evicted) - / time_elapsed); + pool_info->pages_readahead_rate, + pool_info->pages_evicted_rate); /* Print some values to help us with visualizing what is happening with LRU eviction. */ fprintf(file, "LRU len: %lu, unzip_LRU len: %lu\n" "I/O sum[%lu]:cur[%lu], unzip sum[%lu]:cur[%lu]\n", - UT_LIST_GET_LEN(buf_pool->LRU), - UT_LIST_GET_LEN(buf_pool->unzip_LRU), - buf_LRU_stat_sum.io, buf_LRU_stat_cur.io, - buf_LRU_stat_sum.unzip, buf_LRU_stat_cur.unzip); + pool_info->lru_len, pool_info->unzip_lru_len, + pool_info->io_sum, pool_info->io_cur, + pool_info->unzip_sum, pool_info->unzip_cur); +} - buf_refresh_io_stats(); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - mutex_exit(&free_list_mutex); - mutex_exit(&buf_pool_mutex); - mutex_exit(&flush_list_mutex); +/*********************************************************************//** +Prints info of the buffer i/o. */ +UNIV_INTERN +void +buf_print_io( +/*=========*/ + FILE* file) /*!< in/out: buffer where to print */ +{ + ulint i; + buf_pool_info_t* pool_info; + buf_pool_info_t* pool_info_total; + + /* If srv_buf_pool_instances is greater than 1, allocate + one extra buf_pool_info_t, the last one stores + aggregated/total values from all pools */ + if (srv_buf_pool_instances > 1) { + pool_info = (buf_pool_info_t*) mem_zalloc(( + srv_buf_pool_instances + 1) * sizeof *pool_info); + + pool_info_total = &pool_info[srv_buf_pool_instances]; + } else { + ut_a(srv_buf_pool_instances == 1); + pool_info_total = pool_info = (buf_pool_info_t*) mem_zalloc( + sizeof *pool_info) + } + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + /* Fetch individual buffer pool info and calculate + aggregated stats along the way */ + buf_stats_get_pool_info(buf_pool, i, pool_info); + + /* If we have more than one buffer pool, store + the aggregated stats */ + if (srv_buf_pool_instances > 1) { + buf_stats_aggregate_pool_info(pool_info_total, + &pool_info[i]); + } + } + + /* Print the aggreate buffer pool info */ + buf_print_io_instance(pool_info_total, file); + + /* If there are more than one buffer pool, print each individual pool + info */ + if (srv_buf_pool_instances > 1) { + fputs("----------------------\n" + "INDIVIDUAL BUFFER POOL INFO\n" + "----------------------\n", file); + + for (i = 0; i < srv_buf_pool_instances; i++) { + fprintf(file, "---BUFFER POOL %lu\n", i); + buf_print_io_instance(&pool_info[i], file); + } + } + + mem_free(pool_info); } /**********************************************************************//** Refreshes the statistics used to print per-second averages. */ UNIV_INTERN void -buf_refresh_io_stats(void) -/*======================*/ +buf_refresh_io_stats( +/*=================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { - buf_pool->last_printout_time = time(NULL); + buf_pool->last_printout_time = ut_time(); buf_pool->old_stat = buf_pool->stat; } -/*********************************************************************//** -Asserts that all file pages in the buffer are in a replaceable state. -@return TRUE */ +/**********************************************************************//** +Refreshes the statistics used to print per-second averages. */ +UNIV_INTERN +void +buf_refresh_io_stats_all(void) +/*==========================*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_refresh_io_stats(buf_pool); + } +} + +/**********************************************************************//** +Check if all pages in all buffer pools are in a replacable state. +@return FALSE if not */ UNIV_INTERN ibool buf_all_freed(void) /*===============*/ { - buf_chunk_t* chunk; - ulint i; + ulint i; - ut_ad(buf_pool); + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; - //buf_pool_mutex_enter(); /* optimistic */ + buf_pool = buf_pool_from_array(i); - chunk = buf_pool->chunks; - - for (i = buf_pool->n_chunks; i--; chunk++) { - - const buf_block_t* block = buf_chunk_not_freed(chunk); - - if (UNIV_LIKELY_NULL(block)) { - fprintf(stderr, - "Page %lu %lu still fixed or dirty\n", - (ulong) block->page.space, - (ulong) block->page.offset); - ut_error; + if (!buf_all_freed_instance(buf_pool)) { + return(FALSE); } - } - - //buf_pool_mutex_exit(); /* optimistic */ + } return(TRUE); } @@ -4861,25 +5673,32 @@ ibool buf_pool_check_no_pending_io(void) /*==============================*/ { - ibool ret; + ulint i; + ibool ret = TRUE; - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter_all(); - if (buf_pool->n_pend_reads + buf_pool->n_flush[BUF_FLUSH_LRU] - + buf_pool->n_flush[BUF_FLUSH_LIST] - + buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]) { - ret = FALSE; - } else { - ret = TRUE; + for (i = 0; i < srv_buf_pool_instances && ret; i++) { + const buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + if (buf_pool->n_pend_reads + + buf_pool->n_flush[BUF_FLUSH_LRU] + + buf_pool->n_flush[BUF_FLUSH_LIST] + + buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]) { + + ret = FALSE; + } } - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit_all(); return(ret); } +#if 0 +Code currently not used /*********************************************************************//** Gets the current length of the free list of buffer blocks. @return length of the free list */ @@ -4890,16 +5709,18 @@ buf_get_free_list_len(void) { ulint len; - //buf_pool_mutex_enter(); - mutex_enter(&free_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->free_list_mutex); len = UT_LIST_GET_LEN(buf_pool->free); - //buf_pool_mutex_exit(); - mutex_exit(&free_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->free_list_mutex); return(len); } +#endif + #else /* !UNIV_HOTBACKUP */ /********************************************************************//** Inits a page to the buffer buf_pool, for use in ibbackup --restore. */ diff --git a/buf/buf0flu.c b/buf/buf0flu.c index cda8d3b170e..e642b532a8f 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -43,6 +43,8 @@ Created 11/11/1995 Heikki Tuuri #include "log0log.h" #include "os0file.h" #include "trx0sys.h" +#include "mysql/plugin.h" +#include "mysql/service_thd_wait.h" /********************************************************************** These statistics are generated for heuristics used in estimating the @@ -73,7 +75,7 @@ Updated by buf_flush_stat_update(). Not protected by any mutex. */ static buf_flush_stat_t buf_flush_stat_sum; /** Number of pages flushed through non flush_list flushes. */ -static ulint buf_lru_flush_page_count = 0; +// static ulint buf_lru_flush_page_count = 0; /* @} */ @@ -83,27 +85,56 @@ Validates the flush list. @return TRUE if ok */ static ibool -buf_flush_validate_low(void); -/*========================*/ +buf_flush_validate_low( +/*===================*/ + buf_pool_t* buf_pool); /*!< in: Buffer pool instance */ + +/******************************************************************//** +Validates the flush list some of the time. +@return TRUE if ok or the check was skipped */ +static +ibool +buf_flush_validate_skip( +/*====================*/ + buf_pool_t* buf_pool) /*!< in: Buffer pool instance */ +{ +/** Try buf_flush_validate_low() every this many times */ +# define BUF_FLUSH_VALIDATE_SKIP 23 + + /** The buf_flush_validate_low() call skip counter. + Use a signed type because of the race condition below. */ + static int buf_flush_validate_count = BUF_FLUSH_VALIDATE_SKIP; + + /* There is a race condition below, but it does not matter, + because this call is only for heuristic purposes. We want to + reduce the call frequency of the costly buf_flush_validate_low() + check in debug builds. */ + if (--buf_flush_validate_count > 0) { + return(TRUE); + } + + buf_flush_validate_count = BUF_FLUSH_VALIDATE_SKIP; + return(buf_flush_validate_low(buf_pool)); +} #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ -/********************************************************************//** +/******************************************************************//** Insert a block in the flush_rbt and returns a pointer to its predecessor or NULL if no predecessor. The ordering is maintained on the basis of the key. -@return pointer to the predecessor or NULL if no predecessor. */ +@return pointer to the predecessor or NULL if no predecessor. */ static buf_page_t* buf_flush_insert_in_flush_rbt( /*==========================*/ - buf_page_t* bpage) /*!< in: bpage to be inserted. */ + buf_page_t* bpage) /*!< in: bpage to be inserted. */ { - buf_page_t* prev = NULL; const ib_rbt_node_t* c_node; const ib_rbt_node_t* p_node; + buf_page_t* prev = NULL; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&flush_list_mutex)); + ut_ad(buf_flush_list_mutex_own(buf_pool)); /* Insert this buffer into the rbt. */ c_node = rbt_insert(buf_pool->flush_rbt, &bpage, &bpage); @@ -113,36 +144,39 @@ buf_flush_insert_in_flush_rbt( p_node = rbt_prev(buf_pool->flush_rbt, c_node); if (p_node != NULL) { - prev = *rbt_value(buf_page_t*, p_node); + buf_page_t** value; + value = rbt_value(buf_page_t*, p_node); + prev = *value; ut_a(prev != NULL); } return(prev); } -/********************************************************************//** +/*********************************************************//** Delete a bpage from the flush_rbt. */ static void buf_flush_delete_from_flush_rbt( /*============================*/ - buf_page_t* bpage) /*!< in: bpage to be removed. */ + buf_page_t* bpage) /*!< in: bpage to be removed. */ { - #ifdef UNIV_DEBUG - ibool ret = FALSE; + ibool ret = FALSE; #endif /* UNIV_DEBUG */ + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + + ut_ad(buf_flush_list_mutex_own(buf_pool)); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&flush_list_mutex)); #ifdef UNIV_DEBUG ret = #endif /* UNIV_DEBUG */ rbt_delete(buf_pool->flush_rbt, &bpage); + ut_ad(ret); } -/********************************************************************//** +/*****************************************************************//** Compare two modified blocks in the buffer pool. The key for comparison is: key = @@ -151,7 +185,7 @@ buf_pool->flush_rbt. Note that for the purpose of flush_rbt, we only need to order blocks on the oldest_modification. The other two fields are used to uniquely identify the blocks. -@return < 0 if b2 < b1, 0 if b2 == b1, > 0 if b2 > b1 */ +@return < 0 if b2 < b1, 0 if b2 == b1, > 0 if b2 > b1 */ static int buf_flush_block_cmp( @@ -159,29 +193,24 @@ buf_flush_block_cmp( const void* p1, /*!< in: block1 */ const void* p2) /*!< in: block2 */ { - int ret; - const buf_page_t* b1; - const buf_page_t* b2; - - ut_ad(p1 != NULL); - ut_ad(p2 != NULL); - - b1 = *(const buf_page_t**) p1; - b2 = *(const buf_page_t**) p2; + int ret; + const buf_page_t* b1 = *(const buf_page_t**) p1; + const buf_page_t* b2 = *(const buf_page_t**) p2; +#ifdef UNIV_DEBUG + buf_pool_t* buf_pool = buf_pool_from_bpage(b1); +#endif /* UNIV_DEBUG */ ut_ad(b1 != NULL); ut_ad(b2 != NULL); + ut_ad(buf_flush_list_mutex_own(buf_pool)); + ut_ad(b1->in_flush_list); ut_ad(b2->in_flush_list); - if (b2->oldest_modification - > b1->oldest_modification) { + if (b2->oldest_modification > b1->oldest_modification) { return(1); - } - - if (b2->oldest_modification - < b1->oldest_modification) { + } else if (b2->oldest_modification < b1->oldest_modification) { return(-1); } @@ -201,14 +230,21 @@ void buf_flush_init_flush_rbt(void) /*==========================*/ { - //buf_pool_mutex_enter(); - mutex_enter(&flush_list_mutex); + ulint i; - /* Create red black tree for speedy insertions in flush list. */ - buf_pool->flush_rbt = rbt_create(sizeof(buf_page_t*), - buf_flush_block_cmp); - //buf_pool_mutex_exit(); - mutex_exit(&flush_list_mutex); + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_flush_list_mutex_enter(buf_pool); + + /* Create red black tree for speedy insertions in flush list. */ + buf_pool->flush_rbt = rbt_create( + sizeof(buf_page_t*), buf_flush_block_cmp); + + buf_flush_list_mutex_exit(buf_pool); + } } /********************************************************************//** @@ -218,18 +254,24 @@ void buf_flush_free_flush_rbt(void) /*==========================*/ { - //buf_pool_mutex_enter(); - mutex_enter(&flush_list_mutex); + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_flush_list_mutex_enter(buf_pool); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(buf_flush_validate_low()); + ut_a(buf_flush_validate_low(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ - rbt_free(buf_pool->flush_rbt); - buf_pool->flush_rbt = NULL; + rbt_free(buf_pool->flush_rbt); + buf_pool->flush_rbt = NULL; - //buf_pool_mutex_exit(); - mutex_exit(&flush_list_mutex); + buf_flush_list_mutex_exit(buf_pool); + } } /********************************************************************//** @@ -238,28 +280,33 @@ UNIV_INTERN void buf_flush_insert_into_flush_list( /*=============================*/ - buf_block_t* block) /*!< in/out: block which is modified */ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + buf_block_t* block, /*!< in/out: block which is modified */ + ib_uint64_t lsn) /*!< in: oldest modification */ { - //ut_ad(buf_pool_mutex_own()); + ut_ad(!buf_pool_mutex_own(buf_pool)); + ut_ad(log_flush_order_mutex_own()); ut_ad(mutex_own(&block->mutex)); - ut_ad(mutex_own(&flush_list_mutex)); + + buf_flush_list_mutex_enter(buf_pool); + ut_ad((UT_LIST_GET_FIRST(buf_pool->flush_list) == NULL) || (UT_LIST_GET_FIRST(buf_pool->flush_list)->oldest_modification - <= block->page.oldest_modification)); + <= lsn)); /* If we are in the recovery then we need to update the flush red-black tree as well. */ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) { - buf_flush_insert_sorted_into_flush_list(block); + buf_flush_list_mutex_exit(buf_pool); + buf_flush_insert_sorted_into_flush_list(buf_pool, block, lsn); return; } ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); - ut_ad(block->page.in_LRU_list); - ut_ad(block->page.in_page_hash); - ut_ad(!block->page.in_zip_hash); ut_ad(!block->page.in_flush_list); + ut_d(block->page.in_flush_list = TRUE); + block->page.oldest_modification = lsn; UT_LIST_ADD_FIRST(flush_list, buf_pool->flush_list, &block->page); #ifdef UNIV_DEBUG_VALGRIND @@ -274,8 +321,10 @@ buf_flush_insert_into_flush_list( } #endif /* UNIV_DEBUG_VALGRIND */ #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(buf_flush_validate_low()); + ut_a(buf_flush_validate_skip(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + + buf_flush_list_mutex_exit(buf_pool); } /********************************************************************//** @@ -286,21 +335,39 @@ UNIV_INTERN void buf_flush_insert_sorted_into_flush_list( /*====================================*/ - buf_block_t* block) /*!< in/out: block which is modified */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + buf_block_t* block, /*!< in/out: block which is modified */ + ib_uint64_t lsn) /*!< in: oldest modification */ { buf_page_t* prev_b; buf_page_t* b; - //ut_ad(buf_pool_mutex_own()); + ut_ad(!buf_pool_mutex_own(buf_pool)); + ut_ad(log_flush_order_mutex_own()); ut_ad(mutex_own(&block->mutex)); - ut_ad(mutex_own(&flush_list_mutex)); ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); + buf_flush_list_mutex_enter(buf_pool); + + /* The field in_LRU_list is protected by buf_pool->mutex, which + we are not holding. However, while a block is in the flush + list, it is dirty and cannot be discarded, not from the + page_hash or from the LRU list. At most, the uncompressed + page frame of a compressed block may be discarded or created + (copying the block->page to or from a buf_page_t that is + dynamically allocated from buf_buddy_alloc()). Because those + transitions hold block->mutex and the flush list mutex (via + buf_flush_relocate_on_flush_list()), there is no possibility + of a race condition in the assertions below. */ ut_ad(block->page.in_LRU_list); ut_ad(block->page.in_page_hash); + /* buf_buddy_block_register() will take a block in the + BUF_BLOCK_MEMORY state, not a file page. */ ut_ad(!block->page.in_zip_hash); + ut_ad(!block->page.in_flush_list); ut_d(block->page.in_flush_list = TRUE); + block->page.oldest_modification = lsn; #ifdef UNIV_DEBUG_VALGRIND { @@ -346,8 +413,10 @@ buf_flush_insert_sorted_into_flush_list( } #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(buf_flush_validate_low()); + ut_a(buf_flush_validate_low(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + + buf_flush_list_mutex_exit(buf_pool); } /********************************************************************//** @@ -361,9 +430,12 @@ buf_flush_ready_for_replace( buf_page_t* bpage) /*!< in: buffer control block, must be buf_page_in_file(bpage) and in the LRU list */ { - //ut_ad(buf_pool_mutex_own()); +#ifdef UNIV_DEBUG + //buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + //ut_ad(buf_pool_mutex_own(buf_pool)); +#endif ut_ad(mutex_own(buf_page_get_mutex(bpage))); - //ut_ad(bpage->in_LRU_list); /* optimistic use */ + //ut_ad(bpage->in_LRU_list); if (UNIV_LIKELY(bpage->in_LRU_list && buf_page_in_file(bpage))) { @@ -397,8 +469,11 @@ buf_flush_ready_for_flush( buf_page_in_file(bpage) */ enum buf_flush flush_type)/*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { +#ifdef UNIV_DEBUG + //buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + //ut_ad(buf_pool_mutex_own(buf_pool)); +#endif //ut_a(buf_page_in_file(bpage)); - //ut_ad(buf_pool_mutex_own()); /*optimistic...*/ ut_ad(mutex_own(buf_page_get_mutex(bpage))); ut_ad(flush_type == BUF_FLUSH_LRU || BUF_FLUSH_LIST); @@ -438,22 +513,22 @@ buf_flush_remove( /*=============*/ buf_page_t* bpage) /*!< in: pointer to the block in question */ { - //ut_ad(buf_pool_mutex_own()); + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + + //ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(mutex_own(buf_page_get_mutex(bpage))); - - mutex_enter(&flush_list_mutex); - ut_ad(bpage->in_flush_list); + buf_flush_list_mutex_enter(buf_pool); + switch (buf_page_get_state(bpage)) { case BUF_BLOCK_ZIP_PAGE: - /* clean compressed pages should not be on the flush list */ + /* Clean compressed pages should not be on the flush list */ case BUF_BLOCK_ZIP_FREE: case BUF_BLOCK_NOT_USED: case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_MEMORY: case BUF_BLOCK_REMOVE_HASH: - mutex_exit(&flush_list_mutex); ut_error; return; case BUF_BLOCK_ZIP_DIRTY: @@ -466,7 +541,7 @@ buf_flush_remove( break; } - /* If the flush_rbt is active then delete from it as well. */ + /* If the flush_rbt is active then delete from there as well. */ if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) { buf_flush_delete_from_flush_rbt(bpage); } @@ -477,15 +552,24 @@ buf_flush_remove( bpage->oldest_modification = 0; - ut_d(UT_LIST_VALIDATE(flush_list, buf_page_t, buf_pool->flush_list, - ut_ad(ut_list_node_313->in_flush_list))); - mutex_exit(&flush_list_mutex); +#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG + ut_a(buf_flush_validate_skip(buf_pool)); +#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + + buf_flush_list_mutex_exit(buf_pool); } -/********************************************************************//** +/*******************************************************************//** Relocates a buffer control block on the flush_list. -Note that it is assumed that the contents of bpage has already been -copied to dpage. */ +Note that it is assumed that the contents of bpage have already been +copied to dpage. +IMPORTANT: When this function is called bpage and dpage are not +exact copies of each other. For example, they both will have different +::state. Also the ::list pointers in dpage may be stale. We need to +use the current list node (bpage) to do the list manipulation because +the list pointers could have changed between the time that we copied +the contents of bpage to the dpage and the flush list manipulation +below. */ UNIV_INTERN void buf_flush_relocate_on_flush_list( @@ -493,14 +577,25 @@ buf_flush_relocate_on_flush_list( buf_page_t* bpage, /*!< in/out: control block being moved */ buf_page_t* dpage) /*!< in/out: destination block */ { - buf_page_t* prev; - buf_page_t* prev_b = NULL; + buf_page_t* prev; + buf_page_t* prev_b = NULL; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&flush_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + /* Must reside in the same buffer pool. */ + ut_ad(buf_pool == buf_pool_from_bpage(dpage)); ut_ad(mutex_own(buf_page_get_mutex(bpage))); + buf_flush_list_mutex_enter(buf_pool); + + /* FIXME: At this point we have both buf_pool and flush_list + mutexes. Theoretically removal of a block from flush list is + only covered by flush_list mutex but currently we do + have buf_pool mutex in buf_flush_remove() therefore this block + is guaranteed to be in the flush list. We need to check if + this will work without the assumption of block removing code + having the buf_pool mutex. */ ut_ad(bpage->in_flush_list); ut_ad(dpage->in_flush_list); @@ -536,8 +631,10 @@ buf_flush_relocate_on_flush_list( ut_a(!buf_pool->flush_rbt || prev_b == prev); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(buf_flush_validate_low()); + ut_a(buf_flush_validate_low(buf_pool)); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ + + buf_flush_list_mutex_exit(buf_pool); } /********************************************************************//** @@ -549,6 +646,7 @@ buf_flush_write_complete( buf_page_t* bpage) /*!< in: pointer to the block in question */ { enum buf_flush flush_type; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); ut_ad(bpage); @@ -569,8 +667,8 @@ buf_flush_write_complete( /* fprintf(stderr, "n pending flush %lu\n", buf_pool->n_flush[flush_type]); */ - if ((buf_pool->n_flush[flush_type] == 0) - && (buf_pool->init_flush[flush_type] == FALSE)) { + if (buf_pool->n_flush[flush_type] == 0 + && buf_pool->init_flush[flush_type] == FALSE) { /* The running flush batch has ended */ @@ -932,8 +1030,8 @@ buf_flush_init_for_writing( case FIL_PAGE_TYPE_ZBLOB: case FIL_PAGE_TYPE_ZBLOB2: case FIL_PAGE_INDEX: - mach_write_ull(page_zip->data - + FIL_PAGE_LSN, newest_lsn); + mach_write_to_8(page_zip->data + + FIL_PAGE_LSN, newest_lsn); memset(page_zip->data + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); mach_write_to_4(page_zip->data + FIL_PAGE_SPACE_OR_CHKSUM, @@ -955,10 +1053,10 @@ buf_flush_init_for_writing( } /* Write the newest modification lsn to the page header and trailer */ - mach_write_ull(page + FIL_PAGE_LSN, newest_lsn); + mach_write_to_8(page + FIL_PAGE_LSN, newest_lsn); - mach_write_ull(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, - newest_lsn); + mach_write_to_8(page + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM, + newest_lsn); /* Store the new formula checksum */ @@ -993,20 +1091,26 @@ buf_flush_write_block_low( { ulint zip_size = buf_page_get_zip_size(bpage); page_t* frame = NULL; + +#ifdef UNIV_DEBUG + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + //ut_ad(!buf_pool_mutex_own(buf_pool)); +#endif + #ifdef UNIV_LOG_DEBUG static ibool univ_log_debug_warned; #endif /* UNIV_LOG_DEBUG */ ut_ad(buf_page_in_file(bpage)); - /* We are not holding buf_pool_mutex or block_mutex here. + /* We are not holding buf_pool->mutex or block_mutex here. Nevertheless, it is safe to access bpage, because it is io_fixed and oldest_modification != 0. Thus, it cannot be relocated in the buffer pool or removed from flush_list or LRU_list. */ - //ut_ad(!buf_pool_mutex_own()); - ut_ad(!mutex_own(&LRU_list_mutex)); - ut_ad(!mutex_own(&flush_list_mutex)); + //ut_ad(!buf_pool_mutex_own(buf_pool)); + ut_ad(!mutex_own(&buf_pool->LRU_list_mutex)); + ut_ad(!buf_flush_list_mutex_own(buf_pool)); ut_ad(!mutex_own(buf_page_get_mutex(bpage))); ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_WRITE); ut_ad(bpage->oldest_modification != 0); @@ -1043,8 +1147,8 @@ buf_flush_write_block_low( ut_a(mach_read_from_4(frame + FIL_PAGE_SPACE_OR_CHKSUM) == page_zip_calc_checksum(frame, zip_size)); } - mach_write_ull(frame + FIL_PAGE_LSN, - bpage->newest_modification); + mach_write_to_8(frame + FIL_PAGE_LSN, + bpage->newest_modification); memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); break; case BUF_BLOCK_FILE_PAGE: @@ -1074,7 +1178,7 @@ buf_flush_write_block_low( # if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG /********************************************************************//** Writes a flushable page asynchronously from the buffer pool to a file. -NOTE: buf_pool_mutex and block->mutex must be held upon entering this +NOTE: buf_pool->mutex and block->mutex 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 */ @@ -1082,9 +1186,10 @@ UNIV_INTERN ibool buf_flush_page_try( /*===============*/ + buf_pool_t* buf_pool, /*!< in/out: buffer pool instance */ buf_block_t* block) /*!< in/out: buffer control block */ { - ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE); ut_ad(mutex_own(&block->mutex)); @@ -1092,8 +1197,11 @@ buf_flush_page_try( return(FALSE); } + buf_pool_mutex_enter(buf_pool); + if (buf_pool->n_flush[BUF_FLUSH_LRU] > 0 || buf_pool->init_flush[BUF_FLUSH_LRU]) { + buf_pool_mutex_exit(buf_pool); /* There is already a flush batch of the same type running */ return(FALSE); } @@ -1123,7 +1231,7 @@ buf_flush_page_try( immediately. */ mutex_exit(&block->mutex); - buf_pool_mutex_exit(); + buf_pool_mutex_exit(buf_pool); /* Even though block is not protected by any mutex at this point, it is safe to access block, because it is io_fixed and @@ -1132,7 +1240,7 @@ buf_flush_page_try( buf_flush_write_block_low(&block->page); - buf_pool_mutex_enter(); + buf_pool_mutex_enter(buf_pool); buf_pool->init_flush[BUF_FLUSH_LRU] = FALSE; if (buf_pool->n_flush[BUF_FLUSH_LRU] == 0) { @@ -1140,7 +1248,7 @@ buf_flush_page_try( os_event_set(buf_pool->no_flush[BUF_FLUSH_LRU]); } - buf_pool_mutex_exit(); + buf_pool_mutex_exit(buf_pool); buf_flush_buffered_writes(); return(TRUE); @@ -1151,13 +1259,14 @@ buf_flush_page_try( Writes a flushable page asynchronously from the buffer pool to a file. NOTE: in simulated aio we must call os_aio_simulated_wake_handler_threads after we have posted a batch of -writes! NOTE: buf_pool_mutex and buf_page_get_mutex(bpage) must be +writes! NOTE: buf_pool->mutex and buf_page_get_mutex(bpage) must be held upon entering this function, and they will be released by this function. */ static void buf_flush_page( /*===========*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ buf_page_t* bpage, /*!< in: buffer control block */ enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ @@ -1166,18 +1275,17 @@ buf_flush_page( ibool is_uncompressed; ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST); - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX) - || rw_lock_own(&page_hash_latch, RW_LOCK_SHARED)); + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_SHARED)); #endif ut_ad(buf_page_in_file(bpage)); block_mutex = buf_page_get_mutex(bpage); ut_ad(mutex_own(block_mutex)); - mutex_enter(&buf_pool_mutex); - rw_lock_s_unlock(&page_hash_latch); + buf_pool_mutex_enter(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); ut_ad(buf_flush_ready_for_flush(bpage, flush_type)); @@ -1193,7 +1301,7 @@ buf_flush_page( buf_pool->n_flush[flush_type]++; is_uncompressed = (buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE); - ut_ad(is_uncompressed == (block_mutex != &buf_pool_zip_mutex)); + ut_ad(is_uncompressed == (block_mutex != &buf_pool->zip_mutex)); switch (flush_type) { ibool is_s_latched; @@ -1209,8 +1317,7 @@ buf_flush_page( } mutex_exit(block_mutex); - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); /* Even though bpage is not protected by any mutex at this point, it is safe to access bpage, because it is @@ -1247,8 +1354,7 @@ buf_flush_page( immediately. */ mutex_exit(block_mutex); - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); break; default: @@ -1281,27 +1387,35 @@ buf_flush_try_neighbors( ulint offset, /*!< in: page offset */ enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ - ulint flush_neighbors) + ulint n_flushed, /*!< in: number of pages + flushed so far in this batch */ + ulint n_to_flush) /*!< in: maximum number of pages + we are allowed to flush */ { - buf_page_t* bpage; - ulint low, high; - ulint count = 0; ulint i; + ulint low; + ulint high; + ulint count = 0; + buf_pool_t* buf_pool = buf_pool_get(space, offset); ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST); - if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN || !flush_neighbors) { - /* If there is little space, it is better not to flush any - block except from the end of the LRU list */ + if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN || !srv_flush_neighbor_pages) { + /* If there is little space, it is better not to flush + any block except from the end of the LRU list */ low = offset; high = offset + 1; } else { - /* When flushed, dirty blocks are searched in neighborhoods of - this size, and flushed along with the original page. */ + /* When flushed, dirty blocks are searched in + neighborhoods of this size, and flushed along with the + original page. */ - ulint buf_flush_area = ut_min(BUF_READ_AHEAD_AREA, - buf_pool->curr_size / 16); + ulint buf_flush_area; + + buf_flush_area = ut_min( + BUF_READ_AHEAD_AREA(buf_pool), + buf_pool->curr_size / 16); low = (offset / buf_flush_area) * buf_flush_area; high = (offset / buf_flush_area + 1) * buf_flush_area; @@ -1313,15 +1427,37 @@ buf_flush_try_neighbors( high = fil_space_get_size(space); } - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); - for (i = low; i < high; i++) { - bpage = buf_page_hash_get(space, i); + buf_page_t* bpage; + + if ((count + n_flushed) >= n_to_flush) { + + /* We have already flushed enough pages and + should call it a day. There is, however, one + exception. If the page whose neighbors we + are flushing has not been flushed yet then + we'll try to flush the victim that we + selected originally. */ + if (i <= offset) { + i = offset; + } else { + break; + } + } + + buf_pool = buf_pool_get(space, i); + + //buf_pool_mutex_enter(buf_pool); + rw_lock_s_lock(&buf_pool->page_hash_latch); + + /* We only want to flush pages from this buffer pool. */ + bpage = buf_page_hash_get(buf_pool, space, i); if (!bpage) { + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); continue; } @@ -1338,27 +1474,259 @@ buf_flush_try_neighbors( if (block_mutex && buf_flush_ready_for_flush(bpage, flush_type) && (i == offset || !bpage->buf_fix_count)) { /* We only try to flush those - neighbors != offset where the buf fix count is - zero, as we then know that we probably can - latch the page without a semaphore wait. - Semaphore waits are expensive because we must - flush the doublewrite buffer before we start + neighbors != offset where the buf fix + count is zero, as we then know that we + probably can latch the page without a + semaphore wait. Semaphore waits are + expensive because we must flush the + doublewrite buffer before we start waiting. */ - buf_flush_page(bpage, flush_type); + buf_flush_page(buf_pool, bpage, flush_type); ut_ad(!mutex_own(block_mutex)); + ut_ad(!buf_pool_mutex_own(buf_pool)); count++; - - //buf_pool_mutex_enter(); - rw_lock_s_lock(&page_hash_latch); + continue; } else if (block_mutex) { mutex_exit(block_mutex); } } + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); } - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + return(count); +} + +/********************************************************************//** +Check if the block is modified and ready for flushing. If the the block +is ready to flush then flush the page and try o flush its neighbors. + +@return TRUE if buf_pool mutex was not released during this function. +This does not guarantee that some pages were written as well. +Number of pages written are incremented to the count. */ +static +ibool +buf_flush_page_and_try_neighbors( +/*=============================*/ + buf_page_t* bpage, /*!< in: buffer control block, + must be + buf_page_in_file(bpage) */ + enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU + or BUF_FLUSH_LIST */ + ulint n_to_flush, /*!< in: number of pages to + flush */ + ulint* count) /*!< in/out: number of pages + flushed */ +{ + mutex_t* block_mutex; + ibool flushed = FALSE; +#ifdef UNIV_DEBUG + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); +#endif /* UNIV_DEBUG */ + + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(flush_type != BUF_FLUSH_LRU + || mutex_own(&buf_pool->LRU_list_mutex)); + + block_mutex = buf_page_get_mutex_enter(bpage); + + //ut_a(buf_page_in_file(bpage)); + + if (block_mutex && buf_flush_ready_for_flush(bpage, flush_type)) { + ulint space; + ulint offset; + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_bpage(bpage); + + //buf_pool_mutex_exit(buf_pool); + if (flush_type == BUF_FLUSH_LRU) { + mutex_exit(&buf_pool->LRU_list_mutex); + } + + /* These fields are protected by both the + buffer pool mutex and block mutex. */ + space = buf_page_get_space(bpage); + offset = buf_page_get_page_no(bpage); + + mutex_exit(block_mutex); + + /* Try to flush also all the neighbors */ + *count += buf_flush_try_neighbors(space, + offset, + flush_type, + *count, + n_to_flush); + + //buf_pool_mutex_enter(buf_pool); + if (flush_type == BUF_FLUSH_LRU) { + mutex_enter(&buf_pool->LRU_list_mutex); + } + flushed = TRUE; + } else if (block_mutex) { + mutex_exit(block_mutex); + } + + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(flush_type != BUF_FLUSH_LRU + || mutex_own(&buf_pool->LRU_list_mutex)); + + return(flushed); +} + +/*******************************************************************//** +This utility flushes dirty blocks from the end of the LRU list. +In the case of an LRU flush the calling thread may own latches to +pages: to avoid deadlocks, this function must be written so that it +cannot end up waiting for these latches! +@return number of blocks for which the write request was queued. */ +static +ulint +buf_flush_LRU_list_batch( +/*=====================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint max) /*!< in: max of blocks to flush */ +{ + buf_page_t* bpage; + ulint count = 0; + + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + + do { + /* Start from the end of the list looking for a + suitable block to be flushed. */ + bpage = UT_LIST_GET_LAST(buf_pool->LRU); + + /* Iterate backwards over the flush list till we find + a page that isn't ready for flushing. */ + while (bpage != NULL + && !buf_flush_page_and_try_neighbors( + bpage, BUF_FLUSH_LRU, max, &count)) { + + bpage = UT_LIST_GET_PREV(LRU, bpage); + } + } while (bpage != NULL && count < max); + + /* We keep track of all flushes happening as part of LRU + flush. When estimating the desired rate at which flush_list + should be flushed, we factor in this value. */ + buf_lru_flush_page_count += count; + + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + + return(count); +} + +/*******************************************************************//** +This utility flushes dirty blocks from the end of the flush_list. +the calling thread is not allowed to own any latches on pages! +@return number of blocks for which the write request was queued; +ULINT_UNDEFINED if there was a flush of the same type already +running */ +static +ulint +buf_flush_flush_list_batch( +/*=======================*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint min_n, /*!< in: wished minimum mumber + of blocks flushed (it is not + guaranteed that the actual + number is that big, though) */ + ib_uint64_t lsn_limit) /*!< all blocks whose + oldest_modification is smaller + than this should be flushed (if + their number does not exceed + min_n) */ +{ + ulint len; + buf_page_t* bpage; + buf_page_t* prev_bpage = NULL; + ulint count = 0; + + //ut_ad(buf_pool_mutex_own(buf_pool)); + + /* If we have flushed enough, leave the loop */ + do { + /* Start from the end of the list looking for a suitable + block to be flushed. */ + + buf_flush_list_mutex_enter(buf_pool); + + /* We use len here because theoretically insertions can + happen in the flush_list below while we are traversing + it for a suitable candidate for flushing. We'd like to + set a limit on how farther we are willing to traverse + the list. */ + len = UT_LIST_GET_LEN(buf_pool->flush_list); + bpage = UT_LIST_GET_LAST(buf_pool->flush_list); + + if (bpage) { + ut_a(bpage->oldest_modification > 0); + prev_bpage = UT_LIST_GET_PREV(flush_list, bpage); + } + + if (!bpage || bpage->oldest_modification >= lsn_limit) { + + /* We have flushed enough */ + buf_flush_list_mutex_exit(buf_pool); + break; + } + + ut_a(bpage->oldest_modification > 0); + + ut_ad(bpage->in_flush_list); + + buf_flush_list_mutex_exit(buf_pool); + + /* The list may change during the flushing and we cannot + safely preserve within this function a pointer to a + block in the list! */ + while (bpage != NULL + && len > 0 + && !buf_flush_page_and_try_neighbors( + bpage, BUF_FLUSH_LIST, min_n, &count)) { + + buf_flush_list_mutex_enter(buf_pool); + + /* If we are here that means that buf_pool->mutex + was not released in buf_flush_page_and_try_neighbors() + above and this guarantees that bpage didn't get + relocated since we released the flush_list + mutex above. There is a chance, however, that + the bpage got removed from flush_list (not + currently possible because flush_list_remove() + also obtains buf_pool mutex but that may change + in future). To avoid this scenario we check + the oldest_modification and if it is zero + we start all over again. */ + if (bpage->oldest_modification == 0) { + buf_flush_list_mutex_exit(buf_pool); + break; + } + + bpage = UT_LIST_GET_PREV(flush_list, bpage); + + //ut_ad(!bpage || bpage->in_flush_list); + if (bpage != prev_bpage) { + /* the search might warp.. retrying */ + buf_flush_list_mutex_exit(buf_pool); + break; + } + if (bpage) { + prev_bpage = UT_LIST_GET_PREV(flush_list, bpage); + } + + buf_flush_list_mutex_exit(buf_pool); + + --len; + } + + } while (count < min_n && bpage != NULL && len > 0); + + //ut_ad(buf_pool_mutex_own(buf_pool)); return(count); } @@ -1371,10 +1739,11 @@ end up waiting for these latches! NOTE 2: in the case of a flush list flush, the calling thread is not allowed to own any latches on pages! @return number of blocks for which the write request was queued; ULINT_UNDEFINED if there was a flush of the same type already running */ -UNIV_INTERN +static ulint buf_flush_batch( /*============*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ enum buf_flush flush_type, /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST; if BUF_FLUSH_LIST, then the caller must not own any @@ -1382,150 +1751,127 @@ buf_flush_batch( ulint min_n, /*!< in: wished minimum mumber of blocks flushed (it is not guaranteed that the actual number is that big, though) */ - ib_uint64_t lsn_limit) /*!< in the case BUF_FLUSH_LIST all - blocks whose oldest_modification is + ib_uint64_t lsn_limit) /*!< in: in the case of BUF_FLUSH_LIST + all blocks whose oldest_modification is smaller than this should be flushed (if their number does not exceed min_n), otherwise ignored */ { - buf_page_t* bpage; - buf_page_t* prev_bpage = NULL; - ulint page_count = 0; - ulint space; - ulint offset; - ulint remaining = 0; + ulint count = 0; - ut_ad((flush_type == BUF_FLUSH_LRU) - || (flush_type == BUF_FLUSH_LIST)); + ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST); #ifdef UNIV_SYNC_DEBUG ut_ad((flush_type != BUF_FLUSH_LIST) - || sync_thread_levels_empty_gen(TRUE)); + || sync_thread_levels_empty_except_dict()); #endif /* UNIV_SYNC_DEBUG */ - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); - if ((buf_pool->n_flush[flush_type] > 0) - || (buf_pool->init_flush[flush_type] == TRUE)) { + //buf_pool_mutex_enter(buf_pool); + + /* Note: The buffer pool mutex is released and reacquired within + the flush functions. */ + switch(flush_type) { + case BUF_FLUSH_LRU: + mutex_enter(&buf_pool->LRU_list_mutex); + count = buf_flush_LRU_list_batch(buf_pool, min_n); + mutex_exit(&buf_pool->LRU_list_mutex); + break; + case BUF_FLUSH_LIST: + count = buf_flush_flush_list_batch(buf_pool, min_n, lsn_limit); + break; + default: + ut_error; + } + + //buf_pool_mutex_exit(buf_pool); + + buf_flush_buffered_writes(); + +#ifdef UNIV_DEBUG + if (buf_debug_prints && count > 0) { + fprintf(stderr, flush_type == BUF_FLUSH_LRU + ? "Flushed %lu pages in LRU flush\n" + : "Flushed %lu pages in flush list flush\n", + (ulong) count); + } +#endif /* UNIV_DEBUG */ + + srv_buf_pool_flushed += count; + + return(count); +} + +/******************************************************************//** +Gather the aggregated stats for both flush list and LRU list flushing */ +static +void +buf_flush_common( +/*=============*/ + enum buf_flush flush_type, /*!< in: type of flush */ + ulint page_count) /*!< in: number of pages flushed */ +{ + buf_flush_buffered_writes(); + + ut_a(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST); + +#ifdef UNIV_DEBUG + if (buf_debug_prints && page_count > 0) { + fprintf(stderr, flush_type == BUF_FLUSH_LRU + ? "Flushed %lu pages in LRU flush\n" + : "Flushed %lu pages in flush list flush\n", + (ulong) page_count); + } +#endif /* UNIV_DEBUG */ + + srv_buf_pool_flushed += page_count; + + if (flush_type == BUF_FLUSH_LRU) { + /* We keep track of all flushes happening as part of LRU + flush. When estimating the desired rate at which flush_list + should be flushed we factor in this value. */ + buf_lru_flush_page_count += page_count; + } +} + +/******************************************************************//** +Start a buffer flush batch for LRU or flush list */ +static +ibool +buf_flush_start( +/*============*/ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU + or BUF_FLUSH_LIST */ +{ + buf_pool_mutex_enter(buf_pool); + + if (buf_pool->n_flush[flush_type] > 0 + || buf_pool->init_flush[flush_type] == TRUE) { /* There is already a flush batch of the same type running */ - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); - return(ULINT_UNDEFINED); + return(FALSE); } buf_pool->init_flush[flush_type] = TRUE; - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); - if (flush_type == BUF_FLUSH_LRU) { - mutex_enter(&LRU_list_mutex); - } + return(TRUE); +} - for (;;) { -flush_next: - /* If we have flushed enough, leave the loop */ - if (page_count >= min_n) { - - break; - } - - /* Start from the end of the list looking for a suitable - block to be flushed. */ - - if (flush_type == BUF_FLUSH_LRU) { - bpage = UT_LIST_GET_LAST(buf_pool->LRU); - } else { - ut_ad(flush_type == BUF_FLUSH_LIST); - - mutex_enter(&flush_list_mutex); - remaining = UT_LIST_GET_LEN(buf_pool->flush_list); - bpage = UT_LIST_GET_LAST(buf_pool->flush_list); - if (bpage) { - prev_bpage = UT_LIST_GET_PREV(flush_list, bpage); - } - mutex_exit(&flush_list_mutex); - if (!bpage - || bpage->oldest_modification >= lsn_limit) { - /* We have flushed enough */ - - break; - } - ut_ad(bpage->in_flush_list); - } - - /* Note that after finding a single flushable page, we try to - flush also all its neighbors, and after that start from the - END of the LRU list or flush list again: the list may change - during the flushing and we cannot safely preserve within this - function a pointer to a block in the list! */ - - do { - mutex_t*block_mutex = buf_page_get_mutex_enter(bpage); - ibool ready; - - //ut_a(buf_page_in_file(bpage)); - - if (block_mutex) { - ready = buf_flush_ready_for_flush(bpage, flush_type); - mutex_exit(block_mutex); - } else { - ready = FALSE; - } - - if (ready) { - space = buf_page_get_space(bpage); - offset = buf_page_get_page_no(bpage); - - //buf_pool_mutex_exit(); - if (flush_type == BUF_FLUSH_LRU) { - mutex_exit(&LRU_list_mutex); - } - - /* Try to flush also all the neighbors */ - page_count += buf_flush_try_neighbors( - space, offset, flush_type, srv_flush_neighbor_pages); - - //buf_pool_mutex_enter(); - if (flush_type == BUF_FLUSH_LRU) { - mutex_enter(&LRU_list_mutex); - } - goto flush_next; - - } else if (flush_type == BUF_FLUSH_LRU) { - bpage = UT_LIST_GET_PREV(LRU, bpage); - } else { - ut_ad(flush_type == BUF_FLUSH_LIST); - - mutex_enter(&flush_list_mutex); - bpage = UT_LIST_GET_PREV(flush_list, bpage); - //ut_ad(!bpage || bpage->in_flush_list); /* optimistic */ - if (bpage != prev_bpage) { - /* the search may warp.. retrying */ - bpage = NULL; - } - if (bpage) { - prev_bpage = UT_LIST_GET_PREV(flush_list, bpage); - } - mutex_exit(&flush_list_mutex); - remaining--; - } - } while (bpage != NULL); - - if (remaining) - goto flush_next; - - /* If we could not find anything to flush, leave the loop */ - - break; - } - - if (flush_type == BUF_FLUSH_LRU) { - mutex_exit(&LRU_list_mutex); - } - - mutex_enter(&buf_pool_mutex); +/******************************************************************//** +End a buffer flush batch for LRU or flush list */ +static +void +buf_flush_end( +/*==========*/ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + enum buf_flush flush_type) /*!< in: BUF_FLUSH_LRU + or BUF_FLUSH_LIST */ +{ + buf_pool_mutex_enter(buf_pool); buf_pool->init_flush[flush_type] = FALSE; @@ -1536,32 +1882,7 @@ flush_next: os_event_set(buf_pool->no_flush[flush_type]); } - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); - - buf_flush_buffered_writes(); - -#ifdef UNIV_DEBUG - if (buf_debug_prints && page_count > 0) { - ut_a(flush_type == BUF_FLUSH_LRU - || flush_type == BUF_FLUSH_LIST); - fprintf(stderr, flush_type == BUF_FLUSH_LRU - ? "Flushed %lu pages in LRU flush\n" - : "Flushed %lu pages in flush list flush\n", - (ulong) page_count); - } -#endif /* UNIV_DEBUG */ - - srv_buf_pool_flushed += page_count; - - /* We keep track of all flushes happening as part of LRU - flush. When estimating the desired rate at which flush_list - should be flushed we factor in this value. */ - if (flush_type == BUF_FLUSH_LRU) { - buf_lru_flush_page_count += page_count; - } - - return(page_count); + buf_pool_mutex_exit(buf_pool); } /******************************************************************//** @@ -1570,13 +1891,131 @@ UNIV_INTERN void buf_flush_wait_batch_end( /*=====================*/ - enum buf_flush type) /*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + enum buf_flush type) /*!< in: BUF_FLUSH_LRU + or BUF_FLUSH_LIST */ { - ut_ad((type == BUF_FLUSH_LRU) || (type == BUF_FLUSH_LIST)); + ut_ad(type == BUF_FLUSH_LRU || type == BUF_FLUSH_LIST); - os_event_wait(buf_pool->no_flush[type]); + if (buf_pool == NULL) { + ulint i; + + for (i = 0; i < srv_buf_pool_instances; ++i) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + thd_wait_begin(NULL, THD_WAIT_DISKIO); + os_event_wait(buf_pool->no_flush[type]); + thd_wait_end(NULL); + } + } else { + thd_wait_begin(NULL, THD_WAIT_DISKIO); + os_event_wait(buf_pool->no_flush[type]); + thd_wait_end(NULL); + } } +/*******************************************************************//** +This utility flushes dirty blocks from the end of the LRU list. +NOTE: The calling thread may own latches to pages: to avoid deadlocks, +this function must be written so that it cannot end up waiting for these +latches! +@return number of blocks for which the write request was queued; +ULINT_UNDEFINED if there was a flush of the same type already running */ +UNIV_INTERN +ulint +buf_flush_LRU( +/*==========*/ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint min_n) /*!< in: wished minimum mumber of blocks + flushed (it is not guaranteed that the + actual number is that big, though) */ +{ + ulint page_count; + + if (!buf_flush_start(buf_pool, BUF_FLUSH_LRU)) { + return(ULINT_UNDEFINED); + } + + page_count = buf_flush_batch(buf_pool, BUF_FLUSH_LRU, min_n, 0); + + buf_flush_end(buf_pool, BUF_FLUSH_LRU); + + buf_flush_common(BUF_FLUSH_LRU, page_count); + + return(page_count); +} + +/*******************************************************************//** +This utility flushes dirty blocks from the end of the flush list of +all buffer pool instances. +NOTE: The calling thread is not allowed to own any latches on pages! +@return number of blocks for which the write request was queued; +ULINT_UNDEFINED if there was a flush of the same type already running */ +UNIV_INTERN +ulint +buf_flush_list( +/*===========*/ + ulint min_n, /*!< in: wished minimum mumber of blocks + flushed (it is not guaranteed that the + actual number is that big, though) */ + ib_uint64_t lsn_limit) /*!< in the case BUF_FLUSH_LIST all + blocks whose oldest_modification is + smaller than this should be flushed + (if their number does not exceed + min_n), otherwise ignored */ +{ + ulint i; + ulint total_page_count = 0; + ibool skipped = FALSE; + + if (min_n != ULINT_MAX) { + /* Ensure that flushing is spread evenly amongst the + buffer pool instances. When min_n is ULINT_MAX + we need to flush everything up to the lsn limit + so no limit here. */ + min_n = (min_n + srv_buf_pool_instances - 1) + / srv_buf_pool_instances; + } + + /* Flush to lsn_limit in all buffer pool instances */ + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + ulint page_count = 0; + + buf_pool = buf_pool_from_array(i); + + if (!buf_flush_start(buf_pool, BUF_FLUSH_LIST)) { + /* We have two choices here. If lsn_limit was + specified then skipping an instance of buffer + pool means we cannot guarantee that all pages + up to lsn_limit has been flushed. We can + return right now with failure or we can try + to flush remaining buffer pools up to the + lsn_limit. We attempt to flush other buffer + pools based on the assumption that it will + help in the retry which will follow the + failure. */ + skipped = TRUE; + + continue; + } + + page_count = buf_flush_batch( + buf_pool, BUF_FLUSH_LIST, min_n, lsn_limit); + + buf_flush_end(buf_pool, BUF_FLUSH_LIST); + + buf_flush_common(BUF_FLUSH_LIST, page_count); + + total_page_count += page_count; + } + + return(lsn_limit != IB_ULONGLONG_MAX && skipped + ? ULINT_UNDEFINED : total_page_count); +} + /******************************************************************//** Gives a recommendation of how many blocks should be flushed to establish a big enough margin of replaceable blocks near the end of the LRU list @@ -1585,8 +2024,9 @@ and in the free list. LRU list */ static ulint -buf_flush_LRU_recommendation(void) -/*==============================*/ +buf_flush_LRU_recommendation( +/*=========================*/ + buf_pool_t* buf_pool) /*!< in: Buffer pool instance */ { buf_page_t* bpage; ulint n_replaceable; @@ -1596,18 +2036,18 @@ buf_flush_LRU_recommendation(void) if(UT_LIST_GET_LEN(buf_pool->unzip_LRU)) have_LRU_mutex = TRUE; retry: - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (have_LRU_mutex) - mutex_enter(&LRU_list_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); n_replaceable = UT_LIST_GET_LEN(buf_pool->free); bpage = UT_LIST_GET_LAST(buf_pool->LRU); while ((bpage != NULL) - && (n_replaceable < BUF_FLUSH_FREE_BLOCK_MARGIN - + BUF_FLUSH_EXTRA_MARGIN) - && (distance < BUF_LRU_FREE_SEARCH_LEN)) { + && (n_replaceable < BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool) + + BUF_FLUSH_EXTRA_MARGIN(buf_pool)) + && (distance < BUF_LRU_FREE_SEARCH_LEN(buf_pool))) { mutex_t* block_mutex; if (!bpage->in_LRU_list) { @@ -1630,11 +2070,11 @@ retry: bpage = UT_LIST_GET_PREV(LRU, bpage); } - //buf_pool_mutex_exit(); + //buf_pool_mutex_exit(buf_pool); if (have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); - if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN) { + if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool)) { return(0); } else if (!have_LRU_mutex) { @@ -1644,7 +2084,8 @@ retry: goto retry; } - return(BUF_FLUSH_FREE_BLOCK_MARGIN + BUF_FLUSH_EXTRA_MARGIN + return(BUF_FLUSH_FREE_BLOCK_MARGIN(buf_pool) + + BUF_FLUSH_EXTRA_MARGIN(buf_pool) - n_replaceable); } @@ -1657,25 +2098,47 @@ immediately, without waiting. */ UNIV_INTERN void buf_flush_free_margin( -/*=======================*/ - ibool wait) +/*==================*/ + buf_pool_t* buf_pool, /*!< in: Buffer pool instance */ + ibool wait) { ulint n_to_flush; - ulint n_flushed; - n_to_flush = buf_flush_LRU_recommendation(); + n_to_flush = buf_flush_LRU_recommendation(buf_pool); if (n_to_flush > 0) { - n_flushed = buf_flush_batch(BUF_FLUSH_LRU, n_to_flush, 0); + ulint n_flushed; + + n_flushed = buf_flush_LRU(buf_pool, n_to_flush); + if (wait && n_flushed == ULINT_UNDEFINED) { /* There was an LRU type flush batch already running; let us wait for it to end */ - buf_flush_wait_batch_end(BUF_FLUSH_LRU); + buf_flush_wait_batch_end(buf_pool, BUF_FLUSH_LRU); } } } +/*********************************************************************//** +Flushes pages from the end of all the LRU lists. */ +UNIV_INTERN +void +buf_flush_free_margins( +/*========================*/ + ibool wait) +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + buf_flush_free_margin(buf_pool, wait); + } +} + /********************************************************************* Update the historical stats that we are collecting for flush rate heuristics at the end of each interval. @@ -1736,22 +2199,28 @@ ulint buf_flush_get_desired_flush_rate(void) /*==================================*/ { - ulint redo_avg; - ulint lru_flush_avg; - ulint n_dirty; - ulint n_flush_req; - lint rate; - ib_uint64_t lsn = log_get_lsn(); - ulint log_capacity = log_get_capacity(); + ulint i; + lint rate; + ulint redo_avg; + ulint n_dirty = 0; + ulint n_flush_req; + ulint lru_flush_avg; + ib_uint64_t lsn = log_get_lsn(); + ulint log_capacity = log_get_capacity(); /* log_capacity should never be zero after the initialization of log subsystem. */ ut_ad(log_capacity != 0); /* Get total number of dirty pages. It is OK to access - flush_list without holding any mtex as we are using this + flush_list without holding any mutex as we are using this only for heuristics. */ - n_dirty = UT_LIST_GET_LEN(buf_pool->flush_list); + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + n_dirty += UT_LIST_GET_LEN(buf_pool->flush_list); + } /* An overflow can happen if we generate more than 2^32 bytes of redo in this interval i.e.: 4G of redo in 1 second. We can @@ -1793,12 +2262,15 @@ Validates the flush list. @return TRUE if ok */ static ibool -buf_flush_validate_low(void) -/*========================*/ +buf_flush_validate_low( +/*===================*/ + buf_pool_t* buf_pool) /*!< in: Buffer pool instance */ { buf_page_t* bpage; const ib_rbt_node_t* rnode = NULL; + ut_ad(buf_flush_list_mutex_own(buf_pool)); + UT_LIST_VALIDATE(flush_list, buf_page_t, buf_pool->flush_list, ut_ad(ut_list_node_313->in_flush_list)); @@ -1813,16 +2285,29 @@ buf_flush_validate_low(void) while (bpage != NULL) { const ib_uint64_t om = bpage->oldest_modification; + + ut_ad(buf_pool_from_bpage(bpage) == buf_pool); + ut_ad(bpage->in_flush_list); - //ut_a(buf_page_in_file(bpage)); /* optimistic */ + + /* A page in buf_pool->flush_list can be in + BUF_BLOCK_REMOVE_HASH state. This happens when a page + is in the middle of being relocated. In that case the + original descriptor can have this state and still be + in the flush list waiting to acquire the + buf_pool->flush_list_mutex to complete the relocation. */ + ut_a(buf_page_in_file(bpage) + || buf_page_get_state(bpage) == BUF_BLOCK_REMOVE_HASH); ut_a(om > 0); if (UNIV_LIKELY_NULL(buf_pool->flush_rbt)) { - buf_page_t* rpage; + buf_page_t** prpage; + ut_a(rnode); - rpage = *rbt_value(buf_page_t*, rnode); - ut_a(rpage); - ut_a(rpage == bpage); + prpage = rbt_value(buf_page_t*, rnode); + + ut_a(*prpage); + ut_a(*prpage == bpage); rnode = rbt_next(buf_pool->flush_rbt, rnode); } @@ -1843,18 +2328,17 @@ Validates the flush list. @return TRUE if ok */ UNIV_INTERN ibool -buf_flush_validate(void) -/*====================*/ +buf_flush_validate( +/*===============*/ + buf_pool_t* buf_pool) /*!< buffer pool instance */ { ibool ret; - //buf_pool_mutex_enter(); - mutex_enter(&flush_list_mutex); + buf_flush_list_mutex_enter(buf_pool); - ret = buf_flush_validate_low(); + ret = buf_flush_validate_low(buf_pool); - //buf_pool_mutex_exit(); - mutex_exit(&flush_list_mutex); + buf_flush_list_mutex_exit(buf_pool); return(ret); } diff --git a/buf/buf0lru.c b/buf/buf0lru.c index 33db5dce193..c92e72a1729 100644 --- a/buf/buf0lru.c +++ b/buf/buf0lru.c @@ -50,7 +50,7 @@ Created 11/5/1995 Heikki Tuuri #include "srv0srv.h" /** The number of blocks from the LRU_old pointer onward, including -the block pointed to, must be buf_LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV +the block pointed to, must be buf_pool->LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV of the whole LRU list length, except that the tolerance defined below is allowed. Note that the tolerance must be small enough such that for even the BUF_LRU_OLD_MIN_LEN long LRU list, the LRU_old pointer is not @@ -96,8 +96,9 @@ with page_zip_decompress() operations. */ #define BUF_LRU_IO_TO_UNZIP_FACTOR 50 /** Sampled values buf_LRU_stat_cur. -Protected by buf_pool_mutex. Updated by buf_LRU_stat_update(). */ +Not protected by any mutex. Updated by buf_LRU_stat_update(). */ static buf_LRU_stat_t buf_LRU_stat_arr[BUF_LRU_STAT_N_INTERVAL]; + /** Cursor to buf_LRU_stat_arr[] that is updated in a round-robin fashion. */ static ulint buf_LRU_stat_arr_ind; @@ -106,15 +107,12 @@ by buf_LRU_stat_update(). */ UNIV_INTERN buf_LRU_stat_t buf_LRU_stat_cur; /** Running sum of past values of buf_LRU_stat_cur. -Updated by buf_LRU_stat_update(). Protected by buf_pool_mutex. */ +Updated by buf_LRU_stat_update(). Not Protected by any mutex. */ UNIV_INTERN buf_LRU_stat_t buf_LRU_stat_sum; /* @} */ /** @name Heuristics for detecting index scan @{ */ -/** Reserve this much/BUF_LRU_OLD_RATIO_DIV of the buffer pool for -"old" blocks. Protected by buf_pool_mutex. */ -UNIV_INTERN uint buf_LRU_old_ratio; /** Move blocks to "new" LRU list only if the first access was at least this many milliseconds ago. Not protected by any mutex or latch. */ UNIV_INTERN uint buf_LRU_old_threshold_ms; @@ -123,7 +121,7 @@ UNIV_INTERN uint buf_LRU_old_threshold_ms; /******************************************************************//** Takes a block out of the LRU list and page hash table. If the block is compressed-only (BUF_BLOCK_ZIP_PAGE), -the object will be freed and buf_pool_zip_mutex will be released. +the object will be freed and buf_pool->zip_mutex will be released. If a compressed page or a compressed-only block descriptor is freed, other compressed pages or compressed-only block descriptors may be @@ -156,20 +154,21 @@ instead of the general LRU list. UNIV_INLINE ibool buf_LRU_evict_from_unzip_LRU( +/*=========================*/ + buf_pool_t* buf_pool, ibool have_LRU_mutex) -/*==============================*/ { ulint io_avg; ulint unzip_avg; - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); if (!have_LRU_mutex) - mutex_enter(&LRU_list_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); /* If the unzip_LRU list is empty, we can only use the LRU. */ if (UT_LIST_GET_LEN(buf_pool->unzip_LRU) == 0) { if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); return(FALSE); } @@ -179,7 +178,7 @@ buf_LRU_evict_from_unzip_LRU( if (UT_LIST_GET_LEN(buf_pool->unzip_LRU) <= UT_LIST_GET_LEN(buf_pool->LRU) / 10) { if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); return(FALSE); } @@ -187,11 +186,11 @@ buf_LRU_evict_from_unzip_LRU( that a workload is disk bound. */ if (buf_pool->freed_page_clock == 0) { if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); return(TRUE); } if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); /* Calculate the average over past intervals, and add the values of the current interval. */ @@ -240,7 +239,8 @@ static void buf_LRU_drop_page_hash_for_tablespace( /*==================================*/ - ulint id) /*!< in: space id */ + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint id) /*!< in: space id */ { buf_page_t* bpage; ulint* page_arr; @@ -255,22 +255,25 @@ buf_LRU_drop_page_hash_for_tablespace( return; } - page_arr = ut_malloc(sizeof(ulint) - * BUF_LRU_DROP_SEARCH_HASH_SIZE); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + page_arr = ut_malloc( + sizeof(ulint) * BUF_LRU_DROP_SEARCH_HASH_SIZE); + + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + num_entries = 0; scan_again: - num_entries = 0; bpage = UT_LIST_GET_LAST(buf_pool->LRU); while (bpage != NULL) { + /* bpage->state,space,io_fix,buf_fix_count are protected by block_mutex at XtraDB */ mutex_t* block_mutex = buf_page_get_mutex_enter(bpage); buf_page_t* prev_bpage; + ibool is_fixed; prev_bpage = UT_LIST_GET_PREV(LRU, bpage); - if (!block_mutex) { + if (UNIV_UNLIKELY(!block_mutex)) { goto next_page; } @@ -278,63 +281,84 @@ scan_again: if (buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE || bpage->space != id - || bpage->buf_fix_count > 0 || bpage->io_fix != BUF_IO_NONE) { - /* We leave the fixed pages as is in this scan. - To be dealt with later in the final scan. */ + /* Compressed pages are never hashed. + Skip blocks of other tablespaces. + Skip I/O-fixed blocks (to be dealt with later). */ + mutex_exit(block_mutex); +next_page: + bpage = prev_bpage; + continue; + } + + //mutex_enter(&((buf_block_t*) bpage)->mutex); + is_fixed = bpage->buf_fix_count > 0 + || !((buf_block_t*) bpage)->is_hashed; + //mutex_exit(&((buf_block_t*) bpage)->mutex); + + if (is_fixed) { mutex_exit(block_mutex); goto next_page; } - if (((buf_block_t*) bpage)->is_hashed) { + /* Store the page number so that we can drop the hash + index in a batch later. */ + page_arr[num_entries] = bpage->offset; + mutex_exit(block_mutex); - /* Store the offset(i.e.: page_no) in the array - so that we can drop hash index in a batch - later. */ - page_arr[num_entries] = bpage->offset; - mutex_exit(block_mutex); - ut_a(num_entries < BUF_LRU_DROP_SEARCH_HASH_SIZE); - ++num_entries; + ut_a(num_entries < BUF_LRU_DROP_SEARCH_HASH_SIZE); + ++num_entries; - if (num_entries < BUF_LRU_DROP_SEARCH_HASH_SIZE) { - goto next_page; - } - /* Array full. We release the buf_pool_mutex to - obey the latching order. */ - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - - buf_LRU_drop_page_hash_batch(id, zip_size, page_arr, - num_entries); - num_entries = 0; - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - } else { - mutex_exit(block_mutex); + if (num_entries < BUF_LRU_DROP_SEARCH_HASH_SIZE) { + goto next_page; } -next_page: - /* Note that we may have released the buf_pool mutex - above after reading the prev_bpage during processing - of a page_hash_batch (i.e.: when the array was full). - This means that prev_bpage can change in LRU list. - This is OK because this function is a 'best effort' - to drop as many search hash entries as possible and - it does not guarantee that ALL such entries will be - dropped. */ - bpage = prev_bpage; + /* Array full. We release the buf_pool->mutex to obey + the latching order. */ + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + + buf_LRU_drop_page_hash_batch( + id, zip_size, page_arr, num_entries); + + num_entries = 0; + + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + + /* Note that we released the buf_pool mutex above + after reading the prev_bpage during processing of a + page_hash_batch (i.e.: when the array was full). + Because prev_bpage could belong to a compressed-only + block, it may have been relocated, and thus the + pointer cannot be trusted. Because bpage is of type + buf_block_t, it is safe to dereference. + + bpage can change in the LRU list. This is OK because + this function is a 'best effort' to drop as many + search hash entries as possible and it does not + guarantee that ALL such entries will be dropped. */ /* If, however, bpage has been removed from LRU list to the free list then we should restart the scan. bpage->state is protected by buf_pool mutex. */ - if (bpage && !buf_page_in_file(bpage)) { - ut_a(num_entries == 0); + + /* obtain block_mutex again to avoid race condition of bpage->state */ + block_mutex = buf_page_get_mutex_enter(bpage); + if (!block_mutex) { goto scan_again; } + + if (bpage + && buf_page_get_state(bpage) != BUF_BLOCK_FILE_PAGE) { + mutex_exit(block_mutex); + goto scan_again; + } + mutex_exit(block_mutex); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); /* Drop any remaining batch of search hashed pages. */ buf_LRU_drop_page_hash_batch(id, zip_size, page_arr, num_entries); @@ -342,29 +366,23 @@ next_page: } /******************************************************************//** -Invalidates all pages belonging to a given tablespace when we are deleting -the data file(s) of that tablespace. */ -UNIV_INTERN +Invalidates all pages belonging to a given tablespace inside a specific +buffer pool instance when we are deleting the data file(s) of that +tablespace. */ +static void -buf_LRU_invalidate_tablespace( -/*==========================*/ - ulint id) /*!< in: space id */ +buf_LRU_invalidate_tablespace_buf_pool_instance( +/*============================================*/ + buf_pool_t* buf_pool, /*!< buffer pool instance */ + ulint id) /*!< in: space id */ { buf_page_t* bpage; ibool all_freed; - /* Before we attempt to drop pages one by one we first - attempt to drop page hash index entries in batches to make - it more efficient. The batching attempt is a best effort - attempt and does not guarantee that all pages hash entries - will be dropped. We get rid of remaining page hash entries - one by one below. */ - buf_LRU_drop_page_hash_for_tablespace(id); - scan_again: - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - rw_lock_x_lock(&page_hash_latch); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + rw_lock_x_lock(&buf_pool->page_hash_latch); all_freed = TRUE; @@ -379,8 +397,8 @@ scan_again: prev_bpage = UT_LIST_GET_PREV(LRU, bpage); /* bpage->space and bpage->io_fix are protected by - buf_pool_mutex and block_mutex. It is safe to check - them while holding buf_pool_mutex only. */ + buf_pool->mutex and block_mutex. It is safe to check + them while holding buf_pool->mutex only. */ if (buf_page_get_space(bpage) != id) { /* Skip this block, as it does not belong to @@ -434,7 +452,7 @@ scan_again: /* Descriptors of uncompressed blocks will not be relocated, because we are holding the - buf_pool_mutex. */ + buf_pool->mutex. */ break; case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: @@ -446,7 +464,7 @@ scan_again: buf_pool_zip_mutex, it is not necessary to acquire further mutexes. */ - ut_ad(&buf_pool_zip_mutex + ut_ad(&buf_pool->zip_mutex == block_mutex); ut_ad(mutex_own(block_mutex)); prev_bpage_buf_fix = TRUE; @@ -460,9 +478,9 @@ scan_again: ulint page_no; ulint zip_size; - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); zip_size = buf_page_get_zip_size(bpage); page_no = buf_page_get_page_no(bpage); @@ -492,7 +510,7 @@ scan_again: /* The block_mutex should have been released by buf_LRU_block_remove_hashed_page() when it returns BUF_BLOCK_ZIP_FREE. */ - ut_ad(block_mutex == &buf_pool_zip_mutex); + ut_ad(block_mutex == &buf_pool->zip_mutex); ut_ad(!mutex_own(block_mutex)); if (prev_bpage_buf_fix) { @@ -519,9 +537,9 @@ next_page_no_mutex: bpage = prev_bpage; } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); if (!all_freed) { os_thread_sleep(20000); @@ -530,6 +548,32 @@ next_page_no_mutex: } } +/******************************************************************//** +Invalidates all pages belonging to a given tablespace when we are deleting +the data file(s) of that tablespace. */ +UNIV_INTERN +void +buf_LRU_invalidate_tablespace( +/*==========================*/ + ulint id) /*!< in: space id */ +{ + ulint i; + + /* Before we attempt to drop pages one by one we first + attempt to drop page hash index entries in batches to make + it more efficient. The batching attempt is a best effort + attempt and does not guarantee that all pages hash entries + will be dropped. We get rid of remaining page hash entries + one by one below. */ + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + buf_LRU_drop_page_hash_for_tablespace(buf_pool, id); + buf_LRU_invalidate_tablespace_buf_pool_instance(buf_pool, id); + } +} + /******************************************************************//** */ UNIV_INTERN @@ -538,20 +582,27 @@ buf_LRU_mark_space_was_deleted( /*===========================*/ ulint id) /*!< in: space id */ { - buf_page_t* bpage; + ulint i; - mutex_enter(&LRU_list_mutex); + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + buf_page_t* bpage; - bpage = UT_LIST_GET_FIRST(buf_pool->LRU); + buf_pool = buf_pool_from_array(i); - while (bpage != NULL) { - if (buf_page_get_space(bpage) == id) { - bpage->space_was_being_deleted = TRUE; + mutex_enter(&buf_pool->LRU_list_mutex); + + bpage = UT_LIST_GET_FIRST(buf_pool->LRU); + + while (bpage != NULL) { + if (buf_page_get_space(bpage) == id) { + bpage->space_was_being_deleted = TRUE; + } + bpage = UT_LIST_GET_NEXT(LRU, bpage); } - bpage = UT_LIST_GET_NEXT(LRU, bpage); - } - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); + } } /********************************************************************//** @@ -563,10 +614,11 @@ buf_LRU_insert_zip_clean( buf_page_t* bpage) /*!< in: pointer to the block in question */ { buf_page_t* b; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); - ut_ad(mutex_own(&flush_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + ut_ad(mutex_own(&buf_pool->zip_mutex)); ut_ad(buf_page_get_state(bpage) == BUF_BLOCK_ZIP_PAGE); /* Find the first successor of bpage in the LRU list @@ -596,17 +648,20 @@ UNIV_INLINE ibool buf_LRU_free_from_unzip_LRU_list( /*=============================*/ - ulint n_iterations, /*!< in: how many times this has been called - repeatedly without result: a high value means - that we should search farther; we will search - n_iterations / 5 of the unzip_LRU list, - or nothing if n_iterations >= 5 */ - ibool have_LRU_mutex) + buf_pool_t* buf_pool, /*!< in: buffer pool instance */ + ulint n_iterations, /*!< in: how many times this has + been called repeatedly without + result: a high value means that + we should search farther; we will + search n_iterations / 5 of the + unzip_LRU list, or nothing if + n_iterations >= 5 */ + ibool have_LRU_mutex) { buf_block_t* block; ulint distance; - //ut_ad(buf_pool_mutex_own()); /* optimistic */ + //ut_ad(buf_pool_mutex_own(buf_pool)); /* Theoratically it should be much easier to find a victim from unzip_LRU as we can choose even a dirty block (as we'll @@ -616,7 +671,7 @@ buf_LRU_free_from_unzip_LRU_list( if we have done five iterations so far. */ if (UNIV_UNLIKELY(n_iterations >= 5) - || !buf_LRU_evict_from_unzip_LRU(have_LRU_mutex)) { + || !buf_LRU_evict_from_unzip_LRU(buf_pool, have_LRU_mutex)) { return(FALSE); } @@ -675,18 +730,20 @@ UNIV_INLINE ibool buf_LRU_free_from_common_LRU_list( /*==============================*/ - ulint n_iterations, /*!< in: how many times this has been called + buf_pool_t* buf_pool, + ulint n_iterations, + /*!< in: how many times this has been called repeatedly without result: a high value means that we should search farther; if n_iterations < 10, then we search n_iterations / 10 * buf_pool->curr_size pages from the end of the LRU list */ - ibool have_LRU_mutex) + ibool have_LRU_mutex) { buf_page_t* bpage; ulint distance; - //ut_ad(buf_pool_mutex_own()); /* optimistic */ + //ut_ad(buf_pool_mutex_own(buf_pool)); distance = 100 + (n_iterations * buf_pool->curr_size) / 10; @@ -753,7 +810,10 @@ UNIV_INTERN ibool buf_LRU_search_and_free_block( /*==========================*/ - ulint n_iterations) /*!< in: how many times this has been called + buf_pool_t* buf_pool, + /*!< in: buffer pool instance */ + ulint n_iterations) + /*!< in: how many times this has been called repeatedly without result: a high value means that we should search farther; if n_iterations < 10, then we search @@ -768,28 +828,27 @@ buf_LRU_search_and_free_block( if (UT_LIST_GET_LEN(buf_pool->unzip_LRU)) have_LRU_mutex = TRUE; - /* optimistic search... */ - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (have_LRU_mutex) - mutex_enter(&LRU_list_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); - freed = buf_LRU_free_from_unzip_LRU_list(n_iterations, have_LRU_mutex); + freed = buf_LRU_free_from_unzip_LRU_list(buf_pool, n_iterations, have_LRU_mutex); if (!freed) { - freed = buf_LRU_free_from_common_LRU_list(n_iterations, have_LRU_mutex); + freed = buf_LRU_free_from_common_LRU_list( + buf_pool, n_iterations, have_LRU_mutex); } - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); if (!freed) { buf_pool->LRU_flush_ended = 0; } else if (buf_pool->LRU_flush_ended > 0) { buf_pool->LRU_flush_ended--; } - mutex_exit(&buf_pool_mutex); - //buf_pool_mutex_exit(); + buf_pool_mutex_exit(buf_pool); if (have_LRU_mutex) - mutex_exit(&LRU_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); return(freed); } @@ -804,53 +863,69 @@ operations need new buffer blocks, and the i/o work done in flushing would be wasted. */ UNIV_INTERN void -buf_LRU_try_free_flushed_blocks(void) -/*=================================*/ +buf_LRU_try_free_flushed_blocks( +/*============================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); - while (buf_pool->LRU_flush_ended > 0) { + if (buf_pool == NULL) { + ulint i; - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool = buf_pool_from_array(i); + buf_LRU_try_free_flushed_blocks(buf_pool); + } + } else { + buf_pool_mutex_enter(buf_pool); - buf_LRU_search_and_free_block(1); + while (buf_pool->LRU_flush_ended > 0) { - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); + + buf_LRU_search_and_free_block(buf_pool, 1); + + buf_pool_mutex_enter(buf_pool); + } + + buf_pool_mutex_exit(buf_pool); } - - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); } /******************************************************************//** -Returns TRUE if less than 25 % of the buffer pool is available. This can be -used in heuristics to prevent huge transactions eating up the whole buffer -pool for their locks. +Returns TRUE if less than 25 % of the buffer pool in any instance is +available. This can be used in heuristics to prevent huge transactions +eating up the whole buffer pool for their locks. @return TRUE if less than 25 % of buffer pool left */ UNIV_INTERN ibool buf_LRU_buf_pool_running_out(void) /*==============================*/ { - ibool ret = FALSE; + ulint i; + ibool ret = FALSE; - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); - mutex_enter(&free_list_mutex); + for (i = 0; i < srv_buf_pool_instances && !ret; i++) { + buf_pool_t* buf_pool; - if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free) - + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->curr_size / 4) { + buf_pool = buf_pool_from_array(i); - ret = TRUE; + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); + + if (!recv_recovery_on + && UT_LIST_GET_LEN(buf_pool->free) + + UT_LIST_GET_LEN(buf_pool->LRU) + < buf_pool->curr_size / 4) { + + ret = TRUE; + } + + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - mutex_exit(&free_list_mutex); - return(ret); } @@ -860,17 +935,19 @@ free list. If it is empty, returns NULL. @return a free control block, or NULL if the buf_block->free list is empty */ UNIV_INTERN buf_block_t* -buf_LRU_get_free_only(void) -/*=======================*/ +buf_LRU_get_free_only( +/*==================*/ + buf_pool_t* buf_pool) { buf_block_t* block; - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); - mutex_enter(&free_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); block = (buf_block_t*) UT_LIST_GET_LAST(buf_pool->free); if (block) { + ut_ad(block->page.in_free_list); ut_d(block->page.in_free_list = FALSE); ut_ad(!block->page.in_flush_list); @@ -878,16 +955,18 @@ buf_LRU_get_free_only(void) ut_a(!buf_page_in_file(&block->page)); UT_LIST_REMOVE(free, buf_pool->free, (&block->page)); - mutex_exit(&free_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); mutex_enter(&block->mutex); buf_block_set_state(block, BUF_BLOCK_READY_FOR_USE); UNIV_MEM_ALLOC(block->frame, UNIV_PAGE_SIZE); + ut_ad(buf_pool_from_block(block) == buf_pool); + mutex_exit(&block->mutex); } else { - mutex_exit(&free_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); } return(block); @@ -900,8 +979,9 @@ LRU list to the free list. @return the free control block, in state BUF_BLOCK_READY_FOR_USE */ UNIV_INTERN buf_block_t* -buf_LRU_get_free_block(void) -/*========================*/ +buf_LRU_get_free_block( +/*===================*/ + buf_pool_t* buf_pool) /*!< in/out: buffer pool instance */ { buf_block_t* block = NULL; ibool freed; @@ -909,7 +989,7 @@ buf_LRU_get_free_block(void) ibool mon_value_was = FALSE; ibool started_monitor = FALSE; loop: - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free) + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->curr_size / 20) { @@ -976,10 +1056,11 @@ loop: } /* If there is a block in the free list, take it */ - block = buf_LRU_get_free_only(); - //buf_pool_mutex_exit(); + block = buf_LRU_get_free_only(buf_pool); + //buf_pool_mutex_exit(buf_pool); if (block) { + ut_ad(buf_pool_from_block(block) == buf_pool); memset(&block->page.zip, 0, sizeof block->page.zip); if (started_monitor) { @@ -992,7 +1073,7 @@ loop: /* If no block was in the free list, search from the end of the LRU list and try to free a block there */ - freed = buf_LRU_search_and_free_block(n_iterations); + freed = buf_LRU_search_and_free_block(buf_pool, n_iterations); if (freed > 0) { goto loop; @@ -1034,26 +1115,23 @@ loop: /* No free block was found: try to flush the LRU list */ - buf_flush_free_margin(TRUE); + buf_flush_free_margin(buf_pool, TRUE); ++srv_buf_pool_wait_free; os_aio_simulated_wake_handler_threads(); - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); if (buf_pool->LRU_flush_ended > 0) { /* We have written pages in an LRU flush. To make the insert buffer more efficient, we try to move these pages to the free list. */ - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); - buf_LRU_try_free_flushed_blocks(); + buf_LRU_try_free_flushed_blocks(buf_pool); } else { - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); } if (n_iterations > 10) { @@ -1071,17 +1149,18 @@ Moves the LRU_old pointer so that the length of the old blocks list is inside the allowed limits. */ UNIV_INLINE void -buf_LRU_old_adjust_len(void) -/*========================*/ +buf_LRU_old_adjust_len( +/*===================*/ + buf_pool_t* buf_pool) /*!< in: buffer pool instance */ { ulint old_len; ulint new_len; ut_a(buf_pool->LRU_old); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); - ut_ad(buf_LRU_old_ratio >= BUF_LRU_OLD_RATIO_MIN); - ut_ad(buf_LRU_old_ratio <= BUF_LRU_OLD_RATIO_MAX); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); + ut_ad(buf_pool->LRU_old_ratio >= BUF_LRU_OLD_RATIO_MIN); + ut_ad(buf_pool->LRU_old_ratio <= BUF_LRU_OLD_RATIO_MAX); #if BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5) # error "BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5)" #endif @@ -1097,7 +1176,7 @@ buf_LRU_old_adjust_len(void) old_len = buf_pool->LRU_old_len; new_len = ut_min(UT_LIST_GET_LEN(buf_pool->LRU) - * buf_LRU_old_ratio / BUF_LRU_OLD_RATIO_DIV, + * buf_pool->LRU_old_ratio / BUF_LRU_OLD_RATIO_DIV, UT_LIST_GET_LEN(buf_pool->LRU) - (BUF_LRU_OLD_TOLERANCE + BUF_LRU_NON_OLD_MIN_LEN)); @@ -1139,13 +1218,14 @@ Initializes the old blocks pointer in the LRU list. This function should be called when the LRU list grows to BUF_LRU_OLD_MIN_LEN length. */ static void -buf_LRU_old_init(void) -/*==================*/ +buf_LRU_old_init( +/*=============*/ + buf_pool_t* buf_pool) { buf_page_t* bpage; - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN); /* We first initialize all blocks in the LRU list as old and then use @@ -1164,7 +1244,7 @@ buf_LRU_old_init(void) buf_pool->LRU_old = UT_LIST_GET_FIRST(buf_pool->LRU); buf_pool->LRU_old_len = UT_LIST_GET_LEN(buf_pool->LRU); - buf_LRU_old_adjust_len(); + buf_LRU_old_adjust_len(buf_pool); } /******************************************************************//** @@ -1175,11 +1255,13 @@ buf_unzip_LRU_remove_block_if_needed( /*=================================*/ buf_page_t* bpage) /*!< in/out: control block */ { + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + ut_ad(buf_pool); ut_ad(bpage); ut_ad(buf_page_in_file(bpage)); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); if (buf_page_belongs_to_unzip_LRU(bpage)) { buf_block_t* block = (buf_block_t*) bpage; @@ -1199,10 +1281,12 @@ buf_LRU_remove_block( /*=================*/ buf_page_t* bpage) /*!< in: control block */ { + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + ut_ad(buf_pool); ut_ad(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); ut_a(buf_page_in_file(bpage)); @@ -1216,7 +1300,7 @@ buf_LRU_remove_block( /* Below: the previous block is guaranteed to exist, because the LRU_old pointer is only allowed to differ by BUF_LRU_OLD_TOLERANCE from strict - buf_LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV of the LRU + buf_pool->LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV of the LRU list length. */ buf_page_t* prev_bpage = UT_LIST_GET_PREV(LRU, bpage); @@ -1262,7 +1346,7 @@ buf_LRU_remove_block( } /* Adjust the length of the old block list if necessary */ - buf_LRU_old_adjust_len(); + buf_LRU_old_adjust_len(buf_pool); } /******************************************************************//** @@ -1275,10 +1359,12 @@ buf_unzip_LRU_add_block( ibool old) /*!< in: TRUE if should be put to the end of the list, else put to the start */ { + buf_pool_t* buf_pool = buf_pool_from_block(block); + ut_ad(buf_pool); ut_ad(block); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); ut_a(buf_page_belongs_to_unzip_LRU(&block->page)); @@ -1300,10 +1386,12 @@ buf_LRU_add_block_to_end_low( /*=========================*/ buf_page_t* bpage) /*!< in: control block */ { + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + ut_ad(buf_pool); ut_ad(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); ut_a(buf_page_in_file(bpage)); @@ -1319,14 +1407,14 @@ buf_LRU_add_block_to_end_low( buf_page_set_old(bpage, TRUE); buf_pool->LRU_old_len++; - buf_LRU_old_adjust_len(); + buf_LRU_old_adjust_len(buf_pool); } else if (UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN) { /* The LRU list is now long enough for LRU_old to become defined: init it */ - buf_LRU_old_init(); + buf_LRU_old_init(buf_pool); } else { buf_page_set_old(bpage, buf_pool->LRU_old != NULL); } @@ -1350,10 +1438,12 @@ buf_LRU_add_block_low( LRU list is very short, the block is added to the start, regardless of this parameter */ { + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + ut_ad(buf_pool); ut_ad(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); ut_a(buf_page_in_file(bpage)); ut_ad(!bpage->in_LRU_list); @@ -1387,14 +1477,14 @@ buf_LRU_add_block_low( /* Adjust the length of the old block list if necessary */ buf_page_set_old(bpage, old); - buf_LRU_old_adjust_len(); + buf_LRU_old_adjust_len(buf_pool); } else if (UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN) { /* The LRU list is now long enough for LRU_old to become defined: init it */ - buf_LRU_old_init(); + buf_LRU_old_init(buf_pool); } else { buf_page_set_old(bpage, buf_pool->LRU_old != NULL); } @@ -1430,8 +1520,10 @@ buf_LRU_make_block_young( /*=====================*/ buf_page_t* bpage) /*!< in: control block */ { - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); if (bpage->old) { buf_pool->stat.n_pages_made_young++; @@ -1458,10 +1550,10 @@ Try to free a block. If bpage is a descriptor of a compressed-only page, the descriptor object will be freed as well. NOTE: If this function returns BUF_LRU_FREED, it will temporarily -release buf_pool_mutex. Furthermore, the page frame will no longer be +release buf_pool->mutex. Furthermore, the page frame will no longer be accessible via bpage. -The caller must hold buf_pool_mutex and buf_page_get_mutex(bpage) and +The caller must hold buf_pool->mutex and buf_page_get_mutex(bpage) and release these two mutexes after the call. No other buf_page_get_mutex() may be held when calling this function. @return BUF_LRU_FREED if freed, BUF_LRU_CANNOT_RELOCATE or @@ -1476,9 +1568,10 @@ buf_LRU_free_block( ibool have_LRU_mutex) { buf_page_t* b = NULL; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); mutex_t* block_mutex = buf_page_get_mutex(bpage); - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(mutex_own(block_mutex)); ut_ad(buf_page_in_file(bpage)); //ut_ad(bpage->in_LRU_list); @@ -1526,9 +1619,9 @@ buf_LRU_free_block( If it cannot be allocated (without freeing a block from the LRU list), refuse to free bpage. */ alloc: - //buf_pool_mutex_exit_forbid(); - b = buf_buddy_alloc(sizeof *b, NULL, FALSE); - //buf_pool_mutex_exit_allow(); + //buf_pool_mutex_exit_forbid(buf_pool); + b = buf_buddy_alloc(buf_pool, sizeof *b, NULL, FALSE); + //buf_pool_mutex_exit_allow(buf_pool); if (UNIV_UNLIKELY(!b)) { return(BUF_LRU_CANNOT_RELOCATE); @@ -1549,8 +1642,8 @@ alloc: mutex_exit(block_mutex); if (!have_LRU_mutex) - mutex_enter(&LRU_list_mutex); /* optimistic */ - rw_lock_x_lock(&page_hash_latch); + mutex_enter(&buf_pool->LRU_list_mutex); /* optimistic */ + rw_lock_x_lock(&buf_pool->page_hash_latch); mutex_enter(block_mutex); /* recheck states of block */ @@ -1558,11 +1651,11 @@ alloc: || !buf_page_can_relocate(bpage)) { not_freed: if (b) { - buf_buddy_free(b, sizeof *b, TRUE); + buf_buddy_free(buf_pool, b, sizeof *b, TRUE); } if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); return(BUF_LRU_NOT_FREED); } else if (zip || !bpage->zip.data) { if (bpage->oldest_modification) @@ -1583,11 +1676,16 @@ not_freed: ut_a(bpage->buf_fix_count == 0); if (b) { + buf_page_t* hash_b; buf_page_t* prev_b = UT_LIST_GET_PREV(LRU, b); - const ulint fold = buf_page_address_fold( + + const ulint fold = buf_page_address_fold( bpage->space, bpage->offset); - ut_a(!buf_page_hash_get(bpage->space, bpage->offset)); + hash_b = buf_page_hash_get_low( + buf_pool, bpage->space, bpage->offset, fold); + + ut_a(!hash_b); while (prev_b && !prev_b->in_LRU_list) { prev_b = UT_LIST_GET_PREV(LRU, prev_b); @@ -1651,12 +1749,12 @@ not_freed: ut_ad(buf_pool->LRU_old); /* Adjust the length of the old block list if necessary */ - buf_LRU_old_adjust_len(); + buf_LRU_old_adjust_len(buf_pool); } else if (lru_len == BUF_LRU_OLD_MIN_LEN) { /* The LRU list is now long enough for LRU_old to become defined: init it */ - buf_LRU_old_init(); + buf_LRU_old_init(buf_pool); } #ifdef UNIV_LRU_DEBUG /* Check that the "old" flag is consistent @@ -1668,28 +1766,28 @@ not_freed: buf_LRU_add_block_low(b, buf_page_is_old(b)); } - mutex_enter(&flush_list_mutex); + mutex_enter(&buf_pool->zip_mutex); if (b->state == BUF_BLOCK_ZIP_PAGE) { buf_LRU_insert_zip_clean(b); } else { /* Relocate on buf_pool->flush_list. */ buf_flush_relocate_on_flush_list(bpage, b); } - mutex_exit(&flush_list_mutex); bpage->zip.data = NULL; page_zip_set_size(&bpage->zip, 0); /* Prevent buf_page_get_gen() from decompressing the block while we release - buf_pool_mutex and block_mutex. */ + buf_pool->mutex and block_mutex. */ b->buf_fix_count++; b->io_fix = BUF_IO_READ; + mutex_exit(&buf_pool->zip_mutex); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); mutex_exit(block_mutex); /* Remove possible adaptive hash index on the page. @@ -1700,7 +1798,7 @@ not_freed: UNIV_MEM_VALID(((buf_block_t*) bpage)->frame, UNIV_PAGE_SIZE); - btr_search_drop_page_hash_index((buf_block_t*) bpage); + btr_search_drop_page_hash_index((buf_block_t*) bpage, NULL); UNIV_MEM_INVALID(((buf_block_t*) bpage)->frame, UNIV_PAGE_SIZE); @@ -1721,16 +1819,16 @@ not_freed: : BUF_NO_CHECKSUM_MAGIC); } - //buf_pool_mutex_enter(); + //buf_pool_mutex_enter(buf_pool); if (have_LRU_mutex) - mutex_enter(&LRU_list_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); mutex_enter(block_mutex); if (b) { - mutex_enter(&buf_pool_zip_mutex); + mutex_enter(&buf_pool->zip_mutex); b->buf_fix_count--; buf_page_set_io_fix(b, BUF_IO_NONE); - mutex_exit(&buf_pool_zip_mutex); + mutex_exit(&buf_pool->zip_mutex); } buf_LRU_block_free_hashed_page((buf_block_t*) bpage, FALSE); @@ -1738,12 +1836,12 @@ not_freed: /* The block_mutex should have been released by buf_LRU_block_remove_hashed_page() when it returns BUF_BLOCK_ZIP_FREE. */ - ut_ad(block_mutex == &buf_pool_zip_mutex); + ut_ad(block_mutex == &buf_pool->zip_mutex); mutex_enter(block_mutex); if (!have_LRU_mutex) - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); } return(BUF_LRU_FREED); @@ -1758,10 +1856,11 @@ buf_LRU_block_free_non_file_page( buf_block_t* block, /*!< in: block, must not contain a file page */ ibool have_page_hash_mutex) { - void* data; + void* data; + buf_pool_t* buf_pool = buf_pool_from_block(block); ut_ad(block); - //ut_ad(buf_pool_mutex_own()); + //ut_ad(buf_pool_mutex_own(buf_pool)); ut_ad(mutex_own(&block->mutex)); switch (buf_block_get_state(block)) { @@ -1795,17 +1894,21 @@ buf_LRU_block_free_non_file_page( if (data) { block->page.zip.data = NULL; mutex_exit(&block->mutex); - //buf_pool_mutex_exit_forbid(); - buf_buddy_free(data, page_zip_get_size(&block->page.zip), have_page_hash_mutex); - //buf_pool_mutex_exit_allow(); + //buf_pool_mutex_exit_forbid(buf_pool); + + buf_buddy_free( + buf_pool, data, page_zip_get_size(&block->page.zip), + have_page_hash_mutex); + + //buf_pool_mutex_exit_allow(buf_pool); mutex_enter(&block->mutex); page_zip_set_size(&block->page.zip, 0); } - mutex_enter(&free_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); UT_LIST_ADD_FIRST(free, buf_pool->free, (&block->page)); ut_d(block->page.in_free_list = TRUE); - mutex_exit(&free_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE); } @@ -1813,7 +1916,7 @@ buf_LRU_block_free_non_file_page( /******************************************************************//** Takes a block out of the LRU list and page hash table. If the block is compressed-only (BUF_BLOCK_ZIP_PAGE), -the object will be freed and buf_pool_zip_mutex will be released. +the object will be freed and buf_pool->zip_mutex will be released. If a compressed page or a compressed-only block descriptor is freed, other compressed pages or compressed-only block descriptors may be @@ -1830,12 +1933,15 @@ buf_LRU_block_remove_hashed_page( ibool zip) /*!< in: TRUE if should remove also the compressed page of an uncompressed page */ { + ulint fold; const buf_page_t* hashed_bpage; + buf_pool_t* buf_pool = buf_pool_from_bpage(bpage); + ut_ad(bpage); - //ut_ad(buf_pool_mutex_own()); - ut_ad(mutex_own(&LRU_list_mutex)); + //ut_ad(buf_pool_mutex_own(buf_pool)); + ut_ad(mutex_own(&buf_pool->LRU_list_mutex)); #ifdef UNIV_SYNC_DEBUG - ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX)); + ut_ad(rw_lock_own(&buf_pool->page_hash_latch, RW_LOCK_EX)); #endif ut_ad(mutex_own(buf_page_get_mutex(bpage))); @@ -1922,7 +2028,9 @@ buf_LRU_block_remove_hashed_page( break; } - hashed_bpage = buf_page_hash_get(bpage->space, bpage->offset); + fold = buf_page_address_fold(bpage->space, bpage->offset); + hashed_bpage = buf_page_hash_get_low( + buf_pool, bpage->space, bpage->offset, fold); if (UNIV_UNLIKELY(bpage != hashed_bpage)) { fprintf(stderr, @@ -1942,9 +2050,9 @@ buf_LRU_block_remove_hashed_page( #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG mutex_exit(buf_page_get_mutex(bpage)); - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); - rw_lock_x_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); + rw_lock_x_unlock(&buf_pool->page_hash_latch); buf_print(); buf_LRU_print(); buf_validate(); @@ -1956,9 +2064,7 @@ buf_LRU_block_remove_hashed_page( ut_ad(!bpage->in_zip_hash); ut_ad(bpage->in_page_hash); ut_d(bpage->in_page_hash = FALSE); - HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, - buf_page_address_fold(bpage->space, bpage->offset), - bpage); + HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, bpage); switch (buf_page_get_state(bpage)) { case BUF_BLOCK_ZIP_PAGE: ut_ad(!bpage->in_free_list); @@ -1969,12 +2075,17 @@ buf_LRU_block_remove_hashed_page( UT_LIST_REMOVE(zip_list, buf_pool->zip_clean, bpage); - mutex_exit(&buf_pool_zip_mutex); - //buf_pool_mutex_exit_forbid(); - buf_buddy_free(bpage->zip.data, - page_zip_get_size(&bpage->zip), TRUE); - buf_buddy_free(bpage, sizeof(*bpage), TRUE); - //buf_pool_mutex_exit_allow(); + mutex_exit(&buf_pool->zip_mutex); + //buf_pool_mutex_exit_forbid(buf_pool); + + buf_buddy_free( + buf_pool, bpage->zip.data, + page_zip_get_size(&bpage->zip), TRUE); + + bpage->state = BUF_BLOCK_ZIP_FREE; + buf_buddy_free(buf_pool, bpage, sizeof(*bpage), TRUE); + //buf_pool_mutex_exit_allow(buf_pool); + UNIV_MEM_UNDESC(bpage); return(BUF_BLOCK_ZIP_FREE); @@ -1996,9 +2107,13 @@ buf_LRU_block_remove_hashed_page( ut_ad(!bpage->in_flush_list); ut_ad(!bpage->in_LRU_list); mutex_exit(&((buf_block_t*) bpage)->mutex); - //buf_pool_mutex_exit_forbid(); - buf_buddy_free(data, page_zip_get_size(&bpage->zip), TRUE); - //buf_pool_mutex_exit_allow(); + //buf_pool_mutex_exit_forbid(buf_pool); + + buf_buddy_free( + buf_pool, data, + page_zip_get_size(&bpage->zip), TRUE); + + //buf_pool_mutex_exit_allow(buf_pool); mutex_enter(&((buf_block_t*) bpage)->mutex); page_zip_set_size(&bpage->zip, 0); } @@ -2028,7 +2143,10 @@ buf_LRU_block_free_hashed_page( be in a state where it can be freed */ ibool have_page_hash_mutex) { - //ut_ad(buf_pool_mutex_own()); +#ifdef UNIV_DEBUG + //buf_pool_t* buf_pool = buf_pool_from_block(block); + //ut_ad(buf_pool_mutex_own(buf_pool)); +#endif ut_ad(mutex_own(&block->mutex)); buf_block_set_state(block, BUF_BLOCK_MEMORY); @@ -2037,17 +2155,18 @@ buf_LRU_block_free_hashed_page( } /**********************************************************************//** -Updates buf_LRU_old_ratio. +Updates buf_pool->LRU_old_ratio for one buffer pool instance. @return updated old_pct */ -UNIV_INTERN +static uint -buf_LRU_old_ratio_update( -/*=====================*/ - uint old_pct,/*!< in: Reserve this percentage of - the buffer pool for "old" blocks. */ - ibool adjust) /*!< in: TRUE=adjust the LRU list; - FALSE=just assign buf_LRU_old_ratio - during the initialization of InnoDB */ +buf_LRU_old_ratio_update_instance( +/*==============================*/ + buf_pool_t* buf_pool,/*!< in: buffer pool instance */ + uint old_pct,/*!< in: Reserve this percentage of + the buffer pool for "old" blocks. */ + ibool adjust) /*!< in: TRUE=adjust the LRU list; + FALSE=just assign buf_pool->LRU_old_ratio + during the initialization of InnoDB */ { uint ratio; @@ -2059,29 +2178,57 @@ buf_LRU_old_ratio_update( } if (adjust) { - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); - if (ratio != buf_LRU_old_ratio) { - buf_LRU_old_ratio = ratio; + if (ratio != buf_pool->LRU_old_ratio) { + buf_pool->LRU_old_ratio = ratio; if (UT_LIST_GET_LEN(buf_pool->LRU) - >= BUF_LRU_OLD_MIN_LEN) { - buf_LRU_old_adjust_len(); + >= BUF_LRU_OLD_MIN_LEN) { + + buf_LRU_old_adjust_len(buf_pool); } } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); } else { - buf_LRU_old_ratio = ratio; + buf_pool->LRU_old_ratio = ratio; } - /* the reverse of ratio = old_pct * BUF_LRU_OLD_RATIO_DIV / 100 */ return((uint) (ratio * 100 / (double) BUF_LRU_OLD_RATIO_DIV + 0.5)); } +/**********************************************************************//** +Updates buf_pool->LRU_old_ratio. +@return updated old_pct */ +UNIV_INTERN +ulint +buf_LRU_old_ratio_update( +/*=====================*/ + uint old_pct,/*!< in: Reserve this percentage of + the buffer pool for "old" blocks. */ + ibool adjust) /*!< in: TRUE=adjust the LRU list; + FALSE=just assign buf_pool->LRU_old_ratio + during the initialization of InnoDB */ +{ + ulint i; + ulint new_ratio = 0; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + + new_ratio = buf_LRU_old_ratio_update_instance( + buf_pool, old_pct, adjust); + } + + return(new_ratio); +} + /********************************************************************//** Update the historical stats that we are collecting for LRU eviction policy at the end of each interval. */ @@ -2090,16 +2237,26 @@ void buf_LRU_stat_update(void) /*=====================*/ { + ulint i; buf_LRU_stat_t* item; + buf_pool_t* buf_pool; + ibool evict_started = FALSE; buf_LRU_stat_t cur_stat; /* If we haven't started eviction yet then don't update stats. */ - if (buf_pool->freed_page_clock == 0) { - goto func_exit; + for (i = 0; i < srv_buf_pool_instances; i++) { + + buf_pool = buf_pool_from_array(i); + + if (buf_pool->freed_page_clock != 0) { + evict_started = TRUE; + break; + } } - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); + if (!evict_started) { + goto func_exit; + } /* Update the index. */ item = &buf_LRU_stat_arr[buf_LRU_stat_arr_ind]; @@ -2120,9 +2277,6 @@ buf_LRU_stat_update(void) /* Put current entry in the array. */ memcpy(item, &cur_stat, sizeof *item); - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); - func_exit: /* Clear the current entry. */ memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur); @@ -2151,8 +2305,8 @@ buf_LRU_file_dump(void) if (strstr(srv_data_file_names[i], LRU_DUMP_FILE) != NULL) { fprintf(stderr, " InnoDB: The name '%s' seems to be used for" - " innodb_data_file_path. Dumping LRU list is not" - " done for safeness.\n", LRU_DUMP_FILE); + " innodb_data_file_path. For safety, dumping of the LRU list" + " is not being done.\n", LRU_DUMP_FILE); goto end; } } @@ -2165,7 +2319,7 @@ buf_LRU_file_dump(void) goto end; } - dump_file = os_file_create(LRU_DUMP_FILE, OS_FILE_OVERWRITE, + dump_file = os_file_create(innodb_file_temp_key, LRU_DUMP_FILE, OS_FILE_OVERWRITE, OS_FILE_NORMAL, OS_DATA_FILE, &success); if (!success) { os_file_get_last_error(TRUE); @@ -2174,39 +2328,46 @@ buf_LRU_file_dump(void) goto end; } - mutex_enter(&LRU_list_mutex); - bpage = UT_LIST_GET_LAST(buf_pool->LRU); - buffers = offset = 0; - while (bpage != NULL) { - if (offset == 0) { - memset(buffer, 0, UNIV_PAGE_SIZE); - } - mach_write_to_4(buffer + offset * 4, bpage->space); - offset++; - mach_write_to_4(buffer + offset * 4, bpage->offset); - offset++; + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; - if (offset == UNIV_PAGE_SIZE/4) { - success = os_file_write(LRU_DUMP_FILE, dump_file, buffer, - (buffers << UNIV_PAGE_SIZE_SHIFT) & 0xFFFFFFFFUL, - (buffers >> (32 - UNIV_PAGE_SIZE_SHIFT)), - UNIV_PAGE_SIZE); - if (!success) { - mutex_exit(&LRU_list_mutex); - fprintf(stderr, - " InnoDB: cannot write page %lu of %s\n", - buffers, LRU_DUMP_FILE); - goto end; + buf_pool = buf_pool_from_array(i); + + mutex_enter(&buf_pool->LRU_list_mutex); + bpage = UT_LIST_GET_LAST(buf_pool->LRU); + + while (bpage != NULL) { + if (offset == 0) { + memset(buffer, 0, UNIV_PAGE_SIZE); } - buffers++; - offset = 0; - } - bpage = UT_LIST_GET_PREV(LRU, bpage); + mach_write_to_4(buffer + offset * 4, bpage->space); + offset++; + mach_write_to_4(buffer + offset * 4, bpage->offset); + offset++; + + if (offset == UNIV_PAGE_SIZE/4) { + success = os_file_write(LRU_DUMP_FILE, dump_file, buffer, + (buffers << UNIV_PAGE_SIZE_SHIFT) & 0xFFFFFFFFUL, + (buffers >> (32 - UNIV_PAGE_SIZE_SHIFT)), + UNIV_PAGE_SIZE); + if (!success) { + mutex_exit(&buf_pool->LRU_list_mutex); + fprintf(stderr, + " InnoDB: cannot write page %lu of %s\n", + buffers, LRU_DUMP_FILE); + goto end; + } + buffers++; + offset = 0; + } + + bpage = UT_LIST_GET_PREV(LRU, bpage); + } + mutex_exit(&buf_pool->LRU_list_mutex); } - mutex_exit(&LRU_list_mutex); if (offset == 0) { memset(buffer, 0, UNIV_PAGE_SIZE); @@ -2276,7 +2437,7 @@ buf_LRU_file_restore(void) ulint size_high; ulint length; - dump_file = os_file_create_simple_no_error_handling( + dump_file = os_file_create_simple_no_error_handling(innodb_file_temp_key, LRU_DUMP_FILE, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); if (!success || !os_file_get_size(dump_file, &size, &size_high)) { os_file_get_last_error(TRUE); @@ -2306,8 +2467,8 @@ buf_LRU_file_restore(void) UNIV_PAGE_SIZE); if (!success) { fprintf(stderr, - " InnoDB: cannot read page %lu of %s," - " or meet unexpected terminal.\n", + " InnoDB: either could not read page %lu of %s," + " or terminated unexpectedly.\n", buffers, LRU_DUMP_FILE); goto end; } @@ -2359,7 +2520,7 @@ buf_LRU_file_restore(void) if (offset % 16 == 15) { os_aio_simulated_wake_handler_threads(); - buf_flush_free_margin(FALSE); + buf_flush_free_margins(FALSE); } zip_size = fil_space_get_zip_size(space_id); @@ -2381,7 +2542,7 @@ buf_LRU_file_restore(void) } os_aio_simulated_wake_handler_threads(); - buf_flush_free_margin(FALSE); + buf_flush_free_margins(FALSE); ut_print_timestamp(stderr); fprintf(stderr, @@ -2401,12 +2562,12 @@ end: #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /**********************************************************************//** -Validates the LRU list. -@return TRUE */ -UNIV_INTERN -ibool -buf_LRU_validate(void) -/*==================*/ +Validates the LRU list for one buffer pool instance. */ +static +void +buf_LRU_validate_instance( +/*======================*/ + buf_pool_t* buf_pool) { buf_page_t* bpage; buf_block_t* block; @@ -2414,15 +2575,16 @@ buf_LRU_validate(void) ulint new_len; ut_ad(buf_pool); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) { ut_a(buf_pool->LRU_old); old_len = buf_pool->LRU_old_len; new_len = ut_min(UT_LIST_GET_LEN(buf_pool->LRU) - * buf_LRU_old_ratio / BUF_LRU_OLD_RATIO_DIV, + * buf_pool->LRU_old_ratio + / BUF_LRU_OLD_RATIO_DIV, UT_LIST_GET_LEN(buf_pool->LRU) - (BUF_LRU_OLD_TOLERANCE + BUF_LRU_NON_OLD_MIN_LEN)); @@ -2475,8 +2637,8 @@ buf_LRU_validate(void) ut_a(buf_pool->LRU_old_len == old_len); - mutex_exit(&LRU_list_mutex); - mutex_enter(&free_list_mutex); + mutex_exit(&buf_pool->LRU_list_mutex); + mutex_enter(&buf_pool->free_list_mutex); UT_LIST_VALIDATE(free, buf_page_t, buf_pool->free, ut_ad(ut_list_node_313->in_free_list)); @@ -2488,8 +2650,8 @@ buf_LRU_validate(void) ut_a(buf_page_get_state(bpage) == BUF_BLOCK_NOT_USED); } - mutex_exit(&free_list_mutex); - mutex_enter(&LRU_list_mutex); + mutex_exit(&buf_pool->free_list_mutex); + mutex_enter(&buf_pool->LRU_list_mutex); UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU, ut_ad(ut_list_node_313->in_unzip_LRU_list @@ -2504,30 +2666,51 @@ buf_LRU_validate(void) ut_a(buf_page_belongs_to_unzip_LRU(&block->page)); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); +} + +/**********************************************************************//** +Validates the LRU list. +@return TRUE */ +UNIV_INTERN +ibool +buf_LRU_validate(void) +/*==================*/ +{ + ulint i; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool; + + buf_pool = buf_pool_from_array(i); + buf_LRU_validate_instance(buf_pool); + } + return(TRUE); } #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #if defined UNIV_DEBUG_PRINT || defined UNIV_DEBUG || defined UNIV_BUF_DEBUG /**********************************************************************//** -Prints the LRU list. */ +Prints the LRU list for one buffer pool instance. */ UNIV_INTERN void -buf_LRU_print(void) -/*===============*/ +buf_LRU_print_instance( +/*===================*/ + buf_pool_t* buf_pool) { const buf_page_t* bpage; ut_ad(buf_pool); - //buf_pool_mutex_enter(); - mutex_enter(&LRU_list_mutex); + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); bpage = UT_LIST_GET_FIRST(buf_pool->LRU); while (bpage != NULL) { + mutex_enter(buf_page_get_mutex(bpage)); fprintf(stderr, "BLOCK space %lu page %lu ", (ulong) buf_page_get_space(bpage), (ulong) buf_page_get_page_no(bpage)); @@ -2555,19 +2738,17 @@ buf_LRU_print(void) case BUF_BLOCK_FILE_PAGE: frame = buf_block_get_frame((buf_block_t*) bpage); fprintf(stderr, "\ntype %lu" - " index id %lu\n", + " index id %llu\n", (ulong) fil_page_get_type(frame), - (ulong) ut_dulint_get_low( - btr_page_get_index_id(frame))); + (ullint) btr_page_get_index_id(frame)); break; case BUF_BLOCK_ZIP_PAGE: frame = bpage->zip.data; fprintf(stderr, "\ntype %lu size %lu" - " index id %lu\n", + " index id %llu\n", (ulong) fil_page_get_type(frame), (ulong) buf_page_get_zip_size(bpage), - (ulong) ut_dulint_get_low( - btr_page_get_index_id(frame))); + (ullint) btr_page_get_index_id(frame)); break; default: @@ -2576,10 +2757,27 @@ buf_LRU_print(void) break; } + mutex_exit(buf_page_get_mutex(bpage)); bpage = UT_LIST_GET_NEXT(LRU, bpage); } - //buf_pool_mutex_exit(); - mutex_exit(&LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + mutex_exit(&buf_pool->LRU_list_mutex); +} + +/**********************************************************************//** +Prints the LRU list. */ +UNIV_INTERN +void +buf_LRU_print(void) +/*===============*/ +{ + ulint i; + buf_pool_t* buf_pool; + + for (i = 0; i < srv_buf_pool_instances; i++) { + buf_pool = buf_pool_from_array(i); + buf_LRU_print_instance(buf_pool); + } } #endif /* UNIV_DEBUG_PRINT || UNIV_DEBUG || UNIV_BUF_DEBUG */ diff --git a/buf/buf0rea.c b/buf/buf0rea.c index 59de70d9a8a..587b982b3e0 100644 --- a/buf/buf0rea.c +++ b/buf/buf0rea.c @@ -37,6 +37,8 @@ Created 11/5/1995 Heikki Tuuri #include "os0file.h" #include "srv0start.h" #include "srv0srv.h" +#include "mysql/plugin.h" +#include "mysql/service_thd_wait.h" /** The linear read-ahead area size */ #define BUF_READ_AHEAD_LINEAR_AREA BUF_READ_AHEAD_AREA @@ -178,6 +180,7 @@ not_to_recover: ut_ad(buf_page_in_file(bpage)); + thd_wait_begin(NULL, THD_WAIT_DISKIO); if (zip_size) { *err = _fil_io(OS_FILE_READ | wake_later, sync, space, zip_size, offset, 0, zip_size, @@ -189,6 +192,7 @@ not_to_recover: sync, space, 0, offset, 0, UNIV_PAGE_SIZE, ((buf_block_t*) bpage)->frame, bpage, trx); } + thd_wait_end(NULL); if (srv_pass_corrupt_table) { if (*err != DB_SUCCESS) { @@ -201,7 +205,7 @@ not_to_recover: if (sync) { /* The i/o is already completed when we arrive from fil_read */ - buf_page_io_complete(bpage, trx); + buf_page_io_complete(bpage); } return(1); @@ -222,6 +226,7 @@ buf_read_page( ulint offset, /*!< in: page number */ trx_t* trx) { + buf_pool_t* buf_pool = buf_pool_get(space, offset); ib_int64_t tablespace_version; ulint count; ulint err; @@ -246,7 +251,7 @@ buf_read_page( } /* Flush pages from the end of the LRU list if necessary */ - buf_flush_free_margin(FALSE); + buf_flush_free_margin(buf_pool, TRUE); /* Increment number of I/O operations used for LRU policy. */ buf_LRU_stat_inc_io(); @@ -282,12 +287,13 @@ UNIV_INTERN ulint buf_read_ahead_linear( /*==================*/ - ulint space, /*!< in: space id */ - ulint zip_size,/*!< in: compressed page size in bytes, or 0 */ - ulint offset, /*!< in: page number of a page; NOTE: the current thread - must want access to this page (see NOTE 3 above) */ + ulint space, /*!< in: space id */ + ulint zip_size, /*!< in: compressed page size in bytes, or 0 */ + ulint offset, /*!< in: page number; see NOTE 3 above */ + ibool inside_ibuf, /*!< in: TRUE if we are inside ibuf routine */ trx_t* trx) { + buf_pool_t* buf_pool = buf_pool_get(space, offset); ib_int64_t tablespace_version; buf_page_t* bpage; buf_frame_t* frame; @@ -303,12 +309,12 @@ buf_read_ahead_linear( ulint err; ulint i; const ulint buf_read_ahead_linear_area - = BUF_READ_AHEAD_LINEAR_AREA; + = BUF_READ_AHEAD_LINEAR_AREA(buf_pool); ulint threshold; - if (!(srv_read_ahead & 2)) { - return(0); - } + if (!(srv_read_ahead & 2)) { + return(0); + } if (UNIV_UNLIKELY(srv_startup_is_before_trx_rollback_phase)) { /* No read-ahead to avoid thread deadlocks */ @@ -342,12 +348,10 @@ buf_read_ahead_linear( tablespace_version = fil_space_get_version(space); - //buf_pool_mutex_enter(); - mutex_enter(&buf_pool_mutex); + buf_pool_mutex_enter(buf_pool); if (high > fil_space_get_size(space)) { - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); /* The area is not whole, return */ return(0); @@ -355,12 +359,11 @@ buf_read_ahead_linear( if (buf_pool->n_pend_reads > buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) { - //buf_pool_mutex_exit(); - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); return(0); } - mutex_exit(&buf_pool_mutex); + buf_pool_mutex_exit(buf_pool); /* Check that almost all pages in the area have been accessed; if offset == low, the accesses must be in a descending order, otherwise, @@ -375,15 +378,15 @@ buf_read_ahead_linear( /* How many out of order accessed pages can we ignore when working out the access pattern for linear readahead */ threshold = ut_min((64 - srv_read_ahead_threshold), - BUF_READ_AHEAD_AREA); + BUF_READ_AHEAD_AREA(buf_pool)); fail_count = 0; - rw_lock_s_lock(&page_hash_latch); + rw_lock_s_lock(&buf_pool->page_hash_latch); for (i = low; i < high; i++) { - bpage = buf_page_hash_get(space, i); + bpage = buf_page_hash_get(buf_pool, space, i); - if ((bpage == NULL) || !buf_page_is_accessed(bpage)) { + if (bpage == NULL || !buf_page_is_accessed(bpage)) { /* Not accessed */ fail_count++; @@ -407,8 +410,8 @@ buf_read_ahead_linear( if (fail_count > threshold) { /* Too many failures: return */ - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(0); } @@ -420,11 +423,11 @@ 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(space, offset); + bpage = buf_page_hash_get(buf_pool, space, offset); if (bpage == NULL) { - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); return(0); } @@ -450,8 +453,8 @@ buf_read_ahead_linear( pred_offset = fil_page_get_prev(frame); succ_offset = fil_page_get_next(frame); - //buf_pool_mutex_exit(); - rw_lock_s_unlock(&page_hash_latch); + //buf_pool_mutex_exit(buf_pool); + rw_lock_s_unlock(&buf_pool->page_hash_latch); if ((offset == low) && (succ_offset == offset + 1)) { @@ -487,11 +490,9 @@ buf_read_ahead_linear( /* If we got this far, read-ahead can be sensible: do it */ - if (ibuf_inside()) { - ibuf_mode = BUF_READ_IBUF_PAGES_ONLY; - } else { - ibuf_mode = BUF_READ_ANY_PAGE; - } + ibuf_mode = inside_ibuf + ? BUF_READ_IBUF_PAGES_ONLY | OS_AIO_SIMULATED_WAKE_LATER + : BUF_READ_ANY_PAGE | OS_AIO_SIMULATED_WAKE_LATER; count = 0; @@ -508,7 +509,7 @@ buf_read_ahead_linear( if (!ibuf_bitmap_page(zip_size, i)) { count += buf_read_page_low( &err, FALSE, - ibuf_mode | OS_AIO_SIMULATED_WAKE_LATER, + ibuf_mode, space, zip_size, FALSE, tablespace_version, i, trx); if (err == DB_TABLESPACE_DELETED) { ut_print_timestamp(stderr); @@ -530,7 +531,7 @@ buf_read_ahead_linear( os_aio_simulated_wake_handler_threads(); /* Flush pages from the end of the LRU list if necessary */ - buf_flush_free_margin(FALSE); + buf_flush_free_margin(buf_pool, TRUE); #ifdef UNIV_DEBUG if (buf_debug_prints && (count > 0)) { @@ -578,18 +579,21 @@ buf_read_ibuf_merge_pages( { ulint i; - ut_ad(!ibuf_inside()); #ifdef UNIV_IBUF_DEBUG ut_a(n_stored < UNIV_PAGE_SIZE); #endif - while (buf_pool->n_pend_reads - > buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) { - os_thread_sleep(500000); - } for (i = 0; i < n_stored; i++) { - ulint zip_size = fil_space_get_zip_size(space_ids[i]); - ulint err; + ulint err; + buf_pool_t* buf_pool; + ulint zip_size = fil_space_get_zip_size(space_ids[i]); + + buf_pool = buf_pool_get(space_ids[i], page_nos[i]); + + while (buf_pool->n_pend_reads + > buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) { + os_thread_sleep(500000); + } if (UNIV_UNLIKELY(zip_size == ULINT_UNDEFINED)) { @@ -614,8 +618,8 @@ tablespace_deleted: os_aio_simulated_wake_handler_threads(); - /* Flush pages from the end of the LRU list if necessary */ - buf_flush_free_margin(FALSE); + /* Flush pages from the end of all the LRU lists if necessary */ + buf_flush_free_margins(FALSE); #ifdef UNIV_DEBUG if (buf_debug_prints) { @@ -708,11 +712,12 @@ not_to_recover: tablespace_version = fil_space_get_version(space); for (i = 0; i < n_stored; i++) { + buf_pool_t* buf_pool; count = 0; os_aio_print_debug = FALSE; - + buf_pool = buf_pool_get(space, page_nos[i]); while (buf_pool->n_pend_reads >= recv_n_pool_free_frames / 2) { os_aio_simulated_wake_handler_threads(); @@ -751,8 +756,8 @@ not_to_recover: os_aio_simulated_wake_handler_threads(); - /* Flush pages from the end of the LRU list if necessary */ - buf_flush_free_margin(FALSE); + /* Flush pages from the end of all the LRU lists if necessary */ + buf_flush_free_margins(FALSE); #ifdef UNIV_DEBUG if (buf_debug_prints) { diff --git a/build/debian/README.Maintainer b/build/debian/README.Maintainer deleted file mode 100644 index 9554bdd7c62..00000000000 --- a/build/debian/README.Maintainer +++ /dev/null @@ -1,116 +0,0 @@ - -########################### -## FIXME for 5.1 ## -########################### - -* put this trigger-recreation thing into the init scripts -- what?! -* Let debian-i10n-english review all template changes before the translaters start. -* Mark debconf translations as obsolete with debconf-updatepo. - -########################################################################### -# Here are some information that are only of interest for the current and # -# following Debian maintainers of MySQL. # -########################################################################### - -The debian/ directory is under SVN control, see debian/control for URL. - -# -# Preparing a new version -# -The new orig.tar.gz (without non-free documentation) is created in /tmp/ when -running this command: - -debian/rules get-orig-source - -# -# mysqlreport -# -The authors e-mail address is . - -# -# Remarks to dependencies -# -libwrap0-dev (>= 7.6-8.3) - According to bug report 114582 where where build problems on - IA-64/sid with at least two prior versions. -psmisc - /usr/bin/killall in the initscript - -zlib1g in libmysqlclient-dev: - "mysql_config --libs" ads "-lz" - -Build-Dep: - -debhelper (>=4.1.16): - See po-debconf(7). - -autoconf (>= 2.13-20), automake1.7 - Try to get rid of them. - -doxygen, tetex-bin, tetex-extra, gs - for ndb/docs/*tex - -# -# Remarks to the start scripts -# - -## initscripts rely on mysqladmin from a different package -We have the problem that "/etc/init.d/mysql stop" relies on mysqladmin which -is in another package (mysql-client) and a passwordless access that's maybe -only available if the user configured his /root/.my.cnf. Can this be a problem? -* normal mode: not because the user is required to have it. Else: -* purge/remove: not, same as normal mode -* upgrade: not, same as normal mode -* first install: not, it depends on mysql-client which at least is unpacked - so mysqladmin is there (to ping). It is not yet configured - passwordles but if there's a server running then there's a - /root/.my.cnf. Anyways, we simply kill anything that's mysqld. - -## Passwordless access for the maintainer scripts -Another issue is that the scripts needs passwordless access. To ensure this -a debian-sys-maint user is configured which has process and shutdown privs. -The file with the randomly (that's important!) generated password must be -present as long as the databases remain installed because else a new install -would have no access. This file should be used like: - mysqladmin --defaults-file=/etc/mysql/debian.cnf restart -to avoid providing the password in plaintext on a commandline where it would -be visible to any user via the "ps" command. - -## When to start the daemon? -We aim to give the admin full control on when MySQL is running. -Issues to be faced here: -OLD: - 1. Debconf asks whether MySQL should be started on boot so update-rc.d is - only run if the answer has been yes. The admin is likely to forget - this decision but update-rc.d checks for an existing line in - /etc/runlevel.conf and leaves it intact. - 2. On initial install, if the answer is yes, the daemon has to be started. - 3. On upgrades it should only be started if it was already running, everything - else is confusing. Especiall relying on an debconf decision made month ago - is considered suboptimal. See bug #274264 - Implementation so far: - prerm (called on upgrade before stopping the server): - check for a running server and set flag if necessary - preinst (called on initial install and before unpacking when upgrading): - check for the debconf variable and set flag if necessary - postinst (called on initial install and after each upgrade after unpacking): - call update-rc.d if debconf says yes - call invoce-rc.d if the flag has been set - Problems remaining: - dpkg-reconfigure and setting mysql start on boot to yes did not start mysql - (ok "start on boot" literally does not mean "start now" so that might have been ok) -NEW: - 1. --- no debconf anymore for the sake of simplicity. We have runlevel.conf, - the admin should use it - 2. On initial install the server is started. - 3. On upgrades the server is started exactly if it was running before so the - runlevel configuration is irrelevant. It will be preserved by the mean of - update-rc.d's builtin check. - Implementation: - prerm (called on upgrade before stopping the server): - check for a running server and set flag if necessary - preinst (called on initial install and before unpacking when upgrading): - check for $1 beeing (initial) "install" and set flag - postinst (called on initial install and after each upgrade after unpacking): - call update-rc.d - call invoce-rc.d if the flag has been set diff --git a/build/debian/additions/Docs__Images__Makefile.in b/build/debian/additions/Docs__Images__Makefile.in deleted file mode 100644 index f7316d4e345..00000000000 --- a/build/debian/additions/Docs__Images__Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -all: - -distclean: - -rm -f Makefile - -.PHONY: all distclean clean install check diff --git a/build/debian/additions/Docs__Makefile.in b/build/debian/additions/Docs__Makefile.in deleted file mode 100644 index f7316d4e345..00000000000 --- a/build/debian/additions/Docs__Makefile.in +++ /dev/null @@ -1,6 +0,0 @@ -all: - -distclean: - -rm -f Makefile - -.PHONY: all distclean clean install check diff --git a/build/debian/additions/debian-start b/build/debian/additions/debian-start deleted file mode 100644 index 10628019e40..00000000000 --- a/build/debian/additions/debian-start +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# -# This script is executed by "/etc/init.d/mysql" on every (re)start. -# -# Changes to this file will be preserved when updating the Debian package. -# - -source /usr/share/mysql/debian-start.inc.sh - -MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf" -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" -MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf" -MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf" -MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables" -MYCHECK_PARAMS="--all-databases --fast --silent" -MYCHECK_RCPT="root" - -# The following commands should be run when the server is up but in background -# where they do not block the server start and in one shell instance so that -# they run sequentially. They are supposed not to echo anything to stdout. -# If you want to disable the check for crashed tables comment -# "check_for_crashed_tables" out. -# (There may be no output to stdout inside the background process!) -echo "Checking for corrupt, not cleanly closed and upgrade needing tables." -( - upgrade_system_tables_if_necessary; - check_root_accounts; - check_for_crashed_tables; -) >&2 & - -exit 0 diff --git a/build/debian/additions/debian-start.inc.sh b/build/debian/additions/debian-start.inc.sh deleted file mode 100644 index 736cb3448eb..00000000000 --- a/build/debian/additions/debian-start.inc.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# -# This file is included by /etc/mysql/debian-start -# - -## Check all unclosed tables. -# - Requires the server to be up. -# - Is supposed to run silently in background. -function check_for_crashed_tables() { - set -e - set -u - - # But do it in the background to not stall the boot process. - logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables" - - # Checking for $? is unreliable so the size of the output is checked. - # Some table handlers like HEAP do not support CHECK TABLE. - tempfile=`tempfile` - # We have to use xargs in this case, because a for loop barfs on the - # spaces in the thing to be looped over. - LC_ALL=C $MYSQL --skip-column-names --batch -e ' - select concat("select count(*) into @discard from `", - TABLE_SCHEMA, "`.`", TABLE_NAME, "`") - from information_schema.TABLES where ENGINE="MyISAM"' | \ - xargs -i $MYSQL --skip-column-names --silent --batch \ - --force -e "{}" >$tempfile - if [ -s $tempfile ]; then - ( - /bin/echo -e "\n" \ - "Improperly closed tables are also reported if clients are accessing\n" \ - "the tables *now*. A list of current connections is below.\n"; - $MYADMIN processlist status - ) >> $tempfile - # Check for presence as a dependency on mailx would require an MTA. - if [ -x /usr/bin/mailx ]; then - mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile - fi - (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0 - fi - rm $tempfile -} - -## Check for tables needing an upgrade. -# - Requires the server to be up. -# - Is supposed to run silently in background. -function upgrade_system_tables_if_necessary() { - set -e - set -u - - logger -p daemon.info -i -t$0 "Upgrading MySQL tables if necessary." - - # Filter all "duplicate column", "duplicate key" and "unknown column" - # errors as the script is designed to be idempotent. - LC_ALL=C $MYUPGRADE \ - 2>&1 \ - | egrep -v '^(1|@had|ERROR (1054|1060|1061))' \ - | logger -p daemon.warn -i -t$0 -} - -## Check for the presence of both, root accounts with and without password. -# This might have been caused by a bug related to mysql_install_db (#418672). -function check_root_accounts() { - set -e - set -u - - logger -p daemon.info -i -t$0 "Checking for insecure root accounts." - - ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='';" | $MYSQL --skip-column-names ) - if [ "$ret" -ne "0" ]; then - logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!" - fi -} diff --git a/build/debian/additions/echo_stderr b/build/debian/additions/echo_stderr deleted file mode 100644 index 67b3ed7cfb3..00000000000 --- a/build/debian/additions/echo_stderr +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -echo "$*" 1>&2 diff --git a/build/debian/additions/innotop/InnoDBParser.pm b/build/debian/additions/innotop/InnoDBParser.pm deleted file mode 100644 index 3aaa7acd5b8..00000000000 --- a/build/debian/additions/innotop/InnoDBParser.pm +++ /dev/null @@ -1,1089 +0,0 @@ -use strict; -use warnings FATAL => 'all'; - -package InnoDBParser; - -# This program is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com. -# Feedback and improvements are gratefully received. -# -# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, version 2; OR the Perl Artistic License. On UNIX and similar -# systems, you can issue `man perlgpl' or `man perlartistic' to read these - -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA - -our $VERSION = '1.6.0'; - -use Data::Dumper; -$Data::Dumper::Sortkeys = 1; -use English qw(-no_match_vars); -use List::Util qw(max); - -# Some common patterns -my $d = qr/(\d+)/; # Digit -my $f = qr/(\d+\.\d+)/; # Float -my $t = qr/(\d+ \d+)/; # Transaction ID -my $i = qr/((?:\d{1,3}\.){3}\d+)/; # IP address -my $n = qr/([^`\s]+)/; # MySQL object name -my $w = qr/(\w+)/; # Words -my $fl = qr/([\w\.\/]+) line $d/; # Filename and line number -my $h = qr/((?:0x)?[0-9a-f]*)/; # Hex -my $s = qr/(\d{6} .\d:\d\d:\d\d)/; # InnoDB timestamp - -# If you update this variable, also update the SYNOPSIS in the pod. -my %innodb_section_headers = ( - "TRANSACTIONS" => "tx", - "BUFFER POOL AND MEMORY" => "bp", - "SEMAPHORES" => "sm", - "LOG" => "lg", - "ROW OPERATIONS" => "ro", - "INSERT BUFFER AND ADAPTIVE HASH INDEX" => "ib", - "FILE I/O" => "io", - "LATEST DETECTED DEADLOCK" => "dl", - "LATEST FOREIGN KEY ERROR" => "fk", -); - -my %parser_for = ( - tx => \&parse_tx_section, - bp => \&parse_bp_section, - sm => \&parse_sm_section, - lg => \&parse_lg_section, - ro => \&parse_ro_section, - ib => \&parse_ib_section, - io => \&parse_io_section, - dl => \&parse_dl_section, - fk => \&parse_fk_section, -); - -my %fk_parser_for = ( - Transaction => \&parse_fk_transaction_error, - Error => \&parse_fk_bad_constraint_error, - Cannot => \&parse_fk_cant_drop_parent_error, -); - -# A thread's proc_info can be at least 98 different things I've found in the -# source. Fortunately, most of them begin with a gerunded verb. These are -# the ones that don't. -my %is_proc_info = ( - 'After create' => 1, - 'Execution of init_command' => 1, - 'FULLTEXT initialization' => 1, - 'Reopen tables' => 1, - 'Repair done' => 1, - 'Repair with keycache' => 1, - 'System lock' => 1, - 'Table lock' => 1, - 'Thread initialized' => 1, - 'User lock' => 1, - 'copy to tmp table' => 1, - 'discard_or_import_tablespace' => 1, - 'end' => 1, - 'got handler lock' => 1, - 'got old table' => 1, - 'init' => 1, - 'key cache' => 1, - 'locks' => 1, - 'malloc' => 1, - 'query end' => 1, - 'rename result table' => 1, - 'rename' => 1, - 'setup' => 1, - 'statistics' => 1, - 'status' => 1, - 'table cache' => 1, - 'update' => 1, -); - -sub new { - bless {}, shift; -} - -# Parse the status and return it. -# See srv_printf_innodb_monitor in innobase/srv/srv0srv.c -# Pass in the text to parse, whether to be in debugging mode, which sections -# to parse (hashref; if empty, parse all), and whether to parse full info from -# locks and such (probably shouldn't unless you need to). -sub parse_status_text { - my ( $self, $fulltext, $debug, $sections, $full ) = @_; - - die "I can't parse undef" unless defined $fulltext; - $fulltext =~ s/[\r\n]+/\n/g; - - $sections ||= {}; - die '$sections must be a hashref' unless ref($sections) eq 'HASH'; - - my %innodb_data = ( - got_all => 0, # Whether I was able to get the whole thing - ts => '', # Timestamp the server put on it - last_secs => 0, # Num seconds the averages are over - sections => {}, # Parsed values from each section - ); - - if ( $debug ) { - $innodb_data{'fulltext'} = $fulltext; - } - - # Get the most basic info about the status: beginning and end, and whether - # I got the whole thing (if there has been a big deadlock and there are - # too many locks to print, the output might be truncated) - my ( $time_text ) = $fulltext =~ m/^$s INNODB MONITOR OUTPUT$/m; - $innodb_data{'ts'} = [ parse_innodb_timestamp( $time_text ) ]; - $innodb_data{'timestring'} = ts_to_string($innodb_data{'ts'}); - ( $innodb_data{'last_secs'} ) = $fulltext - =~ m/Per second averages calculated from the last $d seconds/; - - ( my $got_all ) = $fulltext =~ m/END OF INNODB MONITOR OUTPUT/; - $innodb_data{'got_all'} = $got_all || 0; - - # Split it into sections. Each section begins with - # ----- - # LABEL - # ----- - my %innodb_sections; - my @matches = $fulltext - =~ m#\n(---+)\n([A-Z /]+)\n\1\n(.*?)(?=\n(---+)\n[A-Z /]+\n\4\n|$)#gs; - while ( my ( $start, $name, $text, $end ) = splice(@matches, 0, 4) ) { - $innodb_sections{$name} = [ $text, $end ? 1 : 0 ]; - } - # The Row Operations section is a special case, because instead of ending - # with the beginning of another section, it ends with the end of the file. - # So this section is complete if the entire file is complete. - $innodb_sections{'ROW OPERATIONS'}->[1] ||= $innodb_data{'got_all'}; - - # Just for sanity's sake, make sure I understand what to do with each - # section - eval { - foreach my $section ( keys %innodb_sections ) { - my $header = $innodb_section_headers{$section}; - die "Unknown section $section in $fulltext\n" - unless $header; - $innodb_data{'sections'}->{ $header } - ->{'fulltext'} = $innodb_sections{$section}->[0]; - $innodb_data{'sections'}->{ $header } - ->{'complete'} = $innodb_sections{$section}->[1]; - } - }; - if ( $EVAL_ERROR ) { - _debug( $debug, $EVAL_ERROR); - } - - # ################################################################ - # Parse the detailed data out of the sections. - # ################################################################ - eval { - foreach my $section ( keys %parser_for ) { - if ( defined $innodb_data{'sections'}->{$section} - && (!%$sections || (defined($sections->{$section} && $sections->{$section})) )) { - $parser_for{$section}->( - $innodb_data{'sections'}->{$section}, - $innodb_data{'sections'}->{$section}->{'complete'}, - $debug, - $full ) - or delete $innodb_data{'sections'}->{$section}; - } - else { - delete $innodb_data{'sections'}->{$section}; - } - } - }; - if ( $EVAL_ERROR ) { - _debug( $debug, $EVAL_ERROR); - } - - return \%innodb_data; -} - -# Parses the status text and returns it flattened out as a single hash. -sub get_status_hash { - my ( $self, $fulltext, $debug, $sections, $full ) = @_; - - # Parse the status text... - my $innodb_status - = $self->parse_status_text($fulltext, $debug, $sections, $full ); - - # Flatten the hierarchical structure into a single list by grabbing desired - # sections from it. - return - (map { 'IB_' . $_ => $innodb_status->{$_} } qw(timestring last_secs got_all)), - (map { 'IB_bp_' . $_ => $innodb_status->{'sections'}->{'bp'}->{$_} } - qw( writes_pending buf_pool_hit_rate total_mem_alloc buf_pool_reads - awe_mem_alloc pages_modified writes_pending_lru page_creates_sec - reads_pending pages_total buf_pool_hits writes_pending_single_page - page_writes_sec pages_read pages_written page_reads_sec - writes_pending_flush_list buf_pool_size add_pool_alloc - dict_mem_alloc pages_created buf_free complete )), - (map { 'IB_tx_' . $_ => $innodb_status->{'sections'}->{'tx'}->{$_} } - qw( num_lock_structs history_list_len purge_done_for transactions - purge_undo_for is_truncated trx_id_counter complete )), - (map { 'IB_ib_' . $_ => $innodb_status->{'sections'}->{'ib'}->{$_} } - qw( hash_table_size hash_searches_s non_hash_searches_s - bufs_in_node_heap used_cells size free_list_len seg_size inserts - merged_recs merges complete )), - (map { 'IB_lg_' . $_ => $innodb_status->{'sections'}->{'lg'}->{$_} } - qw( log_ios_done pending_chkp_writes last_chkp log_ios_s - log_flushed_to log_seq_no pending_log_writes complete )), - (map { 'IB_sm_' . $_ => $innodb_status->{'sections'}->{'sm'}->{$_} } - qw( wait_array_size rw_shared_spins rw_excl_os_waits mutex_os_waits - mutex_spin_rounds mutex_spin_waits rw_excl_spins rw_shared_os_waits - waits signal_count reservation_count complete )), - (map { 'IB_ro_' . $_ => $innodb_status->{'sections'}->{'ro'}->{$_} } - qw( queries_in_queue n_reserved_extents main_thread_state - main_thread_proc_no main_thread_id read_sec del_sec upd_sec ins_sec - read_views_open num_rows_upd num_rows_ins num_rows_read - queries_inside num_rows_del complete )), - (map { 'IB_fk_' . $_ => $innodb_status->{'sections'}->{'fk'}->{$_} } - qw( trigger parent_table child_index parent_index attempted_op - child_db timestring fk_name records col_name reason txn parent_db - type child_table parent_col complete )), - (map { 'IB_io_' . $_ => $innodb_status->{'sections'}->{'io'}->{$_} } - qw( pending_buffer_pool_flushes pending_pwrites pending_preads - pending_normal_aio_reads fsyncs_s os_file_writes pending_sync_ios - reads_s flush_type avg_bytes_s pending_ibuf_aio_reads writes_s - threads os_file_reads pending_aio_writes pending_log_ios os_fsyncs - pending_log_flushes complete )), - (map { 'IB_dl_' . $_ => $innodb_status->{'sections'}->{'dl'}->{$_} } - qw( timestring rolled_back txns complete )); - -} - -sub ts_to_string { - my $parts = shift; - return sprintf('%02d-%02d-%02d %02d:%02d:%02d', @$parts); -} - -sub parse_innodb_timestamp { - my $text = shift; - my ( $y, $m, $d, $h, $i, $s ) - = $text =~ m/^(\d\d)(\d\d)(\d\d) +(\d+):(\d+):(\d+)$/; - die("Can't get timestamp from $text\n") unless $y; - $y += 2000; - return ( $y, $m, $d, $h, $i, $s ); -} - -sub parse_fk_section { - my ( $section, $complete, $debug, $full ) = @_; - my $fulltext = $section->{'fulltext'}; - - return 0 unless $fulltext; - - my ( $ts, $type ) = $fulltext =~ m/^$s\s+(\w+)/m; - $section->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; - $section->{'timestring'} = ts_to_string($section->{'ts'}); - $section->{'type'} = $type; - - # Decide which type of FK error happened, and dispatch to the right parser. - if ( $type && $fk_parser_for{$type} ) { - $fk_parser_for{$type}->( $section, $complete, $debug, $fulltext, $full ); - } - - delete $section->{'fulltext'} unless $debug; - - return 1; -} - -sub parse_fk_cant_drop_parent_error { - my ( $section, $complete, $debug, $fulltext, $full ) = @_; - - # Parse the parent/child table info out - @{$section}{ qw(attempted_op parent_db parent_table) } = $fulltext - =~ m{Cannot $w table `(.*)/(.*)`}m; - @{$section}{ qw(child_db child_table) } = $fulltext - =~ m{because it is referenced by `(.*)/(.*)`}m; - - ( $section->{'reason'} ) = $fulltext =~ m/(Cannot .*)/s; - $section->{'reason'} =~ s/\n(?:InnoDB: )?/ /gm - if $section->{'reason'}; - - # Certain data may not be present. Make them '' if not present. - map { $section->{$_} ||= "" } - qw(child_index fk_name col_name parent_col); -} - -# See dict/dict0dict.c, function dict_foreign_error_report -# I don't care much about these. There are lots of different messages, and -# they come from someone trying to create a foreign key, or similar -# statements. They aren't indicative of some transaction trying to insert, -# delete or update data. Sometimes it is possible to parse out a lot of -# information about the tables and indexes involved, but often the message -# contains the DDL string the user entered, which is way too much for this -# module to try to handle. -sub parse_fk_bad_constraint_error { - my ( $section, $complete, $debug, $fulltext, $full ) = @_; - - # Parse the parent/child table and index info out - @{$section}{ qw(child_db child_table) } = $fulltext - =~ m{Error in foreign key constraint of table (.*)/(.*):$}m; - $section->{'attempted_op'} = 'DDL'; - - # FK name, parent info... if possible. - @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } - = $fulltext - =~ m/CONSTRAINT `?$n`? FOREIGN KEY \(`?$n`?\) REFERENCES (?:`?$n`?\.)?`?$n`? \(`?$n`?\)/; - - if ( !defined($section->{'fk_name'}) ) { - # Try to parse SQL a user might have typed in a CREATE statement or such - @{$section}{ qw(col_name parent_db parent_table parent_col) } - = $fulltext - =~ m/FOREIGN\s+KEY\s*\(`?$n`?\)\s+REFERENCES\s+(?:`?$n`?\.)?`?$n`?\s*\(`?$n`?\)/i; - } - $section->{'parent_db'} ||= $section->{'child_db'}; - - # Name of the child index (index in the same table where the FK is, see - # definition of dict_foreign_struct in include/dict0mem.h, where it is - # called foreign_index, as opposed to referenced_index which is in the - # parent table. This may not be possible to find. - @{$section}{ qw(child_index) } = $fulltext - =~ m/^The index in the foreign key in table is $n$/m; - - @{$section}{ qw(reason) } = $fulltext =~ m/:\s*([^:]+)(?= Constraint:|$)/ms; - $section->{'reason'} =~ s/\s+/ /g - if $section->{'reason'}; - - # Certain data may not be present. Make them '' if not present. - map { $section->{$_} ||= "" } - qw(child_index fk_name col_name parent_table parent_col); -} - -# see source file row/row0ins.c -sub parse_fk_transaction_error { - my ( $section, $complete, $debug, $fulltext, $full ) = @_; - - # Parse the txn info out - my ( $txn ) = $fulltext - =~ m/Transaction:\n(TRANSACTION.*)\nForeign key constraint fails/s; - if ( $txn ) { - $section->{'txn'} = parse_tx_text( $txn, $complete, $debug, $full ); - } - - # Parse the parent/child table and index info out. There are two types: an - # update or a delete of a parent record leaves a child orphaned - # (row_ins_foreign_report_err), and an insert or update of a child record has - # no matching parent record (row_ins_foreign_report_add_err). - - @{$section}{ qw(reason child_db child_table) } - = $fulltext =~ m{^(Foreign key constraint fails for table `(.*)/(.*)`:)$}m; - - @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) } - = $fulltext - =~ m/CONSTRAINT `$n` FOREIGN KEY \(`$n`\) REFERENCES (?:`$n`\.)?`$n` \(`$n`\)/; - $section->{'parent_db'} ||= $section->{'child_db'}; - - # Special case, which I don't know how to trigger, but see - # innobase/row/row0ins.c row_ins_check_foreign_constraint - if ( $fulltext =~ m/ibd file does not currently exist!/ ) { - my ( $attempted_op, $index, $records ) - = $fulltext =~ m/^Trying to (add to index) `$n` tuple:\n(.*))?/sm; - $section->{'child_index'} = $index; - $section->{'attempted_op'} = $attempted_op || ''; - if ( $records && $full ) { - ( $section->{'records'} ) - = parse_innodb_record_dump( $records, $complete, $debug ); - } - @{$section}{qw(parent_db parent_table)} - =~ m/^But the parent table `$n`\.`$n`$/m; - } - else { - my ( $attempted_op, $which, $index ) - = $fulltext =~ m/^Trying to ([\w ]*) in (child|parent) table, in index `$n` tuple:$/m; - if ( $which ) { - $section->{$which . '_index'} = $index; - $section->{'attempted_op'} = $attempted_op || ''; - - # Parse out the related records in the other table. - my ( $search_index, $records ); - if ( $which eq 'child' ) { - ( $search_index, $records ) = $fulltext - =~ m/^But in parent table [^,]*, in index `$n`,\nthe closest match we can find is record:\n(.*)/ms; - $section->{'parent_index'} = $search_index; - } - else { - ( $search_index, $records ) = $fulltext - =~ m/^But in child table [^,]*, in index `$n`, (?:the record is not available|there is a record:\n(.*))?/ms; - $section->{'child_index'} = $search_index; - } - if ( $records && $full ) { - $section->{'records'} - = parse_innodb_record_dump( $records, $complete, $debug ); - } - else { - $section->{'records'} = ''; - } - } - } - - # Parse out the tuple trying to be updated, deleted or inserted. - my ( $trigger ) = $fulltext =~ m/^(DATA TUPLE: \d+ fields;\n.*)$/m; - if ( $trigger ) { - $section->{'trigger'} = parse_innodb_record_dump( $trigger, $complete, $debug ); - } - - # Certain data may not be present. Make them '' if not present. - map { $section->{$_} ||= "" } - qw(child_index fk_name col_name parent_table parent_col); -} - -# There are new-style and old-style record formats. See rem/rem0rec.c -# TODO: write some tests for this -sub parse_innodb_record_dump { - my ( $dump, $complete, $debug ) = @_; - return undef unless $dump; - - my $result = {}; - - if ( $dump =~ m/PHYSICAL RECORD/ ) { - my $style = $dump =~ m/compact format/ ? 'new' : 'old'; - $result->{'style'} = $style; - - # This is a new-style record. - if ( $style eq 'new' ) { - @{$result}{qw( heap_no type num_fields info_bits )} - = $dump - =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; compact format; info bits $d$/m; - } - - # OK, it's old-style. Unfortunately there are variations here too. - elsif ( $dump =~ m/-byte offs / ) { - # Older-old style. - @{$result}{qw( heap_no type num_fields byte_offset info_bits )} - = $dump - =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offs [A-Z]+; info bits $d$/m; - if ( $dump !~ m/-byte offs TRUE/ ) { - $result->{'byte_offset'} = 0; - } - } - else { - # Newer-old style. - @{$result}{qw( heap_no type num_fields byte_offset info_bits )} - = $dump - =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offsets; info bits $d$/m; - } - - } - else { - $result->{'style'} = 'tuple'; - @{$result}{qw( type num_fields )} - = $dump =~ m/^(DATA TUPLE): $d fields;$/m; - } - - # Fill in default values for things that couldn't be parsed. - map { $result->{$_} ||= 0 } - qw(heap_no num_fields byte_offset info_bits); - map { $result->{$_} ||= '' } - qw(style type ); - - my @fields = $dump =~ m/ (\d+:.*?;?);(?=$| \d+:)/gm; - $result->{'fields'} = [ map { parse_field($_, $complete, $debug ) } @fields ]; - - return $result; -} - -# New/old-style applies here. See rem/rem0rec.c -# $text should not include the leading space or the second trailing semicolon. -sub parse_field { - my ( $text, $complete, $debug ) = @_; - - # Sample fields: - # '4: SQL NULL, size 4 ' - # '1: len 6; hex 000000005601; asc V ;' - # '6: SQL NULL' - # '5: len 30; hex 687474703a2f2f7777772e737765657477617465722e636f6d2f73746f72; asc http://www.sweetwater.com/stor;...(truncated)' - my ( $id, $nullsize, $len, $hex, $asc, $truncated ); - ( $id, $nullsize ) = $text =~ m/^$d: SQL NULL, size $d $/; - if ( !defined($id) ) { - ( $id ) = $text =~ m/^$d: SQL NULL$/; - } - if ( !defined($id) ) { - ( $id, $len, $hex, $asc, $truncated ) - = $text =~ m/^$d: len $d; hex $h; asc (.*);(\.\.\.\(truncated\))?$/; - } - - die "Could not parse this field: '$text'" unless defined $id; - return { - id => $id, - len => defined($len) ? $len : defined($nullsize) ? $nullsize : 0, - 'hex' => defined($hex) ? $hex : '', - asc => defined($asc) ? $asc : '', - trunc => $truncated ? 1 : 0, - }; - -} - -sub parse_dl_section { - my ( $dl, $complete, $debug, $full ) = @_; - return unless $dl; - my $fulltext = $dl->{'fulltext'}; - return 0 unless $fulltext; - - my ( $ts ) = $fulltext =~ m/^$s$/m; - return 0 unless $ts; - - $dl->{'ts'} = [ parse_innodb_timestamp( $ts ) ]; - $dl->{'timestring'} = ts_to_string($dl->{'ts'}); - $dl->{'txns'} = {}; - - my @sections - = $fulltext - =~ m{ - ^\*{3}\s([^\n]*) # *** (1) WAITING FOR THIS... - (.*?) # Followed by anything, non-greedy - (?=(?:^\*{3})|\z) # Followed by another three stars or EOF - }gmsx; - - - # Loop through each section. There are no assumptions about how many - # there are, who holds and wants what locks, and who gets rolled back. - while ( my ($header, $body) = splice(@sections, 0, 2) ) { - my ( $txn_id, $what ) = $header =~ m/^\($d\) (.*):$/; - next unless $txn_id; - $dl->{'txns'}->{$txn_id} ||= {}; - my $txn = $dl->{'txns'}->{$txn_id}; - - if ( $what eq 'TRANSACTION' ) { - $txn->{'tx'} = parse_tx_text( $body, $complete, $debug, $full ); - } - else { - push @{$txn->{'locks'}}, parse_innodb_record_locks( $body, $complete, $debug, $full ); - } - } - - @{ $dl }{ qw(rolled_back) } - = $fulltext =~ m/^\*\*\* WE ROLL BACK TRANSACTION \($d\)$/m; - - # Make sure certain values aren't undef - map { $dl->{$_} ||= '' } qw(rolled_back); - - delete $dl->{'fulltext'} unless $debug; - return 1; -} - -sub parse_innodb_record_locks { - my ( $text, $complete, $debug, $full ) = @_; - my @result; - - foreach my $lock ( $text =~ m/(^(?:RECORD|TABLE) LOCKS?.*$)/gm ) { - my $hash = {}; - @{$hash}{ qw(lock_type space_id page_no n_bits index db table txn_id lock_mode) } - = $lock - =~ m{^(RECORD|TABLE) LOCKS? (?:space id $d page no $d n bits $d index `?$n`? of )?table `$n(?:/|`\.`)$n` trx id $t lock.mode (\S+)}m; - ( $hash->{'special'} ) - = $lock =~ m/^(?:RECORD|TABLE) .*? locks (rec but not gap|gap before rec)/m; - $hash->{'insert_intention'} - = $lock =~ m/^(?:RECORD|TABLE) .*? insert intention/m ? 1 : 0; - $hash->{'waiting'} - = $lock =~ m/^(?:RECORD|TABLE) .*? waiting/m ? 1 : 0; - - # Some things may not be in the text, so make sure they are not - # undef. - map { $hash->{$_} ||= 0 } qw(n_bits page_no space_id); - map { $hash->{$_} ||= "" } qw(index special); - push @result, $hash; - } - - return @result; -} - -sub parse_tx_text { - my ( $txn, $complete, $debug, $full ) = @_; - - my ( $txn_id, $txn_status, $active_secs, $proc_no, $os_thread_id ) - = $txn - =~ m/^(?:---)?TRANSACTION $t, (\D*?)(?: $d sec)?, (?:process no $d, )?OS thread id $d/m; - my ( $thread_status, $thread_decl_inside ) - = $txn - =~ m/OS thread id \d+(?: ([^,]+?))?(?:, thread declared inside InnoDB $d)?$/m; - - # Parsing the line that begins 'MySQL thread id' is complicated. The only - # thing always in the line is the thread and query id. See function - # innobase_mysql_print_thd in InnoDB source file sql/ha_innodb.cc. - my ( $thread_line ) = $txn =~ m/^(MySQL thread id .*)$/m; - my ( $mysql_thread_id, $query_id, $hostname, $ip, $user, $query_status ); - - if ( $thread_line ) { - # These parts can always be gotten. - ( $mysql_thread_id, $query_id ) = $thread_line =~ m/^MySQL thread id $d, query id $d/m; - - # If it's a master/slave thread, "Has (read|sent) all" may be the thread's - # proc_info. In these cases, there won't be any host/ip/user info - ( $query_status ) = $thread_line =~ m/(Has (?:read|sent) all .*$)/m; - if ( defined($query_status) ) { - $user = 'system user'; - } - - # It may be the case that the query id is the last thing in the line. - elsif ( $thread_line =~ m/query id \d+ / ) { - # The IP address is the only non-word thing left, so it's the most - # useful marker for where I have to start guessing. - ( $hostname, $ip ) = $thread_line =~ m/query id \d+(?: ([A-Za-z]\S+))? $i/m; - if ( defined $ip ) { - ( $user, $query_status ) = $thread_line =~ m/$ip $w(?: (.*))?$/; - } - else { # OK, there wasn't an IP address. - # There might not be ANYTHING except the query status. - ( $query_status ) = $thread_line =~ m/query id \d+ (.*)$/; - if ( $query_status !~ m/^\w+ing/ && !exists($is_proc_info{$query_status}) ) { - # The remaining tokens are, in order: hostname, user, query_status. - # It's basically impossible to know which is which. - ( $hostname, $user, $query_status ) = $thread_line - =~ m/query id \d+(?: ([A-Za-z]\S+))?(?: $w(?: (.*))?)?$/m; - } - else { - $user = 'system user'; - } - } - } - } - - my ( $lock_wait_status, $lock_structs, $heap_size, $row_locks, $undo_log_entries ) - = $txn - =~ m/^(?:(\D*) )?$d lock struct\(s\), heap size $d(?:, $d row lock\(s\))?(?:, undo log entries $d)?$/m; - my ( $lock_wait_time ) - = $txn - =~ m/^------- TRX HAS BEEN WAITING $d SEC/m; - - my $locks; - # If the transaction has locks, grab the locks. - if ( $txn =~ m/^TABLE LOCK|RECORD LOCKS/ ) { - $locks = [parse_innodb_record_locks($txn, $complete, $debug, $full)]; - } - - my ( $tables_in_use, $tables_locked ) - = $txn - =~ m/^mysql tables in use $d, locked $d$/m; - my ( $txn_doesnt_see_ge, $txn_sees_lt ) - = $txn - =~ m/^Trx read view will not see trx with id >= $t, sees < $t$/m; - my $has_read_view = defined($txn_doesnt_see_ge); - # Only a certain number of bytes of the query text are included here, at least - # under some circumstances. Some versions include 300, some 600. - my ( $query_text ) - = $txn - =~ m{ - ^MySQL\sthread\sid\s[^\n]+\n # This comes before the query text - (.*?) # The query text - (?= # Followed by any of... - ^Trx\sread\sview - |^-------\sTRX\sHAS\sBEEN\sWAITING - |^TABLE\sLOCK - |^RECORD\sLOCKS\sspace\sid - |^(?:---)?TRANSACTION - |^\*\*\*\s\(\d\) - |\Z - ) - }xms; - if ( $query_text ) { - $query_text =~ s/\s+$//; - } - else { - $query_text = ''; - } - - my %stuff = ( - active_secs => $active_secs, - has_read_view => $has_read_view, - heap_size => $heap_size, - hostname => $hostname, - ip => $ip, - lock_structs => $lock_structs, - lock_wait_status => $lock_wait_status, - lock_wait_time => $lock_wait_time, - mysql_thread_id => $mysql_thread_id, - os_thread_id => $os_thread_id, - proc_no => $proc_no, - query_id => $query_id, - query_status => $query_status, - query_text => $query_text, - row_locks => $row_locks, - tables_in_use => $tables_in_use, - tables_locked => $tables_locked, - thread_decl_inside => $thread_decl_inside, - thread_status => $thread_status, - txn_doesnt_see_ge => $txn_doesnt_see_ge, - txn_id => $txn_id, - txn_sees_lt => $txn_sees_lt, - txn_status => $txn_status, - undo_log_entries => $undo_log_entries, - user => $user, - ); - $stuff{'fulltext'} = $txn if $debug; - $stuff{'locks'} = $locks if $locks; - - # Some things may not be in the txn text, so make sure they are not - # undef. - map { $stuff{$_} ||= 0 } qw(active_secs heap_size lock_structs - tables_in_use undo_log_entries tables_locked has_read_view - thread_decl_inside lock_wait_time proc_no row_locks); - map { $stuff{$_} ||= "" } qw(thread_status txn_doesnt_see_ge - txn_sees_lt query_status ip query_text lock_wait_status user); - $stuff{'hostname'} ||= $stuff{'ip'}; - - return \%stuff; -} - -sub parse_tx_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - $section->{'transactions'} = []; - - # Handle the individual transactions - my @transactions = $fulltext =~ m/(---TRANSACTION \d.*?)(?=\n---TRANSACTION|$)/gs; - foreach my $txn ( @transactions ) { - my $stuff = parse_tx_text( $txn, $complete, $debug, $full ); - delete $stuff->{'fulltext'} unless $debug; - push @{$section->{'transactions'}}, $stuff; - } - - # Handle the general info - @{$section}{ 'trx_id_counter' } - = $fulltext =~ m/^Trx id counter $t$/m; - @{$section}{ 'purge_done_for', 'purge_undo_for' } - = $fulltext =~ m/^Purge done for trx's n:o < $t undo n:o < $t$/m; - @{$section}{ 'history_list_len' } # This isn't present in some 4.x versions - = $fulltext =~ m/^History list length $d$/m; - @{$section}{ 'num_lock_structs' } - = $fulltext =~ m/^Total number of lock structs in row lock hash table $d$/m; - @{$section}{ 'is_truncated' } - = $fulltext =~ m/^\.\.\. truncated\.\.\.$/m ? 1 : 0; - - # Fill in things that might not be present - foreach ( qw(history_list_len) ) { - $section->{$_} ||= 0; - } - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -# I've read the source for this section. -sub parse_ro_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - - # Grab the info - @{$section}{ 'queries_inside', 'queries_in_queue' } - = $fulltext =~ m/^$d queries inside InnoDB, $d queries in queue$/m; - ( $section->{ 'read_views_open' } ) - = $fulltext =~ m/^$d read views open inside InnoDB$/m; - ( $section->{ 'n_reserved_extents' } ) - = $fulltext =~ m/^$d tablespace extents now reserved for B-tree/m; - @{$section}{ 'main_thread_proc_no', 'main_thread_id', 'main_thread_state' } - = $fulltext =~ m/^Main thread (?:process no. $d, )?id $d, state: (.*)$/m; - @{$section}{ 'num_rows_ins', 'num_rows_upd', 'num_rows_del', 'num_rows_read' } - = $fulltext =~ m/^Number of rows inserted $d, updated $d, deleted $d, read $d$/m; - @{$section}{ 'ins_sec', 'upd_sec', 'del_sec', 'read_sec' } - = $fulltext =~ m#^$f inserts/s, $f updates/s, $f deletes/s, $f reads/s$#m; - $section->{'main_thread_proc_no'} ||= 0; - - map { $section->{$_} ||= 0 } qw(read_views_open n_reserved_extents); - delete $section->{'fulltext'} unless $debug; - return 1; -} - -sub parse_lg_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section; - my $fulltext = $section->{'fulltext'}; - - # Grab the info - ( $section->{ 'log_seq_no' } ) - = $fulltext =~ m/Log sequence number \s*(\d.*)$/m; - ( $section->{ 'log_flushed_to' } ) - = $fulltext =~ m/Log flushed up to \s*(\d.*)$/m; - ( $section->{ 'last_chkp' } ) - = $fulltext =~ m/Last checkpoint at \s*(\d.*)$/m; - @{$section}{ 'pending_log_writes', 'pending_chkp_writes' } - = $fulltext =~ m/$d pending log writes, $d pending chkp writes/; - @{$section}{ 'log_ios_done', 'log_ios_s' } - = $fulltext =~ m#$d log i/o's done, $f log i/o's/second#; - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -sub parse_ib_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - - # Some servers will output ibuf information for tablespace 0, as though there - # might be many tablespaces with insert buffers. (In practice I believe - # the source code shows there will only ever be one). I have to parse both - # cases here, but I assume there will only be one. - @{$section}{ 'size', 'free_list_len', 'seg_size' } - = $fulltext =~ m/^Ibuf(?: for space 0)?: size $d, free list len $d, seg size $d,$/m; - @{$section}{ 'inserts', 'merged_recs', 'merges' } - = $fulltext =~ m/^$d inserts, $d merged recs, $d merges$/m; - - @{$section}{ 'hash_table_size', 'used_cells', 'bufs_in_node_heap' } - = $fulltext =~ m/^Hash table size $d, used cells $d, node heap has $d buffer\(s\)$/m; - @{$section}{ 'hash_searches_s', 'non_hash_searches_s' } - = $fulltext =~ m{^$f hash searches/s, $f non-hash searches/s$}m; - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -sub parse_wait_array { - my ( $text, $complete, $debug, $full ) = @_; - my %result; - - @result{ qw(thread waited_at_filename waited_at_line waited_secs) } - = $text =~ m/^--Thread $d has waited at $fl for $f seconds/m; - - # Depending on whether it's a SYNC_MUTEX,RW_LOCK_EX,RW_LOCK_SHARED, - # there will be different text output - if ( $text =~ m/^Mutex at/m ) { - $result{'request_type'} = 'M'; - @result{ qw( lock_mem_addr lock_cfile_name lock_cline lock_var) } - = $text =~ m/^Mutex at $h created file $fl, lock var $d$/m; - @result{ qw( waiters_flag )} - = $text =~ m/^waiters flag $d$/m; - } - else { - @result{ qw( request_type lock_mem_addr lock_cfile_name lock_cline) } - = $text =~ m/^(.)-lock on RW-latch at $h created in file $fl$/m; - @result{ qw( writer_thread writer_lock_mode ) } - = $text =~ m/^a writer \(thread id $d\) has reserved it in mode (.*)$/m; - @result{ qw( num_readers waiters_flag )} - = $text =~ m/^number of readers $d, waiters flag $d$/m; - @result{ qw(last_s_file_name last_s_line ) } - = $text =~ m/Last time read locked in file $fl$/m; - @result{ qw(last_x_file_name last_x_line ) } - = $text =~ m/Last time write locked in file $fl$/m; - } - - $result{'cell_waiting'} = $text =~ m/^wait has ended$/m ? 0 : 1; - $result{'cell_event_set'} = $text =~ m/^wait is ending$/m ? 1 : 0; - - # Because there are two code paths, some things won't get set. - map { $result{$_} ||= '' } - qw(last_s_file_name last_x_file_name writer_lock_mode); - map { $result{$_} ||= 0 } - qw(num_readers lock_var last_s_line last_x_line writer_thread); - - return \%result; -} - -sub parse_sm_section { - my ( $section, $complete, $debug, $full ) = @_; - return 0 unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - - # Grab the info - @{$section}{ 'reservation_count', 'signal_count' } - = $fulltext =~ m/^OS WAIT ARRAY INFO: reservation count $d, signal count $d$/m; - @{$section}{ 'mutex_spin_waits', 'mutex_spin_rounds', 'mutex_os_waits' } - = $fulltext =~ m/^Mutex spin waits $d, rounds $d, OS waits $d$/m; - @{$section}{ 'rw_shared_spins', 'rw_shared_os_waits', 'rw_excl_spins', 'rw_excl_os_waits' } - = $fulltext =~ m/^RW-shared spins $d, OS waits $d; RW-excl spins $d, OS waits $d$/m; - - # Look for info on waits. - my @waits = $fulltext =~ m/^(--Thread.*?)^(?=Mutex spin|--Thread)/gms; - $section->{'waits'} = [ map { parse_wait_array($_, $complete, $debug) } @waits ]; - $section->{'wait_array_size'} = scalar(@waits); - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -# I've read the source for this section. -sub parse_bp_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - - # Grab the info - @{$section}{ 'total_mem_alloc', 'add_pool_alloc' } - = $fulltext =~ m/^Total memory allocated $d; in additional pool allocated $d$/m; - @{$section}{'dict_mem_alloc'} = $fulltext =~ m/Dictionary memory allocated $d/; - @{$section}{'awe_mem_alloc'} = $fulltext =~ m/$d MB of AWE memory/; - @{$section}{'buf_pool_size'} = $fulltext =~ m/^Buffer pool size\s*$d$/m; - @{$section}{'buf_free'} = $fulltext =~ m/^Free buffers\s*$d$/m; - @{$section}{'pages_total'} = $fulltext =~ m/^Database pages\s*$d$/m; - @{$section}{'pages_modified'} = $fulltext =~ m/^Modified db pages\s*$d$/m; - @{$section}{'pages_read', 'pages_created', 'pages_written'} - = $fulltext =~ m/^Pages read $d, created $d, written $d$/m; - @{$section}{'page_reads_sec', 'page_creates_sec', 'page_writes_sec'} - = $fulltext =~ m{^$f reads/s, $f creates/s, $f writes/s$}m; - @{$section}{'buf_pool_hits', 'buf_pool_reads'} - = $fulltext =~ m{Buffer pool hit rate $d / $d$}m; - if ($fulltext =~ m/^No buffer pool page gets since the last printout$/m) { - @{$section}{'buf_pool_hits', 'buf_pool_reads'} = (0, 0); - @{$section}{'buf_pool_hit_rate'} = '--'; - } - else { - @{$section}{'buf_pool_hit_rate'} - = $fulltext =~ m{Buffer pool hit rate (\d+ / \d+)$}m; - } - @{$section}{'reads_pending'} = $fulltext =~ m/^Pending reads $d/m; - @{$section}{'writes_pending_lru', 'writes_pending_flush_list', 'writes_pending_single_page' } - = $fulltext =~ m/^Pending writes: LRU $d, flush list $d, single page $d$/m; - - map { $section->{$_} ||= 0 } - qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page - awe_mem_alloc dict_mem_alloc); - @{$section}{'writes_pending'} = List::Util::sum( - @{$section}{ qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page) }); - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -# I've read the source for this. -sub parse_io_section { - my ( $section, $complete, $debug, $full ) = @_; - return unless $section && $section->{'fulltext'}; - my $fulltext = $section->{'fulltext'}; - $section->{'threads'} = {}; - - # Grab the I/O thread info - my @threads = $fulltext =~ m<^(I/O thread \d+ .*)$>gm; - foreach my $thread (@threads) { - my ( $tid, $state, $purpose, $event_set ) - = $thread =~ m{I/O thread $d state: (.+?) \((.*)\)(?: ev set)?$}m; - if ( defined $tid ) { - $section->{'threads'}->{$tid} = { - thread => $tid, - state => $state, - purpose => $purpose, - event_set => $event_set ? 1 : 0, - }; - } - } - - # Grab the reads/writes/flushes info - @{$section}{ 'pending_normal_aio_reads', 'pending_aio_writes' } - = $fulltext =~ m/^Pending normal aio reads: $d, aio writes: $d,$/m; - @{$section}{ 'pending_ibuf_aio_reads', 'pending_log_ios', 'pending_sync_ios' } - = $fulltext =~ m{^ ibuf aio reads: $d, log i/o's: $d, sync i/o's: $d$}m; - @{$section}{ 'flush_type', 'pending_log_flushes', 'pending_buffer_pool_flushes' } - = $fulltext =~ m/^Pending flushes \($w\) log: $d; buffer pool: $d$/m; - @{$section}{ 'os_file_reads', 'os_file_writes', 'os_fsyncs' } - = $fulltext =~ m/^$d OS file reads, $d OS file writes, $d OS fsyncs$/m; - @{$section}{ 'reads_s', 'avg_bytes_s', 'writes_s', 'fsyncs_s' } - = $fulltext =~ m{^$f reads/s, $d avg bytes/read, $f writes/s, $f fsyncs/s$}m; - @{$section}{ 'pending_preads', 'pending_pwrites' } - = $fulltext =~ m/$d pending preads, $d pending pwrites$/m; - @{$section}{ 'pending_preads', 'pending_pwrites' } = (0, 0) - unless defined($section->{'pending_preads'}); - - delete $section->{'fulltext'} unless $debug; - return 1; -} - -sub _debug { - my ( $debug, $msg ) = @_; - if ( $debug ) { - die $msg; - } - else { - warn $msg; - } - return 1; -} - -1; - -# end_of_package -# ############################################################################ -# Perldoc section. I put this last as per the Dog book. -# ############################################################################ -=pod - -=head1 NAME - -InnoDBParser - Parse InnoDB monitor text. - -=head1 DESCRIPTION - -InnoDBParser tries to parse the output of the InnoDB monitor. One way to get -this output is to connect to a MySQL server and issue the command SHOW ENGINE -INNODB STATUS (omit 'ENGINE' on earlier versions of MySQL). The goal is to -turn text into data that something else (e.g. innotop) can use. - -The output comes from all over, but the place to start in the source is -innobase/srv/srv0srv.c. - -=head1 SYNOPSIS - - use InnoDBParser; - use DBI; - - # Get the status text. - my $dbh = DBI->connect( - "DBI::mysql:test;host=localhost", - 'user', - 'password' - ); - my $query = 'SHOW /*!5 ENGINE */ INNODB STATUS'; - my $text = $dbh->selectcol_arrayref($query)->[0]; - - # 1 or 0 - my $debug = 1; - - # Choose sections of the monitor text you want. Possible values: - # TRANSACTIONS => tx - # BUFFER POOL AND MEMORY => bp - # SEMAPHORES => sm - # LOG => lg - # ROW OPERATIONS => ro - # INSERT BUFFER AND ADAPTIVE HASH INDEX => ib - # FILE I/O => io - # LATEST DETECTED DEADLOCK => dl - # LATEST FOREIGN KEY ERROR => fk - - my $required_sections = { - tx => 1, - }; - - # Parse the status text. - my $parser = InnoDBParser->new; - $innodb_status = $parser->parse_status_text( - $text, - $debug, - # Omit the following parameter to get all sections. - $required_sections, - ); - -=head1 COPYRIGHT, LICENSE AND WARRANTY - -This package is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com. -Feedback and improvements are gratefully received. - -THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, version 2; OR the Perl Artistic License. On UNIX and similar -systems, you can issue `man perlgpl' or `man perlartistic' to read these -licenses. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA - -=head1 AUTHOR - -Baron Schwartz, baron at xaprb dot com. - -=head1 BUGS - -None known, but I bet there are some. The InnoDB monitor text wasn't really -designed to be parsable. - -=head1 SEE ALSO - -innotop - a program that can format the parsed status information for humans -to read and enjoy. - -=cut diff --git a/build/debian/additions/innotop/changelog.innotop b/build/debian/additions/innotop/changelog.innotop deleted file mode 100644 index baff706e235..00000000000 --- a/build/debian/additions/innotop/changelog.innotop +++ /dev/null @@ -1,318 +0,0 @@ -Changelog for innotop and InnoDBParser: - -2007-11-09: version 1.6.0 - - * S mode crashed on non-numeric values. - * New user-defined columns crashed upon restart. - * Added --color option to control terminal coloring. - -2007-09-18: version 1.5.2 - - * Added the ability to monitor InnoDB status from a file. - * Changed W mode to L mode; it monitors all locks, not just lock waits. - -2007-09-16: version 1.5.1 - - * Added C (Command Summary) mode. - * Fixed a bug in the 'avg' aggregate function. - -2007-09-10: version 1.5.0 - - Changes: - * Added plugin functionality. - * Added group-by functionality. - * Moved the configuration file to a directory. - * Enhanced filtering and sorting on pivoted tables. - * Many small bug fixes. - -2007-07-16: version 1.4.3 - - Changes: - * Added standard --version command-line option - * Changed colors to cyan instead of blue; more visible on dark terminals. - * Added information to the filter-choosing dialog. - * Added column auto-completion when entering a filter expression. - * Changed Term::ReadKey from optional to mandatory. - * Clarified username in password prompting. - * Ten thousand words of documentation! - - Bugs fixed: - * innotop crashed in W mode when InnoDB status data was truncated. - * innotop didn't display errors in tables if debug was enabled. - * The colored() subroutine wasn't being created in non-interactive mode. - * Don't prompt to save password except the first time. - -2007-05-03: version 1.4.2 - - This version contains all changes to the trunk until revision 239; some - changes in revisions 240:250 are included. - - MAJOR CHANGES: - - * Quick-filters to easily filter any column in any display - * Compatibility with MySQL 3.23 through 6.0 - * Improved error handling when a server is down, permissions denied, etc - * Use additional SHOW INNODB STATUS information in 5.1.x - * Make all modes use tables consistently, so they can all be edited, - filtered, colored and sorted consistently - * Combine V, G and S modes into S mode, with v, g, and s hot-keys - * Let DBD driver read MySQL option files; permit connections without - user/pass/etc - * Compile SQL-like expressions into Perl subroutines; eliminate need to - know Perl - * Do not save all config data to config file, only save user's customizations - * Rewritten and improved command-line option handling - * Added --count, --delay, and other command-line options to support - run-and-exit operation - * Improve built-in variable sets - * Improve help screen with three-part balanced-column layout - * Simplify table-editor and improve hotkey support - * Require Perl to have high-resolution time support (Time::HiRes) - * Help the user choose a query to analyze or kill - * Enable EXPLAIN, show-full-query in T mode just like Q mode - * Let data-extraction access current, previous and incremental data sets - all at once - - MINOR CHANGES: - - * Column stabilizing for Q mode - * New color rules for T, Q, W modes - * Apply slave I/O filter to Q mode - * Improve detection of server version and other meta-data - * Make connection timeout a config variable - * Improve cross-version-compatible SQL syntax - * Get some information from the DBD driver instead of asking MySQL for it - * Improved error messages - * Improve server group creation/editing - * Improve connection/thread killing - * Fix broken key bindings and restore previously mapped hot-keys for - choosing columns - * Some documentation updates (but not nearly enough) - * Allow the user to specify graphing char in S mode (formerly G mode) - * Allow easy switching between variable sets in S mode - * Bind 'n' key globally to choose the 'next' server connection - * Bind '%' key globally to filter displayed tables - * Allow aligning columns on the decimal place for easy readability - * Add hide_hdr config variable to hide column headers in tables - * Add a feature to smartly run PURGE MASTER LOGS in Replication mode - * Enable debug mode as a globally configurable variable - * Improve error messages when an expression or filter doesn't compile or has - a run-time error; die on error when debug is enabled - * Allow user-configurable delays after executing SQL (to let the server - settle down before taking another measurement) - * Add an expression to show how long until a transaction is finished - * Add skip_innodb as a global config variable - * Add '%' after percentages to help disambiguate (user-configurable) - * Add column to M mode to help see how fast slave is catching up to master - - BUG FIXES: - - * T and W modes had wrong value for wait_status column - * Error tracking on connections didn't reset when the connection recovered - * wait_timeout on connections couldn't be set before MySQL 4.0.3 - * There was a crash on 3.23 when wiping deadlocks - * Lettercase changes in some result sets (SHOW MASTER/SLAVE STATUS) between - MySQL versions crashed innotop - * Inactive connections crashed innotop upon access to DBD driver - * set_precision did not respect user defaults for number of digits - * --inc command-line option could not be negated - * InnoDB status parsing was not always parsing all needed information - * S mode (formerly G mode) could crash trying to divide non-numeric data - * M table didn't show Slave_open_temp_tables variable; incorrect lettercase - * DBD drivers with broken AutoCommit would crash innotop - * Some key bindings had incorrect labels - * Some config-file loading routines could load data for things that didn't - exist - * Headers printed too often in S mode - * High-resolution time was not used even when the user had it - * Non-interactive mode printed blank lines sometimes - * Q-mode header and statusbar showed different QPS numbers - * Formulas for key-cache and query-cache hit ratios were wrong - * Mac OS "Darwin" machines were mis-identified as Microsoft Windows - * Some multiplications crashed when given undefined input - * The commify transformation did not check its input and could crash - * Specifying an invalid mode on the command line or config file could crash - innotop - -2007-03-29: version 1.4.1 - - * More tweaks to display of connection errors. - * Fixed a problem with skip-innodb in MySQL 5.1. - * Fix a bug with dead connections in single-connection mode. - * Fix a regex to allow parsing more data from truncated deadlocks. - * Don't load active cxns from the config file if the cxn isn't defined. - -2007-03-03: version 1.4.0 - - * Further tweak error handling and display of connection errors - * More centralization of querying - * Fix forking so it doesn't kill all database connections - * Allow user to run innotop without permissions for GLOBAL variables and status - -2007-02-11: version 1.3.6 - - * Handle some connection failures so innotop doesn't crash because of one server. - * Enable incremental display in more modes. - * Tweaks to colorizing, color editor, and default color rules. - * Tweaks to default sorting rules. - * Use prepared statements for efficiency. - * Bug fixes and code cleanups. - * Data storage is keyed on clock ticks now. - -2007-02-03: version 1.3.5 - - * Bug fixes. - * More tools for editing configuration from within innotop. - * Filters and transformations are constrained to valid values. - * Support for colorizing rows. - * Sorting by multiple columns. - * Compress headers when display is very wide. - * Stabilize and limit column widths. - * Check config file formats when upgrading so upgrades go smoothly. - * Make D mode handle many connections at once. - * Extract simple expressions from data sets in column src property. - This makes innotop more awk-ish. - -2007-01-16: version 1.3 - - * Readline support. - * Can be used unattended, or in a pipe-and-filter mode - where it outputs tab-separated data to standard output. - * You can specify a config file on the command line. - Config files can be marked read-only. - * Monitor multiple servers simultaneously. - * Server groups to help manage many servers conveniently. - * Monitor master/slave status, and control slaves. - * Columns can have user-defined expressions as their data sources. - * Better configuration tools. - * InnoDB status information is merged into SHOW VARIABLES and - SHOW STATUS information, so you can access it all together. - * High-precision time support in more places. - * Lots of tweaks to make things display more readably and compactly. - * Column transformations and filters. - -2007-01-16: version 1.0.1 - * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. - The new project homepage is http://sourceforge.net/projects/innotop/ - * Tweak default T/Q mode sort columns to match what people expect. - * Fix broken InnoDBParser.pm documentation (and hence man page). - -2007-01-06: version 1.0 - * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS. - The new project homepage is http://sourceforge.net/projects/innotop/ - * Prevent control characters from freaking terminal out. - * Set timeout to keep busy servers from closing connection. - * There is only one InnoDB insert buffer. - * Make licenses clear and consistent. - -2006-11-14: innotop 0.1.160, InnoDBParser version 1.69 - * Support for ANSI color on Microsoft Windows (more readable, compact - display; thanks Gisbert W. Selke). - * Better handling of $ENV{HOME} on Windows. - * Added a LICENSE file to the package as per Gentoo bug: - http://bugs.gentoo.org/show_bug.cgi?id=147600 - -2006-11-11: innotop 0.1.157, InnoDBParser version 1.69 - * Add Microsoft Windows support. - -2006-10-19: innotop 0.1.154, InnoDBParser version 1.69 - * Add O (Open Tables) mode - * Add some more checks to handle incomplete InnoDB status information - -2006-09-30: innotop 0.1.152, InnoDBParser version 1.69 - * Figured out what was wrong with package $VERSION variable: it wasn't - after the package declaration! - -2006-09-28: innotop 0.1.152, InnoDBParser version 1.67 - * Make more efforts towards crash-resistance and tolerance of completely - messed-up inputs. If innotop itself is broken, it is now much harder to - tell, because it just keeps on running without complaining. - * Fix a small bug parsing out some information and displaying it. - -2006-09-05: innotop 0.1.149, InnoDBParser version 1.64 - * Try to find and eliminate any parsing code that assumes pattern matches - will succeed. - -2006-09-05: innotop 0.1.149, InnoDBParser version 1.62 - * Make innotop crash-resistant, so I can declare it STABLE finally. - * Instead of using SQL conditional comments, detect MySQL version. - -2006-08-22: innotop 0.1.147, InnoDBParser version 1.60 - * Fix some innotop bugs with undefined values, bad formatting etc. - -2006-08-19: innotop 0.1.146, InnoDBParser version 1.60 - * Make innotop handle some unexpected NULL values in Q mode. - * Add OS wait information to W mode, so it is now "everything that waits." - * Center section captions better. - * Make R mode more readable and compact. - * Make InnoDBParser parse lock waits even when they've been waiting 0 secs. - -2006-08-12: innotop 0.1.139, InnoDBParser version 1.59 - * Add more documentation - * Tweak V mode to show more info in less space. - * Fix a bug in G mode. - -2006-08-10: innotop 0.1.132, InnoDBParser version 1.58 - * Handle yet more types of FK error... it will never end! - * Handle some special cases when DEADLOCK info truncated - * Add a bit more FK info to F mode in innotop - * More tests added to the test suite - -2006-08-07: innotop 0.1.131, InnoDBParser version 1.55 - * Fix another issue with configuration - * Handle another type of FK error - -2006-08-03: innotop 0.1.130, InnoDBParser version 1.54 - * Fix an issue loading config file - * Add heap_no to 'D' (InnoDB Deadlock) mode to ease deadlock debugging. - -2006-08-02: innotop 0.1.128, InnoDBParser version 1.54 - * Parse lock wait information from the TRANSACTION section. - * Even more OS-specific parsing... pain in the butt... - * Add 'W' (InnoDB Lock Wait) mode. - * Fix some minor display issues with statusbar. - -2006-08-02: innotop 0.1.125, InnoDBParser version 1.50 - * Don't try to get references to Perl built-in functions like time() - * Handle more OS-specific variations of InnoDB status text - * Add some more information to various places in innotop - -2006-08-01: innotop 0.1.123, InnoDBParser version 1.47 - - * Enhance S and G modes: clear screen and re-print headers - * Don't crash when deadlock data is truncated - * Make Analyze mode say how to get back to whatever you came from - * Display 'nothing to display' when there is nothing - * Add ability to read InnoDB status text from a file (mostly helps test) - * Add table of Wait Array Information in Row Op/Semaphore mode - * Add table of lock information in InnoDB deadlock mode - * Ensure new features in upgrades don't get masked by existing config files - * Tweak default column choices for T mode - * Enhance foreign key parsing - * Enhance physical record and data tuple parsing - * Enhance lock parsing (handle old-style and new-style formats) - -2006-07-24: innotop 0.1.112, InnoDBParser version 1.36 - - * InnoDBParser enhancements for FK error messages. - * A fix to innotop to prevent it from crashing while trying to display a FK - error message. - * Some minor cosmetic changes to number formatting in innotop. - -2006-07-22: innotop 0.1.106, InnoDBParser version 1.35 - - * InnoDBParser is much more complete and accurate. - * Tons of bug fixes. - * Add partitions to EXPLAIN mode. - * Enhance Q mode header, add T mode header. - * Share some configuration variables across modes. - * Add formatted time columns to Q, T modes. - * Add command-line argument parsing. - * Turn off echo when asking for password. - * Add option to specify port when connecting. - * Let display-optimized-query display multiple notes. - * Lots of small improvements, such as showing more info in statusbar. - -2006-07-02: innotop 0.1.74, InnoDBParser version 1.24 - - * Initial release for public consumption. diff --git a/build/debian/additions/innotop/innotop b/build/debian/additions/innotop/innotop deleted file mode 100644 index e2bfc1bd965..00000000000 --- a/build/debian/additions/innotop/innotop +++ /dev/null @@ -1,9485 +0,0 @@ -#!/usr/bin/perl - -# vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3 - -use strict; -use warnings FATAL => 'all'; -use sigtrap qw(handler finish untrapped normal-signals); - -use Data::Dumper; -use DBI; -use English qw(-no_match_vars); -use File::Basename qw(dirname); -use Getopt::Long; -use List::Util qw(max min maxstr sum); -use InnoDBParser; -use POSIX qw(ceil); -use Time::HiRes qw(time sleep); -use Term::ReadKey qw(ReadMode ReadKey); - -# Version, license and warranty information. {{{1 -# ########################################################################### -our $VERSION = '1.6.0'; -our $SVN_REV = sprintf("%d", q$Revision: 383 $ =~ m/(\d+)/g); -our $SVN_URL = sprintf("%s", q$URL: https://innotop.svn.sourceforge.net/svnroot/innotop/trunk/innotop $ =~ m$svnroot/innotop/(\S+)$g); - -my $innotop_license = <<"LICENSE"; - -This is innotop version $VERSION, a MySQL and InnoDB monitor. - -This program is copyright (c) 2006 Baron Schwartz. -Feedback and improvements are welcome. - -THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, version 2; OR the Perl Artistic License. On UNIX and similar -systems, you can issue `man perlgpl' or `man perlartistic' to read these -licenses. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA. -LICENSE - -# Configuration information and global setup {{{1 -# ########################################################################### - -# Really, really, super-global variables. -my @config_versions = ( - "000-000-000", "001-003-000", # config file was one big name-value hash. - "001-003-000", "001-004-002", # config file contained non-user-defined stuff. -); - -my $clear_screen_sub; - -# This defines expected properties and defaults for the column definitions that -# eventually end up in tbl_meta. -my %col_props = ( - hdr => '', - just => '-', - dec => 0, # Whether to align the column on the decimal point - num => 0, - label => '', - user => 0, - src => '', - tbl => '', # Helps when writing/reading custom columns in config files - minw => 0, - maxw => 0, - trans => [], - agg => 'first', # Aggregate function - aggonly => 0, # Whether to show only when tbl_meta->{aggregate} is true -); - -# Actual DBI connections to MySQL servers. -my %dbhs; - -# Command-line parameters {{{2 -# ########################################################################### - -my @opt_spec = ( - { s => 'help', d => 'Show this help message' }, - { s => 'color|C!', d => 'Use terminal coloring (default)', c => 'color' }, - { s => 'config|c=s', d => 'Config file to read' }, - { s => 'nonint|n', d => 'Non-interactive, output tab-separated fields' }, - { s => 'count=i', d => 'Number of updates before exiting' }, - { s => 'delay|d=f', d => 'Delay between updates in seconds', c => 'interval' }, - { s => 'mode|m=s', d => 'Operating mode to start in', c => 'mode' }, - { s => 'inc|i!', d => 'Measure incremental differences', c => 'status_inc' }, - { s => 'version', d => 'Output version information and exit' }, -); - -# This is the container for the command-line options' values to be stored in -# after processing. Initial values are defaults. -my %opts = ( - n => !( -t STDIN && -t STDOUT ), # If in/out aren't to terminals, we're interactive -); -# Post-process... -my %opt_seen; -foreach my $spec ( @opt_spec ) { - my ( $long, $short ) = $spec->{s} =~ m/^(\w+)(?:\|([^!+=]*))?/; - $spec->{k} = $short || $long; - $spec->{l} = $long; - $spec->{t} = $short; - $spec->{n} = $spec->{s} =~ m/!/; - $opts{$spec->{k}} = undef unless defined $opts{$spec->{k}}; - die "Duplicate option $spec->{k}" if $opt_seen{$spec->{k}}++; -} - -Getopt::Long::Configure('no_ignore_case', 'bundling'); -GetOptions( map { $_->{s} => \$opts{$_->{k}} } @opt_spec) or $opts{help} = 1; - -if ( $opts{version} ) { - print "innotop Ver $VERSION Changeset $SVN_REV from $SVN_URL\n"; - exit(0); -} - -if ( $opts{'help'} ) { - print "Usage: innotop \n\n"; - my $maxw = max(map { length($_->{l}) + ($_->{n} ? 4 : 0)} @opt_spec); - foreach my $spec ( sort { $a->{l} cmp $b->{l} } @opt_spec ) { - my $long = $spec->{n} ? "[no]$spec->{l}" : $spec->{l}; - my $short = $spec->{t} ? "-$spec->{t}" : ''; - printf(" --%-${maxw}s %-4s %s\n", $long, $short, $spec->{d}); - } - print < q{my $host = host || hostname || ''; ($host) = $host =~ m/^((?:[\d.]+(?=:))|(?:[a-zA-Z]\w+))/; return $host || ''}, - Port => q{my ($p) = host =~ m/:(.*)$/; return $p || 0}, - OldVersions => q{dulint_to_int(IB_tx_trx_id_counter) - dulint_to_int(IB_tx_purge_done_for)}, - MaxTxnTime => q/max(map{ $_->{active_secs} } @{ IB_tx_transactions }) || 0/, - NumTxns => q{scalar @{ IB_tx_transactions } }, - DirtyBufs => q{ $cur->{IB_bp_pages_modified} / ($cur->{IB_bp_buf_pool_size} || 1) }, - BufPoolFill => q{ $cur->{IB_bp_pages_total} / ($cur->{IB_bp_buf_pool_size} || 1) }, - ServerLoad => q{ $cur->{Threads_connected}/(Questions||1)/Uptime_hires }, - TxnTimeRemain => q{ defined undo_log_entries && defined $pre->{undo_log_entries} && undo_log_entries < $pre->{undo_log_entries} ? undo_log_entries / (($pre->{undo_log_entries} - undo_log_entries)/((active_secs-$pre->{active_secs})||1))||1 : 0}, - SlaveCatchupRate => ' defined $cur->{seconds_behind_master} && defined $pre->{seconds_behind_master} && $cur->{seconds_behind_master} < $pre->{seconds_behind_master} ? ($pre->{seconds_behind_master}-$cur->{seconds_behind_master})/($cur->{Uptime_hires}-$pre->{Uptime_hires}) : 0', - QcacheHitRatio => q{(Qcache_hits||0)/(((Com_select||0)+(Qcache_hits||0))||1)}, -); - -# ########################################################################### -# Column definitions {{{3 -# Defines every column in every table. A named column has the following -# properties: -# * hdr Column header/title -# * label Documentation for humans. -# * num Whether it's numeric (for sorting). -# * just Alignment; generated from num, user-overridable in tbl_meta -# * minw, maxw Auto-generated, user-overridable. -# Values from this hash are just copied to tbl_meta, which is where everything -# else in the program should read from. -# ########################################################################### - -my %columns = ( - active_secs => { hdr => 'SecsActive', num => 1, label => 'Seconds transaction has been active', }, - add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additonal pool allocated' }, - attempted_op => { hdr => 'Action', num => 0, label => 'The action that caused the error' }, - awe_mem_alloc => { hdr => 'AWE Memory', num => 1, label => '[Windows] AWE memory allocated' }, - binlog_cache_overflow => { hdr => 'Binlog Cache', num => 1, label => 'Transactions too big for binlog cache that went to disk' }, - binlog_do_db => { hdr => 'Binlog Do DB', num => 0, label => 'binlog-do-db setting' }, - binlog_ignore_db => { hdr => 'Binlog Ignore DB', num => 0, label => 'binlog-ignore-db setting' }, - bps_in => { hdr => 'BpsIn', num => 1, label => 'Bytes per second received by the server', }, - bps_out => { hdr => 'BpsOut', num => 1, label => 'Bytes per second sent by the server', }, - buf_free => { hdr => 'Free Bufs', num => 1, label => 'Buffers free in the buffer pool' }, - buf_pool_hit_rate => { hdr => 'Hit Rate', num => 0, label => 'Buffer pool hit rate' }, - buf_pool_hits => { hdr => 'Hits', num => 1, label => 'Buffer pool hits' }, - buf_pool_reads => { hdr => 'Reads', num => 1, label => 'Buffer pool reads' }, - buf_pool_size => { hdr => 'Size', num => 1, label => 'Buffer pool size' }, - bufs_in_node_heap => { hdr => 'Node Heap Bufs', num => 1, label => 'Buffers in buffer pool node heap' }, - bytes_behind_master => { hdr => 'ByteLag', num => 1, label => 'Bytes the slave lags the master in binlog' }, - cell_event_set => { hdr => 'Ending?', num => 1, label => 'Whether the cell event is set' }, - cell_waiting => { hdr => 'Waiting?', num => 1, label => 'Whether the cell is waiting' }, - child_db => { hdr => 'Child DB', num => 0, label => 'The database of the child table' }, - child_index => { hdr => 'Child Index', num => 0, label => 'The index in the child table' }, - child_table => { hdr => 'Child Table', num => 0, label => 'The child table' }, - cmd => { hdr => 'Cmd', num => 0, label => 'Type of command being executed', }, - cnt => { hdr => 'Cnt', num => 0, label => 'Count', agg => 'count', aggonly => 1 }, - connect_retry => { hdr => 'Connect Retry', num => 1, label => 'Slave connect-retry timeout' }, - cxn => { hdr => 'CXN', num => 0, label => 'Connection from which the data came', }, - db => { hdr => 'DB', num => 0, label => 'Current database', }, - dict_mem_alloc => { hdr => 'Dict Mem', num => 1, label => 'Dictionary memory allocated' }, - dirty_bufs => { hdr => 'Dirty Buf', num => 1, label => 'Dirty buffer pool pages' }, - dl_txn_num => { hdr => 'Num', num => 0, label => 'Deadlocked transaction number', }, - event_set => { hdr => 'Evt Set?', num => 1, label => '[Win32] if a wait event is set', }, - exec_master_log_pos => { hdr => 'Exec Master Log Pos', num => 1, label => 'Exec Master Log Position' }, - fk_name => { hdr => 'Constraint', num => 0, label => 'The name of the FK constraint' }, - free_list_len => { hdr => 'Free List Len', num => 1, label => 'Length of the free list' }, - has_read_view => { hdr => 'Rd View', num => 1, label => 'Whether the transaction has a read view' }, - hash_searches_s => { hdr => 'Hash/Sec', num => 1, label => 'Number of hash searches/sec' }, - hash_table_size => { hdr => 'Size', num => 1, label => 'Number of non-hash searches/sec' }, - heap_no => { hdr => 'Heap', num => 1, label => 'Heap number' }, - heap_size => { hdr => 'Heap', num => 1, label => 'Heap size' }, - history_list_len => { hdr => 'History', num => 1, label => 'History list length' }, - host_and_domain => { hdr => 'Host', num => 0, label => 'Hostname/IP and domain' }, - host_and_port => { hdr => 'Host/IP', num => 0, label => 'Hostname or IP address, and port number', }, - hostname => { hdr => 'Host', num => 0, label => 'Hostname' }, - index => { hdr => 'Index', num => 0, label => 'The index involved' }, - index_ref => { hdr => 'Index Ref', num => 0, label => 'Index referenced' }, - info => { hdr => 'Query', num => 0, label => 'Info or the current query', }, - insert_intention => { hdr => 'Ins Intent', num => 1, label => 'Whether the thread was trying to insert' }, - inserts => { hdr => 'Inserts', num => 1, label => 'Inserts' }, - io_bytes_s => { hdr => 'Bytes/Sec', num => 1, label => 'Average I/O bytes/sec' }, - io_flush_type => { hdr => 'Flush Type', num => 0, label => 'I/O Flush Type' }, - io_fsyncs_s => { hdr => 'fsyncs/sec', num => 1, label => 'I/O fsyncs/sec' }, - io_reads_s => { hdr => 'Reads/Sec', num => 1, label => 'Average I/O reads/sec' }, - io_writes_s => { hdr => 'Writes/Sec', num => 1, label => 'Average I/O writes/sec' }, - ip => { hdr => 'IP', num => 0, label => 'IP address' }, - is_name_locked => { hdr => 'Locked', num => 1, label => 'Whether table is name locked', }, - key_buffer_hit => { hdr => 'KCacheHit', num => 1, label => 'Key cache hit ratio', }, - key_len => { hdr => 'Key Length', num => 1, label => 'Number of bytes used in the key' }, - last_chkp => { hdr => 'Last Checkpoint', num => 0, label => 'Last log checkpoint' }, - last_errno => { hdr => 'Last Errno', num => 1, label => 'Last error number' }, - last_error => { hdr => 'Last Error', num => 0, label => 'Last error' }, - last_s_file_name => { hdr => 'S-File', num => 0, label => 'Filename where last read locked' }, - last_s_line => { hdr => 'S-Line', num => 1, label => 'Line where last read locked' }, - last_x_file_name => { hdr => 'X-File', num => 0, label => 'Filename where last write locked' }, - last_x_line => { hdr => 'X-Line', num => 1, label => 'Line where last write locked' }, - last_pct => { hdr => 'Pct', num => 1, label => 'Last Percentage' }, - last_total => { hdr => 'Last Total', num => 1, label => 'Last Total' }, - last_value => { hdr => 'Last Incr', num => 1, label => 'Last Value' }, - load => { hdr => 'Load', num => 1, label => 'Server load' }, - lock_cfile_name => { hdr => 'Crtd File', num => 0, label => 'Filename where lock created' }, - lock_cline => { hdr => 'Crtd Line', num => 1, label => 'Line where lock created' }, - lock_mem_addr => { hdr => 'Addr', num => 0, label => 'The lock memory address' }, - lock_mode => { hdr => 'Mode', num => 0, label => 'The lock mode' }, - lock_structs => { hdr => 'LStrcts', num => 1, label => 'Number of lock structs' }, - lock_type => { hdr => 'Type', num => 0, label => 'The lock type' }, - lock_var => { hdr => 'Lck Var', num => 1, label => 'The lock variable' }, - lock_wait_time => { hdr => 'Wait', num => 1, label => 'How long txn has waited for a lock' }, - log_flushed_to => { hdr => 'Flushed To', num => 0, label => 'Log position flushed to' }, - log_ios_done => { hdr => 'IO Done', num => 1, label => 'Log I/Os done' }, - log_ios_s => { hdr => 'IO/Sec', num => 1, label => 'Average log I/Os per sec' }, - log_seq_no => { hdr => 'Sequence No.', num => 0, label => 'Log sequence number' }, - main_thread_id => { hdr => 'Main Thread ID', num => 1, label => 'Main thread ID' }, - main_thread_proc_no => { hdr => 'Main Thread Proc', num => 1, label => 'Main thread process number' }, - main_thread_state => { hdr => 'Main Thread State', num => 0, label => 'Main thread state' }, - master_file => { hdr => 'File', num => 0, label => 'Master file' }, - master_host => { hdr => 'Master', num => 0, label => 'Master server hostname' }, - master_log_file => { hdr => 'Master Log File', num => 0, label => 'Master log file' }, - master_port => { hdr => 'Master Port', num => 1, label => 'Master port' }, - master_pos => { hdr => 'Position', num => 1, label => 'Master position' }, - master_ssl_allowed => { hdr => 'Master SSL Allowed', num => 0, label => 'Master SSL Allowed' }, - master_ssl_ca_file => { hdr => 'Master SSL CA File', num => 0, label => 'Master SSL Cert Auth File' }, - master_ssl_ca_path => { hdr => 'Master SSL CA Path', num => 0, label => 'Master SSL Cert Auth Path' }, - master_ssl_cert => { hdr => 'Master SSL Cert', num => 0, label => 'Master SSL Cert' }, - master_ssl_cipher => { hdr => 'Master SSL Cipher', num => 0, label => 'Master SSL Cipher' }, - master_ssl_key => { hdr => 'Master SSL Key', num => 0, label => 'Master SSL Key' }, - master_user => { hdr => 'Master User', num => 0, label => 'Master username' }, - max_txn => { hdr => 'MaxTxnTime', num => 1, label => 'MaxTxn' }, - merged_recs => { hdr => 'Merged Recs', num => 1, label => 'Merged records' }, - merges => { hdr => 'Merges', num => 1, label => 'Merges' }, - mutex_os_waits => { hdr => 'Waits', num => 1, label => 'Mutex OS Waits' }, - mutex_spin_rounds => { hdr => 'Rounds', num => 1, label => 'Mutex Spin Rounds' }, - mutex_spin_waits => { hdr => 'Spins', num => 1, label => 'Mutex Spin Waits' }, - mysql_thread_id => { hdr => 'ID', num => 1, label => 'MySQL connection (thread) ID', }, - name => { hdr => 'Name', num => 0, label => 'Variable Name' }, - n_bits => { hdr => '# Bits', num => 1, label => 'Number of bits' }, - non_hash_searches_s => { hdr => 'Non-Hash/Sec', num => 1, label => 'Non-hash searches/sec' }, - num_deletes => { hdr => 'Del', num => 1, label => 'Number of deletes' }, - num_deletes_sec => { hdr => 'Del/Sec', num => 1, label => 'Number of deletes' }, - num_inserts => { hdr => 'Ins', num => 1, label => 'Number of inserts' }, - num_inserts_sec => { hdr => 'Ins/Sec', num => 1, label => 'Number of inserts' }, - num_readers => { hdr => 'Readers', num => 1, label => 'Number of readers' }, - num_reads => { hdr => 'Read', num => 1, label => 'Number of reads' }, - num_reads_sec => { hdr => 'Read/Sec', num => 1, label => 'Number of reads' }, - num_res_ext => { hdr => 'BTree Extents', num => 1, label => 'Number of extents reserved for B-Tree' }, - num_rows => { hdr => 'Row Count', num => 1, label => 'Number of rows estimated to examine' }, - num_times_open => { hdr => 'In Use', num => 1, label => '# times table is opened', }, - num_txns => { hdr => 'Txns', num => 1, label => 'Number of transactions' }, - num_updates => { hdr => 'Upd', num => 1, label => 'Number of updates' }, - num_updates_sec => { hdr => 'Upd/Sec', num => 1, label => 'Number of updates' }, - os_file_reads => { hdr => 'OS Reads', num => 1, label => 'OS file reads' }, - os_file_writes => { hdr => 'OS Writes', num => 1, label => 'OS file writes' }, - os_fsyncs => { hdr => 'OS fsyncs', num => 1, label => 'OS fsyncs' }, - os_thread_id => { hdr => 'OS Thread', num => 1, label => 'The operating system thread ID' }, - p_aio_writes => { hdr => 'Async Wrt', num => 1, label => 'Pending asynchronous I/O writes' }, - p_buf_pool_flushes => { hdr => 'Buffer Pool Flushes', num => 1, label => 'Pending buffer pool flushes' }, - p_ibuf_aio_reads => { hdr => 'IBuf Async Rds', num => 1, label => 'Pending insert buffer asynch I/O reads' }, - p_log_flushes => { hdr => 'Log Flushes', num => 1, label => 'Pending log flushes' }, - p_log_ios => { hdr => 'Log I/Os', num => 1, label => 'Pending log I/O operations' }, - p_normal_aio_reads => { hdr => 'Async Rds', num => 1, label => 'Pending asynchronous I/O reads' }, - p_preads => { hdr => 'preads', num => 1, label => 'Pending p-reads' }, - p_pwrites => { hdr => 'pwrites', num => 1, label => 'Pending p-writes' }, - p_sync_ios => { hdr => 'Sync I/Os', num => 1, label => 'Pending synchronous I/O operations' }, - page_creates_sec => { hdr => 'Creates/Sec', num => 1, label => 'Page creates/sec' }, - page_no => { hdr => 'Page', num => 1, label => 'Page number' }, - page_reads_sec => { hdr => 'Reads/Sec', num => 1, label => 'Page reads per second' }, - page_writes_sec => { hdr => 'Writes/Sec', num => 1, label => 'Page writes per second' }, - pages_created => { hdr => 'Created', num => 1, label => 'Pages created' }, - pages_modified => { hdr => 'Dirty Pages', num => 1, label => 'Pages modified (dirty)' }, - pages_read => { hdr => 'Reads', num => 1, label => 'Pages read' }, - pages_total => { hdr => 'Pages', num => 1, label => 'Pages total' }, - pages_written => { hdr => 'Writes', num => 1, label => 'Pages written' }, - parent_col => { hdr => 'Parent Column', num => 0, label => 'The referred column in the parent table', }, - parent_db => { hdr => 'Parent DB', num => 0, label => 'The database of the parent table' }, - parent_index => { hdr => 'Parent Index', num => 0, label => 'The referred index in the parent table' }, - parent_table => { hdr => 'Parent Table', num => 0, label => 'The parent table' }, - part_id => { hdr => 'Part ID', num => 1, label => 'Sub-part ID of the query' }, - partitions => { hdr => 'Partitions', num => 0, label => 'Query partitions used' }, - pct => { hdr => 'Pct', num => 1, label => 'Percentage' }, - pending_chkp_writes => { hdr => 'Chkpt Writes', num => 1, label => 'Pending log checkpoint writes' }, - pending_log_writes => { hdr => 'Log Writes', num => 1, label => 'Pending log writes' }, - port => { hdr => 'Port', num => 1, label => 'Client port number', }, - possible_keys => { hdr => 'Poss. Keys', num => 0, label => 'Possible keys' }, - proc_no => { hdr => 'Proc', num => 1, label => 'Process number' }, - q_cache_hit => { hdr => 'QCacheHit', num => 1, label => 'Query cache hit ratio', }, - qps => { hdr => 'QPS', num => 1, label => 'How many queries/sec', }, - queries_in_queue => { hdr => 'Queries Queued', num => 1, label => 'Queries in queue' }, - queries_inside => { hdr => 'Queries Inside', num => 1, label => 'Queries inside InnoDB' }, - query_id => { hdr => 'Query ID', num => 1, label => 'Query ID' }, - query_status => { hdr => 'Query Status', num => 0, label => 'The query status' }, - query_text => { hdr => 'Query Text', num => 0, label => 'The query text' }, - questions => { hdr => 'Questions', num => 1, label => 'How many queries the server has gotten', }, - read_master_log_pos => { hdr => 'Read Master Pos', num => 1, label => 'Read master log position' }, - read_views_open => { hdr => 'Rd Views', num => 1, label => 'Number of read views open' }, - reads_pending => { hdr => 'Pending Reads', num => 1, label => 'Reads pending' }, - relay_log_file => { hdr => 'Relay File', num => 0, label => 'Relay log file' }, - relay_log_pos => { hdr => 'Relay Pos', num => 1, label => 'Relay log position' }, - relay_log_size => { hdr => 'Relay Size', num => 1, label => 'Relay log size' }, - relay_master_log_file => { hdr => 'Relay Master File', num => 0, label => 'Relay master log file' }, - replicate_do_db => { hdr => 'Do DB', num => 0, label => 'Replicate-do-db setting' }, - replicate_do_table => { hdr => 'Do Table', num => 0, label => 'Replicate-do-table setting' }, - replicate_ignore_db => { hdr => 'Ignore DB', num => 0, label => 'Replicate-ignore-db setting' }, - replicate_ignore_table => { hdr => 'Ignore Table', num => 0, label => 'Replicate-do-table setting' }, - replicate_wild_do_table => { hdr => 'Wild Do Table', num => 0, label => 'Replicate-wild-do-table setting' }, - replicate_wild_ignore_table => { hdr => 'Wild Ignore Table', num => 0, label => 'Replicate-wild-ignore-table setting' }, - request_type => { hdr => 'Type', num => 0, label => 'Type of lock the thread waits for' }, - reservation_count => { hdr => 'ResCnt', num => 1, label => 'Reservation Count' }, - row_locks => { hdr => 'RLocks', num => 1, label => 'Number of row locks' }, - rw_excl_os_waits => { hdr => 'RW Waits', num => 1, label => 'R/W Excl. OS Waits' }, - rw_excl_spins => { hdr => 'RW Spins', num => 1, label => 'R/W Excl. Spins' }, - rw_shared_os_waits => { hdr => 'Sh Waits', num => 1, label => 'R/W Shared OS Waits' }, - rw_shared_spins => { hdr => 'Sh Spins', num => 1, label => 'R/W Shared Spins' }, - scan_type => { hdr => 'Type', num => 0, label => 'Scan type in chosen' }, - seg_size => { hdr => 'Seg. Size', num => 1, label => 'Segment size' }, - select_type => { hdr => 'Select Type', num => 0, label => 'Type of select used' }, - signal_count => { hdr => 'Signals', num => 1, label => 'Signal Count' }, - size => { hdr => 'Size', num => 1, label => 'Size of the tablespace' }, - skip_counter => { hdr => 'Skip Counter', num => 1, label => 'Skip counter' }, - slave_catchup_rate => { hdr => 'Catchup', num => 1, label => 'How fast the slave is catching up in the binlog' }, - slave_io_running => { hdr => 'Slave-IO', num => 0, label => 'Whether the slave I/O thread is running' }, - slave_io_state => { hdr => 'Slave IO State', num => 0, label => 'Slave I/O thread state' }, - slave_open_temp_tables => { hdr => 'Temp', num => 1, label => 'Slave open temp tables' }, - slave_sql_running => { hdr => 'Slave-SQL', num => 0, label => 'Whether the slave SQL thread is running' }, - slow => { hdr => 'Slow', num => 1, label => 'How many slow queries', }, - space_id => { hdr => 'Space', num => 1, label => 'Tablespace ID' }, - special => { hdr => 'Special', num => 0, label => 'Special/Other info' }, - state => { hdr => 'State', num => 0, label => 'Connection state', maxw => 18, }, - tables_in_use => { hdr => 'Tbl Used', num => 1, label => 'Number of tables in use' }, - tables_locked => { hdr => 'Tbl Lck', num => 1, label => 'Number of tables locked' }, - tbl => { hdr => 'Table', num => 0, label => 'Table', }, - thread => { hdr => 'Thread', num => 1, label => 'Thread number' }, - thread_decl_inside => { hdr => 'Thread Inside', num => 0, label => 'What the thread is declared inside' }, - thread_purpose => { hdr => 'Purpose', num => 0, label => "The thread's purpose" }, - thread_status => { hdr => 'Thread Status', num => 0, label => 'The thread status' }, - time => { hdr => 'Time', num => 1, label => 'Time since the last event', }, - time_behind_master => { hdr => 'TimeLag', num => 1, label => 'Time slave lags master' }, - timestring => { hdr => 'Timestring', num => 0, label => 'Time the event occurred' }, - total => { hdr => 'Total', num => 1, label => 'Total' }, - total_mem_alloc => { hdr => 'Memory', num => 1, label => 'Total memory allocated' }, - truncates => { hdr => 'Trunc', num => 0, label => 'Whether the deadlock is truncating InnoDB status' }, - txn_doesnt_see_ge => { hdr => "Txn Won't See", num => 0, label => 'Where txn read view is limited' }, - txn_id => { hdr => 'ID', num => 0, label => 'Transaction ID' }, - txn_sees_lt => { hdr => 'Txn Sees', num => 1, label => 'Where txn read view is limited' }, - txn_status => { hdr => 'Txn Status', num => 0, label => 'Transaction status' }, - txn_time_remain => { hdr => 'Remaining', num => 1, label => 'Time until txn rollback/commit completes' }, - undo_log_entries => { hdr => 'Undo', num => 1, label => 'Number of undo log entries' }, - undo_for => { hdr => 'Undo', num => 0, label => 'Undo for' }, - until_condition => { hdr => 'Until Condition', num => 0, label => 'Slave until condition' }, - until_log_file => { hdr => 'Until Log File', num => 0, label => 'Slave until log file' }, - until_log_pos => { hdr => 'Until Log Pos', num => 1, label => 'Slave until log position' }, - used_cells => { hdr => 'Cells Used', num => 1, label => 'Number of cells used' }, - used_bufs => { hdr => 'Used Bufs', num => 1, label => 'Number of buffer pool pages used' }, - user => { hdr => 'User', num => 0, label => 'Database username', }, - value => { hdr => 'Value', num => 1, label => 'Value' }, - versions => { hdr => 'Versions', num => 1, label => 'Number of InnoDB MVCC versions unpurged' }, - victim => { hdr => 'Victim', num => 0, label => 'Whether this txn was the deadlock victim' }, - wait_array_size => { hdr => 'Wait Array Size', num => 1, label => 'Wait Array Size' }, - wait_status => { hdr => 'Lock Status', num => 0, label => 'Status of txn locks' }, - waited_at_filename => { hdr => 'File', num => 0, label => 'Filename at which thread waits' }, - waited_at_line => { hdr => 'Line', num => 1, label => 'Line at which thread waits' }, - waiters_flag => { hdr => 'Waiters', num => 1, label => 'Waiters Flag' }, - waiting => { hdr => 'Waiting', num => 1, label => 'Whether lock is being waited for' }, - when => { hdr => 'When', num => 0, label => 'Time scale' }, - writer_lock_mode => { hdr => 'Wrtr Lck Mode', num => 0, label => 'Writer lock mode' }, - writer_thread => { hdr => 'Wrtr Thread', num => 1, label => 'Writer thread ID' }, - writes_pending => { hdr => 'Writes', num => 1, label => 'Number of writes pending' }, - writes_pending_flush_list => { hdr => 'Flush List Writes', num => 1, label => 'Number of flush list writes pending' }, - writes_pending_lru => { hdr => 'LRU Writes', num => 1, label => 'Number of LRU writes pending' }, - writes_pending_single_page => { hdr => '1-Page Writes', num => 1, label => 'Number of 1-page writes pending' }, -); - -# Apply a default property or three. By default, columns are not width-constrained, -# aligned left, and sorted alphabetically, not numerically. -foreach my $col ( values %columns ) { - map { $col->{$_} ||= 0 } qw(num minw maxw); - $col->{just} = $col->{num} ? '' : '-'; -} - -# Filters {{{3 -# This hash defines every filter that can be applied to a table. These -# become part of tbl_meta as well. Each filter is just an expression that -# returns true or false. -# Properties of each entry: -# * func: the subroutine -# * name: the name, repeated -# * user: whether it's a user-defined filter (saved in config) -# * text: text of the subroutine -# * note: explanation -my %filters = (); - -# These are pre-processed to live in %filters above, by compiling them. -my %builtin_filters = ( - hide_self => { - text => <<' END', - return ( !$set->{info} || $set->{info} ne 'SHOW FULL PROCESSLIST' ) - && ( !$set->{query_text} || $set->{query_text} !~ m/INNODB STATUS$/ ); - END - note => 'Removes the innotop processes from the list', - tbls => [qw(innodb_transactions processlist)], - }, - hide_inactive => { - text => <<' END', - return ( !defined($set->{txn_status}) || $set->{txn_status} ne 'not started' ) - && ( !defined($set->{cmd}) || $set->{cmd} !~ m/Sleep|Binlog Dump/ ) - && ( !defined($set->{info}) || $set->{info} =~ m/\S/ ); - END - note => 'Removes processes which are not doing anything', - tbls => [qw(innodb_transactions processlist)], - }, - hide_slave_io => { - text => <<' END', - return !$set->{state} || $set->{state} !~ m/^(?:Waiting for master|Has read all relay)/; - END - note => 'Removes slave I/O threads from the list', - tbls => [qw(processlist slave_io_status)], - }, - table_is_open => { - text => <<' END', - return $set->{num_times_open} + $set->{is_name_locked}; - END - note => 'Removes tables that are not in use or locked', - tbls => [qw(open_tables)], - }, - cxn_is_master => { - text => <<' END', - return $set->{master_file} ? 1 : 0; - END - note => 'Removes servers that are not masters', - tbls => [qw(master_status)], - }, - cxn_is_slave => { - text => <<' END', - return $set->{master_host} ? 1 : 0; - END - note => 'Removes servers that are not slaves', - tbls => [qw(slave_io_status slave_sql_status)], - }, - thd_is_not_waiting => { - text => <<' END', - return $set->{thread_status} !~ m#waiting for i/o request#; - END - note => 'Removes idle I/O threads', - tbls => [qw(io_threads)], - }, -); -foreach my $key ( keys %builtin_filters ) { - my ( $sub, $err ) = compile_filter($builtin_filters{$key}->{text}); - $filters{$key} = { - func => $sub, - text => $builtin_filters{$key}->{text}, - user => 0, - name => $key, # useful for later - note => $builtin_filters{$key}->{note}, - tbls => $builtin_filters{$key}->{tbls}, - } -} - -# Variable sets {{{3 -# Sets (arrayrefs) of variables that are used in S mode. They are read/written to -# the config file. -my %var_sets = ( - general => { - text => join( - ', ', - 'set_precision(Questions/Uptime_hires) as QPS', - 'set_precision(Com_commit/Uptime_hires) as Commit_PS', - 'set_precision((Com_rollback||0)/(Com_commit||1)) as Rollback_Commit', - 'set_precision((' - . join('+', map { "($_||0)" } - qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace - Com_replace_select Com_select Com_update Com_update_multi)) - . ')/(Com_commit||1)) as Write_Commit', - 'set_precision((Com_select+(Qcache_hits||0))/((' - . join('+', map { "($_||0)" } - qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace - Com_replace_select Com_select Com_update Com_update_multi)) - . ')||1)) as R_W_Ratio', - 'set_precision(Opened_tables/Uptime_hires) as Opens_PS', - 'percent($cur->{Open_tables}/($cur->{table_cache})) as Table_Cache_Used', - 'set_precision(Threads_created/Uptime_hires) as Threads_PS', - 'percent($cur->{Threads_cached}/($cur->{thread_cache_size}||1)) as Thread_Cache_Used', - 'percent($cur->{Max_used_connections}/($cur->{max_connections}||1)) as CXN_Used_Ever', - 'percent($cur->{Threads_connected}/($cur->{max_connections}||1)) as CXN_Used_Now', - ), - }, - commands => { - text => join( - ', ', - qw(Uptime Questions Com_delete Com_delete_multi Com_insert - Com_insert_select Com_replace Com_replace_select Com_select Com_update - Com_update_multi) - ), - }, - query_status => { - text => join( - ',', - qw( Uptime Select_full_join Select_full_range_join Select_range - Select_range_check Select_scan Slow_queries Sort_merge_passes - Sort_range Sort_rows Sort_scan) - ), - }, - innodb => { - text => join( - ',', - qw( Uptime Innodb_row_lock_current_waits Innodb_row_lock_time - Innodb_row_lock_time_avg Innodb_row_lock_time_max Innodb_row_lock_waits - Innodb_rows_deleted Innodb_rows_inserted Innodb_rows_read - Innodb_rows_updated) - ), - }, - txn => { - text => join( - ',', - qw( Uptime Com_begin Com_commit Com_rollback Com_savepoint - Com_xa_commit Com_xa_end Com_xa_prepare Com_xa_recover Com_xa_rollback - Com_xa_start) - ), - }, - key_cache => { - text => join( - ',', - qw( Uptime Key_blocks_not_flushed Key_blocks_unused Key_blocks_used - Key_read_requests Key_reads Key_write_requests Key_writes ) - ), - }, - query_cache => { - text => join( - ',', - "percent($exprs{QcacheHitRatio}) as Hit_Pct", - 'set_precision((Qcache_hits||0)/(Qcache_inserts||1)) as Hit_Ins', - 'set_precision((Qcache_lowmem_prunes||0)/Uptime_hires) as Lowmem_Prunes_sec', - 'percent(1-((Qcache_free_blocks||0)/(Qcache_total_blocks||1))) as Blocks_used', - qw( Qcache_free_blocks Qcache_free_memory Qcache_not_cached Qcache_queries_in_cache) - ), - }, - handler => { - text => join( - ',', - qw( Uptime Handler_read_key Handler_read_first Handler_read_next - Handler_read_prev Handler_read_rnd Handler_read_rnd_next Handler_delete - Handler_update Handler_write) - ), - }, - cxns_files_threads => { - text => join( - ',', - qw( Uptime Aborted_clients Aborted_connects Bytes_received Bytes_sent - Compression Connections Created_tmp_disk_tables Created_tmp_files - Created_tmp_tables Max_used_connections Open_files Open_streams - Open_tables Opened_tables Table_locks_immediate Table_locks_waited - Threads_cached Threads_connected Threads_created Threads_running) - ), - }, - prep_stmt => { - text => join( - ',', - qw( Uptime Com_dealloc_sql Com_execute_sql Com_prepare_sql Com_reset - Com_stmt_close Com_stmt_execute Com_stmt_fetch Com_stmt_prepare - Com_stmt_reset Com_stmt_send_long_data ) - ), - }, - innodb_health => { - text => join( - ',', - "$exprs{OldVersions} as OldVersions", - qw(IB_sm_mutex_spin_waits IB_sm_mutex_spin_rounds IB_sm_mutex_os_waits), - "$exprs{NumTxns} as NumTxns", - "$exprs{MaxTxnTime} as MaxTxnTime", - qw(IB_ro_queries_inside IB_ro_queries_in_queue), - "set_precision($exprs{DirtyBufs} * 100) as dirty_bufs", - "set_precision($exprs{BufPoolFill} * 100) as buf_fill", - qw(IB_bp_pages_total IB_bp_pages_read IB_bp_pages_written IB_bp_pages_created) - ), - }, - innodb_health2 => { - text => join( - ', ', - 'percent(1-((Innodb_buffer_pool_pages_free||0)/($cur->{Innodb_buffer_pool_pages_total}||1))) as BP_page_cache_usage', - 'percent(1-((Innodb_buffer_pool_reads||0)/(Innodb_buffer_pool_read_requests||1))) as BP_cache_hit_ratio', - 'Innodb_buffer_pool_wait_free', - 'Innodb_log_waits', - ), - }, - slow_queries => { - text => join( - ', ', - 'set_precision(Slow_queries/Uptime_hires) as Slow_PS', - 'set_precision(Select_full_join/Uptime_hires) as Full_Join_PS', - 'percent(Select_full_join/(Com_select||1)) as Full_Join_Ratio', - ), - }, -); - -# Server sets {{{3 -# Defines sets of servers between which the user can quickly switch. -my %server_groups; - -# Connections {{{3 -# This hash defines server connections. Each connection is a string that can be passed to -# the DBI connection. These are saved in the connections section in the config file. -my %connections; -# Defines the parts of connections. -my @conn_parts = qw(user have_user pass have_pass dsn savepass dl_table); - -# Graph widths {{{3 -# This hash defines the max values seen for various status/variable values, for graphing. -# These are stored in their own section in the config file. These are just initial values: -my %mvs = ( - Com_select => 50, - Com_insert => 50, - Com_update => 50, - Com_delete => 50, - Questions => 100, -); - -# ########################################################################### -# Valid Term::ANSIColor color strings. -# ########################################################################### -my %ansicolors = map { $_ => 1 } - qw( black blink blue bold clear concealed cyan dark green magenta on_black - on_blue on_cyan on_green on_magenta on_red on_white on_yellow red reset - reverse underline underscore white yellow); - -# ########################################################################### -# Valid comparison operators for color rules -# ########################################################################### -my %comp_ops = ( - '==' => 'Numeric equality', - '>' => 'Numeric greater-than', - '<' => 'Numeric less-than', - '>=' => 'Numeric greater-than/equal', - '<=' => 'Numeric less-than/equal', - '!=' => 'Numeric not-equal', - 'eq' => 'String equality', - 'gt' => 'String greater-than', - 'lt' => 'String less-than', - 'ge' => 'String greater-than/equal', - 'le' => 'String less-than/equal', - 'ne' => 'String not-equal', - '=~' => 'Pattern match', - '!~' => 'Negated pattern match', -); - -# ########################################################################### -# Valid aggregate functions. -# ########################################################################### -my %agg_funcs = ( - first => sub { - return $_[0] - }, - count => sub { - return 0 + @_; - }, - avg => sub { - my @args = grep { defined $_ } @_; - return (sum(map { m/([\d\.-]+)/g } @args) || 0) / (scalar(@args) || 1); - }, - sum => \&sum, -); - -# ########################################################################### -# Valid functions for transformations. -# ########################################################################### -my %trans_funcs = ( - shorten => \&shorten, - secs_to_time => \&secs_to_time, - no_ctrl_char => \&no_ctrl_char, - percent => \&percent, - commify => \&commify, - dulint_to_int => \&dulint_to_int, - set_precision => \&set_precision, -); - -# Table definitions {{{3 -# This hash defines every table that can get displayed in every mode. Each -# table specifies columns and column data sources. The column is -# defined by the %columns hash. -# -# Example: foo => { src => 'bar' } means the foo column (look at -# $columns{foo} for its definition) gets its data from the 'bar' element of -# the current data set, whatever that is. -# -# These columns are post-processed after being defined, because they get stuff -# from %columns. After all the config is loaded for columns, there's more -# post-processing too; the subroutines compiled from src get added to -# the hash elements for extract_values to use. -# ########################################################################### - -my %tbl_meta = ( - adaptive_hash_index => { - capt => 'Adaptive Hash Index', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - hash_table_size => { src => 'IB_ib_hash_table_size', trans => [qw(shorten)], }, - used_cells => { src => 'IB_ib_used_cells' }, - bufs_in_node_heap => { src => 'IB_ib_bufs_in_node_heap' }, - hash_searches_s => { src => 'IB_ib_hash_searches_s' }, - non_hash_searches_s => { src => 'IB_ib_non_hash_searches_s' }, - }, - visible => [ qw(cxn hash_table_size used_cells bufs_in_node_heap hash_searches_s non_hash_searches_s) ], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'ib', - group_by => [], - aggregate => 0, - }, - buffer_pool => { - capt => 'Buffer Pool', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - total_mem_alloc => { src => 'IB_bp_total_mem_alloc', trans => [qw(shorten)], }, - awe_mem_alloc => { src => 'IB_bp_awe_mem_alloc', trans => [qw(shorten)], }, - add_pool_alloc => { src => 'IB_bp_add_pool_alloc', trans => [qw(shorten)], }, - buf_pool_size => { src => 'IB_bp_buf_pool_size', trans => [qw(shorten)], }, - buf_free => { src => 'IB_bp_buf_free' }, - buf_pool_hit_rate => { src => 'IB_bp_buf_pool_hit_rate' }, - buf_pool_reads => { src => 'IB_bp_buf_pool_reads' }, - buf_pool_hits => { src => 'IB_bp_buf_pool_hits' }, - dict_mem_alloc => { src => 'IB_bp_dict_mem_alloc' }, - pages_total => { src => 'IB_bp_pages_total' }, - pages_modified => { src => 'IB_bp_pages_modified' }, - reads_pending => { src => 'IB_bp_reads_pending' }, - writes_pending => { src => 'IB_bp_writes_pending' }, - writes_pending_lru => { src => 'IB_bp_writes_pending_lru' }, - writes_pending_flush_list => { src => 'IB_bp_writes_pending_flush_list' }, - writes_pending_single_page => { src => 'IB_bp_writes_pending_single_page' }, - page_creates_sec => { src => 'IB_bp_page_creates_sec' }, - page_reads_sec => { src => 'IB_bp_page_reads_sec' }, - page_writes_sec => { src => 'IB_bp_page_writes_sec' }, - pages_created => { src => 'IB_bp_pages_created' }, - pages_read => { src => 'IB_bp_pages_read' }, - pages_written => { src => 'IB_bp_pages_written' }, - }, - visible => [ qw(cxn buf_pool_size buf_free pages_total pages_modified buf_pool_hit_rate total_mem_alloc add_pool_alloc)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'bp', - group_by => [], - aggregate => 0, - }, - # TODO: a new step in set_to_tbl: join result to itself, grouped? - # TODO: this would also enable pulling Q and T data together. - # TODO: using a SQL-ish language would also allow pivots to be easier -- treat the pivoted data as a view and SELECT from it. - cmd_summary => { - capt => 'Command Summary', - cust => {}, - cols => { - name => { src => 'name' }, - total => { src => 'total' }, - value => { src => 'value', agg => 'sum'}, - pct => { src => 'value/total', trans => [qw(percent)] }, - last_total => { src => 'last_total' }, - last_value => { src => 'last_value', agg => 'sum'}, - last_pct => { src => 'last_value/last_total', trans => [qw(percent)] }, - }, - visible => [qw(name value pct last_value last_pct)], - filters => [qw()], - sort_cols => '-value', - sort_dir => '1', - innodb => '', - group_by => [qw(name)], - aggregate => 1, - }, - deadlock_locks => { - capt => 'Deadlock Locks', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - mysql_thread_id => { src => 'mysql_thread_id' }, - dl_txn_num => { src => 'dl_txn_num' }, - lock_type => { src => 'lock_type' }, - space_id => { src => 'space_id' }, - page_no => { src => 'page_no' }, - heap_no => { src => 'heap_no' }, - n_bits => { src => 'n_bits' }, - index => { src => 'index' }, - db => { src => 'db' }, - tbl => { src => 'table' }, - lock_mode => { src => 'lock_mode' }, - special => { src => 'special' }, - insert_intention => { src => 'insert_intention' }, - waiting => { src => 'waiting' }, - }, - visible => [ qw(cxn mysql_thread_id waiting lock_mode db tbl index special insert_intention)], - filters => [], - sort_cols => 'cxn mysql_thread_id', - sort_dir => '1', - innodb => 'dl', - group_by => [], - aggregate => 0, - }, - deadlock_transactions => { - capt => 'Deadlock Transactions', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - active_secs => { src => 'active_secs' }, - dl_txn_num => { src => 'dl_txn_num' }, - has_read_view => { src => 'has_read_view' }, - heap_size => { src => 'heap_size' }, - host_and_domain => { src => 'hostname' }, - hostname => { src => $exprs{Host} }, - ip => { src => 'ip' }, - lock_structs => { src => 'lock_structs' }, - lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, - mysql_thread_id => { src => 'mysql_thread_id' }, - os_thread_id => { src => 'os_thread_id' }, - proc_no => { src => 'proc_no' }, - query_id => { src => 'query_id' }, - query_status => { src => 'query_status' }, - query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, - row_locks => { src => 'row_locks' }, - tables_in_use => { src => 'tables_in_use' }, - tables_locked => { src => 'tables_locked' }, - thread_decl_inside => { src => 'thread_decl_inside' }, - thread_status => { src => 'thread_status' }, - 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ] }, - timestring => { src => 'timestring' }, - txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, - txn_id => { src => 'txn_id' }, - txn_sees_lt => { src => 'txn_sees_lt' }, - txn_status => { src => 'txn_status' }, - truncates => { src => 'truncates' }, - undo_log_entries => { src => 'undo_log_entries' }, - user => { src => 'user' }, - victim => { src => 'victim' }, - wait_status => { src => 'lock_wait_status' }, - }, - visible => [ qw(cxn mysql_thread_id timestring user hostname victim time undo_log_entries lock_structs query_text)], - filters => [], - sort_cols => 'cxn mysql_thread_id', - sort_dir => '1', - innodb => 'dl', - group_by => [], - aggregate => 0, - }, - explain => { - capt => 'EXPLAIN Results', - cust => {}, - cols => { - part_id => { src => 'id' }, - select_type => { src => 'select_type' }, - tbl => { src => 'table' }, - partitions => { src => 'partitions' }, - scan_type => { src => 'type' }, - possible_keys => { src => 'possible_keys' }, - index => { src => 'key' }, - key_len => { src => 'key_len' }, - index_ref => { src => 'ref' }, - num_rows => { src => 'rows' }, - special => { src => 'extra' }, - }, - visible => [ qw(select_type tbl partitions scan_type possible_keys index key_len index_ref num_rows special)], - filters => [], - sort_cols => '', - sort_dir => '1', - innodb => '', - group_by => [], - aggregate => 0, - }, - file_io_misc => { - capt => 'File I/O Misc', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - io_bytes_s => { src => 'IB_io_avg_bytes_s' }, - io_flush_type => { src => 'IB_io_flush_type' }, - io_fsyncs_s => { src => 'IB_io_fsyncs_s' }, - io_reads_s => { src => 'IB_io_reads_s' }, - io_writes_s => { src => 'IB_io_writes_s' }, - os_file_reads => { src => 'IB_io_os_file_reads' }, - os_file_writes => { src => 'IB_io_os_file_writes' }, - os_fsyncs => { src => 'IB_io_os_fsyncs' }, - }, - visible => [ qw(cxn os_file_reads os_file_writes os_fsyncs io_reads_s io_writes_s io_bytes_s)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'io', - group_by => [], - aggregate => 0, - }, - fk_error => { - capt => 'Foreign Key Error Info', - cust => {}, - cols => { - timestring => { src => 'IB_fk_timestring' }, - child_db => { src => 'IB_fk_child_db' }, - child_table => { src => 'IB_fk_child_table' }, - child_index => { src => 'IB_fk_child_index' }, - fk_name => { src => 'IB_fk_fk_name' }, - parent_db => { src => 'IB_fk_parent_db' }, - parent_table => { src => 'IB_fk_parent_table' }, - parent_col => { src => 'IB_fk_parent_col' }, - parent_index => { src => 'IB_fk_parent_index' }, - attempted_op => { src => 'IB_fk_attempted_op' }, - }, - visible => [ qw(timestring child_db child_table child_index parent_db parent_table parent_col parent_index fk_name attempted_op)], - filters => [], - sort_cols => '', - sort_dir => '1', - innodb => 'fk', - group_by => [], - aggregate => 0, - }, - insert_buffers => { - capt => 'Insert Buffers', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - inserts => { src => 'IB_ib_inserts' }, - merged_recs => { src => 'IB_ib_merged_recs' }, - merges => { src => 'IB_ib_merges' }, - size => { src => 'IB_ib_size' }, - free_list_len => { src => 'IB_ib_free_list_len' }, - seg_size => { src => 'IB_ib_seg_size' }, - }, - visible => [ qw(cxn inserts merged_recs merges size free_list_len seg_size)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'ib', - group_by => [], - aggregate => 0, - }, - innodb_locks => { - capt => 'InnoDB Locks', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - db => { src => 'db' }, - index => { src => 'index' }, - insert_intention => { src => 'insert_intention' }, - lock_mode => { src => 'lock_mode' }, - lock_type => { src => 'lock_type' }, - lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, - mysql_thread_id => { src => 'mysql_thread_id' }, - n_bits => { src => 'n_bits' }, - page_no => { src => 'page_no' }, - space_id => { src => 'space_id' }, - special => { src => 'special' }, - tbl => { src => 'table' }, - 'time' => { src => 'active_secs', hdr => 'Active', trans => [ qw(secs_to_time) ] }, - txn_id => { src => 'txn_id' }, - waiting => { src => 'waiting' }, - }, - visible => [ qw(cxn mysql_thread_id lock_type waiting lock_wait_time time lock_mode db tbl index insert_intention special)], - filters => [], - sort_cols => 'cxn -lock_wait_time', - sort_dir => '1', - innodb => 'tx', - colors => [ - { col => 'lock_wait_time', op => '>', arg => 60, color => 'red' }, - { col => 'lock_wait_time', op => '>', arg => 30, color => 'yellow' }, - { col => 'lock_wait_time', op => '>', arg => 10, color => 'green' }, - ], - group_by => [], - aggregate => 0, - }, - innodb_transactions => { - capt => 'InnoDB Transactions', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - active_secs => { src => 'active_secs' }, - has_read_view => { src => 'has_read_view' }, - heap_size => { src => 'heap_size' }, - hostname => { src => $exprs{Host} }, - ip => { src => 'ip' }, - wait_status => { src => 'lock_wait_status' }, - lock_wait_time => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] }, - lock_structs => { src => 'lock_structs' }, - mysql_thread_id => { src => 'mysql_thread_id' }, - os_thread_id => { src => 'os_thread_id' }, - proc_no => { src => 'proc_no' }, - query_id => { src => 'query_id' }, - query_status => { src => 'query_status' }, - query_text => { src => 'query_text', trans => [ qw(no_ctrl_char) ] }, - txn_time_remain => { src => $exprs{TxnTimeRemain}, trans => [ qw(secs_to_time) ] }, - row_locks => { src => 'row_locks' }, - tables_in_use => { src => 'tables_in_use' }, - tables_locked => { src => 'tables_locked' }, - thread_decl_inside => { src => 'thread_decl_inside' }, - thread_status => { src => 'thread_status' }, - 'time' => { src => 'active_secs', trans => [ qw(secs_to_time) ], agg => 'sum' }, - txn_doesnt_see_ge => { src => 'txn_doesnt_see_ge' }, - txn_id => { src => 'txn_id' }, - txn_sees_lt => { src => 'txn_sees_lt' }, - txn_status => { src => 'txn_status', minw => 10, maxw => 10 }, - undo_log_entries => { src => 'undo_log_entries' }, - user => { src => 'user', maxw => 10 }, - cnt => { src => 'mysql_thread_id', minw => 0 }, - }, - visible => [ qw(cxn cnt mysql_thread_id user hostname txn_status time undo_log_entries query_text)], - filters => [ qw( hide_self hide_inactive ) ], - sort_cols => '-active_secs txn_status cxn mysql_thread_id', - sort_dir => '1', - innodb => 'tx', - hide_caption => 1, - colors => [ - { col => 'wait_status', op => 'eq', arg => 'LOCK WAIT', color => 'black on_red' }, - { col => 'time', op => '>', arg => 600, color => 'red' }, - { col => 'time', op => '>', arg => 300, color => 'yellow' }, - { col => 'time', op => '>', arg => 60, color => 'green' }, - { col => 'time', op => '>', arg => 30, color => 'cyan' }, - { col => 'txn_status', op => 'eq', arg => 'not started', color => 'white' }, - ], - group_by => [ qw(cxn txn_status) ], - aggregate => 0, - }, - io_threads => { - capt => 'I/O Threads', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - thread => { src => 'thread' }, - thread_purpose => { src => 'purpose' }, - event_set => { src => 'event_set' }, - thread_status => { src => 'state' }, - }, - visible => [ qw(cxn thread thread_purpose thread_status)], - filters => [ qw() ], - sort_cols => 'cxn thread', - sort_dir => '1', - innodb => 'io', - group_by => [], - aggregate => 0, - }, - log_statistics => { - capt => 'Log Statistics', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - last_chkp => { src => 'IB_lg_last_chkp' }, - log_flushed_to => { src => 'IB_lg_log_flushed_to' }, - log_ios_done => { src => 'IB_lg_log_ios_done' }, - log_ios_s => { src => 'IB_lg_log_ios_s' }, - log_seq_no => { src => 'IB_lg_log_seq_no' }, - pending_chkp_writes => { src => 'IB_lg_pending_chkp_writes' }, - pending_log_writes => { src => 'IB_lg_pending_log_writes' }, - }, - visible => [ qw(cxn log_seq_no log_flushed_to last_chkp log_ios_done log_ios_s)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'lg', - group_by => [], - aggregate => 0, - }, - master_status => { - capt => 'Master Status', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - binlog_do_db => { src => 'binlog_do_db' }, - binlog_ignore_db => { src => 'binlog_ignore_db' }, - master_file => { src => 'file' }, - master_pos => { src => 'position' }, - binlog_cache_overflow => { src => '(Binlog_cache_disk_use||0)/(Binlog_cache_use||1)', trans => [ qw(percent) ] }, - }, - visible => [ qw(cxn master_file master_pos binlog_cache_overflow)], - filters => [ qw(cxn_is_master) ], - sort_cols => 'cxn', - sort_dir => '1', - innodb => '', - group_by => [], - aggregate => 0, - }, - pending_io => { - capt => 'Pending I/O', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - p_normal_aio_reads => { src => 'IB_io_pending_normal_aio_reads' }, - p_aio_writes => { src => 'IB_io_pending_aio_writes' }, - p_ibuf_aio_reads => { src => 'IB_io_pending_ibuf_aio_reads' }, - p_sync_ios => { src => 'IB_io_pending_sync_ios' }, - p_buf_pool_flushes => { src => 'IB_io_pending_buffer_pool_flushes' }, - p_log_flushes => { src => 'IB_io_pending_log_flushes' }, - p_log_ios => { src => 'IB_io_pending_log_ios' }, - p_preads => { src => 'IB_io_pending_preads' }, - p_pwrites => { src => 'IB_io_pending_pwrites' }, - }, - visible => [ qw(cxn p_normal_aio_reads p_aio_writes p_ibuf_aio_reads p_sync_ios p_log_flushes p_log_ios)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'io', - group_by => [], - aggregate => 0, - }, - open_tables => { - capt => 'Open Tables', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - db => { src => 'database' }, - tbl => { src => 'table' }, - num_times_open => { src => 'in_use' }, - is_name_locked => { src => 'name_locked' }, - }, - visible => [ qw(cxn db tbl num_times_open is_name_locked)], - filters => [ qw(table_is_open) ], - sort_cols => '-num_times_open cxn db tbl', - sort_dir => '1', - innodb => '', - group_by => [], - aggregate => 0, - }, - page_statistics => { - capt => 'Page Statistics', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - pages_read => { src => 'IB_bp_pages_read' }, - pages_written => { src => 'IB_bp_pages_written' }, - pages_created => { src => 'IB_bp_pages_created' }, - page_reads_sec => { src => 'IB_bp_page_reads_sec' }, - page_writes_sec => { src => 'IB_bp_page_writes_sec' }, - page_creates_sec => { src => 'IB_bp_page_creates_sec' }, - }, - visible => [ qw(cxn pages_read pages_written pages_created page_reads_sec page_writes_sec page_creates_sec)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'bp', - group_by => [], - aggregate => 0, - }, - processlist => { - capt => 'MySQL Process List', - cust => {}, - cols => { - cxn => { src => 'cxn', minw => 6, maxw => 10 }, - mysql_thread_id => { src => 'id', minw => 6, maxw => 0 }, - user => { src => 'user', minw => 5, maxw => 8 }, - hostname => { src => $exprs{Host}, minw => 13, maxw => 8, }, - port => { src => $exprs{Port}, minw => 0, maxw => 0, }, - host_and_port => { src => 'host', minw => 0, maxw => 0 }, - db => { src => 'db', minw => 6, maxw => 12 }, - cmd => { src => 'command', minw => 5, maxw => 0 }, - time => { src => 'time', minw => 5, maxw => 0, trans => [ qw(secs_to_time) ], agg => 'sum' }, - state => { src => 'state', minw => 0, maxw => 0 }, - info => { src => 'info', minw => 0, maxw => 0, trans => [ qw(no_ctrl_char) ] }, - cnt => { src => 'id', minw => 0, maxw => 0 }, - }, - visible => [ qw(cxn cmd cnt mysql_thread_id user hostname db time info)], - filters => [ qw(hide_self hide_inactive hide_slave_io) ], - sort_cols => '-time cxn hostname mysql_thread_id', - sort_dir => '1', - innodb => '', - hide_caption => 1, - colors => [ - { col => 'state', op => 'eq', arg => 'Locked', color => 'black on_red' }, - { col => 'cmd', op => 'eq', arg => 'Sleep', color => 'white' }, - { col => 'user', op => 'eq', arg => 'system user', color => 'white' }, - { col => 'cmd', op => 'eq', arg => 'Connect', color => 'white' }, - { col => 'cmd', op => 'eq', arg => 'Binlog Dump', color => 'white' }, - { col => 'time', op => '>', arg => 600, color => 'red' }, - { col => 'time', op => '>', arg => 120, color => 'yellow' }, - { col => 'time', op => '>', arg => 60, color => 'green' }, - { col => 'time', op => '>', arg => 30, color => 'cyan' }, - ], - group_by => [qw(cxn cmd)], - aggregate => 0, - }, - - # TODO: some more columns: - # kb_used=hdr='BufUsed' minw='0' num='0' src='percent(1 - ((Key_blocks_unused * key_cache_block_size) / (key_buffer_size||1)))' dec='0' trans='' tbl='q_header' just='-' user='1' maxw='0' label='User-defined' - # retries=hdr='Retries' minw='0' num='0' src='Slave_retried_transactions' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' - # thd=hdr='Thd' minw='0' num='0' src='Threads_connected' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined' - - q_header => { - capt => 'Q-mode Header', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - questions => { src => 'Questions' }, - qps => { src => 'Questions/Uptime_hires', dec => 1, trans => [qw(shorten)] }, - load => { src => $exprs{ServerLoad}, dec => 1, trans => [qw(shorten)] }, - slow => { src => 'Slow_queries', dec => 1, trans => [qw(shorten)] }, - q_cache_hit => { src => $exprs{QcacheHitRatio}, dec => 1, trans => [qw(percent)] }, - key_buffer_hit => { src => '1-(Key_reads/(Key_read_requests||1))', dec => 1, trans => [qw(percent)] }, - bps_in => { src => 'Bytes_received/Uptime_hires', dec => 1, trans => [qw(shorten)] }, - bps_out => { src => 'Bytes_sent/Uptime_hires', dec => 1, trans => [qw(shorten)] }, - when => { src => 'when' }, - }, - visible => [ qw(cxn when load qps slow q_cache_hit key_buffer_hit bps_in bps_out)], - filters => [], - sort_cols => 'when cxn', - sort_dir => '1', - innodb => '', - hide_caption => 1, - group_by => [], - aggregate => 0, - }, - row_operations => { - capt => 'InnoDB Row Operations', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - num_inserts => { src => 'IB_ro_num_rows_ins' }, - num_updates => { src => 'IB_ro_num_rows_upd' }, - num_reads => { src => 'IB_ro_num_rows_read' }, - num_deletes => { src => 'IB_ro_num_rows_del' }, - num_inserts_sec => { src => 'IB_ro_ins_sec' }, - num_updates_sec => { src => 'IB_ro_upd_sec' }, - num_reads_sec => { src => 'IB_ro_read_sec' }, - num_deletes_sec => { src => 'IB_ro_del_sec' }, - }, - visible => [ qw(cxn num_inserts num_updates num_reads num_deletes num_inserts_sec - num_updates_sec num_reads_sec num_deletes_sec)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'ro', - group_by => [], - aggregate => 0, - }, - row_operation_misc => { - capt => 'Row Operation Misc', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - queries_in_queue => { src => 'IB_ro_queries_in_queue' }, - queries_inside => { src => 'IB_ro_queries_inside' }, - read_views_open => { src => 'IB_ro_read_views_open' }, - main_thread_id => { src => 'IB_ro_main_thread_id' }, - main_thread_proc_no => { src => 'IB_ro_main_thread_proc_no' }, - main_thread_state => { src => 'IB_ro_main_thread_state' }, - num_res_ext => { src => 'IB_ro_n_reserved_extents' }, - }, - visible => [ qw(cxn queries_in_queue queries_inside read_views_open main_thread_state)], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'ro', - group_by => [], - aggregate => 0, - }, - semaphores => { - capt => 'InnoDB Semaphores', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - mutex_os_waits => { src => 'IB_sm_mutex_os_waits' }, - mutex_spin_rounds => { src => 'IB_sm_mutex_spin_rounds' }, - mutex_spin_waits => { src => 'IB_sm_mutex_spin_waits' }, - reservation_count => { src => 'IB_sm_reservation_count' }, - rw_excl_os_waits => { src => 'IB_sm_rw_excl_os_waits' }, - rw_excl_spins => { src => 'IB_sm_rw_excl_spins' }, - rw_shared_os_waits => { src => 'IB_sm_rw_shared_os_waits' }, - rw_shared_spins => { src => 'IB_sm_rw_shared_spins' }, - signal_count => { src => 'IB_sm_signal_count' }, - wait_array_size => { src => 'IB_sm_wait_array_size' }, - }, - visible => [ qw(cxn mutex_os_waits mutex_spin_waits mutex_spin_rounds - rw_excl_os_waits rw_excl_spins rw_shared_os_waits rw_shared_spins - signal_count reservation_count )], - filters => [], - sort_cols => 'cxn', - sort_dir => '1', - innodb => 'sm', - group_by => [], - aggregate => 0, - }, - slave_io_status => { - capt => 'Slave I/O Status', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - connect_retry => { src => 'connect_retry' }, - master_host => { src => 'master_host', hdr => 'Master'}, - master_log_file => { src => 'master_log_file', hdr => 'File' }, - master_port => { src => 'master_port' }, - master_ssl_allowed => { src => 'master_ssl_allowed' }, - master_ssl_ca_file => { src => 'master_ssl_ca_file' }, - master_ssl_ca_path => { src => 'master_ssl_ca_path' }, - master_ssl_cert => { src => 'master_ssl_cert' }, - master_ssl_cipher => { src => 'master_ssl_cipher' }, - master_ssl_key => { src => 'master_ssl_key' }, - master_user => { src => 'master_user' }, - read_master_log_pos => { src => 'read_master_log_pos', hdr => 'Pos' }, - relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, - slave_io_running => { src => 'slave_io_running', hdr => 'On?' }, - slave_io_state => { src => 'slave_io_state', hdr => 'State' }, - }, - visible => [ qw(cxn master_host slave_io_running master_log_file relay_log_size read_master_log_pos slave_io_state)], - filters => [ qw( cxn_is_slave ) ], - sort_cols => 'slave_io_running cxn', - colors => [ - { col => 'slave_io_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, - ], - sort_dir => '1', - innodb => '', - group_by => [], - aggregate => 0, - }, - slave_sql_status => { - capt => 'Slave SQL Status', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - exec_master_log_pos => { src => 'exec_master_log_pos', hdr => 'Master Pos' }, - last_errno => { src => 'last_errno' }, - last_error => { src => 'last_error' }, - master_host => { src => 'master_host', hdr => 'Master' }, - relay_log_file => { src => 'relay_log_file' }, - relay_log_pos => { src => 'relay_log_pos' }, - relay_log_size => { src => 'relay_log_space', trans => [qw(shorten)] }, - relay_master_log_file => { src => 'relay_master_log_file', hdr => 'Master File' }, - replicate_do_db => { src => 'replicate_do_db' }, - replicate_do_table => { src => 'replicate_do_table' }, - replicate_ignore_db => { src => 'replicate_ignore_db' }, - replicate_ignore_table => { src => 'replicate_ignore_table' }, - replicate_wild_do_table => { src => 'replicate_wild_do_table' }, - replicate_wild_ignore_table => { src => 'replicate_wild_ignore_table' }, - skip_counter => { src => 'skip_counter' }, - slave_sql_running => { src => 'slave_sql_running', hdr => 'On?' }, - until_condition => { src => 'until_condition' }, - until_log_file => { src => 'until_log_file' }, - until_log_pos => { src => 'until_log_pos' }, - time_behind_master => { src => 'seconds_behind_master', trans => [ qw(secs_to_time) ] }, - bytes_behind_master => { src => 'master_log_file && master_log_file eq relay_master_log_file ? read_master_log_pos - exec_master_log_pos : 0', trans => [qw(shorten)] }, - slave_catchup_rate => { src => $exprs{SlaveCatchupRate}, trans => [ qw(set_precision) ] }, - slave_open_temp_tables => { src => 'Slave_open_temp_tables' }, - }, - visible => [ qw(cxn master_host slave_sql_running time_behind_master slave_catchup_rate slave_open_temp_tables relay_log_pos last_error)], - filters => [ qw( cxn_is_slave ) ], - sort_cols => 'slave_sql_running cxn', - sort_dir => '1', - innodb => '', - colors => [ - { col => 'slave_sql_running', op => 'ne', arg => 'Yes', color => 'black on_red' }, - { col => 'time_behind_master', op => '>', arg => 600, color => 'red' }, - { col => 'time_behind_master', op => '>', arg => 60, color => 'yellow' }, - { col => 'time_behind_master', op => '==', arg => 0, color => 'white' }, - ], - group_by => [], - aggregate => 0, - }, - t_header => { - capt => 'T-Mode Header', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - dirty_bufs => { src => $exprs{DirtyBufs}, trans => [qw(percent)] }, - history_list_len => { src => 'IB_tx_history_list_len' }, - lock_structs => { src => 'IB_tx_num_lock_structs' }, - num_txns => { src => $exprs{NumTxns} }, - max_txn => { src => $exprs{MaxTxnTime}, trans => [qw(secs_to_time)] }, - undo_for => { src => 'IB_tx_purge_undo_for' }, - used_bufs => { src => $exprs{BufPoolFill}, trans => [qw(percent)]}, - versions => { src => $exprs{OldVersions} }, - }, - visible => [ qw(cxn history_list_len versions undo_for dirty_bufs used_bufs num_txns max_txn lock_structs)], - filters => [ ], - sort_cols => 'cxn', - sort_dir => '1', - innodb => '', - colors => [], - hide_caption => 1, - group_by => [], - aggregate => 0, - }, - var_status => { - capt => 'Variables & Status', - cust => {}, - cols => {}, # Generated from current varset - visible => [], # Generated from current varset - filters => [], - sort_cols => '', - sort_dir => 1, - innodb => '', - temp => 1, # Do not persist to config file. - hide_caption => 1, - pivot => 0, - group_by => [], - aggregate => 0, - }, - wait_array => { - capt => 'InnoDB Wait Array', - cust => {}, - cols => { - cxn => { src => 'cxn' }, - thread => { src => 'thread' }, - waited_at_filename => { src => 'waited_at_filename' }, - waited_at_line => { src => 'waited_at_line' }, - 'time' => { src => 'waited_secs', trans => [ qw(secs_to_time) ] }, - request_type => { src => 'request_type' }, - lock_mem_addr => { src => 'lock_mem_addr' }, - lock_cfile_name => { src => 'lock_cfile_name' }, - lock_cline => { src => 'lock_cline' }, - writer_thread => { src => 'writer_thread' }, - writer_lock_mode => { src => 'writer_lock_mode' }, - num_readers => { src => 'num_readers' }, - lock_var => { src => 'lock_var' }, - waiters_flag => { src => 'waiters_flag' }, - last_s_file_name => { src => 'last_s_file_name' }, - last_s_line => { src => 'last_s_line' }, - last_x_file_name => { src => 'last_x_file_name' }, - last_x_line => { src => 'last_x_line' }, - cell_waiting => { src => 'cell_waiting' }, - cell_event_set => { src => 'cell_event_set' }, - }, - visible => [ qw(cxn thread time waited_at_filename waited_at_line request_type num_readers lock_var waiters_flag cell_waiting cell_event_set)], - filters => [], - sort_cols => 'cxn -time', - sort_dir => '1', - innodb => 'sm', - group_by => [], - aggregate => 0, - }, -); - -# Initialize %tbl_meta from %columns and do some checks. -foreach my $table_name ( keys %tbl_meta ) { - my $table = $tbl_meta{$table_name}; - my $cols = $table->{cols}; - - foreach my $col_name ( keys %$cols ) { - my $col_def = $table->{cols}->{$col_name}; - die "I can't find a column named '$col_name' for '$table_name'" unless $columns{$col_name}; - $columns{$col_name}->{referenced} = 1; - - foreach my $prop ( keys %col_props ) { - # Each column gets non-existing values set from %columns or defaults from %col_props. - if ( !$col_def->{$prop} ) { - $col_def->{$prop} - = defined($columns{$col_name}->{$prop}) - ? $columns{$col_name}->{$prop} - : $col_props{$prop}; - } - } - - # Ensure transformations and aggregate functions are valid - die "Unknown aggregate function '$col_def->{agg}' " - . "for column '$col_name' in table '$table_name'" - unless exists $agg_funcs{$col_def->{agg}}; - foreach my $trans ( @{$col_def->{trans}} ) { - die "Unknown transformation '$trans' " - . "for column '$col_name' in table '$table_name'" - unless exists $trans_funcs{$trans}; - } - } - - # Ensure each column in visible and group_by exists in cols - foreach my $place ( qw(visible group_by) ) { - foreach my $col_name ( @{$table->{$place}} ) { - if ( !exists $cols->{$col_name} ) { - die "Column '$col_name' is listed in '$place' for '$table_name', but doesn't exist"; - } - } - } - - # Compile sort and color subroutines - $table->{sort_func} = make_sort_func($table); - $table->{color_func} = make_color_func($table); -} - -# This is for code cleanup: -{ - my @unused_cols = grep { !$columns{$_}->{referenced} } sort keys %columns; - if ( @unused_cols ) { - die "The following columns are not used: " - . join(' ', @unused_cols); - } -} - -# ########################################################################### -# Operating modes {{{3 -# ########################################################################### -my %modes = ( - B => { - hdr => 'InnoDB Buffers', - cust => {}, - note => 'Shows buffer info from InnoDB', - action_for => { - i => { - action => sub { toggle_config('status_inc') }, - label => 'Toggle incremental status display', - }, - }, - display_sub => \&display_B, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], - visible_tables => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)], - }, - C => { - hdr => 'Command Summary', - cust => {}, - note => 'Shows relative magnitude of variables', - action_for => { - s => { - action => sub { get_config_interactive('cmd_filter') }, - label => 'Choose variable prefix', - }, - }, - display_sub => \&display_C, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(cmd_summary)], - visible_tables => [qw(cmd_summary)], - }, - D => { - hdr => 'InnoDB Deadlocks', - cust => {}, - note => 'View InnoDB deadlock information', - action_for => { - c => { - action => sub { edit_table('deadlock_transactions') }, - label => 'Choose visible columns', - }, - w => { - action => \&create_deadlock, - label => 'Wipe deadlock status info by creating a deadlock', - }, - }, - display_sub => \&display_D, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(deadlock_transactions deadlock_locks)], - visible_tables => [qw(deadlock_transactions deadlock_locks)], - }, - F => { - hdr => 'InnoDB FK Err', - cust => {}, - note => 'View the latest InnoDB foreign key error', - action_for => {}, - display_sub => \&display_F, - connections => [], - server_group => '', - one_connection => 1, - tables => [qw(fk_error)], - visible_tables => [qw(fk_error)], - }, - I => { - hdr => 'InnoDB I/O Info', - cust => {}, - note => 'Shows I/O info (i/o, log...) from InnoDB', - action_for => { - i => { - action => sub { toggle_config('status_inc') }, - label => 'Toggle incremental status display', - }, - }, - display_sub => \&display_I, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(io_threads pending_io file_io_misc log_statistics)], - visible_tables => [qw(io_threads pending_io file_io_misc log_statistics)], - }, - L => { - hdr => 'Locks', - cust => {}, - note => 'Shows transaction locks', - action_for => { - a => { - action => sub { send_cmd_to_servers('CREATE TABLE IF NOT EXISTS test.innodb_lock_monitor(a int) ENGINE=InnoDB', 0, '', []); }, - label => 'Start the InnoDB Lock Monitor', - }, - o => { - action => sub { send_cmd_to_servers('DROP TABLE IF EXISTS test.innodb_lock_monitor', 0, '', []); }, - label => 'Stop the InnoDB Lock Monitor', - }, - }, - display_sub => \&display_L, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(innodb_locks)], - visible_tables => [qw(innodb_locks)], - }, - M => { - hdr => 'Replication Status', - cust => {}, - note => 'Shows replication (master and slave) status', - action_for => { - a => { - action => sub { send_cmd_to_servers('START SLAVE', 0, 'START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE = ?, MASTER_LOG_POS = ?', []); }, - label => 'Start slave(s)', - }, - i => { - action => sub { toggle_config('status_inc') }, - label => 'Toggle incremental status display', - }, - o => { - action => sub { send_cmd_to_servers('STOP SLAVE', 0, '', []); }, - label => 'Stop slave(s)', - }, - b => { - action => sub { purge_master_logs() }, - label => 'Purge unused master logs', - }, - }, - display_sub => \&display_M, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(slave_sql_status slave_io_status master_status)], - visible_tables => [qw(slave_sql_status slave_io_status master_status)], - }, - O => { - hdr => 'Open Tables', - cust => {}, - note => 'Shows open tables in MySQL', - action_for => { - r => { - action => sub { reverse_sort('open_tables'); }, - label => 'Reverse sort order', - }, - s => { - action => sub { choose_sort_cols('open_tables'); }, - label => "Choose sort column", - }, - }, - display_sub => \&display_O, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(open_tables)], - visible_tables => [qw(open_tables)], - }, - Q => { - hdr => 'Query List', - cust => {}, - note => 'Shows queries from SHOW FULL PROCESSLIST', - action_for => { - a => { - action => sub { toggle_filter('processlist', 'hide_self') }, - label => 'Toggle the innotop process', - }, - c => { - action => sub { edit_table('processlist') }, - label => 'Choose visible columns', - }, - e => { - action => sub { analyze_query('e'); }, - label => "Explain a thread's query", - }, - f => { - action => sub { analyze_query('f'); }, - label => "Show a thread's full query", - }, - h => { - action => sub { toggle_visible_table('Q', 'q_header') }, - label => 'Toggle the header on and off', - }, - i => { - action => sub { toggle_filter('processlist', 'hide_inactive') }, - label => 'Toggle idle processes', - }, - k => { - action => sub { kill_query('CONNECTION') }, - label => "Kill a query's connection", - }, - r => { - action => sub { reverse_sort('processlist'); }, - label => 'Reverse sort order', - }, - s => { - action => sub { choose_sort_cols('processlist'); }, - label => "Change the display's sort column", - }, - x => { - action => sub { kill_query('QUERY') }, - label => "Kill a query", - }, - }, - display_sub => \&display_Q, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(q_header processlist)], - visible_tables => [qw(q_header processlist)], - }, - R => { - hdr => 'InnoDB Row Ops', - cust => {}, - note => 'Shows InnoDB row operation and semaphore info', - action_for => { - i => { - action => sub { toggle_config('status_inc') }, - label => 'Toggle incremental status display', - }, - }, - display_sub => \&display_R, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(row_operations row_operation_misc semaphores wait_array)], - visible_tables => [qw(row_operations row_operation_misc semaphores wait_array)], - }, - S => { - hdr => 'Variables & Status', - cust => {}, - note => 'Shows query load statistics a la vmstat', - action_for => { - '>' => { - action => sub { switch_var_set('S_set', 1) }, - label => 'Switch to next variable set', - }, - '<' => { - action => sub { switch_var_set('S_set', -1) }, - label => 'Switch to prev variable set', - }, - c => { - action => sub { - choose_var_set('S_set'); - start_S_mode(); - }, - label => "Choose which set to display", - }, - e => { - action => \&edit_current_var_set, - label => 'Edit the current set of variables', - }, - i => { - action => sub { $clear_screen_sub->(); toggle_config('status_inc') }, - label => 'Toggle incremental status display', - }, - '-' => { - action => sub { set_display_precision(-1) }, - label => 'Decrease fractional display precision', - }, - '+' => { - action => sub { set_display_precision(1) }, - label => 'Increase fractional display precision', - }, - g => { - action => sub { set_s_mode('g') }, - label => 'Switch to graph (tload) view', - }, - s => { - action => sub { set_s_mode('s') }, - label => 'Switch to standard (vmstat) view', - }, - v => { - action => sub { set_s_mode('v') }, - label => 'Switch to pivoted view', - }, - }, - display_sub => \&display_S, - no_clear_screen => 1, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(var_status)], - visible_tables => [qw(var_status)], - }, - T => { - hdr => 'InnoDB Txns', - cust => {}, - note => 'Shows InnoDB transactions in top-like format', - action_for => { - a => { - action => sub { toggle_filter('innodb_transactions', 'hide_self') }, - label => 'Toggle the innotop process', - }, - c => { - action => sub { edit_table('innodb_transactions') }, - label => 'Choose visible columns', - }, - e => { - action => sub { analyze_query('e'); }, - label => "Explain a thread's query", - }, - f => { - action => sub { analyze_query('f'); }, - label => "Show a thread's full query", - }, - h => { - action => sub { toggle_visible_table('T', 't_header') }, - label => 'Toggle the header on and off', - }, - i => { - action => sub { toggle_filter('innodb_transactions', 'hide_inactive') }, - label => 'Toggle inactive transactions', - }, - k => { - action => sub { kill_query('CONNECTION') }, - label => "Kill a transaction's connection", - }, - r => { - action => sub { reverse_sort('innodb_transactions'); }, - label => 'Reverse sort order', - }, - s => { - action => sub { choose_sort_cols('innodb_transactions'); }, - label => "Change the display's sort column", - }, - x => { - action => sub { kill_query('QUERY') }, - label => "Kill a query", - }, - }, - display_sub => \&display_T, - connections => [], - server_group => '', - one_connection => 0, - tables => [qw(t_header innodb_transactions)], - visible_tables => [qw(t_header innodb_transactions)], - }, -); - -# ########################################################################### -# Global key mappings {{{3 -# Keyed on a single character, which is read from the keyboard. Uppercase -# letters switch modes. Lowercase letters access commands when in a mode. -# These can be overridden by action_for in %modes. -# ########################################################################### -my %action_for = ( - '$' => { - action => \&edit_configuration, - label => 'Edit configuration settings', - }, - '?' => { - action => \&display_help, - label => 'Show help', - }, - '!' => { - action => \&display_license, - label => 'Show license and warranty', - }, - '^' => { - action => \&edit_table, - label => "Edit the displayed table(s)", - }, - '#' => { - action => \&choose_server_groups, - label => 'Select/create server groups', - }, - '@' => { - action => \&choose_servers, - label => 'Select/create server connections', - }, - '/' => { - action => \&add_quick_filter, - label => 'Quickly filter what you see', - }, - '\\' => { - action => \&clear_quick_filters, - label => 'Clear quick-filters', - }, - '%' => { - action => \&choose_filters, - label => 'Choose and edit table filters', - }, - "\t" => { - action => \&next_server_group, - label => 'Switch to the next server group', - key => 'TAB', - }, - '=' => { - action => \&toggle_aggregate, - label => 'Toggle aggregation', - }, - # TODO: can these be auto-generated from %modes? - B => { - action => sub { switch_mode('B') }, - label => '', - }, - C => { - action => sub { switch_mode('C') }, - label => '', - }, - D => { - action => sub { switch_mode('D') }, - label => '', - }, - F => { - action => sub { switch_mode('F') }, - label => '', - }, - I => { - action => sub { switch_mode('I') }, - label => '', - }, - L => { - action => sub { switch_mode('L') }, - label => '', - }, - M => { - action => sub { switch_mode('M') }, - label => '', - }, - O => { - action => sub { switch_mode('O') }, - label => '', - }, - Q => { - action => sub { switch_mode('Q') }, - label => '', - }, - R => { - action => sub { switch_mode('R') }, - label => '', - }, - S => { - action => \&start_S_mode, - label => '', - }, - T => { - action => sub { switch_mode('T') }, - label => '', - }, - d => { - action => sub { get_config_interactive('interval') }, - label => 'Change refresh interval', - }, - n => { action => \&next_server, label => 'Switch to the next connection' }, - p => { action => \&pause, label => 'Pause innotop', }, - q => { action => \&finish, label => 'Quit innotop', }, -); - -# ########################################################################### -# Sleep times after certain statements {{{3 -# ########################################################################### -my %stmt_sleep_time_for = (); - -# ########################################################################### -# Config editor key mappings {{{3 -# ########################################################################### -my %cfg_editor_action = ( - c => { - note => 'Edit columns, etc in the displayed table(s)', - func => \&edit_table, - }, - g => { - note => 'Edit general configuration', - func => \&edit_configuration_variables, - }, - k => { - note => 'Edit row-coloring rules', - func => \&edit_color_rules, - }, - p => { - note => 'Manage plugins', - func => \&edit_plugins, - }, - s => { - note => 'Edit server groups', - func => \&edit_server_groups, - }, - S => { - note => 'Edit SQL statement sleep delays', - func => \&edit_stmt_sleep_times, - }, - t => { - note => 'Choose which table(s) to display in this mode', - func => \&choose_mode_tables, - }, -); - -# ########################################################################### -# Color editor key mappings {{{3 -# ########################################################################### -my %color_editor_action = ( - n => { - note => 'Create a new color rule', - func => sub { - my ( $tbl, $idx ) = @_; - my $meta = $tbl_meta{$tbl}; - - $clear_screen_sub->(); - my $col; - do { - $col = prompt_list( - 'Choose the target column for the rule', - '', - sub { return keys %{$meta->{cols}} }, - { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); - } while ( !$col ); - ( $col ) = grep { $_ } split(/\W+/, $col); - return $idx unless $col && exists $meta->{cols}->{$col}; - - $clear_screen_sub->(); - my $op; - do { - $op = prompt_list( - 'Choose the comparison operator for the rule', - '', - sub { return keys %comp_ops }, - { map { $_ => $comp_ops{$_} } keys %comp_ops } ); - } until ( $op ); - $op =~ s/\s+//g; - return $idx unless $op && exists $comp_ops{$op}; - - my $arg; - do { - $arg = prompt('Specify an argument for the comparison'); - } until defined $arg; - - my $color; - do { - $color = prompt_list( - 'Choose the color(s) the row should be when the rule matches', - '', - sub { return keys %ansicolors }, - { map { $_ => $_ } keys %ansicolors } ); - } until defined $color; - $color = join(' ', unique(grep { exists $ansicolors{$_} } split(/\W+/, $color))); - return $idx unless $color; - - push @{$tbl_meta{$tbl}->{colors}}, { - col => $col, - op => $op, - arg => $arg, - color => $color - }; - $tbl_meta{$tbl}->{cust}->{colors} = 1; - - return $idx; - }, - }, - d => { - note => 'Remove the selected rule', - func => sub { - my ( $tbl, $idx ) = @_; - my @rules = @{ $tbl_meta{$tbl}->{colors} }; - return 0 unless @rules > 0 && $idx < @rules && $idx >= 0; - splice(@{$tbl_meta{$tbl}->{colors}}, $idx, 1); - $tbl_meta{$tbl}->{cust}->{colors} = 1; - return $idx == @rules ? $#rules : $idx; - }, - }, - j => { - note => 'Move highlight down one', - func => sub { - my ( $tbl, $idx ) = @_; - my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; - return ($idx + 1) % $num_rules; - }, - }, - k => { - note => 'Move highlight up one', - func => sub { - my ( $tbl, $idx ) = @_; - my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}}; - return ($idx - 1) % $num_rules; - }, - }, - '+' => { - note => 'Move selected rule up one', - func => sub { - my ( $tbl, $idx ) = @_; - my $meta = $tbl_meta{$tbl}; - my $dest = $idx == 0 ? scalar(@{$meta->{colors}} - 1) : $idx - 1; - my $temp = $meta->{colors}->[$idx]; - $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; - $meta->{colors}->[$dest] = $temp; - $meta->{cust}->{colors} = 1; - return $dest; - }, - }, - '-' => { - note => 'Move selected rule down one', - func => sub { - my ( $tbl, $idx ) = @_; - my $meta = $tbl_meta{$tbl}; - my $dest = $idx == scalar(@{$meta->{colors}} - 1) ? 0 : $idx + 1; - my $temp = $meta->{colors}->[$idx]; - $meta->{colors}->[$idx] = $meta->{colors}->[$dest]; - $meta->{colors}->[$dest] = $temp; - $meta->{cust}->{colors} = 1; - return $dest; - }, - }, -); - -# ########################################################################### -# Plugin editor key mappings {{{3 -# ########################################################################### -my %plugin_editor_action = ( - '*' => { - note => 'Toggle selected plugin active/inactive', - func => sub { - my ( $plugins, $idx ) = @_; - my $plugin = $plugins->[$idx]; - $plugin->{active} = $plugin->{active} ? 0 : 1; - return $idx; - }, - }, - j => { - note => 'Move highlight down one', - func => sub { - my ( $plugins, $idx ) = @_; - return ($idx + 1) % scalar(@$plugins); - }, - }, - k => { - note => 'Move highlight up one', - func => sub { - my ( $plugins, $idx ) = @_; - return $idx == 0 ? @$plugins - 1 : $idx - 1; - }, - }, -); - -# ########################################################################### -# Table editor key mappings {{{3 -# ########################################################################### -my %tbl_editor_action = ( - a => { - note => 'Add a column to the table', - func => sub { - my ( $tbl, $col ) = @_; - my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; - my %all_cols = %{ $tbl_meta{$tbl}->{cols} }; - delete @all_cols{@visible_cols}; - my $choice = prompt_list( - 'Choose a column', - '', - sub { return keys %all_cols; }, - { map { $_ => $all_cols{$_}->{label} || $all_cols{$_}->{hdr} } keys %all_cols }); - if ( $all_cols{$choice} ) { - push @{$tbl_meta{$tbl}->{visible}}, $choice; - $tbl_meta{$tbl}->{cust}->{visible} = 1; - return $choice; - } - return $col; - }, - }, - n => { - note => 'Create a new column and add it to the table', - func => sub { - my ( $tbl, $col ) = @_; - - $clear_screen_sub->(); - print word_wrap("Choose a name for the column. This name is not displayed, and is used only " - . "for internal reference. It can contain only lowercase letters, numbers, " - . "and underscores."); - print "\n\n"; - do { - $col = prompt("Enter column name"); - $col = '' if $col =~ m/[^a-z0-9_]/; - } while ( !$col ); - - $clear_screen_sub->(); - my $hdr; - do { - $hdr = prompt("Enter column header"); - } while ( !$hdr ); - - $clear_screen_sub->(); - print "Choose a source for the column's data\n\n"; - my ( $src, $sub, $err ); - do { - if ( $err ) { - print "Error: $err\n\n"; - } - $src = prompt("Enter column source"); - if ( $src ) { - ( $sub, $err ) = compile_expr($src); - } - } until ( !$err); - - # TODO: this duplicates %col_props. - $tbl_meta{$tbl}->{cols}->{$col} = { - hdr => $hdr, - src => $src, - just => '-', - num => 0, - label => 'User-defined', - user => 1, - tbl => $tbl, - minw => 0, - maxw => 0, - trans => [], - func => $sub, - dec => 0, - agg => 0, - aggonly => 0, - }; - - $tbl_meta{$tbl}->{visible} = [ unique(@{$tbl_meta{$tbl}->{visible}}, $col) ]; - $tbl_meta{$tbl}->{cust}->{visible} = 1; - return $col; - }, - }, - d => { - note => 'Remove selected column', - func => sub { - my ( $tbl, $col ) = @_; - my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; - my $idx = 0; - return $col unless @visible_cols > 1; - while ( $visible_cols[$idx] ne $col ) { - $idx++; - } - $tbl_meta{$tbl}->{visible} = [ grep { $_ ne $col } @visible_cols ]; - $tbl_meta{$tbl}->{cust}->{visible} = 1; - return $idx == $#visible_cols ? $visible_cols[$idx - 1] : $visible_cols[$idx + 1]; - }, - }, - e => { - note => 'Edit selected column', - func => sub { - # TODO: make this editor hotkey-driven and give readline support. - my ( $tbl, $col ) = @_; - $clear_screen_sub->(); - my $meta = $tbl_meta{$tbl}->{cols}->{$col}; - my @prop = qw(hdr label src just num minw maxw trans agg); # TODO redundant - - my $answer; - do { - # Do what the user asked... - if ( $answer && grep { $_ eq $answer } @prop ) { - # Some properties are arrays, others scalars. - my $ini = ref $col_props{$answer} ? join(' ', @{$meta->{$answer}}) : $meta->{$answer}; - my $val = prompt("New value for $answer", undef, $ini); - $val = [ split(' ', $val) ] if ref($col_props{$answer}); - if ( $answer eq 'trans' ) { - $val = [ unique(grep{ exists $trans_funcs{$_} } @$val) ]; - } - @{$meta}{$answer, 'user', 'tbl' } = ( $val, 1, $tbl ); - } - - my @display_lines = ( - '', - "You are editing column $tbl.$col.\n", - ); - - push @display_lines, create_table2( - \@prop, - { map { $_ => $_ } @prop }, - { map { $_ => ref $meta->{$_} eq 'ARRAY' ? join(' ', @{$meta->{$_}}) - : ref $meta->{$_} ? '[expression code]' - : $meta->{$_} - } @prop - }, - { sep => ' ' }); - draw_screen(\@display_lines, { raw => 1 }); - print "\n\n"; # One to add space, one to clear readline artifacts - $answer = prompt('Edit what? (q to quit)'); - } while ( $answer ne 'q' ); - - return $col; - }, - }, - j => { - note => 'Move highlight down one', - func => sub { - my ( $tbl, $col ) = @_; - my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; - my $idx = 0; - while ( $visible_cols[$idx] ne $col ) { - $idx++; - } - return $visible_cols[ ($idx + 1) % @visible_cols ]; - }, - }, - k => { - note => 'Move highlight up one', - func => sub { - my ( $tbl, $col ) = @_; - my @visible_cols = @{ $tbl_meta{$tbl}->{visible} }; - my $idx = 0; - while ( $visible_cols[$idx] ne $col ) { - $idx++; - } - return $visible_cols[ $idx - 1 ]; - }, - }, - '+' => { - note => 'Move selected column up one', - func => sub { - my ( $tbl, $col ) = @_; - my $meta = $tbl_meta{$tbl}; - my @visible_cols = @{$meta->{visible}}; - my $idx = 0; - while ( $visible_cols[$idx] ne $col ) { - $idx++; - } - if ( $idx ) { - $visible_cols[$idx] = $visible_cols[$idx - 1]; - $visible_cols[$idx - 1] = $col; - $meta->{visible} = \@visible_cols; - } - else { - shift @{$meta->{visible}}; - push @{$meta->{visible}}, $col; - } - $meta->{cust}->{visible} = 1; - return $col; - }, - }, - '-' => { - note => 'Move selected column down one', - func => sub { - my ( $tbl, $col ) = @_; - my $meta = $tbl_meta{$tbl}; - my @visible_cols = @{$meta->{visible}}; - my $idx = 0; - while ( $visible_cols[$idx] ne $col ) { - $idx++; - } - if ( $idx == $#visible_cols ) { - unshift @{$meta->{visible}}, $col; - pop @{$meta->{visible}}; - } - else { - $visible_cols[$idx] = $visible_cols[$idx + 1]; - $visible_cols[$idx + 1] = $col; - $meta->{visible} = \@visible_cols; - } - $meta->{cust}->{visible} = 1; - return $col; - }, - }, - f => { - note => 'Choose filters', - func => sub { - my ( $tbl, $col ) = @_; - choose_filters($tbl); - return $col; - }, - }, - o => { - note => 'Edit color rules', - func => sub { - my ( $tbl, $col ) = @_; - edit_color_rules($tbl); - return $col; - }, - }, - s => { - note => 'Choose sort columns', - func => sub { - my ( $tbl, $col ) = @_; - choose_sort_cols($tbl); - return $col; - }, - }, - g => { - note => 'Choose group-by (aggregate) columns', - func => sub { - my ( $tbl, $col ) = @_; - choose_group_cols($tbl); - return $col; - }, - }, -); - -# ########################################################################### -# Global variables and environment {{{2 -# ########################################################################### - -my @this_term_size; # w_chars, h_chars, w_pix, h_pix -my @last_term_size; # w_chars, h_chars, w_pix, h_pix -my $char; -my $windows = $OSNAME =~ m/MSWin/; -my $have_color = 0; -my $MAX_ULONG = 4294967295; # 2^32-1 -my $num_regex = qr/^[+-]?(?=\d|\.)\d*(?:\.\d+)?(?:E[+-]?\d+|)$/i; -my $int_regex = qr/^\d+$/; -my $bool_regex = qr/^[01]$/; -my $term = undef; -my $file = undef; # File to watch for InnoDB monitor output -my $file_mtime = undef; # Status of watched file -my $file_data = undef; # Last chunk of text read from file -my $innodb_parser = InnoDBParser->new; - -my $nonfatal_errs = join('|', - 'Access denied for user', - 'Unknown MySQL server host', - 'Unknown database', - 'Can\'t connect to local MySQL server through socket', - 'Can\'t connect to MySQL server on', - 'MySQL server has gone away', - 'Cannot call SHOW INNODB STATUS', - 'Access denied', - 'AutoCommit', -); - -if ( !$opts{n} ) { - require Term::ReadLine; - $term = Term::ReadLine->new('innotop'); -} - -# Stores status, variables, innodb status, master/slave status etc. -# Keyed on connection name. Each entry is a hashref of current and past data sets, -# keyed on clock tick. -my %vars; -my %info_gotten = (); # Which things have been retrieved for the current clock tick. - -# Stores info on currently displayed queries: cxn, connection ID, query text. -my @current_queries; - -my $lines_printed = 0; -my $clock = 0; # Incremented with every wake-sleep cycle -my $clearing_deadlocks = 0; - -# Find the home directory; it's different on different OSes. -my $homepath = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.'; - -# If terminal coloring is available, use it. The only function I want from -# the module is the colored() function. -eval { - if ( !$opts{n} ) { - if ( $windows ) { - require Win32::Console::ANSI; - } - require Term::ANSIColor; - import Term::ANSIColor qw(colored); - $have_color = 1; - } -}; -if ( $EVAL_ERROR || $opts{n} ) { - # If there was an error, manufacture my own colored() function that does no - # coloring. - *colored = sub { pop @_; @_; }; -} - -if ( $opts{n} ) { - $clear_screen_sub = sub {}; -} -elsif ( $windows ) { - $clear_screen_sub = sub { $lines_printed = 0; system("cls") }; -} -else { - my $clear = `clear`; - $clear_screen_sub = sub { $lines_printed = 0; print $clear }; -} - -# ########################################################################### -# Config storage. {{{2 -# ########################################################################### -my %config = ( - color => { - val => $have_color, - note => 'Whether to use terminal coloring', - conf => 'ALL', - pat => $bool_regex, - }, - cmd_filter => { - val => 'Com_', - note => 'Prefix for values in C mode', - conf => [qw(C)], - }, - plugin_dir => { - val => "$homepath/.innotop/plugins", - note => 'Directory where plugins can be found', - conf => 'ALL', - }, - show_percent => { - val => 1, - note => 'Show the % symbol after percentages', - conf => 'ALL', - pat => $bool_regex, - }, - skip_innodb => { - val => 0, - note => 'Disable SHOW INNODB STATUS', - conf => 'ALL', - pat => $bool_regex, - }, - S_func => { - val => 's', - note => 'What to display in S mode: graph, status, pivoted status', - conf => [qw(S)], - pat => qr/^[gsv]$/, - }, - cxn_timeout => { - val => 28800, - note => 'Connection timeout for keeping unused connections alive', - conf => 'ALL', - pat => $int_regex, - }, - graph_char => { - val => '*', - note => 'Character for drawing graphs', - conf => [ qw(S) ], - pat => qr/^.$/, - }, - show_cxn_errors_in_tbl => { - val => 1, - note => 'Whether to display connection errors as rows in the table', - conf => 'ALL', - pat => $bool_regex, - }, - hide_hdr => { - val => 0, - note => 'Whether to show column headers', - conf => 'ALL', - pat => $bool_regex, - }, - show_cxn_errors => { - val => 1, - note => 'Whether to print connection errors to STDOUT', - conf => 'ALL', - pat => $bool_regex, - }, - readonly => { - val => 0, - note => 'Whether the config file is read-only', - conf => [ qw() ], - pat => $bool_regex, - }, - global => { - val => 1, - note => 'Whether to show GLOBAL variables and status', - conf => 'ALL', - pat => $bool_regex, - }, - header_highlight => { - val => 'bold', - note => 'How to highlight table column headers', - conf => 'ALL', - pat => qr/^(?:bold|underline)$/, - }, - display_table_captions => { - val => 1, - note => 'Whether to put captions on tables', - conf => 'ALL', - pat => $bool_regex, - }, - charset => { - val => 'ascii', - note => 'What type of characters should be displayed in queries (ascii, unicode, none)', - conf => 'ALL', - pat => qr/^(?:ascii|unicode|none)$/, - }, - auto_wipe_dl => { - val => 0, - note => 'Whether to auto-wipe InnoDB deadlocks', - conf => 'ALL', - pat => $bool_regex, - }, - max_height => { - val => 30, - note => '[Win32] Max window height', - conf => 'ALL', - }, - debug => { - val => 0, - pat => $bool_regex, - note => 'Debug mode (more verbose errors, uses more memory)', - conf => 'ALL', - }, - num_digits => { - val => 2, - pat => $int_regex, - note => 'How many digits to show in fractional numbers and percents', - conf => 'ALL', - }, - debugfile => { - val => "$homepath/.innotop/core_dump", - note => 'A debug file in case you are interested in error output', - }, - show_statusbar => { - val => 1, - pat => $bool_regex, - note => 'Whether to show the status bar in the display', - conf => 'ALL', - }, - mode => { - val => "T", - note => "Which mode to start in", - cmdline => 1, - }, - status_inc => { - val => 0, - note => 'Whether to show raw or incremental values for status variables', - pat => $bool_regex, - }, - interval => { - val => 10, - pat => qr/^(?:(?:\d*?[1-9]\d*(?:\.\d*)?)|(?:\d*\.\d*?[1-9]\d*))$/, - note => "The interval at which the display will be refreshed. Fractional values allowed.", - }, - num_status_sets => { - val => 9, - pat => $int_regex, - note => 'How many sets of STATUS and VARIABLES values to show', - conf => [ qw(S) ], - }, - S_set => { - val => 'general', - pat => qr/^\w+$/, - note => 'Which set of variables to display in S (Variables & Status) mode', - conf => [ qw(S) ], - }, -); - -# ########################################################################### -# Config file sections {{{2 -# The configuration file is broken up into sections like a .ini file. This -# variable defines those sections and the subroutines responsible for reading -# and writing them. -# ########################################################################### -my %config_file_sections = ( - plugins => { - reader => \&load_config_plugins, - writer => \&save_config_plugins, - }, - group_by => { - reader => \&load_config_group_by, - writer => \&save_config_group_by, - }, - filters => { - reader => \&load_config_filters, - writer => \&save_config_filters, - }, - active_filters => { - reader => \&load_config_active_filters, - writer => \&save_config_active_filters, - }, - visible_tables => { - reader => \&load_config_visible_tables, - writer => \&save_config_visible_tables, - }, - sort_cols => { - reader => \&load_config_sort_cols, - writer => \&save_config_sort_cols, - }, - active_columns => { - reader => \&load_config_active_columns, - writer => \&save_config_active_columns, - }, - tbl_meta => { - reader => \&load_config_tbl_meta, - writer => \&save_config_tbl_meta, - }, - general => { - reader => \&load_config_config, - writer => \&save_config_config, - }, - connections => { - reader => \&load_config_connections, - writer => \&save_config_connections, - }, - active_connections => { - reader => \&load_config_active_connections, - writer => \&save_config_active_connections, - }, - server_groups => { - reader => \&load_config_server_groups, - writer => \&save_config_server_groups, - }, - active_server_groups => { - reader => \&load_config_active_server_groups, - writer => \&save_config_active_server_groups, - }, - max_values_seen => { - reader => \&load_config_mvs, - writer => \&save_config_mvs, - }, - varsets => { - reader => \&load_config_varsets, - writer => \&save_config_varsets, - }, - colors => { - reader => \&load_config_colors, - writer => \&save_config_colors, - }, - stmt_sleep_times => { - reader => \&load_config_stmt_sleep_times, - writer => \&save_config_stmt_sleep_times, - }, -); - -# Config file sections have some dependencies, so they have to be read/written in order. -my @ordered_config_file_sections = qw(general plugins filters active_filters tbl_meta - connections active_connections server_groups active_server_groups max_values_seen - active_columns sort_cols visible_tables varsets colors stmt_sleep_times - group_by); - -# All events for which plugins may register themselves. Entries are arrayrefs. -my %event_listener_for = map { $_ => [] } - qw( - extract_values - set_to_tbl_pre_filter set_to_tbl_pre_sort set_to_tbl_pre_group - set_to_tbl_pre_colorize set_to_tbl_pre_transform set_to_tbl_pre_pivot - set_to_tbl_pre_create set_to_tbl_post_create - draw_screen - ); - -# All variables to which plugins have access. -my %pluggable_vars = ( - action_for => \%action_for, - agg_funcs => \%agg_funcs, - config => \%config, - connections => \%connections, - dbhs => \%dbhs, - filters => \%filters, - modes => \%modes, - server_groups => \%server_groups, - tbl_meta => \%tbl_meta, - trans_funcs => \%trans_funcs, - var_sets => \%var_sets, -); - -# ########################################################################### -# Contains logic to generate prepared statements for a given function for a -# given DB connection. Returns a $sth. -# ########################################################################### -my %stmt_maker_for = ( - INNODB_STATUS => sub { - my ( $dbh ) = @_; - return $dbh->prepare(version_ge( $dbh, '5.0.0' ) - ? 'SHOW ENGINE INNODB STATUS' - : 'SHOW INNODB STATUS'); - }, - SHOW_VARIABLES => sub { - my ( $dbh ) = @_; - return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '4.0.3' ) - ? 'SHOW GLOBAL VARIABLES' - : 'SHOW VARIABLES'); - }, - SHOW_STATUS => sub { - my ( $dbh ) = @_; - return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '5.0.2' ) - ? 'SHOW GLOBAL STATUS' - : 'SHOW STATUS'); - }, - KILL_QUERY => sub { - my ( $dbh ) = @_; - return $dbh->prepare(version_ge( $dbh, '5.0.0' ) - ? 'KILL QUERY ?' - : 'KILL ?'); - }, - SHOW_MASTER_LOGS => sub { - my ( $dbh ) = @_; - return $dbh->prepare('SHOW MASTER LOGS'); - }, - SHOW_MASTER_STATUS => sub { - my ( $dbh ) = @_; - return $dbh->prepare('SHOW MASTER STATUS'); - }, - SHOW_SLAVE_STATUS => sub { - my ( $dbh ) = @_; - return $dbh->prepare('SHOW SLAVE STATUS'); - }, - KILL_CONNECTION => sub { - my ( $dbh ) = @_; - return $dbh->prepare(version_ge( $dbh, '5.0.0' ) - ? 'KILL CONNECTION ?' - : 'KILL ?'); - }, - OPEN_TABLES => sub { - my ( $dbh ) = @_; - return version_ge($dbh, '4.0.0') - ? $dbh->prepare('SHOW OPEN TABLES') - : undef; - }, - PROCESSLIST => sub { - my ( $dbh ) = @_; - return $dbh->prepare('SHOW FULL PROCESSLIST'); - }, -); - -# Plugins! -my %plugins = ( -); - -# ########################################################################### -# Run the program {{{1 -# ########################################################################### - -# This config variable is only useful for MS Windows because its terminal -# can't tell how tall it is. -if ( !$windows ) { - delete $config{max_height}; -} - -# Try to lower my priority. -eval { setpriority(0, 0, getpriority(0, 0) + 10); }; - -# Print stuff to the screen immediately, don't wait for a newline. -$OUTPUT_AUTOFLUSH = 1; - -# Clear the screen and load the configuration. -$clear_screen_sub->(); -load_config(); -post_process_tbl_meta(); - -# Make sure no changes are written to config file in non-interactive mode. -if ( $opts{n} ) { - $config{readonly}->{val} = 1; -} - -eval { - - # Open the file for InnoDB status - if ( @ARGV ) { - my $filename = shift @ARGV; - open $file, "<", $filename - or die "Cannot open '$filename': $OS_ERROR"; - } - - # In certain modes we might have to collect data for two cycles - # before printing anything out, so we need to bump up the count one. - if ( $opts{n} && $opts{count} && $config{status_inc}->{val} - && $config{mode}->{val} =~ m/[S]/ ) - { - $opts{count}++; - } - - while (++$clock) { - - my $mode = $config{mode}->{val} || 'T'; - if ( !$modes{$mode} ) { - die "Mode '$mode' doesn't exist; try one of these:\n" - . join("\n", map { " $_ $modes{$_}->{hdr}" } sort keys %modes) - . "\n"; - } - - if ( !$opts{n} ) { - @last_term_size = @this_term_size; - @this_term_size = Term::ReadKey::GetTerminalSize(\*STDOUT); - if ( $windows ) { - $this_term_size[0]--; - $this_term_size[1] - = min($this_term_size[1], $config{max_height}->{val}); - } - die("Can't read terminal size") unless @this_term_size; - } - - # If there's no connection to a database server, we need to fix that... - if ( !%connections ) { - print "You have not defined any database connections.\n\n"; - add_new_dsn(); - } - - # See whether there are any connections defined for this mode. If there's only one - # connection total, assume the user wants to just use innotop for a single server - # and don't ask which server to connect to. Also, if we're monitoring from a file, - # we just use the first connection. - if ( !get_connections() ) { - if ( $file || 1 == scalar keys %connections ) { - $modes{$config{mode}->{val}}->{connections} = [ keys %connections ]; - } - else { - choose_connections(); - } - } - - # Term::ReadLine might have re-set $OUTPUT_AUTOFLUSH. - $OUTPUT_AUTOFLUSH = 1; - - # Prune old data - my $sets = $config{num_status_sets}->{val}; - foreach my $store ( values %vars ) { - delete @{$store}{ grep { $_ < $clock - $sets } keys %$store }; - } - %info_gotten = (); - - # Call the subroutine to display this mode. - $modes{$mode}->{display_sub}->(); - - # It may be time to quit now. - if ( $opts{count} && $clock >= $opts{count} ) { - finish(); - } - - # Wait for a bit. - if ( $opts{n} ) { - sleep($config{interval}->{val}); - } - else { - ReadMode('cbreak'); - $char = ReadKey($config{interval}->{val}); - ReadMode('normal'); - } - - # Handle whatever action the key indicates. - do_key_action(); - - } -}; -if ( $EVAL_ERROR ) { - core_dump( $EVAL_ERROR ); -} -finish(); - -# Subroutines {{{1 -# Mode functions{{{2 -# switch_mode {{{3 -sub switch_mode { - my $mode = shift; - $config{mode}->{val} = $mode; -} - -# Prompting functions {{{2 -# prompt_list {{{3 -# Prompts the user for a value, given a question, initial value, -# a completion function and a hashref of hints. -sub prompt_list { - die "Can't call in non-interactive mode" if $opts{n}; - my ( $question, $init, $completion, $hints ) = @_; - if ( $hints ) { - # Figure out how wide the table will be - my $max_name = max(map { length($_) } keys %$hints ); - $max_name ||= 0; - $max_name += 3; - my @meta_rows = create_table2( - [ sort keys %$hints ], - { map { $_ => $_ } keys %$hints }, - { map { $_ => trunc($hints->{$_}, $this_term_size[0] - $max_name) } keys %$hints }, - { sep => ' ' }); - if (@meta_rows > 10) { - # Try to split and stack the meta rows next to each other - my $split = int(@meta_rows / 2); - @meta_rows = stack_next( - [@meta_rows[0..$split - 1]], - [@meta_rows[$split..$#meta_rows]], - { pad => ' | '}, - ); - } - print join( "\n", - '', - map { ref $_ ? colored(@$_) : $_ } create_caption('Choose from', @meta_rows), ''), - "\n"; - } - $term->Attribs->{completion_function} = $completion; - my $answer = $term->readline("$question: ", $init); - $OUTPUT_AUTOFLUSH = 1; - $answer = '' if !defined($answer); - $answer =~ s/\s+$//; - return $answer; -} - -# prompt {{{3 -# Prints out a prompt and reads from the keyboard, then validates with the -# validation regex until the input is correct. -sub prompt { - die "Can't call in non-interactive mode" if $opts{n}; - my ( $prompt, $regex, $init, $completion ) = @_; - my $response; - my $success = 0; - do { - if ( $completion ) { - $term->Attribs->{completion_function} = $completion; - } - $response = $term->readline("$prompt: ", $init); - if ( $regex && $response !~ m/$regex/ ) { - print "Invalid response.\n\n"; - } - else { - $success = 1; - } - } while ( !$success ); - $OUTPUT_AUTOFLUSH = 1; - $response =~ s/\s+$//; - return $response; -} - -# prompt_noecho {{{3 -# Unfortunately, suppressing echo with Term::ReadLine isn't reliable; the user might not -# have that library, or it might not support that feature. -sub prompt_noecho { - my ( $prompt ) = @_; - print colored("$prompt: ", 'underline'); - my $response; - ReadMode('noecho'); - $response = ; - chomp($response); - ReadMode('normal'); - return $response; -} - -# do_key_action {{{3 -# Depending on whether a key was read, do something. Keys have certain -# actions defined in lookup tables. Each mode may have its own lookup table, -# which trumps the global table -- so keys can be context-sensitive. The key -# may be read and written in a subroutine, so it's a global. -sub do_key_action { - if ( defined $char ) { - my $mode = $config{mode}->{val}; - my $action - = defined($modes{$mode}->{action_for}->{$char}) - ? $modes{$mode}->{action_for}->{$char}->{action} - : defined($action_for{$char}) - ? $action_for{$char}->{action} - : sub{}; - $action->(); - } -} - -# pause {{{3 -sub pause { - die "Can't call in non-interactive mode" if $opts{n}; - my $msg = shift; - print defined($msg) ? "\n$msg" : "\nPress any key to continue"; - ReadMode('cbreak'); - my $char = ReadKey(0); - ReadMode('normal'); - return $char; -} - -# reverse_sort {{{3 -sub reverse_sort { - my $tbl = shift; - $tbl_meta{$tbl}->{sort_dir} *= -1; -} - -# select_cxn {{{3 -# Selects connection(s). If the mode (or argument list) has only one, returns -# it without prompt. -sub select_cxn { - my ( $prompt, @cxns ) = @_; - if ( !@cxns ) { - @cxns = get_connections(); - } - if ( @cxns == 1 ) { - return $cxns[0]; - } - my $choices = prompt_list( - $prompt, - $cxns[0], - sub{ return @cxns }, - { map { $_ => $connections{$_}->{dsn} } @cxns }); - my @result = unique(grep { my $a = $_; grep { $_ eq $a } @cxns } split(/\s+/, $choices)); - return @result; -} - -# kill_query {{{3 -# Kills a connection, or on new versions, optionally a query but not connection. -sub kill_query { - my ( $q_or_c ) = @_; - - my $info = choose_thread( - sub { 1 }, - 'Select a thread to kill the ' . $q_or_c, - ); - return unless $info; - return unless pause("Kill $info->{id}?") =~ m/y/i; - - eval { - do_stmt($info->{cxn}, $q_or_c eq 'QUERY' ? 'KILL_QUERY' : 'KILL_CONNECTION', $info->{id} ); - }; - - if ( $EVAL_ERROR ) { - print "\nError: $EVAL_ERROR"; - pause(); - } -} - -# set_display_precision {{{3 -sub set_display_precision { - my $dir = shift; - $config{num_digits}->{val} = min(9, max(0, $config{num_digits}->{val} + $dir)); -} - -sub toggle_visible_table { - my ( $mode, $table ) = @_; - my $visible = $modes{$mode}->{visible_tables}; - if ( grep { $_ eq $table } @$visible ) { - $modes{$mode}->{visible_tables} = [ grep { $_ ne $table } @$visible ]; - } - else { - unshift @$visible, $table; - } - $modes{$mode}->{cust}->{visible_tables} = 1; -} - -# toggle_filter{{{3 -sub toggle_filter { - my ( $tbl, $filter ) = @_; - my $filters = $tbl_meta{$tbl}->{filters}; - if ( grep { $_ eq $filter } @$filters ) { - $tbl_meta{$tbl}->{filters} = [ grep { $_ ne $filter } @$filters ]; - } - else { - push @$filters, $filter; - } - $tbl_meta{$tbl}->{cust}->{filters} = 1; -} - -# toggle_config {{{3 -sub toggle_config { - my ( $key ) = @_; - $config{$key}->{val} ^= 1; -} - -# create_deadlock {{{3 -sub create_deadlock { - $clear_screen_sub->(); - - print "This function will deliberately cause a small deadlock, " - . "clearing deadlock information from the InnoDB monitor.\n\n"; - - my $answer = prompt("Are you sure you want to proceed? Say 'y' if you do"); - return 0 unless $answer eq 'y'; - - my ( $cxn ) = select_cxn('Clear on which server? '); - return unless $cxn && exists($connections{$cxn}); - - clear_deadlock($cxn); -} - -# deadlock_thread {{{3 -sub deadlock_thread { - my ( $id, $tbl, $cxn ) = @_; - - eval { - my $dbh = get_new_db_connection($cxn, 1); - my @stmts = ( - "set transaction isolation level serializable", - (version_ge($dbh, '4.0.11') ? "start transaction" : 'begin'), - "select * from $tbl where a = $id", - "update $tbl set a = $id where a <> $id", - ); - - foreach my $stmt (@stmts[0..2]) { - $dbh->do($stmt); - } - sleep(1 + $id); - $dbh->do($stmts[-1]); - }; - if ( $EVAL_ERROR ) { - if ( $EVAL_ERROR !~ m/Deadlock found/ ) { - die $EVAL_ERROR; - } - } - exit(0); -} - -# Purges unused binlogs on the master, up to but not including the latest log. -# TODO: guess which connections are slaves of a given master. -sub purge_master_logs { - my @cxns = get_connections(); - - get_master_slave_status(@cxns); - - # Toss out the rows that don't have master/slave status... - my @vars = - grep { $_ && ($_->{file} || $_->{master_host}) } - map { $vars{$_}->{$clock} } @cxns; - @cxns = map { $_->{cxn} } @vars; - - # Figure out which master to purge ons. - my @masters = map { $_->{cxn} } grep { $_->{file} } @vars; - my ( $master ) = select_cxn('Which master?', @masters ); - return unless $master; - my ($master_status) = grep { $_->{cxn} eq $master } @vars; - - # Figure out the result order (not lexical order) of master logs. - my @master_logs = get_master_logs($master); - my $i = 0; - my %master_logs = map { $_->{log_name} => $i++ } @master_logs; - - # Ask which slave(s) are reading from this master. - my @slave_status = grep { $_->{master_host} } @vars; - my @slaves = map { $_->{cxn} } @slave_status; - @slaves = select_cxn("Which slaves are reading from $master?", @slaves); - @slave_status = grep { my $item = $_; grep { $item->{cxn} eq $_ } @slaves } @slave_status; - return unless @slave_status; - - # Find the minimum binary log in use. - my $min_log = min(map { $master_logs{$_->{master_log_file}} } @slave_status); - my $log_name = $master_logs[$min_log]->{log_name}; - - my $stmt = "PURGE MASTER LOGS TO '$log_name'"; - send_cmd_to_servers($stmt, 0, 'PURGE {MASTER | BINARY} LOGS {TO "log_name" | BEFORE "date"}', [$master]); -} - -sub send_cmd_to_servers { - my ( $cmd, $all, $hint, $cxns ) = @_; - if ( $all ) { - @$cxns = get_connections(); - } - elsif ( !@$cxns ) { - @$cxns = select_cxn('Which servers?', @$cxns); - } - if ( $hint ) { - print "\nHint: $hint\n"; - } - $cmd = prompt('Command to send', undef, $cmd); - foreach my $cxn ( @$cxns ) { - eval { - my $sth = do_query($cxn, $cmd); - }; - if ( $EVAL_ERROR ) { - print "Error from $cxn: $EVAL_ERROR\n"; - } - else { - print "Success on $cxn\n"; - } - } - pause(); -} - -# Display functions {{{2 - -sub set_s_mode { - my ( $func ) = @_; - $clear_screen_sub->(); - $config{S_func}->{val} = $func; -} - -# start_S_mode {{{3 -sub start_S_mode { - $clear_screen_sub->(); - switch_mode('S'); -} - -# display_B {{{3 -sub display_B { - my @display_lines; - my @cxns = get_connections(); - get_innodb_status(\@cxns); - - my @buffer_pool; - my @page_statistics; - my @insert_buffers; - my @adaptive_hash_index; - my %rows_for = ( - buffer_pool => \@buffer_pool, - page_statistics => \@page_statistics, - insert_buffers => \@insert_buffers, - adaptive_hash_index => \@adaptive_hash_index, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - - if ( $set->{IB_bp_complete} ) { - if ( $wanted{buffer_pool} ) { - push @buffer_pool, extract_values($set, $set, $pre, 'buffer_pool'); - } - if ( $wanted{page_statistics} ) { - push @page_statistics, extract_values($set, $set, $pre, 'page_statistics'); - } - } - if ( $set->{IB_ib_complete} ) { - if ( $wanted{insert_buffers} ) { - push @insert_buffers, extract_values( - $config{status_inc}->{val} ? inc(0, $cxn) : $set, $set, $pre, - 'insert_buffers'); - } - if ( $wanted{adaptive_hash_index} ) { - push @adaptive_hash_index, extract_values($set, $set, $pre, 'adaptive_hash_index'); - } - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_C {{{3 -sub display_C { - my @display_lines; - my @cxns = get_connections(); - get_status_info(@cxns); - - my @cmd_summary; - my %rows_for = ( - cmd_summary => \@cmd_summary, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - # For now, I'm manually pulling these variables out and pivoting. Eventually a SQL-ish - # dialect should let me join a table to a grouped and pivoted table and do this more easily. - # TODO: make it so. - my $prefix = qr/^$config{cmd_filter}->{val}/; # TODO: this is a total hack - my @values; - my ($total, $last_total) = (0, 0); - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - foreach my $key ( keys %$set ) { - next unless $key =~ m/$prefix/i; - my $val = $set->{$key}; - next unless defined $val && $val =~ m/^\d+$/; - my $last_val = $val - ($pre->{$key} || 0); - $total += $val; - $last_total += $last_val; - push @values, { - name => $key, - value => $val, - last_value => $last_val, - }; - } - } - - # Add aggregation and turn into a real set TODO: total hack - if ( $wanted{cmd_summary} ) { - foreach my $value ( @values ) { - @{$value}{qw(total last_total)} = ($total, $last_total); - push @cmd_summary, extract_values($value, $value, $value, 'cmd_summary'); - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_D {{{3 -sub display_D { - my @display_lines; - my @cxns = get_connections(); - get_innodb_status(\@cxns); - - my @deadlock_transactions; - my @deadlock_locks; - my %rows_for = ( - deadlock_transactions => \@deadlock_transactions, - deadlock_locks => \@deadlock_locks, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - foreach my $cxn ( @cxns ) { - my $innodb_status = $vars{$cxn}->{$clock}; - my $prev_status = $vars{$cxn}->{$clock-1} || $innodb_status; - - if ( $innodb_status->{IB_dl_timestring} ) { - - my $victim = $innodb_status->{IB_dl_rolled_back} || 0; - - if ( %wanted ) { - foreach my $txn_id ( keys %{$innodb_status->{IB_dl_txns}} ) { - my $txn = $innodb_status->{IB_dl_txns}->{$txn_id}; - my $pre = $prev_status->{IB_dl_txns}->{$txn_id} || $txn; - - if ( $wanted{deadlock_transactions} ) { - my $hash = extract_values($txn->{tx}, $txn->{tx}, $pre->{tx}, 'deadlock_transactions'); - $hash->{cxn} = $cxn; - $hash->{dl_txn_num} = $txn_id; - $hash->{victim} = $txn_id == $victim ? 'Yes' : 'No'; - $hash->{timestring} = $innodb_status->{IB_dl_timestring}; - $hash->{truncates} = $innodb_status->{IB_dl_complete} ? 'No' : 'Yes'; - push @deadlock_transactions, $hash; - } - - if ( $wanted{deadlock_locks} ) { - foreach my $lock ( @{$txn->{locks}} ) { - my $hash = extract_values($lock, $lock, $lock, 'deadlock_locks'); - $hash->{dl_txn_num} = $txn_id; - $hash->{cxn} = $cxn; - $hash->{mysql_thread_id} = $txn->{tx}->{mysql_thread_id}; - push @deadlock_locks, $hash; - } - } - - } - } - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_F {{{3 -sub display_F { - my @display_lines; - my ( $cxn ) = get_connections(); - get_innodb_status([$cxn]); - my $innodb_status = $vars{$cxn}->{$clock}; - - if ( $innodb_status->{IB_fk_timestring} ) { - - push @display_lines, 'Reason: ' . $innodb_status->{IB_fk_reason}; - - # Display FK errors caused by invalid DML. - if ( $innodb_status->{IB_fk_txn} ) { - my $txn = $innodb_status->{IB_fk_txn}; - push @display_lines, - '', - "User $txn->{user} from $txn->{hostname}, thread $txn->{mysql_thread_id} was executing:", - '', no_ctrl_char($txn->{query_text}); - } - - my @fk_table = create_table2( - $tbl_meta{fk_error}->{visible}, - meta_to_hdr('fk_error'), - extract_values($innodb_status, $innodb_status, $innodb_status, 'fk_error'), - { just => '-', sep => ' '}); - push @display_lines, '', @fk_table; - - } - else { - push @display_lines, '', 'No foreign key error data.'; - } - draw_screen(\@display_lines, { raw => 1 } ); -} - -# display_I {{{3 -sub display_I { - my @display_lines; - my @cxns = get_connections(); - get_innodb_status(\@cxns); - - my @io_threads; - my @pending_io; - my @file_io_misc; - my @log_statistics; - my %rows_for = ( - io_threads => \@io_threads, - pending_io => \@pending_io, - file_io_misc => \@file_io_misc, - log_statistics => \@log_statistics, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - - if ( $set->{IB_io_complete} ) { - if ( $wanted{io_threads} ) { - my $cur_threads = $set->{IB_io_threads}; - my $pre_threads = $pre->{IB_io_threads} || $cur_threads; - foreach my $key ( sort keys %$cur_threads ) { - my $cur_thd = $cur_threads->{$key}; - my $pre_thd = $pre_threads->{$key} || $cur_thd; - my $hash = extract_values($cur_thd, $cur_thd, $pre_thd, 'io_threads'); - $hash->{cxn} = $cxn; - push @io_threads, $hash; - } - } - if ( $wanted{pending_io} ) { - push @pending_io, extract_values($set, $set, $pre, 'pending_io'); - } - if ( $wanted{file_io_misc} ) { - push @file_io_misc, extract_values( - $config{status_inc}->{val} ? inc(0, $cxn) : $set, - $set, $pre, 'file_io_misc'); - } - } - if ( $set->{IB_lg_complete} && $wanted{log_statistics} ) { - push @log_statistics, extract_values($set, $set, $pre, 'log_statistics'); - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_L {{{3 -sub display_L { - my @display_lines; - my @cxns = get_connections(); - get_innodb_status(\@cxns); - - my @innodb_locks; - my %rows_for = ( - innodb_locks => \@innodb_locks, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - # Get info on locks - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock} or next; - my $pre = $vars{$cxn}->{$clock-1} || $set; - - if ( $wanted{innodb_locks} && defined $set->{IB_tx_transactions} && @{$set->{IB_tx_transactions}} ) { - - my $cur_txns = $set->{IB_tx_transactions}; - my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; - my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; - my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; - foreach my $txn ( @$cur_txns ) { - foreach my $lock ( @{$txn->{locks}} ) { - my %hash = map { $_ => $txn->{$_} } qw(txn_id mysql_thread_id lock_wait_time active_secs); - map { $hash{$_} = $lock->{$_} } qw(lock_type space_id page_no n_bits index db table txn_id lock_mode special insert_intention waiting); - $hash{cxn} = $cxn; - push @innodb_locks, extract_values(\%hash, \%hash, \%hash, 'innodb_locks'); - } - } - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_M {{{3 -sub display_M { - my @display_lines; - my @cxns = get_connections(); - get_master_slave_status(@cxns); - get_status_info(@cxns); - - my @slave_sql_status; - my @slave_io_status; - my @master_status; - my %rows_for = ( - slave_sql_status => \@slave_sql_status, - slave_io_status => \@slave_io_status, - master_status => \@master_status, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - foreach my $cxn ( @cxns ) { - my $set = $config{status_inc}->{val} ? inc(0, $cxn) : $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock - 1} || $set; - if ( $wanted{slave_sql_status} ) { - push @slave_sql_status, extract_values($set, $set, $pre, 'slave_sql_status'); - } - if ( $wanted{slave_io_status} ) { - push @slave_io_status, extract_values($set, $set, $pre, 'slave_io_status'); - } - if ( $wanted{master_status} ) { - push @master_status, extract_values($set, $set, $pre, 'master_status'); - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_O {{{3 -sub display_O { - my @display_lines = (''); - my @cxns = get_connections(); - my @open_tables = get_open_tables(@cxns); - my @tables = map { extract_values($_, $_, $_, 'open_tables') } @open_tables; - push @display_lines, set_to_tbl(\@tables, 'open_tables'), get_cxn_errors(@cxns); - draw_screen(\@display_lines); -} - -# display_Q {{{3 -sub display_Q { - my @display_lines; - - my @q_header; - my @processlist; - my %rows_for = ( - q_header => \@q_header, - processlist => \@processlist, - ); - - my @visible = $opts{n} ? 'processlist' : get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - # Get the data - my @cxns = get_connections(); - my @full_processlist = get_full_processlist(@cxns); - - # Create header - if ( $wanted{q_header} ) { - get_status_info(@cxns); - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - my $hash = extract_values($set, $set, $pre, 'q_header'); - $hash->{cxn} = $cxn; - $hash->{when} = 'Total'; - push @q_header, $hash; - - if ( exists $vars{$cxn}->{$clock - 1} ) { - my $inc = inc(0, $cxn); - my $hash = extract_values($inc, $set, $pre, 'q_header'); - $hash->{cxn} = $cxn; - $hash->{when} = 'Now'; - push @q_header, $hash; - } - } - } - - if ( $wanted{processlist} ) { - # TODO: save prev values - push @processlist, map { extract_values($_, $_, $_, 'processlist') } @full_processlist; - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - next unless $wanted{$tbl}; - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - # Save queries in global variable for analysis. The rows in %rows_for have been - # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows - # that get pushed to the screen. - @current_queries = map { - my %hash; - @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db info secs) }; - \%hash; - } @{$rows_for{processlist}}; - - draw_screen(\@display_lines); -} - -# display_R {{{3 -sub display_R { - my @display_lines; - my @cxns = get_connections(); - get_innodb_status(\@cxns); - - my @row_operations; - my @row_operation_misc; - my @semaphores; - my @wait_array; - my %rows_for = ( - row_operations => \@row_operations, - row_operation_misc => \@row_operation_misc, - semaphores => \@semaphores, - wait_array => \@wait_array, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - my $incvar = $config{status_inc}->{val}; - - foreach my $cxn ( @cxns ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - my $inc; # Only assigned to if wanted - - if ( $set->{IB_ro_complete} ) { - if ( $wanted{row_operations} ) { - $inc ||= $incvar ? inc(0, $cxn) : $set; - push @row_operations, extract_values($inc, $set, $pre, 'row_operations'); - } - if ( $wanted{row_operation_misc} ) { - push @row_operation_misc, extract_values($set, $set, $pre, 'row_operation_misc'), - } - } - - if ( $set->{IB_sm_complete} && $wanted{semaphores} ) { - $inc ||= $incvar ? inc(0, $cxn) : $set; - push @semaphores, extract_values($inc, $set, $pre, 'semaphores'); - } - - if ( $set->{IB_sm_wait_array_size} && $wanted{wait_array} ) { - foreach my $wait ( @{$set->{IB_sm_waits}} ) { - my $hash = extract_values($wait, $wait, $wait, 'wait_array'); - $hash->{cxn} = $cxn; - push @wait_array, $hash; - } - } - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - draw_screen(\@display_lines); -} - -# display_T {{{3 -sub display_T { - my @display_lines; - - my @t_header; - my @innodb_transactions; - my %rows_for = ( - t_header => \@t_header, - innodb_transactions => \@innodb_transactions, - ); - - my @visible = $opts{n} ? 'innodb_transactions' : get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - - my @cxns = get_connections(); - - # If the header is to be shown, buffer pool data is required. - get_innodb_status( \@cxns, [ $wanted{t_header} ? qw(bp) : () ] ); - - foreach my $cxn ( get_connections() ) { - my $set = $vars{$cxn}->{$clock}; - my $pre = $vars{$cxn}->{$clock-1} || $set; - - next unless $set->{IB_tx_transactions}; - - if ( $wanted{t_header} ) { - my $hash = extract_values($set, $set, $pre, 't_header'); - push @t_header, $hash; - } - - if ( $wanted{innodb_transactions} ) { - my $cur_txns = $set->{IB_tx_transactions}; - my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns; - my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns; - my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns; - foreach my $thd_id ( sort keys %cur_txns ) { - my $cur_txn = $cur_txns{$thd_id}; - my $pre_txn = $pre_txns{$thd_id} || $cur_txn; - my $hash = extract_values($cur_txn, $cur_txn, $pre_txn, 'innodb_transactions'); - $hash->{cxn} = $cxn; - push @innodb_transactions, $hash; - } - } - - } - - my $first_table = 0; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - - # Save queries in global variable for analysis. The rows in %rows_for have been - # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows - # that get pushed to the screen. - @current_queries = map { - my %hash; - @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db query_text active_secs) }; - \%hash; - } @{$rows_for{innodb_transactions}}; - - draw_screen(\@display_lines); -} - -# display_S {{{3 -sub display_S { - my $fmt = get_var_set('S_set'); - my $func = $config{S_func}->{val}; - my $inc = $func eq 'g' || $config{status_inc}->{val}; - - # The table's meta-data is generated from the compiled var_set. - my ( $cols, $visible ); - if ( $tbl_meta{var_status}->{fmt} && $fmt eq $tbl_meta{var_status}->{fmt} ) { - ( $cols, $visible ) = @{$tbl_meta{var_status}}{qw(cols visible)}; - } - else { - ( $cols, $visible ) = compile_select_stmt($fmt); - - # Apply missing values to columns. Always apply averages across all connections. - map { - $_->{agg} = 'avg'; - $_->{label} = $_->{hdr}; - } values %$cols; - - $tbl_meta{var_status}->{cols} = $cols; - $tbl_meta{var_status}->{visible} = $visible; - $tbl_meta{var_status}->{fmt} = $fmt; - map { $tbl_meta{var_status}->{cols}->{$_}->{just} = ''} @$visible; - } - - my @var_status; - my %rows_for = ( - var_status => \@var_status, - ); - - my @visible = get_visible_tables(); - my %wanted = map { $_ => 1 } @visible; - my @cxns = get_connections(); - - get_status_info(@cxns); - get_innodb_status(\@cxns); - - # Set up whether to pivot and how many sets to extract. - $tbl_meta{var_status}->{pivot} = $func eq 'v'; - - my $num_sets - = $func eq 'v' - ? $config{num_status_sets}->{val} - : 0; - foreach my $set ( 0 .. $num_sets ) { - my @rows; - foreach my $cxn ( @cxns ) { - my $vars = $inc ? inc($set, $cxn) : $vars{$cxn}->{$clock - $set}; - my $cur = $vars{$cxn}->{$clock-$set}; - my $pre = $vars{$cxn}->{$clock-$set-1} || $cur; - next unless $vars && %$vars; - my $hash = extract_values($vars, $cur, $pre, 'var_status'); - push @rows, $hash; - } - @rows = apply_group_by('var_status', [], @rows); - push @var_status, @rows; - } - - # Recompile the sort func. TODO: avoid recompiling at every refresh. - # Figure out whether the data is all numeric and decide on a sort type. - # my $cmp - # = scalar( - # grep { !defined $_ || $_ !~ m/^\d+$/ } - # map { my $col = $_; map { $_->{$col} } @var_status } - # $tbl_meta{var_status}->{sort_cols} =~ m/(\w+)/g) - # ? 'cmp' - # : '<=>'; - $tbl_meta{var_status}->{sort_func} = make_sort_func($tbl_meta{var_status}); - - # ################################################################ - # Now there is specific display code based on $config{S_func} - # ################################################################ - if ( $func =~ m/s|g/ ) { - my $min_width = 4; - - # Clear the screen if the display width changed. - if ( @last_term_size && $this_term_size[0] != $last_term_size[0] ) { - $lines_printed = 0; - $clear_screen_sub->(); - } - - if ( $func eq 's' ) { - # Decide how wide columns should be. - my $num_cols = scalar(@$visible); - my $width = $opts{n} ? 0 : max($min_width, int(($this_term_size[0] - $num_cols + 1) / $num_cols)); - my $g_format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); - - # Print headers every now and then. Headers can get really long, so compact them. - my @hdr = @$visible; - if ( $opts{n} ) { - if ( $lines_printed == 0 ) { - print join("\t", @hdr), "\n"; - $lines_printed++; - } - } - elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { - @hdr = map { donut(crunch($_, $width), $width) } @hdr; - print join(' ', map { sprintf( "%${width}s", donut($_, $width)) } @hdr) . "\n"; - $lines_printed = 1; - } - - # Design a column format for the values. - my $format - = $opts{n} - ? join("\t", map { '%s' } @$visible) . "\n" - : join(' ', map { "%${width}s" } @hdr) . "\n"; - - foreach my $row ( @var_status ) { - printf($format, map { defined $_ ? $_ : '' } @{$row}{ @$visible }); - $lines_printed++; - } - } - else { # 'g' mode - # Design a column format for the values. - my $num_cols = scalar(@$visible); - my $width = $opts{n} ? 0 : int(($this_term_size[0] - $num_cols + 1) / $num_cols); - my $format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols ); - $format =~ s/\s$/\n/; - - # Print headers every now and then. - if ( $opts{n} ) { - if ( $lines_printed == 0 ) { - print join("\t", @$visible), "\n"; - print join("\t", map { shorten($mvs{$_}) } @$visible), "\n"; - } - } - elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) { - printf($format, map { donut(crunch($_, $width), $width) } @$visible); - printf($format, map { shorten($mvs{$_} || 0) } @$visible); - $lines_printed = 2; - } - - # Update the max ever seen, and scale by the max ever seen. - my $set = $var_status[0]; - foreach my $col ( @$visible ) { - $set->{$col} = 1 unless defined $set->{$col} && $set->{$col} =~ m/$num_regex/; - $set->{$col} = ($set->{$col} || 1) / ($set->{Uptime_hires} || 1); - $mvs{$col} = max($mvs{$col} || 1, $set->{$col}); - $set->{$col} /= $mvs{$col}; - } - printf($format, map { ( $config{graph_char}->{val} x int( $width * $set->{$_} )) || '.' } @$visible ); - $lines_printed++; - - } - } - else { # 'v' - my $first_table = 0; - my @display_lines; - foreach my $tbl ( @visible ) { - push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl); - push @display_lines, get_cxn_errors(@cxns) - if ( $config{debug}->{val} || !$first_table++ ); - } - $clear_screen_sub->(); - draw_screen( \@display_lines ); - } -} - -# display_explain {{{3 -sub display_explain { - my $info = shift; - my $cxn = $info->{cxn}; - my $db = $info->{db}; - - my ( $mods, $query ) = rewrite_for_explain($info->{query}); - - my @display_lines; - - if ( $query ) { - - my $part = version_ge($dbhs{$cxn}->{dbh}, '5.1.5') ? 'PARTITIONS' : ''; - $query = "EXPLAIN $part\n" . $query; - - eval { - if ( $db ) { - do_query($cxn, "use $db"); - } - my $sth = do_query($cxn, $query); - - my $res; - while ( $res = $sth->fetchrow_hashref() ) { - map { $res->{$_} ||= '' } ( 'partitions', keys %$res); - my @this_table = create_caption("Sub-Part $res->{id}", - create_table2( - $tbl_meta{explain}->{visible}, - meta_to_hdr('explain'), - extract_values($res, $res, $res, 'explain'))); - @display_lines = stack_next(\@display_lines, \@this_table, { pad => ' ', vsep => 2 }); - } - }; - - if ( $EVAL_ERROR ) { - push @display_lines, - '', - "The query could not be explained. Only SELECT queries can be " - . "explained; innotop tries to rewrite certain REPLACE and INSERT queries " - . "into SELECT, but this doesn't always succeed."; - } - - } - else { - push @display_lines, '', 'The query could not be explained.'; - } - - if ( $mods ) { - push @display_lines, '', '[This query has been re-written to be explainable]'; - } - - unshift @display_lines, no_ctrl_char($query); - draw_screen(\@display_lines, { raw => 1 } ); -} - -# rewrite_for_explain {{{3 -sub rewrite_for_explain { - my $query = shift; - - my $mods = 0; - my $orig = $query; - $mods += $query =~ s/^\s*(?:replace|insert).*?select/select/is; - $mods += $query =~ s/^ - \s*create\s+(?:temporary\s+)?table - \s+(?:\S+\s+)as\s+select/select/xis; - $mods += $query =~ s/\s+on\s+duplicate\s+key\s+update.*$//is; - return ( $mods, $query ); -} - -# show_optimized_query {{{3 -sub show_optimized_query { - my $info = shift; - my $cxn = $info->{cxn}; - my $db = $info->{db}; - my $meta = $dbhs{$cxn}; - - my @display_lines; - - my ( $mods, $query ) = rewrite_for_explain($info->{query}); - - if ( $mods ) { - push @display_lines, '[This query has been re-written to be explainable]'; - } - - if ( $query ) { - push @display_lines, no_ctrl_char($info->{query}); - - eval { - if ( $db ) { - do_query($cxn, "use $db"); - } - do_query( $cxn, 'EXPLAIN EXTENDED ' . $query ) or die "Can't explain query"; - my $sth = do_query($cxn, 'SHOW WARNINGS'); - my $res = $sth->fetchall_arrayref({}); - - if ( $res ) { - foreach my $result ( @$res ) { - push @display_lines, 'Note:', no_ctrl_char($result->{message}); - } - } - else { - push @display_lines, '', 'The query optimization could not be generated.'; - } - }; - - if ( $EVAL_ERROR ) { - push @display_lines, '', "The optimization could not be generated: $EVAL_ERROR"; - } - - } - else { - push @display_lines, '', 'The query optimization could not be generated.'; - } - - draw_screen(\@display_lines, { raw => 1 } ); -} - -# display_help {{{3 -sub display_help { - my $mode = $config{mode}->{val}; - - # Get globally mapped keys, then overwrite them with mode-specific ones. - my %keys = map { - $_ => $action_for{$_}->{label} - } keys %action_for; - foreach my $key ( keys %{$modes{$mode}->{action_for}} ) { - $keys{$key} = $modes{$mode}->{action_for}->{$key}->{label}; - } - delete $keys{'?'}; - - # Split them into three kinds of keys: MODE keys, action keys, and - # magic (special character) keys. - my @modes = sort grep { m/[A-Z]/ } keys %keys; - my @actions = sort grep { m/[a-z]/ } keys %keys; - my @magic = sort grep { m/[^A-Z]/i } keys %keys; - - my @display_lines = ( '', 'Switch to a different mode:' ); - - # Mode keys - my @all_modes = map { "$_ $modes{$_}->{hdr}" } @modes; - my @col1 = splice(@all_modes, 0, ceil(@all_modes/3)); - my @col2 = splice(@all_modes, 0, ceil(@all_modes/2)); - my $max1 = max(map {length($_)} @col1); - my $max2 = max(map {length($_)} @col2); - while ( @col1 ) { - push @display_lines, sprintf(" %-${max1}s %-${max2}s %s", - (shift @col1 || ''), - (shift @col2 || ''), - (shift @all_modes || '')); - } - - # Action keys - my @all_actions = map { "$_ $keys{$_}" } @actions; - @col1 = splice(@all_actions, 0, ceil(@all_actions/2)); - $max1 = max(map {length($_)} @col1); - push @display_lines, '', 'Actions:'; - while ( @col1 ) { - push @display_lines, sprintf(" %-${max1}s %s", - (shift @col1 || ''), - (shift @all_actions || '')); - } - - # Magic keys - my @all_magic = map { sprintf('%4s', $action_for{$_}->{key} || $_) . " $keys{$_}" } @magic; - @col1 = splice(@all_magic, 0, ceil(@all_magic/2)); - $max1 = max(map {length($_)} @col1); - push @display_lines, '', 'Other:'; - while ( @col1 ) { - push @display_lines, sprintf("%-${max1}s%s", - (shift @col1 || ''), - (shift @all_magic || '')); - } - - $clear_screen_sub->(); - draw_screen(\@display_lines, { show_all => 1 } ); - pause(); - $clear_screen_sub->(); -} - -# show_full_query {{{3 -sub show_full_query { - my $info = shift; - my @display_lines = no_ctrl_char($info->{query}); - draw_screen(\@display_lines, { raw => 1 }); -} - -# Formatting functions {{{2 - -# create_table2 {{{3 -# Makes a two-column table, labels on left, data on right. -# Takes refs of @cols, %labels and %data, %user_prefs -sub create_table2 { - my ( $cols, $labels, $data, $user_prefs ) = @_; - my @rows; - - if ( @$cols && %$data ) { - - # Override defaults - my $p = { - just => '', - sep => ':', - just1 => '-', - }; - if ( $user_prefs ) { - map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; - } - - # Fix undef values - map { $data->{$_} = '' unless defined $data->{$_} } @$cols; - - # Format the table - my $max_l = max(map{ length($labels->{$_}) } @$cols); - my $max_v = max(map{ length($data->{$_}) } @$cols); - my $format = "%$p->{just}${max_l}s$p->{sep} %$p->{just1}${max_v}s"; - foreach my $col ( @$cols ) { - push @rows, sprintf($format, $labels->{$col}, $data->{$col}); - } - } - return @rows; -} - -# stack_next {{{3 -# Stacks one display section next to the other. Accepts left-hand arrayref, -# right-hand arrayref, and options hashref. Tries to stack as high as -# possible, so -# aaaaaa -# bbb -# can stack ccc next to the bbb. -# NOTE: this DOES modify its arguments, even though it returns a new array. -sub stack_next { - my ( $left, $right, $user_prefs ) = @_; - my @result; - - my $p = { - pad => ' ', - vsep => 0, - }; - if ( $user_prefs ) { - map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs; - } - - # Find out how wide the LHS can be and still let the RHS fit next to it. - my $pad = $p->{pad}; - my $max_r = max( map { length($_) } @$right) || 0; - my $max_l = $this_term_size[0] - $max_r - length($pad); - - # Find the minimum row on the LHS that the RHS will fit next to. - my $i = scalar(@$left) - 1; - while ( $i >= 0 && length($left->[$i]) <= $max_l ) { - $i--; - } - $i++; - my $offset = $i; - - if ( $i < scalar(@$left) ) { - # Find the max width of the section of the LHS against which the RHS - # will sit. - my $max_i_in_common = min($i + scalar(@$right) - 1, scalar(@$left) - 1); - my $max_width = max( map { length($_) } @{$left}[$i..$max_i_in_common]); - - # Append the RHS onto the LHS until one runs out. - while ( $i < @$left && $i - $offset < @$right ) { - my $format = "%-${max_width}s$pad%${max_r}s"; - $left->[$i] = sprintf($format, $left->[$i], $right->[$i - $offset]); - $i++; - } - while ( $i - $offset < @$right ) { - # There is more RHS to push on the end of the array - push @$left, - sprintf("%${max_width}s$pad%${max_r}s", ' ', $right->[$i - $offset]); - $i++; - } - push @result, @$left; - } - else { - # There is no room to put them side by side. Add them below, with - # a blank line above them if specified. - push @result, @$left; - push @result, (' ' x $this_term_size[0]) if $p->{vsep} && @$left; - push @result, @$right; - } - return @result; -} - -# create_caption {{{3 -sub create_caption { - my ( $caption, @rows ) = @_; - if ( @rows ) { - - # Calculate the width of what will be displayed, so it can be centered - # in that space. When the thing is wider than the display, center the - # caption in the display. - my $width = min($this_term_size[0], max(map { length(ref($_) ? $_->[0] : $_) } @rows)); - - my $cap_len = length($caption); - - # It may be narrow enough to pad the sides with underscores and save a - # line on the screen. - if ( $cap_len <= $width - 6 ) { - my $left = int(($width - 2 - $cap_len) / 2); - unshift @rows, - ("_" x $left) . " $caption " . ("_" x ($width - $left - $cap_len - 2)); - } - - # The caption is too wide to add underscores on each side. - else { - - # Color is supported, so we can use terminal underlining. - if ( $config{color}->{val} ) { - my $left = int(($width - $cap_len) / 2); - unshift @rows, [ - (" " x $left) . $caption . (" " x ($width - $left - $cap_len)), - 'underline', - ]; - } - - # Color is not supported, so we have to add a line underneath to separate the - # caption from whatever it's captioning. - else { - my $left = int(($width - $cap_len) / 2); - unshift @rows, ('-' x $width); - unshift @rows, (" " x $left) . $caption . (" " x ($width - $left - $cap_len)); - } - - # The caption is wider than the thing it labels, so we have to pad the - # thing it labels to a consistent width. - if ( $cap_len > $width ) { - @rows = map { - ref($_) - ? [ sprintf('%-' . $cap_len . 's', $_->[0]), $_->[1] ] - : sprintf('%-' . $cap_len . 's', $_); - } @rows; - } - - } - } - return @rows; -} - -# create_table {{{3 -# Input: an arrayref of columns, hashref of col info, and an arrayref of hashes -# Example: [ 'a', 'b' ] -# { a => spec, b => spec } -# [ { a => 1, b => 2}, { a => 3, b => 4 } ] -# The 'spec' is a hashref of hdr => label, just => ('-' or ''). It also supports min and max-widths -# vi the minw and maxw params. -# Output: an array of strings, one per row. -# Example: -# Column One Column Two -# ---------- ---------- -# 1 2 -# 3 4 -sub create_table { - my ( $cols, $info, $data, $prefs ) = @_; - $prefs ||= {}; - $prefs->{no_hdr} ||= ($opts{n} && $clock != 1); - - # Truncate rows that will surely be off screen even if this is the only table. - if ( !$opts{n} && !$prefs->{raw} && !$prefs->{show_all} && $this_term_size[1] < @$data-1 ) { - $data = [ @$data[0..$this_term_size[1] - 1] ]; - } - - my @rows = (); - - if ( @$cols && %$info ) { - - # Fix undef values, collapse whitespace. - foreach my $row ( @$data ) { - map { $row->{$_} = collapse_ws($row->{$_}) } @$cols; - } - - my $col_sep = $opts{n} ? "\t" : ' '; - - # Find each column's max width. - my %width_for; - if ( !$opts{n} ) { - %width_for = map { - my $col_name = $_; - if ( $info->{$_}->{dec} ) { - # Align along the decimal point - my $max_rodp = max(0, map { $_->{$col_name} =~ m/([^\s\d-].*)$/ ? length($1) : 0 } @$data); - foreach my $row ( @$data ) { - my $col = $row->{$col_name}; - my ( $l, $r ) = $col =~ m/^([\s\d]*)(.*)$/; - $row->{$col_name} = sprintf("%s%-${max_rodp}s", $l, $r); - } - } - my $max_width = max( length($info->{$_}->{hdr}), map { length($_->{$col_name}) } @$data); - if ( $info->{$col_name}->{maxw} ) { - $max_width = min( $max_width, $info->{$col_name}->{maxw} ); - } - if ( $info->{$col_name}->{minw} ) { - $max_width = max( $max_width, $info->{$col_name}->{minw} ); - } - $col_name => $max_width; - } @$cols; - } - - # The table header. - if ( !$config{hide_hdr}->{val} && !$prefs->{no_hdr} ) { - push @rows, $opts{n} - ? join( $col_sep, @$cols ) - : join( $col_sep, map { sprintf( "%-$width_for{$_}s", trunc($info->{$_}->{hdr}, $width_for{$_}) ) } @$cols ); - if ( $config{color}->{val} && $config{header_highlight}->{val} ) { - push @rows, [ pop @rows, $config{header_highlight}->{val} ]; - } - elsif ( !$opts{n} ) { - push @rows, join( $col_sep, map { "-" x $width_for{$_} } @$cols ); - } - } - - # The table data. - if ( $opts{n} ) { - foreach my $item ( @$data ) { - push @rows, join($col_sep, map { $item->{$_} } @$cols ); - } - } - else { - my $format = join( $col_sep, - map { "%$info->{$_}->{just}$width_for{$_}s" } @$cols ); - foreach my $item ( @$data ) { - my $row = sprintf($format, map { trunc($item->{$_}, $width_for{$_}) } @$cols ); - if ( $config{color}->{val} && $item->{_color} ) { - push @rows, [ $row, $item->{_color} ]; - } - else { - push @rows, $row; - } - } - } - } - - return @rows; -} - -# Aggregates a table. If $group_by is an arrayref of columns, the grouping key -# is the specified columns; otherwise it's just the empty string (e.g. -# everything is grouped as one group). -sub apply_group_by { - my ( $tbl, $group_by, @rows ) = @_; - my $meta = $tbl_meta{$tbl}; - my %is_group = map { $_ => 1 } @$group_by; - my @non_grp = grep { !$is_group{$_} } keys %{$meta->{cols}}; - - my %temp_table; - foreach my $row ( @rows ) { - my $group_key - = @$group_by - ? '{' . join('}{', map { defined $_ ? $_ : '' } @{$row}{@$group_by}) . '}' - : ''; - $temp_table{$group_key} ||= []; - push @{$temp_table{$group_key}}, $row; - } - - # Crush the rows together... - my @new_rows; - foreach my $key ( sort keys %temp_table ) { - my $group = $temp_table{$key}; - my %new_row; - @new_row{@$group_by} = @{$group->[0]}{@$group_by}; - foreach my $col ( @non_grp ) { - my $agg = $meta->{cols}->{$col}->{agg} || 'first'; - $new_row{$col} = $agg_funcs{$agg}->( map { $_->{$col} } @$group ); - } - push @new_rows, \%new_row; - } - return @new_rows; -} - -# set_to_tbl {{{3 -# Unifies all the work of filtering, sorting etc. Alters the input. -# TODO: pull all the little pieces out into subroutines and stick events in each of them. -sub set_to_tbl { - my ( $rows, $tbl ) = @_; - my $meta = $tbl_meta{$tbl} or die "No such table $tbl in tbl_meta"; - - if ( !$meta->{pivot} ) { - - # Hook in event listeners - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { - $listener->set_to_tbl_pre_filter($rows, $tbl); - } - - # Apply filters. Note that if the table is pivoted, filtering and sorting - # are applied later. - foreach my $filter ( @{$meta->{filters}} ) { - eval { - @$rows = grep { $filters{$filter}->{func}->($_) } @$rows; - }; - if ( $EVAL_ERROR && $config{debug}->{val} ) { - die $EVAL_ERROR; - } - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { - $listener->set_to_tbl_pre_sort($rows, $tbl); - } - - # Sort. Note that if the table is pivoted, sorting might have the wrong - # columns and it could crash. This will only be an issue if it's possible - # to toggle pivoting on and off, which it's not at the moment. - if ( @$rows && $meta->{sort_func} && !$meta->{aggregate} ) { - if ( $meta->{sort_dir} > 0 ) { - @$rows = $meta->{sort_func}->( @$rows ); - } - else { - @$rows = reverse $meta->{sort_func}->( @$rows ); - } - } - - } - - # Stop altering arguments now. - my @rows = @$rows; - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_group}} ) { - $listener->set_to_tbl_pre_group(\@rows, $tbl); - } - - # Apply group-by. - if ( $meta->{aggregate} ) { - @rows = apply_group_by($tbl, $meta->{group_by}, @rows); - - # Sort. Note that if the table is pivoted, sorting might have the wrong - # columns and it could crash. This will only be an issue if it's possible - # to toggle pivoting on and off, which it's not at the moment. - if ( @rows && $meta->{sort_func} ) { - if ( $meta->{sort_dir} > 0 ) { - @rows = $meta->{sort_func}->( @rows ); - } - else { - @rows = reverse $meta->{sort_func}->( @rows ); - } - } - - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_colorize}} ) { - $listener->set_to_tbl_pre_colorize(\@rows, $tbl); - } - - if ( !$meta->{pivot} ) { - # Colorize. Adds a _color column to rows. - if ( @rows && $meta->{color_func} ) { - eval { - foreach my $row ( @rows ) { - $row->{_color} = $meta->{color_func}->($row); - } - }; - if ( $EVAL_ERROR ) { - pause($EVAL_ERROR); - } - } - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_transform}} ) { - $listener->set_to_tbl_pre_transform(\@rows, $tbl); - } - - # Apply_transformations. - if ( @rows ) { - my $cols = $meta->{cols}; - foreach my $col ( keys %{$rows->[0]} ) { - # Don't auto-vivify $tbl_meta{tbl}-{cols}->{_color}->{trans} - next if $col eq '_color'; - foreach my $trans ( @{$cols->{$col}->{trans}} ) { - map { $_->{$col} = $trans_funcs{$trans}->($_->{$col}) } @rows; - } - } - } - - my ($fmt_cols, $fmt_meta); - - # Pivot. - if ( $meta->{pivot} ) { - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_pivot}} ) { - $listener->set_to_tbl_pre_pivot(\@rows, $tbl); - } - - my @vars = @{$meta->{visible}}; - my @tmp = map { { name => $_ } } @vars; - my @cols = 'name'; - foreach my $i ( 0..@$rows-1 ) { - my $col = "set_$i"; - push @cols, $col; - foreach my $j ( 0..@vars-1 ) { - $tmp[$j]->{$col} = $rows[$i]->{$vars[$j]}; - } - } - $fmt_meta = { map { $_ => { hdr => $_, just => '-' } } @cols }; - $fmt_cols = \@cols; - @rows = @tmp; - - # Hook in event listeners - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) { - $listener->set_to_tbl_pre_filter($rows, $tbl); - } - - # Apply filters. - foreach my $filter ( @{$meta->{filters}} ) { - eval { - @rows = grep { $filters{$filter}->{func}->($_) } @rows; - }; - if ( $EVAL_ERROR && $config{debug}->{val} ) { - die $EVAL_ERROR; - } - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) { - $listener->set_to_tbl_pre_sort($rows, $tbl); - } - - # Sort. - if ( @rows && $meta->{sort_func} ) { - if ( $meta->{sort_dir} > 0 ) { - @rows = $meta->{sort_func}->( @rows ); - } - else { - @rows = reverse $meta->{sort_func}->( @rows ); - } - } - - } - else { - # If the table isn't pivoted, just show all columns that are supposed to - # be shown; but eliminate aggonly columns if the table isn't aggregated. - my $aggregated = $meta->{aggregate}; - $fmt_cols = [ grep { $aggregated || !$meta->{cols}->{$_}->{aggonly} } @{$meta->{visible}} ]; - $fmt_meta = { map { $_ => $meta->{cols}->{$_} } @$fmt_cols }; - - # If the table is aggregated, re-order the group_by columns to the left of - # the display. - if ( $aggregated ) { - my %is_group = map { $_ => 1 } @{$meta->{group_by}}; - $fmt_cols = [ @{$meta->{group_by}}, grep { !$is_group{$_} } @$fmt_cols ]; - } - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_create}} ) { - $listener->set_to_tbl_pre_create(\@rows, $tbl); - } - - @rows = create_table( $fmt_cols, $fmt_meta, \@rows); - if ( !$meta->{hide_caption} && !$opts{n} && $config{display_table_captions}->{val} ) { - @rows = create_caption($meta->{capt}, @rows) - } - - foreach my $listener ( @{$event_listener_for{set_to_tbl_post_create}} ) { - $listener->set_to_tbl_post_create(\@rows, $tbl); - } - - return @rows; -} - -# meta_to_hdr {{{3 -sub meta_to_hdr { - my $tbl = shift; - my $meta = $tbl_meta{$tbl}; - my %labels = map { $_ => $meta->{cols}->{$_}->{hdr} } @{$meta->{visible}}; - return \%labels; -} - -# commify {{{3 -# From perlfaq5: add commas. -sub commify { - my ( $num ) = @_; - $num = 0 unless defined $num; - $num =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; - return $num; -} - -# set_precision {{{3 -# Trim to desired precision. -sub set_precision { - my ( $num, $precision ) = @_; - $precision = $config{num_digits}->{val} if !defined $precision; - sprintf("%.${precision}f", $num); -} - -# percent {{{3 -# Convert to percent -sub percent { - my ( $num ) = @_; - $num = 0 unless defined $num; - my $digits = $config{num_digits}->{val}; - return sprintf("%.${digits}f", $num * 100) - . ($config{show_percent}->{val} ? '%' : ''); -} - -# shorten {{{3 -sub shorten { - my ( $num, $opts ) = @_; - - return $num if !defined($num) || $opts{n} || $num !~ m/$num_regex/; - - $opts ||= {}; - my $pad = defined $opts->{pad} ? $opts->{pad} : ''; - my $num_digits = defined $opts->{num_digits} - ? $opts->{num_digits} - : $config{num_digits}->{val}; - my $force = defined $opts->{force}; - - my $n = 0; - while ( $num >= 1_024 ) { - $num /= 1_024; - ++$n; - } - return sprintf( - $num =~ m/\./ || $n || $force - ? "%.${num_digits}f%s" - : '%d', - $num, ($pad,'k','M','G', 'T')[$n]); - -} - -# Utility functions {{{2 -# unique {{{3 -sub unique { - my %seen; - return grep { !$seen{$_}++ } @_; -} - -# make_color_func {{{3 -sub make_color_func { - my ( $tbl ) = @_; - my @criteria; - foreach my $spec ( @{$tbl->{colors}} ) { - next unless exists $comp_ops{$spec->{op}}; - my $val = $spec->{op} =~ m/^(?:eq|ne|le|ge|lt|gt)$/ ? "'$spec->{arg}'" - : $spec->{op} =~ m/^(?:=~|!~)$/ ? "m/" . quotemeta($spec->{arg}) . "/" - : $spec->{arg}; - push @criteria, - "( defined \$set->{$spec->{col}} && \$set->{$spec->{col}} $spec->{op} $val ) { return '$spec->{color}'; }"; - } - return undef unless @criteria; - my $sub = eval 'sub { my ( $set ) = @_; if ' . join(" elsif ", @criteria) . '}'; - die if $EVAL_ERROR; - return $sub; -} - -# make_sort_func {{{3 -# Gets a list of sort columns from the table, like "+cxn -time" and returns a -# subroutine that will sort that way. -sub make_sort_func { - my ( $tbl ) = @_; - my @criteria; - - # Pivoted tables can be sorted by 'name' and set_x columns; others must be - # sorted by existing columns. TODO: this will crash if you toggle between - # pivoted and nonpivoted. I have several other 'crash' notes about this if - # this ever becomes possible. - - if ( $tbl->{pivot} ) { - # Sort type is not really possible on pivoted columns, because a 'column' - # contains data from an entire non-pivoted row, so there could be a mix of - # numeric and non-numeric data. Thus everything has to be 'cmp' type. - foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { - next unless $col; - my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; - next unless $name && $name =~ m/^(?:name|set_\d+)$/; - $dir ||= '+'; - my $op = 'cmp'; - my $df = "''"; - push @criteria, - $dir eq '+' - ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" - : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; - } - } - else { - foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) { - next unless $col; - my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/; - next unless $name && $tbl->{cols}->{$name}; - $dir ||= '+'; - my $op = $tbl->{cols}->{$name}->{num} ? "<=>" : "cmp"; - my $df = $tbl->{cols}->{$name}->{num} ? "0" : "''"; - push @criteria, - $dir eq '+' - ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)" - : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)"; - } - } - return sub { return @_ } unless @criteria; - my $sub = eval 'sub { sort {' . join("||", @criteria) . '} @_; }'; - die if $EVAL_ERROR; - return $sub; -} - -# trunc {{{3 -# Shortens text to specified length. -sub trunc { - my ( $text, $len ) = @_; - if ( length($text) <= $len ) { - return $text; - } - return substr($text, 0, $len); -} - -# donut {{{3 -# Takes out the middle of text to shorten it. -sub donut { - my ( $text, $len ) = @_; - return $text if length($text) <= $len; - my $max = length($text) - $len; - my $min = $max - 1; - - # Try to remove a single "word" from somewhere in the center - if ( $text =~ s/_[^_]{$min,$max}_/_/ ) { - return $text; - } - - # Prefer removing the end of a "word" - if ( $text =~ s/([^_]+)[^_]{$max}_/$1_/ ) { - return $text; - } - - $text = substr($text, 0, int($len/2)) - . "_" - . substr($text, int($len/2) + $max + 1); - return $text; -} - -# crunch {{{3 -# Removes vowels and compacts repeated letters to shorten text. -sub crunch { - my ( $text, $len ) = @_; - return $text if $len && length($text) <= $len; - $text =~ s/^IB_\w\w_//; - $text =~ s/(?{val}; - if ( $charset && $charset eq 'unicode' ) { - $text =~ s/ - ("(?:(?!(?{val} ) { - unshift @$display_lines, create_statusbar(); - } - - foreach my $listener ( @{$event_listener_for{draw_screen}} ) { - $listener->draw_screen($display_lines); - } - - $clear_screen_sub->() - if $prefs->{clear} || !$modes{$config{mode}->{val}}->{no_clear_screen}; - if ( $opts{n} || $prefs->{raw} ) { - my $num_lines = 0; - print join("\n", - map { - $num_lines++; - ref $_ - ? colored($_->[0], $_->[1]) - : $_; - } - grep { !$opts{n} || $_ } # Suppress empty lines - @$display_lines); - if ( $opts{n} && $num_lines ) { - print "\n"; - } - } - else { - my $max_lines = $prefs->{show_all} - ? scalar(@$display_lines)- 1 - : min(scalar(@$display_lines), $this_term_size[1]); - print join("\n", - map { - ref $_ - ? colored(substr($_->[0], 0, $this_term_size[0]), $_->[1]) - : substr($_, 0, $this_term_size[0]); - } @$display_lines[0..$max_lines - 1]); - } -} - -# secs_to_time {{{3 -sub secs_to_time { - my ( $secs, $fmt ) = @_; - $secs ||= 0; - return '00:00' unless $secs; - - # Decide what format to use, if not given - $fmt ||= $secs >= 86_400 ? 'd' - : $secs >= 3_600 ? 'h' - : 'm'; - - return - $fmt eq 'd' ? sprintf( - "%d+%02d:%02d:%02d", - int($secs / 86_400), - int(($secs % 86_400) / 3_600), - int(($secs % 3_600) / 60), - $secs % 60) - : $fmt eq 'h' ? sprintf( - "%02d:%02d:%02d", - int(($secs % 86_400) / 3_600), - int(($secs % 3_600) / 60), - $secs % 60) - : sprintf( - "%02d:%02d", - int(($secs % 3_600) / 60), - $secs % 60); -} - -# dulint_to_int {{{3 -# Takes a number that InnoDB formats as two ulint integers, like transaction IDs -# and such, and turns it into a single integer -sub dulint_to_int { - my $num = shift; - return 0 unless $num; - my ( $high, $low ) = $num =~ m/^(\d+) (\d+)$/; - return $low unless $high; - return $low + ( $high * $MAX_ULONG ); -} - -# create_statusbar {{{3 -sub create_statusbar { - my $mode = $config{mode}->{val}; - my @cxns = sort { $a cmp $b } get_connections(); - - my $modeline = ( $config{readonly}->{val} ? '[RO] ' : '' ) - . $modes{$mode}->{hdr} . " (? for help)"; - my $mode_width = length($modeline); - my $remaining_width = $this_term_size[0] - $mode_width - 1; - my $result; - - # The thingie in top-right that says what we're monitoring. - my $cxn = ''; - - if ( 1 == @cxns && $dbhs{$cxns[0]} && $dbhs{$cxns[0]}->{dbh} ) { - $cxn = $dbhs{$cxns[0]}->{dbh}->{mysql_serverinfo} || ''; - } - else { - if ( $modes{$mode}->{server_group} ) { - $cxn = "Servers: " . $modes{$mode}->{server_group}; - my $err_count = grep { $dbhs{$_} && $dbhs{$_}->{err_count} } @cxns; - if ( $err_count ) { - $cxn .= "(" . ( scalar(@cxns) - $err_count ) . "/" . scalar(@cxns) . ")"; - } - } - else { - $cxn = join(' ', map { ($dbhs{$_}->{err_count} ? '!' : '') . $_ } - grep { $dbhs{$_} } @cxns); - } - } - - if ( 1 == @cxns ) { - get_driver_status(@cxns); - my $vars = $vars{$cxns[0]}->{$clock}; - my $inc = inc(0, $cxns[0]); - - # Format server uptime human-readably, calculate QPS... - my $uptime = secs_to_time( $vars->{Uptime_hires} ); - my $qps = ($inc->{Questions}||0) / ($inc->{Uptime_hires}||1); - my $ibinfo = ''; - - if ( exists $vars->{IB_last_secs} ) { - $ibinfo .= "InnoDB $vars->{IB_last_secs}s "; - if ( $vars->{IB_got_all} ) { - if ( ($mode eq 'T' || $mode eq 'W') - && $vars->{IB_tx_is_truncated} ) { - $ibinfo .= ':^|'; - } - else { - $ibinfo .= ':-)'; - } - } - else { - $ibinfo .= ':-('; - } - } - $result = sprintf( - "%-${mode_width}s %${remaining_width}s", - $modeline, - join(', ', grep { $_ } ( - $cxns[0], - $uptime, - $ibinfo, - shorten($qps) . " QPS", - ($vars->{Threads} || 0) . " thd", - $cxn))); - } - else { - $result = sprintf( - "%-${mode_width}s %${remaining_width}s", - $modeline, - $cxn); - } - - return $config{color}->{val} ? [ $result, 'bold reverse' ] : $result; -} - -# Database connections {{{3 -sub add_new_dsn { - my ( $name ) = @_; - - if ( defined $name ) { - $name =~ s/[\s:;]//g; - } - - if ( !$name ) { - print word_wrap("Choose a name for the connection. It cannot contain " - . "whitespace, colons or semicolons."), "\n\n"; - do { - $name = prompt("Enter a name"); - $name =~ s/[\s:;]//g; - } until ( $name ); - } - - my $dsn; - do { - $clear_screen_sub->(); - print "Typical DSN strings look like\n DBI:mysql:;host=hostname;port=port\n" - . "The db and port are optional and can usually be omitted.\n" - . "If you specify 'mysql_read_default_group=mysql' many options can be read\n" - . "from your mysql options files (~/.my.cnf, /etc/my.cnf).\n\n"; - $dsn = prompt("Enter a DSN string", undef, "DBI:mysql:;mysql_read_default_group=mysql;host=$name"); - } until ( $dsn ); - - $clear_screen_sub->(); - my $dl_table = prompt("Optional: enter a table (must not exist) to use when resetting InnoDB deadlock information", - undef, 'test.innotop_dl'); - - $connections{$name} = { - dsn => $dsn, - dl_table => $dl_table, - }; -} - -sub add_new_server_group { - my ( $name ) = @_; - - if ( defined $name ) { - $name =~ s/[\s:;]//g; - } - - if ( !$name ) { - print word_wrap("Choose a name for the group. It cannot contain " - . "whitespace, colons or semicolons."), "\n\n"; - do { - $name = prompt("Enter a name"); - $name =~ s/[\s:;]//g; - } until ( $name ); - } - - my @cxns; - do { - $clear_screen_sub->(); - @cxns = select_cxn("Choose servers for $name", keys %connections); - } until ( @cxns ); - - $server_groups{$name} = \@cxns; - return $name; -} - -sub get_var_set { - my ( $name ) = @_; - while ( !$name || !exists($var_sets{$config{$name}->{val}}) ) { - $name = choose_var_set($name); - } - return $var_sets{$config{$name}->{val}}->{text}; -} - -sub add_new_var_set { - my ( $name ) = @_; - - if ( defined $name ) { - $name =~ s/\W//g; - } - - if ( !$name ) { - do { - $name = prompt("Enter a name"); - $name =~ s/\W//g; - } until ( $name ); - } - - my $variables; - do { - $clear_screen_sub->(); - $variables = prompt("Enter variables for $name", undef ); - } until ( $variables ); - - $var_sets{$name} = { text => $variables, user => 1 }; -} - -sub next_server { - my $mode = $config{mode}->{val}; - my @cxns = sort keys %connections; - my ($cur) = get_connections($mode); - $cur ||= $cxns[0]; - my $pos = grep { $_ lt $cur } @cxns; - my $newpos = ($pos + 1) % @cxns; - $modes{$mode}->{server_group} = ''; - $modes{$mode}->{connections} = [ $cxns[$newpos] ]; - $clear_screen_sub->(); -} - -sub next_server_group { - my $mode = shift || $config{mode}->{val}; - my @grps = sort keys %server_groups; - my $curr = $modes{$mode}->{server_group}; - - return unless @grps; - - if ( $curr ) { - # Find the current group's position. - my $pos = 0; - while ( $curr ne $grps[$pos] ) { - $pos++; - } - $modes{$mode}->{server_group} = $grps[ ($pos + 1) % @grps ]; - } - else { - $modes{$mode}->{server_group} = $grps[0]; - } -} - -# Get a list of connection names used in this mode. -sub get_connections { - if ( $file ) { - return qw(file); - } - my $mode = shift || $config{mode}->{val}; - my @connections = $modes{$mode}->{server_group} - ? @{$server_groups{$modes{$mode}->{server_group}}} - : @{$modes{$mode}->{connections}}; - if ( $modes{$mode}->{one_connection} ) { - @connections = @connections ? $connections[0] : (); - } - return unique(@connections); -} - -# Get a list of tables used in this mode. If innotop is running non-interactively, just use the first. -sub get_visible_tables { - my $mode = shift || $config{mode}->{val}; - my @tbls = @{$modes{$mode}->{visible_tables}}; - if ( $opts{n} ) { - return $tbls[0]; - } - else { - return @tbls; - } -} - -# Choose from among available connections or server groups. -# If the mode has a server set in use, prefers that instead. -sub choose_connections { - $clear_screen_sub->(); - my $mode = $config{mode}->{val}; - my $meta = { map { $_ => $connections{$_}->{dsn} } keys %connections }; - foreach my $group ( keys %server_groups ) { - $meta->{"#$group"} = join(' ', @{$server_groups{$group}}); - } - - my $choices = prompt_list("Choose connections or a group for $mode mode", - undef, sub { return keys %$meta }, $meta); - - my @choices = unique(grep { $_ } split(/\s+/, $choices)); - if ( @choices ) { - if ( $choices[0] =~ s/^#// && exists $server_groups{$choices[0]} ) { - $modes{$mode}->{server_group} = $choices[0]; - } - else { - $modes{$mode}->{connections} = [ grep { exists $connections{$_} } @choices ]; - } - } -} - -# Accepts a DB connection name and the name of a prepared query (e.g. status, kill). -# Also a list of params for the prepared query. This allows not storing prepared -# statements globally. Returns a $sth that's been executed. -# ERROR-HANDLING SEMANTICS: if the statement throws an error, propagate, but if the -# connection has gone away or can't connect, DO NOT. Just return undef. -sub do_stmt { - my ( $cxn, $stmt_name, @args ) = @_; - - return undef if $file; - - # Test if the cxn should not even be tried - return undef if $dbhs{$cxn} - && $dbhs{$cxn}->{err_count} - && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) - && $dbhs{$cxn}->{wake_up} > $clock; - - my $sth; - my $retries = 1; - my $success = 0; - TRY: - while ( $retries-- >= 0 && !$success ) { - - eval { - my $dbh = connect_to_db($cxn); - - # If the prepared query doesn't exist, make it. - if ( !exists $dbhs{$cxn}->{stmts}->{$stmt_name} ) { - $dbhs{$cxn}->{stmts}->{$stmt_name} = $stmt_maker_for{$stmt_name}->($dbh); - } - - $sth = $dbhs{$cxn}->{stmts}->{$stmt_name}; - if ( $sth ) { - $sth->execute(@args); - } - $success = 1; - }; - if ( $EVAL_ERROR ) { - if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { - handle_cxn_error($cxn, $EVAL_ERROR); - } - else { - die "$cxn $stmt_name: $EVAL_ERROR"; - } - if ( $retries < 0 ) { - $sth = undef; - } - } - } - - if ( $sth && $sth->{NUM_OF_FIELDS} ) { - sleep($stmt_sleep_time_for{$stmt_name}) if $stmt_sleep_time_for{$stmt_name}; - return $sth; - } -} - -# Keeps track of error count, sleep times till retries, etc etc. -# When there's an error we retry the connection every so often, increasing in -# Fibonacci series to prevent too much banging on the server. -sub handle_cxn_error { - my ( $cxn, $err ) = @_; - my $meta = $dbhs{$cxn}; - $meta->{err_count}++; - - # This is used so errors that have to do with permissions needed by the current - # mode will get displayed as long as we're in this mode, but get ignored if the - # mode changes. - $meta->{mode} = $config{mode}->{val}; - - # Strip garbage from the error text if possible. - $err =~ s/\s+/ /g; - if ( $err =~ m/failed: (.*?) at \S*innotop line/ ) { - $err = $1; - } - - $meta->{last_err} = $err; - my $sleep_time = $meta->{this_sleep} + $meta->{prev_sleep}; - $meta->{prev_sleep} = $meta->{this_sleep}; - $meta->{this_sleep} = $sleep_time; - $meta->{wake_up} = $clock + $sleep_time; - if ( $config{show_cxn_errors}->{val} ) { - print STDERR "Error at tick $clock $cxn $err" if $config{debug}->{val}; - } -} - -# Accepts a DB connection name and a (string) query. Returns a $sth that's been -# executed. -sub do_query { - my ( $cxn, $query ) = @_; - - return undef if $file; - - # Test if the cxn should not even be tried - return undef if $dbhs{$cxn} - && $dbhs{$cxn}->{err_count} - && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} ) - && $dbhs{$cxn}->{wake_up} > $clock; - - my $sth; - my $retries = 1; - my $success = 0; - TRY: - while ( $retries-- >= 0 && !$success ) { - - eval { - my $dbh = connect_to_db($cxn); - - $sth = $dbh->prepare($query); - $sth->execute(); - $success = 1; - }; - if ( $EVAL_ERROR ) { - if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) { - handle_cxn_error($cxn, $EVAL_ERROR); - } - else { - die $EVAL_ERROR; - } - if ( $retries < 0 ) { - $sth = undef; - } - } - } - - return $sth; -} - -sub get_uptime { - my ( $cxn ) = @_; - $dbhs{$cxn}->{start_time} ||= time(); - # Avoid dividing by zero - return (time() - $dbhs{$cxn}->{start_time}) || .001; -} - -sub connect_to_db { - my ( $cxn ) = @_; - - $dbhs{$cxn} ||= { - stmts => {}, # bucket for prepared statements. - prev_sleep => 0, - this_sleep => 1, - wake_up => 0, - start_time => 0, - dbh => undef, - }; - my $href = $dbhs{$cxn}; - - if ( !$href->{dbh} || ref($href->{dbh}) !~ m/DBI/ || !$href->{dbh}->ping ) { - my $dbh = get_new_db_connection($cxn); - @{$href}{qw(dbh err_count wake_up this_sleep start_time prev_sleep)} - = ($dbh, 0, 0, 1, 0, 0); - - # Derive and store the server's start time in hi-res - my $uptime = $dbh->selectrow_hashref("show status like 'Uptime'")->{value}; - $href->{start_time} = time() - $uptime; - - # Set timeouts so an unused connection stays alive. - # For example, a connection might be used in Q mode but idle in T mode. - if ( version_ge($dbh, '4.0.3')) { - my $timeout = $config{cxn_timeout}->{val}; - $dbh->do("set session wait_timeout=$timeout, interactive_timeout=$timeout"); - } - } - return $href->{dbh}; -} - -# Compares versions like 5.0.27 and 4.1.15-standard-log -sub version_ge { - my ( $dbh, $target ) = @_; - my $version = sprintf('%03d%03d%03d', $dbh->{mysql_serverinfo} =~ m/(\d+)/g); - return $version ge sprintf('%03d%03d%03d', $target =~ m/(\d+)/g); -} - -# Extracts status values that can be gleaned from the DBD driver without doing a whole query. -sub get_driver_status { - my @cxns = @_; - if ( !$info_gotten{driver_status}++ ) { - foreach my $cxn ( @cxns ) { - next unless $dbhs{$cxn} && $dbhs{$cxn}->{dbh} && $dbhs{$cxn}->{dbh}->{Active}; - $vars{$cxn}->{$clock} ||= {}; - my $vars = $vars{$cxn}->{$clock}; - my %res = map { $_ =~ s/ +/_/g; $_ } $dbhs{$cxn}->{dbh}->{mysql_stat} =~ m/(\w[^:]+): ([\d\.]+)/g; - map { $vars->{$_} ||= $res{$_} } keys %res; - $vars->{Uptime_hires} ||= get_uptime($cxn); - $vars->{cxn} = $cxn; - } - } -} - -sub get_new_db_connection { - my ( $connection, $destroy ) = @_; - if ( $file ) { - die "You can't connect to a MySQL server while monitoring a file. This is probably a bug."; - } - - my $dsn = $connections{$connection} - or die "No connection named '$connection' is defined in your configuration"; - - if ( !defined $dsn->{have_user} ) { - my $answer = prompt("Do you want to specify a username for $connection?", undef, 'n'); - $dsn->{have_user} = $answer && $answer =~ m/1|y/i; - } - - if ( !defined $dsn->{have_pass} ) { - my $answer = prompt("Do you want to specify a password for $connection?", undef, 'n'); - $dsn->{have_pass} = $answer && $answer =~ m/1|y/i; - } - - if ( !$dsn->{user} && $dsn->{have_user} ) { - my $user = $ENV{USERNAME} || $ENV{USER} || getlogin() || getpwuid($REAL_USER_ID) || undef; - $dsn->{user} = prompt("Enter username for $connection", undef, $user); - } - - if ( !defined $dsn->{user} ) { - $dsn->{user} = ''; - } - - if ( !$dsn->{pass} && !$dsn->{savepass} && $dsn->{have_pass} ) { - $dsn->{pass} = prompt_noecho("Enter password for '$dsn->{user}' on $connection"); - print "\n"; - if ( !defined($dsn->{savepass}) ) { - my $answer = prompt("Save password in plain text in the config file?", undef, 'y'); - $dsn->{savepass} = $answer && $answer =~ m/1|y/i; - } - } - - my $dbh = DBI->connect( - $dsn->{dsn}, $dsn->{user}, $dsn->{pass}, - { RaiseError => 1, PrintError => 0, AutoCommit => 1 }); - $dbh->{InactiveDestroy} = 1 unless $destroy; # Can't be set in $db_options - $dbh->{FetchHashKeyName} = 'NAME_lc'; # Lowercases all column names for fetchrow_hashref - return $dbh; -} - -sub get_cxn_errors { - my @cxns = @_; - return () unless $config{show_cxn_errors_in_tbl}->{val}; - return - map { [ $_ . ': ' . $dbhs{$_}->{last_err}, 'red' ] } - grep { $dbhs{$_} && $dbhs{$_}->{err_count} && $dbhs{$_}->{mode} eq $config{mode}->{val} } - @cxns; -} - -# Setup and tear-down functions {{{2 - -# Takes a string and turns it into a hashref you can apply to %tbl_meta tables. The string -# can be in the form 'foo, bar, foo/bar, foo as bar' much like a SQL SELECT statement. -sub compile_select_stmt { - my ($str) = @_; - my @exps = $str =~ m/\s*([^,]+(?i:\s+as\s+[^,\s]+)?)\s*(?=,|$)/g; - my %cols; - my @visible; - foreach my $exp ( @exps ) { - my ( $text, $colname ); - if ( $exp =~ m/as\s+(\w+)\s*/ ) { - $colname = $1; - $exp =~ s/as\s+(\w+)\s*//; - $text = $exp; - } - else { - $text = $colname = $exp; - } - my ($func, $err) = compile_expr($text); - $cols{$colname} = { - src => $text, - hdr => $colname, - num => 0, - func => $func, - }; - push @visible, $colname; - } - return (\%cols, \@visible); -} - -# compile_filter {{{3 -sub compile_filter { - my ( $text ) = @_; - my ( $sub, $err ); - eval "\$sub = sub { my \$set = shift; $text }"; - if ( $EVAL_ERROR ) { - $EVAL_ERROR =~ s/at \(eval.*$//; - $sub = sub { return $EVAL_ERROR }; - $err = $EVAL_ERROR; - } - return ( $sub, $err ); -} - -# compile_expr {{{3 -sub compile_expr { - my ( $expr ) = @_; - # Leave built-in functions alone so they get called as Perl functions, unless - # they are the only word in $expr, in which case treat them as hash keys. - if ( $expr =~ m/\W/ ) { - $expr =~ s/(?{$1}"/eg; - } - else { - $expr = "\$set->{$expr}"; - } - my ( $sub, $err ); - my $quoted = quotemeta($expr); - eval qq{ - \$sub = sub { - my (\$set, \$cur, \$pre) = \@_; - my \$val = eval { $expr }; - if ( \$EVAL_ERROR && \$config{debug}->{val} ) { - \$EVAL_ERROR =~ s/ at \\(eval.*//s; - die "\$EVAL_ERROR in expression $quoted"; - } - return \$val; - } - }; - if ( $EVAL_ERROR ) { - if ( $config{debug}->{val} ) { - die $EVAL_ERROR; - } - $EVAL_ERROR =~ s/ at \(eval.*$//; - $sub = sub { return $EVAL_ERROR }; - $err = $EVAL_ERROR; - } - return ( $sub, $err ); -} - -# finish {{{3 -# This is a subroutine because it's called from a key to quit the program. -sub finish { - save_config(); - ReadMode('normal') unless $opts{n}; - print "\n"; - exit(0); -} - -# core_dump {{{3 -sub core_dump { - my $msg = shift; - if ($config{debugfile}->{val} && $config{debug}->{val}) { - eval { - open my $file, '>>', $config{debugfile}->{val}; - if ( %vars ) { - print $file "Current variables:\n" . Dumper(\%vars); - } - close $file; - }; - } - print $msg; -} - -# load_config {{{3 -sub load_config { - - my $filename = $opts{c} || "$homepath/.innotop/innotop.ini"; - my $dirname = dirname($filename); - if ( -f $dirname && !$opts{c} ) { - # innotop got upgraded and this is the old config file. - my $answer = pause("Innotop's default config location has moved to $filename. Move old config file $dirname there now? y/n"); - if ( lc $answer eq 'y' ) { - rename($dirname, "$homepath/innotop.ini") - or die "Can't rename '$dirname': $OS_ERROR"; - mkdir($dirname) or die "Can't create directory '$dirname': $OS_ERROR"; - mkdir("$dirname/plugins") or die "Can't create directory '$dirname/plugins': $OS_ERROR"; - rename("$homepath/innotop.ini", $filename) - or die "Can't rename '$homepath/innotop.ini' to '$filename': $OS_ERROR"; - } - else { - print "\nInnotop will now exit so you can fix the config file.\n"; - exit(0); - } - } - - if ( ! -d $dirname ) { - mkdir $dirname - or die "Can't create directory '$dirname': $OS_ERROR"; - } - if ( ! -d "$dirname/plugins" ) { - mkdir "$dirname/plugins" - or die "Can't create directory '$dirname/plugins': $OS_ERROR"; - } - - if ( -f $filename ) { - open my $file, "<", $filename or die("Can't open '$filename': $OS_ERROR"); - - # Check config file version. Just ignore if either innotop or the file has - # garbage in the version number. - if ( defined(my $line = <$file>) && $VERSION =~ m/\d/ ) { - chomp $line; - if ( my ($maj, $min, $rev) = $line =~ m/^version=(\d+)\.(\d+)(?:\.(\d+))?$/ ) { - $rev ||= 0; - my $cfg_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); - ( $maj, $min, $rev ) = $VERSION =~ m/^(\d+)\.(\d+)(?:\.(\d+))?$/; - $rev ||= 0; - my $innotop_ver = sprintf('%03d-%03d-%03d', $maj, $min, $rev); - - if ( $cfg_ver gt $innotop_ver ) { - pause("The config file is for a newer version of innotop and may not be read correctly."); - } - else { - my @ver_history = @config_versions; - while ( my ($start, $end) = splice(@ver_history, 0, 2) ) { - # If the config file is between the endpoints and innotop is greater than - # the endpoint, innotop has a newer config file format than the file. - if ( $cfg_ver ge $start && $cfg_ver lt $end && $innotop_ver ge $end ) { - my $msg = "innotop's config file format has changed. Overwrite $filename? y or n"; - if ( pause($msg) eq 'n' ) { - $config{readonly}->{val} = 1; - print "\ninnotop will not save any configuration changes you make."; - pause(); - print "\n"; - } - close $file; - return; - } - } - } - } - } - - while ( my $line = <$file> ) { - chomp $line; - next unless $line =~ m/^\[([a-z_]+)\]$/; - if ( exists $config_file_sections{$1} ) { - $config_file_sections{$1}->{reader}->($file); - } - else { - warn "Unknown config file section '$1'"; - } - } - close $file or die("Can't close $filename: $OS_ERROR"); - } - -} - -# Do some post-processing on %tbl_meta: compile src properties into func etc. -sub post_process_tbl_meta { - foreach my $table ( values %tbl_meta ) { - foreach my $col_name ( keys %{$table->{cols}} ) { - my $col_def = $table->{cols}->{$col_name}; - my ( $sub, $err ) = compile_expr($col_def->{src}); - $col_def->{func} = $sub; - } - } -} - -# load_config_plugins {{{3 -sub load_config_plugins { - my ( $file ) = @_; - - # First, find a list of all plugins that exist on disk, and get information about them. - my $dir = $config{plugin_dir}->{val}; - foreach my $p_file ( <$dir/*.pm> ) { - my ($package, $desc); - eval { - open my $p_in, "<", $p_file or die $OS_ERROR; - while ( my $line = <$p_in> ) { - chomp $line; - if ( $line =~ m/^package\s+(.*?);/ ) { - $package = $1; - } - elsif ( $line =~ m/^# description: (.*)/ ) { - $desc = $1; - } - last if $package && $desc; - } - close $p_in; - }; - if ( $package ) { - $plugins{$package} = { - file => $p_file, - desc => $desc, - class => $package, - active => 0, - }; - if ( $config{debug}->{val} && $EVAL_ERROR ) { - die $EVAL_ERROR; - } - } - } - - # Now read which ones the user has activated. Each line simply represents an active plugin. - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - next unless $line && $plugins{$line}; - - my $obj; - eval { - require $plugins{$line}->{file}; - $obj = $line->new(%pluggable_vars); - foreach my $event ( $obj->register_for_events() ) { - my $queue = $event_listener_for{$event}; - if ( $queue ) { - push @$queue, $obj; - } - } - }; - if ( $config{debug}->{val} && $EVAL_ERROR ) { - die $EVAL_ERROR; - } - if ( $obj ) { - $plugins{$line}->{active} = 1; - $plugins{$line}->{object} = $obj; - } - } -} - -# save_config_plugins {{{3 -sub save_config_plugins { - my $file = shift; - foreach my $class ( sort keys %plugins ) { - next unless $plugins{$class}->{active}; - print $file "$class\n"; - } -} - -# load_config_active_server_groups {{{3 -sub load_config_active_server_groups { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $mode, $group ) = $line =~ m/^(.*?)=(.*)$/; - next unless $mode && $group - && exists $modes{$mode} && exists $server_groups{$group}; - $modes{$mode}->{server_group} = $group; - } -} - -# save_config_active_server_groups {{{3 -sub save_config_active_server_groups { - my $file = shift; - foreach my $mode ( sort keys %modes ) { - print $file "$mode=$modes{$mode}->{server_group}\n"; - } -} - -# load_config_server_groups {{{3 -sub load_config_server_groups { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $name && $rest; - my @vars = unique(grep { $_ && exists $connections{$_} } split(/\s+/, $rest)); - next unless @vars; - $server_groups{$name} = \@vars; - } -} - -# save_config_server_groups {{{3 -sub save_config_server_groups { - my $file = shift; - foreach my $set ( sort keys %server_groups ) { - print $file "$set=", join(' ', @{$server_groups{$set}}), "\n"; - } -} - -# load_config_varsets {{{3 -sub load_config_varsets { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $name && $rest; - $var_sets{$name} = { - text => $rest, - user => 1, - }; - } -} - -# save_config_varsets {{{3 -sub save_config_varsets { - my $file = shift; - foreach my $varset ( sort keys %var_sets ) { - next unless $var_sets{$varset}->{user}; - print $file "$varset=$var_sets{$varset}->{text}\n"; - } -} - -# load_config_group_by {{{3 -sub load_config_group_by { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $tbl && exists $tbl_meta{$tbl}; - my @parts = unique(grep { exists($tbl_meta{$tbl}->{cols}->{$_}) } split(/\s+/, $rest)); - $tbl_meta{$tbl}->{group_by} = [ @parts ]; - $tbl_meta{$tbl}->{cust}->{group_by} = 1; - } -} - -# save_config_group_by {{{3 -sub save_config_group_by { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - next if $tbl_meta{$tbl}->{temp}; - next unless $tbl_meta{$tbl}->{cust}->{group_by}; - my $aref = $tbl_meta{$tbl}->{group_by}; - print $file "$tbl=", join(' ', @$aref), "\n"; - } -} - -# load_config_filters {{{3 -sub load_config_filters { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key, $rest ) = $line =~ m/^(.+?)=(.*)$/; - next unless $key && $rest; - - my %parts = $rest =~ m/(\w+)='((?:(?!(? $sub, - text => $parts{text}, - user => 1, - name => $key, - note => 'User-defined filter', - tbls => \@tbls, - } - } -} - -# save_config_filters {{{3 -sub save_config_filters { - my $file = shift; - foreach my $key ( sort keys %filters ) { - next if !$filters{$key}->{user} || $filters{$key}->{quick}; - my $text = $filters{$key}->{text}; - $text =~ s/([\\'])/\\$1/g; - my $tbls = join(" ", @{$filters{$key}->{tbls}}); - print $file "$key=text='$text' tbls='$tbls'\n"; - } -} - -# load_config_visible_tables {{{3 -sub load_config_visible_tables { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $mode, $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $mode && exists $modes{$mode}; - $modes{$mode}->{visible_tables} = - [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $rest)) ]; - $modes{$mode}->{cust}->{visible_tables} = 1; - } -} - -# save_config_visible_tables {{{3 -sub save_config_visible_tables { - my $file = shift; - foreach my $mode ( sort keys %modes ) { - next unless $modes{$mode}->{cust}->{visible_tables}; - my $tables = $modes{$mode}->{visible_tables}; - print $file "$mode=", join(' ', @$tables), "\n"; - } -} - -# load_config_sort_cols {{{3 -sub load_config_sort_cols { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $key && exists $tbl_meta{$key}; - $tbl_meta{$key}->{sort_cols} = $rest; - $tbl_meta{$key}->{cust}->{sort_cols} = 1; - $tbl_meta{$key}->{sort_func} = make_sort_func($tbl_meta{$key}); - } -} - -# save_config_sort_cols {{{3 -sub save_config_sort_cols { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - next unless $tbl_meta{$tbl}->{cust}->{sort_cols}; - my $col = $tbl_meta{$tbl}->{sort_cols}; - print $file "$tbl=$col\n"; - } -} - -# load_config_active_filters {{{3 -sub load_config_active_filters { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $tbl && exists $tbl_meta{$tbl}; - my @parts = unique(grep { exists($filters{$_}) } split(/\s+/, $rest)); - @parts = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @parts; - $tbl_meta{$tbl}->{filters} = [ @parts ]; - $tbl_meta{$tbl}->{cust}->{filters} = 1; - } -} - -# save_config_active_filters {{{3 -sub save_config_active_filters { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - next if $tbl_meta{$tbl}->{temp}; - next unless $tbl_meta{$tbl}->{cust}->{filters}; - my $aref = $tbl_meta{$tbl}->{filters}; - print $file "$tbl=", join(' ', @$aref), "\n"; - } -} - -# load_config_active_columns {{{3 -sub load_config_active_columns { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $key && exists $tbl_meta{$key}; - my @parts = grep { exists($tbl_meta{$key}->{cols}->{$_}) } unique split(/ /, $rest); - $tbl_meta{$key}->{visible} = [ @parts ]; - $tbl_meta{$key}->{cust}->{visible} = 1; - } -} - -# save_config_active_columns {{{3 -sub save_config_active_columns { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - next unless $tbl_meta{$tbl}->{cust}->{visible}; - my $aref = $tbl_meta{$tbl}->{visible}; - print $file "$tbl=", join(' ', @$aref), "\n"; - } -} - -# save_config_tbl_meta {{{3 -sub save_config_tbl_meta { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - foreach my $col ( keys %{$tbl_meta{$tbl}->{cols}} ) { - my $meta = $tbl_meta{$tbl}->{cols}->{$col}; - next unless $meta->{user}; - print $file "$col=", join( - " ", - map { - # Some properties (trans) are arrays, others scalars - my $val = ref($meta->{$_}) ? join(',', @{$meta->{$_}}) : $meta->{$_}; - $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes - "$_='$val'"; # Enclose in single quotes - } - grep { $_ ne 'func' } - keys %$meta - ), "\n"; - } - } -} - -# save_config_config {{{3 -sub save_config_config { - my $file = shift; - foreach my $key ( sort keys %config ) { - eval { - if ( $key ne 'password' || $config{savepass}->{val} ) { - print $file "# $config{$key}->{note}\n" - or die "Cannot print to file: $OS_ERROR"; - my $val = $config{$key}->{val}; - $val = '' unless defined($val); - if ( ref( $val ) eq 'ARRAY' ) { - print $file "$key=" - . join( " ", @$val ) . "\n" - or die "Cannot print to file: $OS_ERROR"; - } - elsif ( ref( $val ) eq 'HASH' ) { - print $file "$key=" - . join( " ", - map { "$_:$val->{$_}" } keys %$val - ) . "\n"; - } - else { - print $file "$key=$val\n"; - } - } - }; - if ( $EVAL_ERROR ) { print "$EVAL_ERROR in $key"; }; - } - -} - -# load_config_config {{{3 -sub load_config_config { - my ( $file ) = @_; - - # Look in the command-line parameters for things stored in the same slot. - my %cmdline = - map { $_->{c} => $opts{$_->{k}} } - grep { exists $_->{c} && exists $opts{$_->{k}} } - @opt_spec; - - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $name, $val ) = $line =~ m/^(.+?)=(.*)$/; - next unless defined $name && defined $val; - - # Values might already have been set at the command line. - $val = defined($cmdline{$name}) ? $cmdline{$name} : $val; - - # Validate the incoming values... - if ( $name && exists( $config{$name} ) ) { - if ( !$config{$name}->{pat} || $val =~ m/$config{$name}->{pat}/ ) { - $config{$name}->{val} = $val; - $config{$name}->{read} = 1; - } - } - } -} - -# load_config_tbl_meta {{{3 -sub load_config_tbl_meta { - my ( $file ) = @_; - - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - # Each tbl_meta section has all the properties defined in %col_props. - my ( $col , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $col; - my %parts = $rest =~ m/(\w+)='((?:(?!(?{cols}->{$col} ||= {}; - - foreach my $prop ( keys %col_props ) { - if ( !defined($parts{$prop}) ) { - die "Undefined property $prop for column $col in table $tbl"; - } - - # Un-escape escaping - $parts{$prop} =~ s/\\\\/\\/g; - $parts{$prop} =~ s/\\'/'/g; - - if ( ref $col_props{$prop} ) { - if ( $prop eq 'trans' ) { - $meta->{cols}->{$col}->{trans} - = [ unique(grep { exists $trans_funcs{$_} } split(',', $parts{$prop})) ]; - } - else { - $meta->{cols}->{$col}->{$prop} = [ split(',', $parts{$prop}) ]; - } - } - else { - $meta->{cols}->{$col}->{$prop} = $parts{$prop}; - } - } - - } -} - -# save_config {{{3 -sub save_config { - return if $config{readonly}->{val}; - # Save to a temp file first, so a crash doesn't destroy the main config file - my $newname = $opts{c} || "$homepath/.innotop/innotop.ini"; - my $filename = $newname . '_tmp'; - open my $file, "+>", $filename - or die("Can't write to $filename: $OS_ERROR"); - print $file "version=$VERSION\n"; - - foreach my $section ( @ordered_config_file_sections ) { - die "No such config file section $section" unless $config_file_sections{$section}; - print $file "\n[$section]\n\n"; - $config_file_sections{$section}->{writer}->($file); - print $file "\n[/$section]\n"; - } - - # Now clobber the main config file with the temp. - close $file or die("Can't close $filename: $OS_ERROR"); - rename($filename, $newname) or die("Can't rename $filename to $newname: $OS_ERROR"); -} - -# load_config_connections {{{3 -sub load_config_connections { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $key; - my %parts = $rest =~ m/(\S+?)=(\S*)/g; - my %conn = map { $_ => $parts{$_} || '' } @conn_parts; - $connections{$key} = \%conn; - } -} - -# save_config_connections {{{3 -sub save_config_connections { - my $file = shift; - foreach my $conn ( sort keys %connections ) { - my $href = $connections{$conn}; - my @keys = $href->{savepass} ? @conn_parts : grep { $_ ne 'pass' } @conn_parts; - print $file "$conn=", join(' ', map { "$_=$href->{$_}" } grep { defined $href->{$_} } @keys), "\n"; - } -} - -sub load_config_colors { - my ( $file ) = @_; - my %rule_set_for; - - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $tbl, $rule ) = $line =~ m/^(.*?)=(.*)$/; - next unless $tbl && $rule; - next unless exists $tbl_meta{$tbl}; - my %parts = $rule =~ m/(\w+)='((?:(?!(?{cols}->{$parts{col}}; - next unless $parts{op} && exists $comp_ops{$parts{op}}; - next unless defined $parts{arg}; - next unless defined $parts{color}; - my @colors = unique(grep { exists $ansicolors{$_} } split(/\W+/, $parts{color})); - next unless @colors; - - # Finally! Enough validation... - $rule_set_for{$tbl} ||= []; - push @{$rule_set_for{$tbl}}, \%parts; - } - - foreach my $tbl ( keys %rule_set_for ) { - $tbl_meta{$tbl}->{colors} = $rule_set_for{$tbl}; - $tbl_meta{$tbl}->{color_func} = make_color_func($tbl_meta{$tbl}); - $tbl_meta{$tbl}->{cust}->{colors} = 1; - } -} - -# save_config_colors {{{3 -sub save_config_colors { - my $file = shift; - foreach my $tbl ( sort keys %tbl_meta ) { - my $meta = $tbl_meta{$tbl}; - next unless $meta->{cust}->{colors}; - foreach my $rule ( @{$meta->{colors}} ) { - print $file "$tbl=", join( - ' ', - map { - my $val = $rule->{$_}; - $val =~ s/([\\'])/\\$1/g; # Escape backslashes and single quotes - "$_='$val'"; # Enclose in single quotes - } - qw(col op arg color) - ), "\n"; - } - } -} - -# load_config_active_connections {{{3 -sub load_config_active_connections { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/; - next unless $key && exists $modes{$key}; - my @parts = grep { exists $connections{$_} } split(/ /, $rest); - $modes{$key}->{connections} = [ @parts ] if exists $modes{$key}; - } -} - -# save_config_active_connections {{{3 -sub save_config_active_connections { - my $file = shift; - foreach my $mode ( sort keys %modes ) { - my @connections = get_connections($mode); - print $file "$mode=", join(' ', @connections), "\n"; - } -} - -# load_config_stmt_sleep_times {{{3 -sub load_config_stmt_sleep_times { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $val ) = split('=', $line); - next unless $key && defined $val && $val =~ m/$num_regex/; - $stmt_sleep_time_for{$key} = $val; - } -} - -# save_config_stmt_sleep_times {{{3 -sub save_config_stmt_sleep_times { - my $file = shift; - foreach my $key ( sort keys %stmt_sleep_time_for ) { - print $file "$key=$stmt_sleep_time_for{$key}\n"; - } -} - -# load_config_mvs {{{3 -sub load_config_mvs { - my ( $file ) = @_; - while ( my $line = <$file> ) { - chomp $line; - next if $line =~ m/^#/; - last if $line =~ m/^\[/; - - my ( $key , $val ) = split('=', $line); - next unless $key && defined $val && $val =~ m/$num_regex/; - $mvs{$key} = $val; - } -} - -# save_config_mvs {{{3 -sub save_config_mvs { - my $file = shift; - foreach my $key ( sort keys %mvs ) { - print $file "$key=$mvs{$key}\n"; - } -} - -# edit_configuration {{{3 -sub edit_configuration { - my $key = ''; - while ( $key ne 'q' ) { - $clear_screen_sub->(); - my @display_lines = ''; - - if ( $key && $cfg_editor_action{$key} ) { - $cfg_editor_action{$key}->{func}->(); - } - - # Show help - push @display_lines, create_caption('What configuration do you want to edit?', - create_table2( - [ sort keys %cfg_editor_action ], - { map { $_ => $_ } keys %cfg_editor_action }, - { map { $_ => $cfg_editor_action{$_}->{note} } keys %cfg_editor_action }, - { sep => ' ' })); - - draw_screen(\@display_lines); - $key = pause(''); - } -} - -# edit_configuration_variables {{{3 -sub edit_configuration_variables { - $clear_screen_sub->(); - my $mode = $config{mode}->{val}; - - my %config_choices - = map { $_ => $config{$_}->{note} || '' } - # Only config values that are marked as applying to this mode. - grep { - my $key = $_; - $config{$key}->{conf} && - ( $config{$key}->{conf} eq 'ALL' - || grep { $mode eq $_ } @{$config{$key}->{conf}} ) - } keys %config; - - my $key = prompt_list( - "Enter the name of the variable you wish to configure", - '', - sub{ return keys %config_choices }, - \%config_choices); - - if ( exists($config_choices{$key}) ) { - get_config_interactive($key); - } -} - -# edit_color_rules {{{3 -sub edit_color_rules { - my ( $tbl ) = @_; - $clear_screen_sub->(); - $tbl ||= choose_visible_table(); - if ( $tbl && exists($tbl_meta{$tbl}) ) { - my $meta = $tbl_meta{$tbl}; - my @cols = ('', qw(col op arg color)); - my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; - $info->{label}->{maxw} = 30; - my $key; - my $selected_rule; - - # This loop builds a tabular view of the rules. - do { - - # Show help - if ( $key && $key eq '?' ) { - my @display_lines = ''; - push @display_lines, create_caption('Editor key mappings', - create_table2( - [ sort keys %color_editor_action ], - { map { $_ => $_ } keys %color_editor_action }, - { map { $_ => $color_editor_action{$_}->{note} } keys %color_editor_action }, - { sep => ' ' })); - draw_screen(\@display_lines); - pause(); - $key = ''; - } - else { - - # Do the action specified - $selected_rule ||= 0; - if ( $key && $color_editor_action{$key} ) { - $selected_rule = $color_editor_action{$key}->{func}->($tbl, $selected_rule); - $selected_rule ||= 0; - } - - # Build the table of rules. If the terminal has color, the selected rule - # will be highlighted; otherwise a > at the left will indicate. - my $data = $meta->{colors} || []; - foreach my $i ( 0..@$data - 1 ) { - $data->[$i]->{''} = $i == $selected_rule ? '>' : ''; - } - my @display_lines = create_table(\@cols, $info, $data); - - # Highlight selected entry - for my $i ( 0 .. $#display_lines ) { - if ( $display_lines[$i] =~ m/^>/ ) { - $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; - } - } - - # Draw the screen and wait for a command. - unshift @display_lines, '', - "Editing color rules for $meta->{capt}. Press ? for help, q to " - . "quit.", ''; - draw_screen(\@display_lines); - print "\n\n", word_wrap('Rules are applied in order from top to ' - . 'bottom. The first matching rule wins and prevents the ' - . 'rest of the rules from being applied.'); - $key = pause(''); - } - } while ( $key ne 'q' ); - $meta->{color_func} = make_color_func($meta); - } -} - -# add_quick_filter {{{3 -sub add_quick_filter { - my $tbl = choose_visible_table(); - if ( $tbl && exists($tbl_meta{$tbl}) ) { - print "\n"; - my $response = prompt_list( - "Enter column name and filter text", - '', - sub { return keys %{$tbl_meta{$tbl}->{cols}} }, - () - ); - my ( $col, $text ) = split(/\s+/, $response, 2); - - # You can't filter on a nonexistent column. But if you filter on a pivoted - # table, the columns are different, so on a pivoted table, allow filtering - # on the 'name' column. - # NOTE: if a table is pivoted and un-pivoted, this will likely cause crashes. - # Currently not an issue since there's no way to toggle pivot/nopivot. - return unless $col && $text && - (exists($tbl_meta{$tbl}->{cols}->{$col}) - || ($tbl_meta{$tbl}->{pivot} && $col eq 'name')); - - my ( $sub, $err ) = compile_filter( "defined \$set->{$col} && \$set->{$col} =~ m/$text/" ); - return if !$sub || $err; - my $name = "quick_$tbl.$col"; - $filters{$name} = { - func => $sub, - text => $text, - user => 1, - quick => 1, - name => $name, - note => 'Quick-filter', - tbls => [$tbl], - }; - push @{$tbl_meta{$tbl}->{filters}}, $name; - } -} - -# clear_quick_filters {{{3 -sub clear_quick_filters { - my $tbl = choose_visible_table( - # Only tables that have quick-filters - sub { - my ( $tbl ) = @_; - return scalar grep { $filters{$_}->{quick} } @{ $tbl_meta{$tbl}->{filters} }; - } - ); - if ( $tbl && exists($tbl_meta{$tbl}) ) { - my @current = @{$tbl_meta{$tbl}->{filters}}; - @current = grep { !$filters{$_}->{quick} } @current; - $tbl_meta{$tbl}->{filters} = \@current; - } -} - -sub edit_plugins { - $clear_screen_sub->(); - - my @cols = ('', qw(class desc active)); - my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; - my @rows = map { $plugins{$_} } sort keys %plugins; - my $key; - my $selected; - - # This loop builds a tabular view of the plugins. - do { - - # Show help - if ( $key && $key eq '?' ) { - my @display_lines = ''; - push @display_lines, create_caption('Editor key mappings', - create_table2( - [ sort keys %plugin_editor_action ], - { map { $_ => $_ } keys %plugin_editor_action }, - { map { $_ => $plugin_editor_action{$_}->{note} } keys %plugin_editor_action }, - { sep => ' ' })); - draw_screen(\@display_lines); - pause(); - $key = ''; - } - - # Do the action specified - else { - $selected ||= 0; - if ( $key && $plugin_editor_action{$key} ) { - $selected = $plugin_editor_action{$key}->{func}->(\@rows, $selected); - $selected ||= 0; - } - - # Build the table of plugins. - foreach my $row ( 0.. $#rows ) { - $rows[$row]->{''} = $row eq $selected ? '>' : ' '; - } - my @display_lines = create_table(\@cols, $info, \@rows); - - # Highlight selected entry - for my $i ( 0 .. $#display_lines ) { - if ( $display_lines[$i] =~ m/^>/ ) { - $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; - } - } - - # Draw the screen and wait for a command. - unshift @display_lines, '', - "Plugin Management. Press ? for help, q to quit.", ''; - draw_screen(\@display_lines); - $key = pause(''); - } - } while ( $key ne 'q' ); -} - -# edit_table {{{3 -sub edit_table { - $clear_screen_sub->(); - my ( $tbl ) = @_; - $tbl ||= choose_visible_table(); - if ( $tbl && exists($tbl_meta{$tbl}) ) { - my $meta = $tbl_meta{$tbl}; - my @cols = ('', qw(name hdr label src)); - my $info = { map { $_ => { hdr => $_, just => '-', } } @cols }; - $info->{label}->{maxw} = 30; - my $key; - my $selected_column; - - # This loop builds a tabular view of the tbl_meta's structure, showing each column - # in the entry as a row. - do { - - # Show help - if ( $key && $key eq '?' ) { - my @display_lines = ''; - push @display_lines, create_caption('Editor key mappings', - create_table2( - [ sort keys %tbl_editor_action ], - { map { $_ => $_ } keys %tbl_editor_action }, - { map { $_ => $tbl_editor_action{$_}->{note} } keys %tbl_editor_action }, - { sep => ' ' })); - draw_screen(\@display_lines); - pause(); - $key = ''; - } - else { - - # Do the action specified - $selected_column ||= $meta->{visible}->[0]; - if ( $key && $tbl_editor_action{$key} ) { - $selected_column = $tbl_editor_action{$key}->{func}->($tbl, $selected_column); - $selected_column ||= $meta->{visible}->[0]; - } - - # Build the pivoted view of the table's meta-data. If the terminal has color, - # The selected row will be highlighted; otherwise a > at the left will indicate. - my $data = []; - foreach my $row ( @{$meta->{visible}} ) { - my %hash; - @hash{ @cols } = @{$meta->{cols}->{$row}}{@cols}; - $hash{src} = '' if ref $hash{src}; - $hash{name} = $row; - $hash{''} = $row eq $selected_column ? '>' : ' '; - push @$data, \%hash; - } - my @display_lines = create_table(\@cols, $info, $data); - - # Highlight selected entry - for my $i ( 0 .. $#display_lines ) { - if ( $display_lines[$i] =~ m/^>/ ) { - $display_lines[$i] = [ $display_lines[$i], 'reverse' ]; - } - } - - # Draw the screen and wait for a command. - unshift @display_lines, '', - "Editing table definition for $meta->{capt}. Press ? for help, q to quit.", ''; - draw_screen(\@display_lines, { clear => 1 }); - $key = pause(''); - } - } while ( $key ne 'q' ); - } -} - -# choose_mode_tables {{{3 -# Choose which table(s), and in what order, to display in a given mode. -sub choose_mode_tables { - my $mode = $config{mode}->{val}; - my @tbls = @{$modes{$mode}->{visible_tables}}; - my $new = prompt_list( - "Choose tables to display", - join(' ', @tbls), - sub { return @{$modes{$mode}->{tables}} }, - { map { $_ => $tbl_meta{$_}->{capt} } @{$modes{$mode}->{tables}} } - ); - $modes{$mode}->{visible_tables} = - [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $new)) ]; - $modes{$mode}->{cust}->{visible_tables} = 1; -} - -# choose_visible_table {{{3 -sub choose_visible_table { - my ( $grep_cond ) = @_; - my $mode = $config{mode}->{val}; - my @tbls - = grep { $grep_cond ? $grep_cond->($_) : 1 } - @{$modes{$mode}->{visible_tables}}; - my $tbl = $tbls[0]; - if ( @tbls > 1 ) { - $tbl = prompt_list( - "Choose a table", - '', - sub { return @tbls }, - { map { $_ => $tbl_meta{$_}->{capt} } @tbls } - ); - } - return $tbl; -} - -sub toggle_aggregate { - my ( $tbl ) = @_; - $tbl ||= choose_visible_table(); - return unless $tbl && exists $tbl_meta{$tbl}; - my $meta = $tbl_meta{$tbl}; - $meta->{aggregate} ^= 1; -} - -sub choose_filters { - my ( $tbl ) = @_; - $tbl ||= choose_visible_table(); - return unless $tbl && exists $tbl_meta{$tbl}; - my $meta = $tbl_meta{$tbl}; - $clear_screen_sub->(); - - print "Choose filters for $meta->{capt}:\n"; - - my $ini = join(' ', @{$meta->{filters}}); - my $val = prompt_list( - 'Choose filters', - $ini, - sub { return keys %filters }, - { - map { $_ => $filters{$_}->{note} } - grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } - keys %filters - } - ); - - my @choices = unique(split(/\s+/, $val)); - foreach my $new ( grep { !exists($filters{$_}) } @choices ) { - my $answer = prompt("There is no filter called '$new'. Create it?", undef, 'y'); - if ( $answer eq 'y' ) { - create_new_filter($new, $tbl); - } - } - @choices = grep { exists $filters{$_} } @choices; - @choices = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @choices; - $meta->{filters} = [ @choices ]; - $meta->{cust}->{filters} = 1; -} - -sub choose_group_cols { - my ( $tbl ) = @_; - $tbl ||= choose_visible_table(); - return unless $tbl && exists $tbl_meta{$tbl}; - $clear_screen_sub->(); - my $meta = $tbl_meta{$tbl}; - my $curr = join(', ', @{$meta->{group_by}}); - my $val = prompt_list( - 'Group-by columns', - $curr, - sub { return keys %{$meta->{cols}} }, - { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }); - if ( $curr ne $val ) { - $meta->{group_by} = [ grep { exists $meta->{cols}->{$_} } $val =~ m/(\w+)/g ]; - $meta->{cust}->{group_by} = 1; - } -} - -sub choose_sort_cols { - my ( $tbl ) = @_; - $tbl ||= choose_visible_table(); - return unless $tbl && exists $tbl_meta{$tbl}; - $clear_screen_sub->(); - my $meta = $tbl_meta{$tbl}; - - my ( $cols, $hints ); - if ( $meta->{pivot} ) { - $cols = sub { qw(name set_0) }; - $hints = { name => 'name', set_0 => 'set_0' }; - } - else { - $cols = sub { return keys %{$meta->{cols}} }; - $hints = { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} }; - } - - my $val = prompt_list( - 'Sort columns (reverse sort with -col)', - $meta->{sort_cols}, - $cols, - $hints ); - if ( $meta->{sort_cols} ne $val ) { - $meta->{sort_cols} = $val; - $meta->{cust}->{sort_cols} = 1; - $tbl_meta{$tbl}->{sort_func} = make_sort_func($tbl_meta{$tbl}); - } -} - -# create_new_filter {{{3 -sub create_new_filter { - my ( $filter, $tbl ) = @_; - $clear_screen_sub->(); - - if ( !$filter || $filter =~ m/\W/ ) { - print word_wrap("Choose a name for the filter. This name is not displayed, and is only used " - . "for internal reference. It can only contain lowercase letters, numbers, and underscores."); - print "\n\n"; - do { - $filter = prompt("Enter filter name"); - } while ( !$filter || $filter =~ m/\W/ ); - } - - my $completion = sub { keys %{$tbl_meta{$tbl}->{cols}} }; - my ( $err, $sub, $body ); - do { - $clear_screen_sub->(); - print word_wrap("A filter is a Perl subroutine that accepts a hashref of columns " - . "called \$set, and returns a true value if the filter accepts the row. Example:\n" - . " \$set->{active_secs} > 5\n" - . "will only allow rows if their active_secs column is greater than 5."); - print "\n\n"; - if ( $err ) { - print "There's an error in your filter expression: $err\n\n"; - } - $body = prompt("Enter subroutine body", undef, undef, $completion); - ( $sub, $err ) = compile_filter($body); - } while ( $err ); - - $filters{$filter} = { - func => $sub, - text => $body, - user => 1, - name => $filter, - note => 'User-defined filter', - tbls => [$tbl], - }; -} - -# get_config_interactive {{{3 -sub get_config_interactive { - my $key = shift; - $clear_screen_sub->(); - - # Print help first. - print "Enter a new value for '$key' ($config{$key}->{note}).\n"; - - my $current = ref($config{$key}->{val}) ? join(" ", @{$config{$key}->{val}}) : $config{$key}->{val}; - - my $new_value = prompt('Enter a value', $config{$key}->{pat}, $current); - $config{$key}->{val} = $new_value; -} - -sub edit_current_var_set { - my $mode = $config{mode}->{val}; - my $name = $config{"${mode}_set"}->{val}; - my $variables = $var_sets{$name}->{text}; - - my $new = $variables; - do { - $clear_screen_sub->(); - $new = prompt("Enter variables for $name", undef, $variables); - } until ( $new ); - - if ( $new ne $variables ) { - @{$var_sets{$name}}{qw(text user)} = ( $new, 1); - } -} - - -sub choose_var_set { - my ( $key ) = @_; - $clear_screen_sub->(); - - my $new_value = prompt_list( - 'Choose a set of values to display, or enter the name of a new one', - $config{$key}->{val}, - sub { return keys %var_sets }, - { map { $_ => $var_sets{$_}->{text} } keys %var_sets }); - - if ( !exists $var_sets{$new_value} ) { - add_new_var_set($new_value); - } - - $config{$key}->{val} = $new_value if exists $var_sets{$new_value}; -} - -sub switch_var_set { - my ( $cfg_var, $dir ) = @_; - my @var_sets = sort keys %var_sets; - my $cur = $config{$cfg_var}->{val}; - my $pos = grep { $_ lt $cur } @var_sets; - my $newpos = ($pos + $dir) % @var_sets; - $config{$cfg_var}->{val} = $var_sets[$newpos]; - $clear_screen_sub->(); -} - -# Online configuration and prompting functions {{{2 - -# edit_stmt_sleep_times {{{3 -sub edit_stmt_sleep_times { - $clear_screen_sub->(); - my $stmt = prompt_list('Specify a statement', '', sub { return sort keys %stmt_maker_for }); - return unless $stmt && exists $stmt_maker_for{$stmt}; - $clear_screen_sub->(); - my $curr_val = $stmt_sleep_time_for{$stmt} || 0; - my $new_val = prompt('Specify a sleep delay after calling this SQL', $num_regex, $curr_val); - if ( $new_val ) { - $stmt_sleep_time_for{$stmt} = $new_val; - } - else { - delete $stmt_sleep_time_for{$stmt}; - } -} - -# edit_server_groups {{{3 -# Choose which server connections are in a server group. First choose a group, -# then choose which connections are in it. -sub edit_server_groups { - $clear_screen_sub->(); - my $mode = $config{mode}->{val}; - my $group = $modes{$mode}->{server_group}; - my %curr = %server_groups; - my $new = choose_or_create_server_group($group, 'to edit'); - $clear_screen_sub->(); - if ( exists $curr{$new} ) { - # Don't do this step if the user just created a new server group, - # because part of that process was to choose connections. - my $cxns = join(' ', @{$server_groups{$new}}); - my @conns = choose_or_create_connection($cxns, 'for this group'); - $server_groups{$new} = \@conns; - } -} - -# choose_server_groups {{{3 -sub choose_server_groups { - $clear_screen_sub->(); - my $mode = $config{mode}->{val}; - my $group = $modes{$mode}->{server_group}; - my $new = choose_or_create_server_group($group, 'for this mode'); - $modes{$mode}->{server_group} = $new if exists $server_groups{$new}; -} - -sub choose_or_create_server_group { - my ( $group, $prompt ) = @_; - my $new = ''; - - my @available = sort keys %server_groups; - - if ( @available ) { - print "You can enter the name of a new group to create it.\n"; - - $new = prompt_list( - "Choose a server group $prompt", - $group, - sub { return @available }, - { map { $_ => join(' ', @{$server_groups{$_}}) } @available }); - - $new =~ s/\s.*//; - - if ( !exists $server_groups{$new} ) { - my $answer = prompt("There is no server group called '$new'. Create it?", undef, "y"); - if ( $answer eq 'y' ) { - add_new_server_group($new); - } - } - } - else { - $new = add_new_server_group(); - } - return $new; -} - -sub choose_or_create_connection { - my ( $cxns, $prompt ) = @_; - print "You can enter the name of a new connection to create it.\n"; - - my @available = sort keys %connections; - my $new_cxns = prompt_list( - "Choose connections $prompt", - $cxns, - sub { return @available }, - { map { $_ => $connections{$_}->{dsn} } @available }); - - my @new = unique(grep { !exists $connections{$_} } split(/\s+/, $new_cxns)); - foreach my $new ( @new ) { - my $answer = prompt("There is no connection called '$new'. Create it?", undef, "y"); - if ( $answer eq 'y' ) { - add_new_dsn($new); - } - } - - return unique(grep { exists $connections{$_} } split(/\s+/, $new_cxns)); -} - -# choose_servers {{{3 -sub choose_servers { - $clear_screen_sub->(); - my $mode = $config{mode}->{val}; - my $cxns = join(' ', get_connections()); - my @chosen = choose_or_create_connection($cxns, 'for this mode'); - $modes{$mode}->{connections} = \@chosen; - $modes{$mode}->{server_group} = ''; # Clear this because it overrides {connections} -} - -# display_license {{{3 -sub display_license { - $clear_screen_sub->(); - - print $innotop_license; - - pause(); -} - -# Data-retrieval functions {{{2 -# get_status_info {{{3 -# Get SHOW STATUS and SHOW VARIABLES together. -sub get_status_info { - my @cxns = @_; - if ( !$info_gotten{status}++ ) { - foreach my $cxn ( @cxns ) { - $vars{$cxn}->{$clock} ||= {}; - my $vars = $vars{$cxn}->{$clock}; - - my $sth = do_stmt($cxn, 'SHOW_STATUS') or next; - my $res = $sth->fetchall_arrayref(); - map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; - - # Calculate hi-res uptime and add cxn to the hash. This duplicates get_driver_status, - # but it's most important to have consistency. - $vars->{Uptime_hires} ||= get_uptime($cxn); - $vars->{cxn} = $cxn; - - # Add SHOW VARIABLES to the hash - $sth = do_stmt($cxn, 'SHOW_VARIABLES') or next; - $res = $sth->fetchall_arrayref(); - map { $vars->{$_->[0]} = $_->[1] || 0 } @$res; - } - } -} - -# Chooses a thread for explaining, killing, etc... -# First arg is a func that can be called in grep. -sub choose_thread { - my ( $grep_cond, $prompt ) = @_; - - # Narrow the list to queries that can be explained. - my %thread_for = map { - # Eliminate innotop's own threads. - $_ => $dbhs{$_}->{dbh} ? $dbhs{$_}->{dbh}->{mysql_thread_id} : 0 - } keys %connections; - - my @candidates = grep { - $_->{id} != $thread_for{$_->{cxn}} && $grep_cond->($_) - } @current_queries; - return unless @candidates; - - # Find out which server. - my @cxns = unique map { $_->{cxn} } @candidates; - my ( $cxn ) = select_cxn('On which server', @cxns); - return unless $cxn && exists($connections{$cxn}); - - # Re-filter the list of candidates to only those on this server - @candidates = grep { $_->{cxn} eq $cxn } @candidates; - - # Find out which thread to do. - my $info; - if ( @candidates > 1 ) { - - # Sort longest-active first, then longest-idle. - my $sort_func = sub { - my ( $a, $b ) = @_; - return $a->{query} && !$b->{query} ? 1 - : $b->{query} && !$a->{query} ? -1 - : ($a->{time} || 0) <=> ($b->{time} || 0); - }; - my @threads = map { $_->{id} } reverse sort { $sort_func->($a, $b) } @candidates; - - print "\n"; - my $thread = prompt_list($prompt, - $threads[0], - sub { return @threads }); - return unless $thread && $thread =~ m/$int_regex/; - - # Find the info hash of that query on that server. - ( $info ) = grep { $thread == $_->{id} } @candidates; - } - else { - $info = $candidates[0]; - } - return $info; -} - -# analyze_query {{{3 -# Allows the user to show fulltext, explain, show optimized... -sub analyze_query { - my ( $action ) = @_; - - my $info = choose_thread( - sub { $_[0]->{query} }, - 'Select a thread to analyze', - ); - return unless $info; - - my %actions = ( - e => \&display_explain, - f => \&show_full_query, - o => \&show_optimized_query, - ); - do { - $actions{$action}->($info); - print "\n"; - $action = pause('Press e to explain, f for full query, o for optimized query'); - } while ( exists($actions{$action}) ); -} - -# inc {{{3 -# Returns the difference between two sets of variables/status/innodb stuff. -sub inc { - my ( $offset, $cxn ) = @_; - my $vars = $vars{$cxn}; - if ( $offset < 0 ) { - return $vars->{$clock}; - } - elsif ( exists $vars{$clock - $offset} && !exists $vars->{$clock - $offset - 1} ) { - return $vars->{$clock - $offset}; - } - my $cur = $vars->{$clock - $offset}; - my $pre = $vars->{$clock - $offset - 1}; - return { - # Numeric variables get subtracted, non-numeric get passed straight through. - map { - $_ => - ( (defined $cur->{$_} && $cur->{$_} =~ m/$num_regex/) - ? $cur->{$_} - ($pre->{$_} || 0) - : $cur->{$_} ) - } keys %{$cur} - }; -} - -# extract_values {{{3 -# Arguments are a set of values (which may be incremental, derived from -# current and previous), current, and previous values. -# TODO: there are a few places that don't remember prev set so can't pass it. -sub extract_values { - my ( $set, $cur, $pre, $tbl ) = @_; - - # Hook in event listeners - foreach my $listener ( @{$event_listener_for{extract_values}} ) { - $listener->extract_values($set, $cur, $pre, $tbl); - } - - my $result = {}; - my $meta = $tbl_meta{$tbl}; - my $cols = $meta->{cols}; - foreach my $key ( keys %$cols ) { - my $info = $cols->{$key} - or die "Column '$key' doesn't exist in $tbl"; - die "No func defined for '$key' in $tbl" - unless $info->{func}; - eval { - $result->{$key} = $info->{func}->($set, $cur, $pre) - }; - if ( $EVAL_ERROR ) { - if ( $config{debug}->{val} ) { - die $EVAL_ERROR; - } - $result->{$key} = $info->{num} ? 0 : ''; - } - } - return $result; -} - -# get_full_processlist {{{3 -sub get_full_processlist { - my @cxns = @_; - my @result; - foreach my $cxn ( @cxns ) { - my $stmt = do_stmt($cxn, 'PROCESSLIST') or next; - my $arr = $stmt->fetchall_arrayref({}); - push @result, map { $_->{cxn} = $cxn; $_ } @$arr; - } - return @result; -} - -# get_open_tables {{{3 -sub get_open_tables { - my @cxns = @_; - my @result; - foreach my $cxn ( @cxns ) { - my $stmt = do_stmt($cxn, 'OPEN_TABLES') or next; - my $arr = $stmt->fetchall_arrayref({}); - push @result, map { $_->{cxn} = $cxn; $_ } @$arr; - } - return @result; -} - -# get_innodb_status {{{3 -sub get_innodb_status { - my ( $cxns, $addl_sections ) = @_; - if ( !$config{skip_innodb}->{val} && !$info_gotten{innodb_status}++ ) { - - # Determine which sections need to be parsed - my %sections_required = - map { $tbl_meta{$_}->{innodb} => 1 } - grep { $_ && $tbl_meta{$_}->{innodb} } - get_visible_tables(); - - # Add in any other sections the caller requested. - foreach my $sec ( @$addl_sections ) { - $sections_required{$sec} = 1; - } - - foreach my $cxn ( @$cxns ) { - my $innodb_status_text; - - if ( $file ) { # Try to fetch status text from the file. - my @stat = stat($file); - - # Initialize the file. - if ( !$file_mtime ) { - # Initialize to 130k from the end of the file (because the limit - # on the size of innodb status is 128k even with Google's patches) - # and try to grab the last status from the file. - sysseek($file, (-128 * 1_024), 2); - } - - # Read from the file. - my $buffer; - if ( !$file_mtime || $file_mtime != $stat[9] ) { - $file_data = ''; - while ( sysread($file, $buffer, 4096) ) { - $file_data .= $buffer; - } - $file_mtime = $stat[9]; - } - - # Delete everything but the last InnoDB status text from the file. - $file_data =~ s/\A.*(?=^=====================================\n...... ........ INNODB MONITOR OUTPUT)//ms; - $innodb_status_text = $file_data; - } - - else { - my $stmt = do_stmt($cxn, 'INNODB_STATUS') or next; - $innodb_status_text = $stmt->fetchrow_hashref()->{status}; - } - - next unless $innodb_status_text - && substr($innodb_status_text, 0, 100) =~ m/INNODB MONITOR OUTPUT/; - - # Parse and merge into %vars storage - my %innodb_status = ( - $innodb_parser->get_status_hash( - $innodb_status_text, - $config{debug}->{val}, - \%sections_required, - 0, # don't parse full lock information - ) - ); - if ( !$innodb_status{IB_got_all} && $config{auto_wipe_dl}->{val} ) { - clear_deadlock($cxn); - } - - # Merge using a hash slice, which is the fastest way - $vars{$cxn}->{$clock} ||= {}; - my $hash = $vars{$cxn}->{$clock}; - @{$hash}{ keys %innodb_status } = values %innodb_status; - $hash->{cxn} = $cxn; - $hash->{Uptime_hires} ||= get_uptime($cxn); - } - } -} - -# clear_deadlock {{{3 -sub clear_deadlock { - my ( $cxn ) = @_; - return if $clearing_deadlocks++; - my $tbl = $connections{$cxn}->{dl_table}; - return unless $tbl; - - eval { - # Set up the table for creating a deadlock. - my $engine = version_ge($dbhs{$cxn}->{dbh}, '4.1.2') ? 'engine' : 'type'; - return unless do_query($cxn, "drop table if exists $tbl"); - return unless do_query($cxn, "create table $tbl(a int) $engine=innodb"); - return unless do_query($cxn, "delete from $tbl"); - return unless do_query($cxn, "insert into $tbl(a) values(0), (1)"); - return unless do_query($cxn, "commit"); # Or the children will block against the parent - - # Fork off two children to deadlock against each other. - my %children; - foreach my $child ( 0..1 ) { - my $pid = fork(); - if ( defined($pid) && $pid == 0 ) { # I am a child - deadlock_thread( $child, $tbl, $cxn ); - } - elsif ( !defined($pid) ) { - die("Unable to fork for clearing deadlocks!\n"); - } - # I already exited if I'm a child, so I'm the parent. - $children{$child} = $pid; - } - - # Wait for the children to exit. - foreach my $child ( keys %children ) { - my $pid = waitpid($children{$child}, 0); - } - - # Clean up. - do_query($cxn, "drop table $tbl"); - }; - if ( $EVAL_ERROR ) { - print $EVAL_ERROR; - pause(); - } - - $clearing_deadlocks = 0; -} - -sub get_master_logs { - my @cxns = @_; - my @result; - if ( !$info_gotten{master_logs}++ ) { - foreach my $cxn ( @cxns ) { - my $stmt = do_stmt($cxn, 'SHOW_MASTER_LOGS') or next; - push @result, @{$stmt->fetchall_arrayref({})}; - } - } - return @result; -} - -# get_master_slave_status {{{3 -sub get_master_slave_status { - my @cxns = @_; - if ( !$info_gotten{replication_status}++ ) { - foreach my $cxn ( @cxns ) { - $vars{$cxn}->{$clock} ||= {}; - my $vars = $vars{$cxn}->{$clock}; - $vars->{cxn} = $cxn; - - my $stmt = do_stmt($cxn, 'SHOW_MASTER_STATUS') or next; - my $res = $stmt->fetchall_arrayref({})->[0]; - @{$vars}{ keys %$res } = values %$res; - $stmt = do_stmt($cxn, 'SHOW_SLAVE_STATUS') or next; - $res = $stmt->fetchall_arrayref({})->[0]; - @{$vars}{ keys %$res } = values %$res; - $vars->{Uptime_hires} ||= get_uptime($cxn); - } - } -} - -sub is_func { - my ( $word ) = @_; - return defined(&$word) - || eval "my \$x= sub { $word }; 1" - || $EVAL_ERROR !~ m/^Bareword/; -} - -# Documentation {{{1 -# ############################################################################ -# I put this last as per the Dog book. -# ############################################################################ -=pod - -=head1 NAME - -innotop - MySQL and InnoDB transaction/status monitor. - -=head1 SYNOPSIS - -To monitor servers normally: - - innotop - -To monitor InnoDB status information from a file: - - innotop /var/log/mysql/mysqld.err - -To run innotop non-interactively in a pipe-and-filter configuration: - - innotop --count 5 -d 1 -n - -=head1 DESCRIPTION - -innotop monitors MySQL servers. Each of its modes shows you a different aspect -of what's happening in the server. For example, there's a mode for monitoring -replication, one for queries, and one for transactions. innotop refreshes its -data periodically, so you see an updating view. - -innotop has lots of features for power users, but you can start and run it with -virtually no configuration. If you're just getting started, see -L<"QUICK-START">. Press '?' at any time while running innotop for -context-sensitive help. - -=head1 QUICK-START - -To start innotop, open a terminal or command prompt. If you have installed -innotop on your system, you should be able to just type "innotop" and press -Enter; otherwise, you will need to change to innotop's directory and type "perl -innotop". - -The first thing innotop needs to know is how to connect to a MySQL server. You -can just enter the hostname of the server, for example "localhost" or -"127.0.0.1" if the server is on the same machine as innotop. After this innotop -will prompt you for a DSN (data source name). You should be able to just accept -the defaults by pressing Enter. - -When innotop asks you about a table to use when resetting InnoDB deadlock -information, just accept the default for now. This is an advanced feature you -can configure later (see L<"D: InnoDB Deadlocks"> for more). - -If you have a .my.cnf file with your MySQL connection defaults, innotop can read -it, and you won't need to specify a username and password if it's in that file. -Otherwise, you should answer 'y' to the next couple of prompts. - -After this, you should be connected, and innotop should show you something like -the following: - - InnoDB Txns (? for help) localhost, 01:11:19, InnoDB 10s :-), 50 QPS, - - CXN History Versions Undo Dirty Buf Used Bufs Txns MaxTxn - localhost 7 2035 0 0 0.00% 92.19% 1 07:34 - - CXN ID User Host Txn Status Time Undo Query Tex - localhost 98379 user1 webserver ACTIVE 07:34 0 SELECT `c - localhost 98450 user1 webserver ACTIVE 01:06 0 INSERT IN - localhost 97750 user1 webserver not starte 00:00 0 - localhost 98375 user1 appserver not starte 00:00 0 - -(This sample is truncated at the right so it will fit on a terminal when running -'man innotop') - -This sample comes from a quiet server with few transactions active. If your -server is busy, you'll see more output. Notice the first line on the screen, -which tells you what mode you're in and what server you're connected to. You -can change to other modes with keystrokes; press 'Q' to switch to a list of -currently running queries. - -Press the '?' key to see what keys are active in the current mode. You can -press any of these keys and innotop will either take the requested action or -prompt you for more input. If your system has Term::ReadLine support, you can -use TAB and other keys to auto-complete and edit input. - -To quit innotop, press the 'q' key. - -=head1 OPTIONS - -innotop is mostly configured via its configuration file, but some of the -configuration options can come from the command line. You can also specify a -file to monitor for InnoDB status output; see L<"MONITORING A FILE"> for more -details. - -You can negate some options by prefixing the option name with --no. For -example, --noinc (or --no-inc) negates L<"--inc">. - -=over - -=item --help - -Print a summary of command-line usage and exit. - -=item --color - -Enable or disable terminal coloring. Corresponds to the L<"color"> config file -setting. - -=item --config - -Specifies a configuration file to read. This option is non-sticky, that is to -say it does not persist to the configuration file itself. - -=item --nonint - -Enable non-interactive operation. See L<"NON-INTERACTIVE OPERATION"> for more. - -=item --count - -Refresh only the specified number of times (ticks) before exiting. Each refresh -is a pause for L<"interval"> seconds, followed by requesting data from MySQL -connections and printing it to the terminal. - -=item --delay - -Specifies the amount of time to pause between ticks (refreshes). Corresponds to -the configuration option L<"interval">. - -=item --mode - -Specifies the mode in which innotop should start. Corresponds to the -configuration option L<"mode">. - -=item --inc - -Specifies whether innotop should display absolute numbers or relative numbers -(offsets from their previous values). Corresponds to the configuration option -L<"status_inc">. - -=item --version - -Output version information and exit. - -=back - -=head1 HOTKEYS - -innotop is interactive, and you control it with key-presses. - -=over - -=item * - -Uppercase keys switch between modes. - -=item * - -Lowercase keys initiate some action within the current mode. - -=item * - -Other keys do something special like change configuration or show the -innotop license. - -=back - -Press '?' at any time to see the currently active keys and what they do. - -=head1 MODES - -Each of innotop's modes retrieves and displays a particular type of data from -the servers you're monitoring. You switch between modes with uppercase keys. -The following is a brief description of each mode, in alphabetical order. To -switch to the mode, press the key listed in front of its heading in the -following list: - -=over - -=item B: InnoDB Buffers - -This mode displays information about the InnoDB buffer pool, page statistics, -insert buffer, and adaptive hash index. The data comes from SHOW INNODB STATUS. - -This mode contains the L<"buffer_pool">, L<"page_statistics">, -L<"insert_buffers">, and L<"adaptive_hash_index"> tables by default. - -=item C: Command Summary - -This mode is similar to mytop's Command Summary mode. It shows the -L<"cmd_summary"> table, which looks something like the following: - - Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 - _____________________ Command Summary _____________________ - Name Value Pct Last Incr Pct - Select_scan 3244858 69.89% 2 100.00% - Select_range 1354177 29.17% 0 0.00% - Select_full_join 39479 0.85% 0 0.00% - Select_full_range_join 4097 0.09% 0 0.00% - Select_range_check 0 0.00% 0 0.00% - -The command summary table is built by extracting variables from -L<"STATUS_VARIABLES">. The variables must be numeric and must match the prefix -given by the L<"cmd_filter"> configuration variable. The variables are then -sorted by value descending and compared to the last variable, as shown above. -The percentage columns are percentage of the total of all variables in the -table, so you can see the relative weight of the variables. - -The example shows what you see if the prefix is "Select_". The default -prefix is "Com_". You can choose a prefix with the 's' key. - -It's rather like running SHOW VARIABLES LIKE "prefix%" with memory and -nice formatting. - -Values are aggregated across all servers. The Pct columns are not correctly -aggregated across multiple servers. This is a known limitation of the grouping -algorithm that may be fixed in the future. - -=item D: InnoDB Deadlocks - -This mode shows the transactions involved in the last InnoDB deadlock. A second -table shows the locks each transaction held and waited for. A deadlock is -caused by a cycle in the waits-for graph, so there should be two locks held and -one waited for unless the deadlock information is truncated. - -InnoDB puts deadlock information before some other information in the SHOW -INNODB STATUS output. If there are a lot of locks, the deadlock information can -grow very large, and there is a limit on the size of the SHOW INNODB -STATUS output. A large deadlock can fill the entire output, or even be -truncated, and prevent you from seeing other information at all. If you are -running innotop in another mode, for example T mode, and suddenly you don't see -anything, you might want to check and see if a deadlock has wiped out the data -you need. - -If it has, you can create a small deadlock to replace the large one. Use the -'w' key to 'wipe' the large deadlock with a small one. This will not work -unless you have defined a deadlock table for the connection (see L<"SERVER -CONNECTIONS">). - -You can also configure innotop to automatically detect when a large deadlock -needs to be replaced with a small one (see L<"auto_wipe_dl">). - -This mode displays the L<"deadlock_transactions"> and L<"deadlock_locks"> tables -by default. - -=item F: InnoDB Foreign Key Errors - -This mode shows the last InnoDB foreign key error information, such as the -table where it happened, when and who and what query caused it, and so on. - -InnoDB has a huge variety of foreign key error messages, and many of them are -just hard to parse. innotop doesn't always do the best job here, but there's -so much code devoted to parsing this messy, unparseable output that innotop is -likely never to be perfect in this regard. If innotop doesn't show you what -you need to see, just look at the status text directly. - -This mode displays the L<"fk_error"> table by default. - -=item I: InnoDB I/O Info - -This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, -file I/O miscellaneous, and log statistics. It displays the L<"io_threads">, -L<"pending_io">, L<"file_io_misc">, and L<"log_statistics"> tables by default. - -=item L: Locks - -This mode shows information about current locks. At the moment only InnoDB -locks are supported, and by default you'll only see locks for which transactions -are waiting. This information comes from the TRANSACTIONS section of the InnoDB -status text. If you have a very busy server, you may have frequent lock waits; -it helps to be able to see which tables and indexes are the "hot spot" for -locks. If your server is running pretty well, this mode should show nothing. - -You can configure MySQL and innotop to monitor not only locks for which a -transaction is waiting, but those currently held, too. You can do this with the -InnoDB Lock Monitor (L). It's -not documented in the MySQL manual, but creating the lock monitor with the -following statement also affects the output of SHOW INNODB STATUS, which innotop -uses: - - CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; - -This causes InnoDB to print its output to the MySQL file every 16 seconds or so, -as stated in the manual, but it also makes the normal SHOW INNODB STATUS output -include lock information, which innotop can parse and display (that's the -undocumented feature). - -This means you can do what may have seemed impossible: to a limited extent -(InnoDB truncates some information in the output), you can see which transaction -holds the locks something else is waiting for. You can also enable and disable -the InnoDB Lock Monitor with the key mappings in this mode. - -This mode displays the L<"innodb_locks"> table by default. Here's a sample of -the screen when one connection is waiting for locks another connection holds: - - _________________________________ InnoDB Locks __________________________ - CXN ID Type Waiting Wait Active Mode DB Table Index - localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY - localhost 12 TABLE 0 00:10 00:10 IX test t1 - localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY - localhost 11 TABLE 0 00:00 00:25 IX test t1 - localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY - -You can see the first connection, ID 12, is waiting for a lock on the PRIMARY -key on test.t1, and has been waiting for 10 seconds. The second connection -isn't waiting, because the Waiting column is 0, but it holds locks on the same -index. That tells you connection 11 is blocking connection 12. - -=item M: Master/Slave Replication Status - -This mode shows the output of SHOW SLAVE STATUS and SHOW MASTER STATUS in three -tables. The first two divide the slave's status into SQL and I/O thread status, -and the last shows master status. Filters are applied to eliminate non-slave -servers from the slave tables, and non-master servers from the master table. - -This mode displays the L<"slave_sql_status">, L<"slave_io_status">, and -L<"master_status"> tables by default. - -=item O: Open Tables - -This section comes from MySQL's SHOW OPEN TABLES command. By default it is -filtered to show tables which are in use by one or more queries, so you can -get a quick look at which tables are 'hot'. You can use this to guess which -tables might be locked implicitly. - -This mode displays the L<"open_tables"> mode by default. - -=item Q: Query List - -This mode displays the output from SHOW FULL PROCESSLIST, much like B's -query list mode. This mode does B show InnoDB-related information. This -is probably one of the most useful modes for general usage. - -There is an informative header that shows general status information about -your server. You can toggle it on and off with the 'h' key. By default, -innotop hides inactive processes and its own process. You can toggle these on -and off with the 'i' and 'a' keys. - -You can EXPLAIN a query from this mode with the 'e' key. This displays the -query's full text, the results of EXPLAIN, and in newer MySQL versions, even -the optimized query resulting from EXPLAIN EXTENDED. innotop also tries to -rewrite certain queries to make them EXPLAIN-able. For example, INSERT/SELECT -statements are rewritable. - -This mode displays the L<"q_header"> and L<"processlist"> tables by default. - -=item R: InnoDB Row Operations and Semaphores - -This mode shows InnoDB row operations, row operation miscellaneous, semaphores, -and information from the wait array. It displays the L<"row_operations">, -L<"row_operation_misc">, L<"semaphores">, and L<"wait_array"> tables by default. - -=item S: Variables & Status - -This mode calculates statistics, such as queries per second, and prints them out -in several different styles. You can show absolute values, or incremental values -between ticks. - -You can switch between the views by pressing a key. The 's' key prints a -single line each time the screen updates, in the style of B. The 'g' -key changes the view to a graph of the same numbers, sort of like B. -The 'v' key changes the view to a pivoted table of variable names on the left, -with successive updates scrolling across the screen from left to right. You can -choose how many updates to put on the screen with the L<"num_status_sets"> -configuration variable. - -Headers may be abbreviated to fit on the screen in interactive operation. You -choose which variables to display with the 'c' key, which selects from -predefined sets, or lets you create your own sets. You can edit the current set -with the 'e' key. - -This mode doesn't really display any tables like other modes. Instead, it uses -a table definition to extract and format the data, but it then transforms the -result in special ways before outputting it. It uses the L<"var_status"> table -definition for this. - -=item T: InnoDB Transactions - -This mode shows transactions from the InnoDB monitor's output, in B-like -format. This mode is the reason I wrote innotop. - -You can kill queries or processes with the 'k' and 'x' keys, and EXPLAIN a query -with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, -so explaining may not work right if the query is truncated. - -The informational header can be toggled on and off with the 'h' key. By -default, innotop hides inactive transactions and its own transaction. You can -toggle this on and off with the 'i' and 'a' keys. - -This mode displays the L<"t_header"> and L<"innodb_transactions"> tables by -default. - -=back - -=head1 INNOTOP STATUS - -The first line innotop displays is a "status bar" of sorts. What it contains -depends on the mode you're in, and what servers you're monitoring. The first -few words are always the innotop mode, such as "InnoDB Txns" for T mode, -followed by a reminder to press '?' for help at any time. - -=head2 ONE SERVER - -The simplest case is when you're monitoring a single server. In this case, the -name of the connection is next on the status line. This is the name you gave -when you created the connection -- most likely the MySQL server's hostname. -This is followed by the server's uptime. - -If you're in an InnoDB mode, such as T or B, the next word is "InnoDB" followed -by some information about the SHOW INNODB STATUS output used to render the -screen. The first word is the number of seconds since the last SHOW INNODB -STATUS, which InnoDB uses to calculate some per-second statistics. The next is -a smiley face indicating whether the InnoDB output is truncated. If the smiley -face is a :-), all is well; there is no truncation. A :^| means the transaction -list is so long, InnoDB has only printed out some of the transactions. Finally, -a frown :-( means the output is incomplete, which is probably due to a deadlock -printing too much lock information (see L<"D: InnoDB Deadlocks">). - -The next two words indicate the server's queries per second (QPS) and how many -threads (connections) exist. Finally, the server's version number is the last -thing on the line. - -=head2 MULTIPLE SERVERS - -If you are monitoring multiple servers (see L<"SERVER CONNECTIONS">), the status -line does not show any details about individual servers. Instead, it shows the -names of the connections that are active. Again, these are connection names you -specified, which are likely to be the server's hostname. A connection that has -an error is prefixed with an exclamation point. - -If you are monitoring a group of servers (see L<"SERVER GROUPS">), the status -line shows the name of the group. If any connection in the group has an -error, the group's name is followed by the fraction of the connections that -don't have errors. - -See L<"ERROR HANDLING"> for more details about innotop's error handling. - -=head2 MONITORING A FILE - -If you give a filename on the command line, innotop will not connect to ANY -servers at all. It will watch the specified file for InnoDB status output and -use that as its data source. It will always show a single connection called -'file'. And since it can't connect to a server, it can't determine how long the -server it's monitoring has been up; so it calculates the server's uptime as time -since innotop started running. - -=head1 SERVER ADMINISTRATION - -While innotop is primarily a monitor that lets you watch and analyze your -servers, it can also send commands to servers. The most frequently useful -commands are killing queries and stopping or starting slaves. - -You can kill a connection, or in newer versions of MySQL kill a query but not a -connection, from L<"Q: Query List"> and L<"T: InnoDB Transactions"> modes. -Press 'k' to issue a KILL command, or 'x' to issue a KILL QUERY command. -innotop will prompt you for the server and/or connection ID to kill (innotop -does not prompt you if there is only one possible choice for any input). -innotop pre-selects the longest-running query, or the oldest connection. -Confirm the command with 'y'. - -In L<"M: Master/Slave Replication Status"> mode, you can start and stop slaves -with the 'a' and 'o' keys, respectively. You can send these commands to many -slaves at once. innotop fills in a default command of START SLAVE or STOP SLAVE -for you, but you can actually edit the command and send anything you wish, such -as SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event -when it starts. - -You can also ask innotop to calculate the earliest binlog in use by any slave -and issue a PURGE MASTER LOGS on the master. Use the 'b' key for this. innotop -will prompt you for a master to run the command on, then prompt you for the -connection names of that master's slaves (there is no way for innotop to -determine this reliably itself). innotop will find the minimum binlog in use by -these slave connections and suggest it as the argument to PURGE MASTER LOGS. - -=head1 SERVER CONNECTIONS - -When you create a server connection, innotop asks you for a series of inputs, as -follows: - -=over - -=item DSN - -A DSN is a Data Source Name, which is the initial argument passed to the DBI -module for connecting to a server. It is usually of the form - - DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME - -Since this DSN is passed to the DBD::mysql driver, you should read the driver's -documentation at L<"http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"> for -the exact details on all the options you can pass the driver in the DSN. You -can read more about DBI at L, and especially at -L. - -The mysql_read_default_group=mysql option lets the DBD driver read your MySQL -options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid -specifying a username or password for the connection. - -=item InnoDB Deadlock Table - -This optional item tells innotop a table name it can use to deliberately create -a small deadlock (see L<"D: InnoDB Deadlocks">). If you specify this option, -you just need to be sure the table doesn't exist, and that innotop can create -and drop the table with the InnoDB storage engine. You can safely omit or just -accept the default if you don't intend to use this. - -=item Username - -innotop will ask you if you want to specify a username. If you say 'y', it will -then prompt you for a user name. If you have a MySQL option file that specifies -your username, you don't have to specify a username. - -The username defaults to your login name on the system you're running innotop on. - -=item Password - -innotop will ask you if you want to specify a password. Like the username, the -password is optional, but there's an additional prompt that asks if you want to -save the password in the innotop configuration file. If you don't save it in -the configuration file, innotop will prompt you for a password each time it -starts. Passwords in the innotop configuration file are saved in plain text, -not encrypted in any way. - -=back - -Once you finish answering these questions, you should be connected to a server. -But innotop isn't limited to monitoring a single server; you can define many -server connections and switch between them by pressing the '@' key. See -L<"SWITCHING BETWEEN CONNECTIONS">. - -To create a new connection, press the '@' key and type the name of the new -connection, then follow the steps given above. - -=head1 SERVER GROUPS - -If you have multiple MySQL instances, you can put them into named groups, such -as 'all', 'masters', and 'slaves', which innotop can monitor all together. - -You can choose which group to monitor with the '#' key, and you can press the -TAB key to switch to the next group. If you're not currently monitoring a -group, pressing TAB selects the first group. - -To create a group, press the '#' key and type the name of your new group, then -type the names of the connections you want the group to contain. - -=head1 SWITCHING BETWEEN CONNECTIONS - -innotop lets you quickly switch which servers you're monitoring. The most basic -way is by pressing the '@' key and typing the name(s) of the connection(s) you -want to use. This setting is per-mode, so you can monitor different connections -in each mode, and innotop remembers which connections you choose. - -You can quickly switch to the 'next' connection in alphabetical order with the -'n' key. If you're monitoring a server group (see L<"SERVER GROUPS">) this will -switch to the first connection. - -You can also type many connection names, and innotop will fetch and display data -from them all. Just separate the connection names with spaces, for example -"server1 server2." Again, if you type the name of a connection that doesn't -exist, innotop will prompt you for connection information and create the -connection. - -Another way to monitor multiple connections at once is with server groups. You -can use the TAB key to switch to the 'next' group in alphabetical order, or if -you're not monitoring any groups, TAB will switch to the first group. - -innotop does not fetch data in parallel from connections, so if you are -monitoring a large group or many connections, you may notice increased delay -between ticks. - -When you monitor more than one connection, innotop's status bar changes. See -L<"INNOTOP STATUS">. - -=head1 ERROR HANDLING - -Error handling is not that important when monitoring a single connection, but is -crucial when you have many active connections. A crashed server or lost -connection should not crash innotop. As a result, innotop will continue to run -even when there is an error; it just won't display any information from the -connection that had an error. Because of this, innotop's behavior might confuse -you. It's a feature, not a bug! - -innotop does not continue to query connections that have errors, because they -may slow innotop and make it hard to use, especially if the error is a problem -connecting and causes a long time-out. Instead, innotop retries the connection -occasionally to see if the error still exists. If so, it will wait until some -point in the future. The wait time increases in ticks as the Fibonacci series, -so it tries less frequently as time passes. - -Since errors might only happen in certain modes because of the SQL commands -issued in those modes, innotop keeps track of which mode caused the error. If -you switch to a different mode, innotop will retry the connection instead of -waiting. - -By default innotop will display the problem in red text at the bottom of the -first table on the screen. You can disable this behavior with the -L<"show_cxn_errors_in_tbl"> configuration option, which is enabled by default. -If the L<"debug"> option is enabled, innotop will display the error at the -bottom of every table, not just the first. And if L<"show_cxn_errors"> is -enabled, innotop will print the error text to STDOUT as well. Error messages -might only display in the mode that caused the error, depending on the mode and -whether innotop is avoiding querying that connection. - -=head1 NON-INTERACTIVE OPERATION - -You can run innotop in non-interactive mode, in which case it is entirely -controlled from the configuration file and command-line options. To start -innotop in non-interactive mode, give the L"<--nonint"> command-line option. -This changes innotop's behavior in the following ways: - -=over - -=item * - -Certain Perl modules are not loaded. Term::Readline is not loaded, since -innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI -modules are not loaded. Term::ReadKey is still used, since innotop may have to -prompt for connection passwords when starting up. - -=item * - -innotop does not clear the screen after each tick. - -=item * - -innotop does not persist any changes to the configuration file. - -=item * - -If L<"--count"> is given and innotop is in incremental mode (see L<"status_inc"> -and L<"--inc">), innotop actually refreshes one more time than specified so it -can print incremental statistics. This suppresses output during the first -tick, so innotop may appear to hang. - -=item * - -innotop only displays the first table in each mode. This is so the output can -be easily processed with other command-line utilities such as awk and sed. To -change which tables display in each mode, see L<"TABLES">. Since L<"Q: Query -List"> mode is so important, innotop automatically disables the L<"q_header"> -table. This ensures you'll see the L<"processlist"> table, even if you have -innotop configured to show the q_header table during interactive operation. -Similarly, in L<"T: InnoDB Transactions"> mode, the L<"t_header"> table is -suppressed so you see only the L<"innodb_transactions"> table. - -=item * - -All output is tab-separated instead of being column-aligned with whitespace, and -innotop prints the full contents of each table instead of only printing one -screenful at a time. - -=item * - -innotop only prints column headers once instead of every tick (see -L<"hide_hdr">). innotop does not print table captions (see -L<"display_table_captions">). innotop ensures there are no empty lines in the -output. - -=item * - -innotop does not honor the L<"shorten"> transformation, which normally shortens -some numbers to human-readable formats. - -=item * - -innotop does not print a status line (see L<"INNOTOP STATUS">). - -=back - -=head1 CONFIGURING - -Nearly everything about innotop is configurable. Most things are possible to -change with built-in commands, but you can also edit the configuration file. - -While running innotop, press the '$' key to bring up the configuration editing -dialog. Press another key to select the type of data you want to edit: - -=over - -=item S: Statement Sleep Times - -Edits SQL statement sleep delays, which make innotop pause for the specified -amount of time after executing a statement. See L<"SQL STATEMENTS"> for a -definition of each statement and what it does. By default innotop does not -delay after any statements. - -This feature is included so you can customize the side-effects caused by -monitoring your server. You may not see any effects, but some innotop users -have noticed that certain MySQL versions under very high load with InnoDB -enabled take longer than usual to execute SHOW GLOBAL STATUS. If innotop calls -SHOW FULL PROCESSLIST immediately afterward, the processlist contains more -queries than the machine actually averages at any given moment. Configuring -innotop to pause briefly after calling SHOW GLOBAL STATUS alleviates this -effect. - -Sleep times are stored in the L<"stmt_sleep_times"> section of the configuration -file. Fractional-second sleeps are supported, subject to your hardware's -limitations. - -=item c: Edit Columns - -Starts the table editor on one of the displayed tables. See L<"TABLE EDITOR">. -An alternative way to start the table editor without entering the configuration -dialog is with the '^' key. - -=item g: General Configuration - -Starts the configuration editor to edit global and mode-specific configuration -variables (see L<"MODES">). innotop prompts you to choose a variable from among -the global and mode-specific ones depending on the current mode. - -=item k: Row-Coloring Rules - -Starts the row-coloring rules editor on one of the displayed table(s). See -L<"COLORS"> for details. - -=item p: Manage Plugins - -Starts the plugin configuration editor. See L<"PLUGINS"> for details. - -=item s: Server Groups - -Lets you create and edit server groups. See L<"SERVER GROUPS">. - -=item t: Choose Displayed Tables - -Lets you choose which tables to display in this mode. See L<"MODES"> and -L<"TABLES">. - -=back - -=head1 CONFIGURATION FILE - -innotop's default configuration file location is in $HOME/.innotop, but can be -overridden with the L<"--config"> command-line option. You can edit it by hand -safely. innotop reads the configuration file when it starts, and writes it out -again when it exits, so any changes you make while innotop is running will be -lost. - -innotop doesn't store its entire configuration in the configuration file. It -has a huge set of default configuration that it holds only in memory, and the -configuration file only overrides these defaults. When you customize a default -setting, innotop notices, and then stores the customizations into the file. -This keeps the file size down, makes it easier to edit, and makes upgrades -easier. - -A configuration file can be made read-only. See L<"readonly">. - -The configuration file is arranged into sections like an INI file. Each -section begins with [section-name] and ends with [/section-name]. Each -section's entries have a different syntax depending on the data they need to -store. You can put comments in the file; any line that begins with a # -character is a comment. innotop will not read the comments, so it won't write -them back out to the file when it exits. Comments in read-only configuration -files are still useful, though. - -The first line in the file is innotop's version number. This lets innotop -notice when the file format is not backwards-compatible, and upgrade smoothly -without destroying your customized configuration. - -The following list describes each section of the configuration file and the data -it contains: - -=over - -=item general - -The 'general' section contains global configuration variables and variables that -may be mode-specific, but don't belong in any other section. The syntax is a -simple key=value list. innotop writes a comment above each value to help you -edit the file by hand. - -=over - -=item S_func - -Controls S mode presentation (see L<"S: Variables & Status">). If g, values are -graphed; if s, values are like vmstat; if p, values are in a pivoted table. - -=item S_set - -Specifies which set of variables to display in L<"S: Variables & Status"> mode. -See L<"VARIABLE SETS">. - -=item auto_wipe_dl - -Instructs innotop to automatically wipe large deadlocks when it notices them. -When this happens you may notice a slight delay. At the next tick, you will -usually see the information that was being truncated by the large deadlock. - -=item charset - -Specifies what kind of characters to allow through the L<"no_ctrl_char"> -transformation. This keeps non-printable characters from confusing a -terminal when you monitor queries that contain binary data, such as images. - -The default is 'ascii', which considers anything outside normal ASCII to be a -control character. The other allowable values are 'unicode' and 'none'. 'none' -considers every character a control character, which can be useful for -collapsing ALL text fields in queries. - -=item cmd_filter - -This is the prefix that filters variables in L<"C: Command Summary"> mode. - -=item color - -Whether terminal coloring is permitted. - -=item cxn_timeout - -On MySQL versions 4.0.3 and newer, this variable is used to set the connection's -timeout, so MySQL doesn't close the connection if it is not used for a while. -This might happen because a connection isn't monitored in a particular mode, for -example. - -=item debug - -This option enables more verbose errors and makes innotop more strict in some -places. It can help in debugging filters and other user-defined code. It also -makes innotop write a lot of information to L<"debugfile"> when there is a -crash. - -=item debugfile - -A file to which innotop will write information when there is a crash. See -L<"FILES">. - -=item display_table_captions - -innotop displays a table caption above most tables. This variable suppresses or -shows captions on all tables globally. Some tables are configured with the -hide_caption property, which overrides this. - -=item global - -Whether to show GLOBAL variables and status. innotop only tries to do this on -servers which support the GLOBAL option to SHOW VARIABLES and SHOW STATUS. In -some MySQL versions, you need certain privileges to do this; if you don't have -them, innotop will not be able to fetch any variable and status data. This -configuration variable lets you run innotop and fetch what data you can even -without the elevated privileges. - -I can no longer find or reproduce the situation where GLOBAL wasn't allowed, but -I know there was one. - -=item graph_char - -Defines the character to use when drawing graphs in L<"S: Variables & Status"> -mode. - -=item header_highlight - -Defines how to highlight column headers. This only works if Term::ANSIColor is -available. Valid values are 'bold' and 'underline'. - -=item hide_hdr - -Hides column headers globally. - -=item interval - -The interval at which innotop will refresh its data (ticks). The interval is -implemented as a sleep time between ticks, so the true interval will vary -depending on how long it takes innotop to fetch and render data. - -This variable accepts fractions of a second. - -=item mode - -The mode in which innotop should start. Allowable arguments are the same as the -key presses that select a mode interactively. See L<"MODES">. - -=item num_digits - -How many digits to show in fractional numbers and percents. This variable's -range is between 0 and 9 and can be set directly from L<"S: Variables & Status"> -mode with the '+' and '-' keys. It is used in the L<"set_precision">, -L<"shorten">, and L<"percent"> transformations. - -=item num_status_sets - -Controls how many sets of status variables to display in pivoted L<"S: Variables -& Status"> mode. It also controls the number of old sets of variables innotop -keeps in its memory, so the larger this variable is, the more memory innotop -uses. - -=item plugin_dir - -Specifies where plugins can be found. By default, innotop stores plugins in the -'plugins' subdirectory of your innotop configuration directory. - -=item readonly - -Whether the configuration file is readonly. This cannot be set interactively, -because it would prevent itself from being written to the configuration file. - -=item show_cxn_errors - -Makes innotop print connection errors to STDOUT. See L<"ERROR HANDLING">. - -=item show_cxn_errors_in_tbl - -Makes innotop display connection errors as rows in the first table on screen. -See L<"ERROR HANDLING">. - -=item show_percent - -Adds a '%' character after the value returned by the L<"percent"> -transformation. - -=item show_statusbar - -Controls whether to show the status bar in the display. See L<"INNOTOP -STATUS">. - -=item skip_innodb - -Disables fetching SHOW INNODB STATUS, in case your server(s) do not have InnoDB -enabled and you don't want innotop to try to fetch it. This can also be useful -when you don't have the SUPER privilege, required to run SHOW INNODB STATUS. - -=item status_inc - -Whether to show absolute or incremental values for status variables. -Incremental values are calculated as an offset from the last value innotop saw -for that variable. This is a global setting, but will probably become -mode-specific at some point. Right now it is honored a bit inconsistently; some -modes don't pay attention to it. - -=back - -=item plugins - -This section holds a list of package names of active plugins. If the plugin -exists, innotop will activate it. See L<"PLUGINS"> for more information. - -=item filters - -This section holds user-defined filters (see L<"FILTERS">). Each line is in the -format filter_name=text='filter text' tbls='table list'. - -The filter text is the text of the subroutine's code. The table list is a list -of tables to which the filter can apply. By default, user-defined filters apply -to the table for which they were created, but you can manually override that by -editing the definition in the configuration file. - -=item active_filters - -This section stores which filters are active on each table. Each line is in the -format table_name=filter_list. - -=item tbl_meta - -This section stores user-defined or user-customized columns (see L<"COLUMNS">). -Each line is in the format col_name=properties, where the properties are a -name=quoted-value list. - -=item connections - -This section holds the server connections you have defined. Each line is in the -format name=properties, where the properties are a name=value list. The -properties are self-explanatory, and the only one that is treated specially is -'pass' which is only present if 'savepass' is set. See L<"SERVER CONNECTIONS">. - -=item active_connections - -This section holds a list of which connections are active in each mode. Each -line is in the format mode_name=connection_list. - -=item server_groups - -This section holds server groups. Each line is in the format -name=connection_list. See L<"SERVER GROUPS">. - -=item active_server_groups - -This section holds a list of which server group is active in each mode. Each -line is in the format mode_name=server_group. - -=item max_values_seen - -This section holds the maximum values seen for variables. This is used to scale -the graphs in L<"S: Variables & Status"> mode. Each line is in the format -name=value. - -=item active_columns - -This section holds table column lists. Each line is in the format -tbl_name=column_list. See L<"COLUMNS">. - -=item sort_cols - -This section holds the sort definition. Each line is in the format -tbl_name=column_list. If a column is prefixed with '-', that column sorts -descending. See L<"SORTING">. - -=item visible_tables - -This section defines which tables are visible in each mode. Each line is in the -format mode_name=table_list. See L<"TABLES">. - -=item varsets - -This section defines variable sets for use in L<"S: Status & Variables"> mode. -Each line is in the format name=variable_list. See L<"VARIABLE SETS">. - -=item colors - -This section defines colorization rules. Each line is in the format -tbl_name=property_list. See L<"COLORS">. - -=item stmt_sleep_times - -This section contains statement sleep times. Each line is in the format -statement_name=sleep_time. See L<"S: Statement Sleep Times">. - -=item group_by - -This section contains column lists for table group_by expressions. Each line is -in the format tbl_name=column_list. See L<"GROUPING">. - -=back - -=head1 CUSTOMIZING - -You can customize innotop a great deal. For example, you can: - -=over - -=item * - -Choose which tables to display, and in what order. - -=item * - -Choose which columns are in those tables, and create new columns. - -=item * - -Filter which rows display with built-in filters, user-defined filters, and -quick-filters. - -=item * - -Sort the rows to put important data first or group together related rows. - -=item * - -Highlight rows with color. - -=item * - -Customize the alignment, width, and formatting of columns, and apply -transformations to columns to extract parts of their values or format the values -as you wish (for example, shortening large numbers to familiar units). - -=item * - -Design your own expressions to extract and combine data as you need. This gives -you unlimited flexibility. - -=back - -All these and more are explained in the following sections. - -=head2 TABLES - -A table is what you'd expect: a collection of columns. It also has some other -properties, such as a caption. Filters, sorting rules, and colorization rules -belong to tables and are covered in later sections. - -Internally, table meta-data is defined in a data structure called %tbl_meta. -This hash holds all built-in table definitions, which contain a lot of default -instructions to innotop. The meta-data includes the caption, a list of columns -the user has customized, a list of columns, a list of visible columns, a list of -filters, color rules, a sort-column list, sort direction, and some information -about the table's data sources. Most of this is customizable via the table -editor (see L<"TABLE EDITOR">). - -You can choose which tables to show by pressing the '$' key. See L<"MODES"> and -L<"TABLES">. - -The table life-cycle is as follows: - -=over - -=item * - -Each table begins with a data source, which is an array of hashes. See below -for details on data sources. - -=item * - -Each element of the data source becomes a row in the final table. - -=item * - -For each element in the data source, innotop extracts values from the source and -creates a row. This row is another hash, which later steps will refer to as -$set. The values innotop extracts are determined by the table's columns. Each -column has an extraction subroutine, compiled from an expression (see -L<"EXPRESSIONS">). The resulting row is a hash whose keys are named the same as -the column name. - -=item * - -innotop filters the rows, removing those that don't need to be displayed. See -L<"FILTERS">. - -=item * - -innotop sorts the rows. See L<"SORTING">. - -=item * - -innotop groups the rows together, if specified. See L<"GROUPING">. - -=item * - -innotop colorizes the rows. See L<"COLORS">. - -=item * - -innotop transforms the column values in each row. See L<"TRANSFORMATIONS">. - -=item * - -innotop optionally pivots the rows (see L<"PIVOTING">), then filters and sorts -them. - -=item * - -innotop formats and justifies the rows as a table. During this step, innotop -applies further formatting to the column values, including alignment, maximum -and minimum widths. innotop also does final error checking to ensure there are -no crashes due to undefined values. innotop then adds a caption if specified, -and the table is ready to print. - -=back - -The lifecycle is slightly different if the table is pivoted, as noted above. To -clarify, if the table is pivoted, the process is extract, group, transform, -pivot, filter, sort, create. If it's not pivoted, the process is extract, -filter, sort, group, color, transform, create. This slightly convoluted process -doesn't map all that well to SQL, but pivoting complicates things pretty -thoroughly. Roughly speaking, filtering and sorting happen as late as needed to -effect the final result as you might expect, but as early as possible for -efficiency. - -Each built-in table is described below: - -=over - -=item adaptive_hash_index - -Displays data about InnoDB's adaptive hash index. Data source: -L<"STATUS_VARIABLES">. - -=item buffer_pool - -Displays data about InnoDB's buffer pool. Data source: L<"STATUS_VARIABLES">. - -=item cmd_summary - -Displays weighted status variables. Data source: L<"STATUS_VARIABLES">. - -=item deadlock_locks - -Shows which locks were held and waited for by the last detected deadlock. Data -source: L<"DEADLOCK_LOCKS">. - -=item deadlock_transactions - -Shows transactions involved in the last detected deadlock. Data source: -L<"DEADLOCK_TRANSACTIONS">. - -=item explain - -Shows the output of EXPLAIN. Data source: L<"EXPLAIN">. - -=item file_io_misc - -Displays data about InnoDB's file and I/O operations. Data source: -L<"STATUS_VARIABLES">. - -=item fk_error - -Displays various data about InnoDB's last foreign key error. Data source: -L<"STATUS_VARIABLES">. - -=item innodb_locks - -Displays InnoDB locks. Data source: L<"INNODB_LOCKS">. - -=item innodb_transactions - -Displays data about InnoDB's current transactions. Data source: -L<"INNODB_TRANSACTIONS">. - -=item insert_buffers - -Displays data about InnoDB's insert buffer. Data source: L<"STATUS_VARIABLES">. - -=item io_threads - -Displays data about InnoDB's I/O threads. Data source: L<"IO_THREADS">. - -=item log_statistics - -Displays data about InnoDB's logging system. Data source: L<"STATUS_VARIABLES">. - -=item master_status - -Displays replication master status. Data source: L<"STATUS_VARIABLES">. - -=item open_tables - -Displays open tables. Data source: L<"OPEN_TABLES">. - -=item page_statistics - -Displays InnoDB page statistics. Data source: L<"STATUS_VARIABLES">. - -=item pending_io - -Displays InnoDB pending I/O operations. Data source: L<"STATUS_VARIABLES">. - -=item processlist - -Displays current MySQL processes (threads/connections). Data source: -L<"PROCESSLIST">. - -=item q_header - -Displays various status values. Data source: L<"STATUS_VARIABLES">. - -=item row_operation_misc - -Displays data about InnoDB's row operations. Data source: -L<"STATUS_VARIABLES">. - -=item row_operations - -Displays data about InnoDB's row operations. Data source: -L<"STATUS_VARIABLES">. - -=item semaphores - -Displays data about InnoDB's semaphores and mutexes. Data source: -L<"STATUS_VARIABLES">. - -=item slave_io_status - -Displays data about the slave I/O thread. Data source: -L<"STATUS_VARIABLES">. - -=item slave_sql_status - -Displays data about the slave SQL thread. Data source: L<"STATUS_VARIABLES">. - -=item t_header - -Displays various InnoDB status values. Data source: L<"STATUS_VARIABLES">. - -=item var_status - -Displays user-configurable data. Data source: L<"STATUS_VARIABLES">. - -=item wait_array - -Displays data about InnoDB's OS wait array. Data source: L<"OS_WAIT_ARRAY">. - -=back - -=head2 COLUMNS - -Columns belong to tables. You can choose a table's columns by pressing the '^' -key, which starts the L<"TABLE EDITOR"> and lets you choose and edit columns. -Pressing 'e' from within the table editor lets you edit the column's properties: - -=over - -=item * - -hdr: a column header. This appears in the first row of the table. - -=item * - -just: justification. '-' means left-justified and '' means right-justified, -just as with printf formatting codes (not a coincidence). - -=item * - -dec: whether to further align the column on the decimal point. - -=item * - -num: whether the column is numeric. This affects how values are sorted -(lexically or numerically). - -=item * - -label: a small note about the column, which appears in dialogs that help the -user choose columns. - -=item * - -src: an expression that innotop uses to extract the column's data from its -source (see L<"DATA SOURCES">). See L<"EXPRESSIONS"> for more on expressions. - -=item * - -minw: specifies a minimum display width. This helps stabilize the display, -which makes it easier to read if the data is changing frequently. - -=item * - -maxw: similar to minw. - -=item * - -trans: a list of column transformations. See L<"TRANSFORMATIONS">. - -=item * - -agg: an aggregate function. See L<"GROUPING">. The default is L<"first">. - -=item * - -aggonly: controls whether the column only shows when grouping is enabled on the -table (see L<"GROUPING">). By default, this is disabled. This means columns -will always be shown by default, whether grouping is enabled or not. If a -column's aggonly is set true, the column will appear when you toggle grouping on -the table. Several columns are set this way, such as the count column on -L<"processlist"> and L<"innodb_transactions">, so you don't see a count when the -grouping isn't enabled, but you do when it is. - -=back - -=head2 FILTERS - -Filters remove rows from the display. They behave much like a WHERE clause in -SQL. innotop has several built-in filters, which remove irrelevant information -like inactive queries, but you can define your own as well. innotop also lets -you create quick-filters, which do not get saved to the configuration file, and -are just an easy way to quickly view only some rows. - -You can enable or disable a filter on any table. Press the '%' key (mnemonic: % -looks kind of like a line being filtered between two circles) and choose which -table you want to filter, if asked. You'll then see a list of possible filters -and a list of filters currently enabled for that table. Type the names of -filters you want to apply and press Enter. - -=head3 USER-DEFINED FILTERS - -If you type a name that doesn't exist, innotop will prompt you to create the -filter. Filters are easy to create if you know Perl, and not hard if you don't. -What you're doing is creating a subroutine that returns true if the row should -be displayed. The row is a hash reference passed to your subroutine as $set. - -For example, imagine you want to filter the processlist table so you only see -queries that have been running more than five minutes. Type a new name for your -filter, and when prompted for the subroutine body, press TAB to initiate your -terminal's auto-completion. You'll see the names of the columns in the -L<"processlist"> table (innotop generally tries to help you with auto-completion -lists). You want to filter on the 'time' column. Type the text "$set->{time} > -300" to return true when the query is more than five minutes old. That's all -you need to do. - -In other words, the code you're typing is surrounded by an implicit context, -which looks like this: - - sub filter { - my ( $set ) = @_; - # YOUR CODE HERE - } - -If your filter doesn't work, or if something else suddenly behaves differently, -you might have made an error in your filter, and innotop is silently catching -the error. Try enabling L<"debug"> to make innotop throw an error instead. - -=head3 QUICK-FILTERS - -innotop's quick-filters are a shortcut to create a temporary filter that doesn't -persist when you restart innotop. To create a quick-filter, press the '/' key. -innotop will prompt you for the column name and filter text. Again, you can use -auto-completion on column names. The filter text can be just the text you want -to "search for." For example, to filter the L<"processlist"> table on queries -that refer to the products table, type '/' and then 'info product'. - -The filter text can actually be any Perl regular expression, but of course a -literal string like 'product' works fine as a regular expression. - -Behind the scenes innotop compiles the quick-filter into a specially tagged -filter that is otherwise like any other filter. It just isn't saved to the -configuration file. - -To clear quick-filters, press the '\' key and innotop will clear them all at -once. - -=head2 SORTING - -innotop has sensible built-in defaults to sort the most important rows to the -top of the table. Like anything else in innotop, you can customize how any -table is sorted. - -To start the sort dialog, start the L<"TABLE EDITOR"> with the '^' key, choose a -table if necessary, and press the 's' key. You'll see a list of columns you can -use in the sort expression and the current sort expression, if any. Enter a -list of columns by which you want to sort and press Enter. If you want to -reverse sort, prefix the column name with a minus sign. For example, if you -want to sort by column a ascending, then column b descending, type 'a -b'. You -can also explicitly add a + in front of columns you want to sort ascending, but -it's not required. - -Some modes have keys mapped to open this dialog directly, and to quickly reverse -sort direction. Press '?' as usual to see which keys are mapped in any mode. - -=head2 GROUPING - -innotop can group, or aggregate, rows together (I use the terms -interchangeably). This is quite similar to an SQL GROUP BY clause. You can -specify to group on certain columns, or if you don't specify any, the entire set -of rows is treated as one group. This is quite like SQL so far, but unlike SQL, -you can also select un-grouped columns. innotop actually aggregates every -column. If you don't explicitly specify a grouping function, the default is -'first'. This is basically a convenience so you don't have to specify an -aggregate function for every column you want in the result. - -You can quickly toggle grouping on a table with the '=' key, which toggles its -aggregate property. This property doesn't persist to the config file. - -The columns by which the table is grouped are specified in its group_by -property. When you turn grouping on, innotop places the group_by columns at the -far left of the table, even if they're not supposed to be visible. The rest of -the visible columns appear in order after them. - -Two tables have default group_by lists and a count column built in: -L<"processlist"> and L<"innodb_transactions">. The grouping is by connection -and status, so you can quickly see how many queries or transactions are in a -given status on each server you're monitoring. The time columns are aggregated -as a sum; other columns are left at the default 'first' aggregation. - -By default, the table shown in L<"S: Variables & Status"> mode also uses -grouping so you can monitor variables and status across many servers. The -default aggregation function in this mode is 'avg'. - -Valid grouping functions are defined in the %agg_funcs hash. They include - -=over - -=item first - -Returns the first element in the group. - -=item count - -Returns the number of elements in the group, including undefined elements, much -like SQL's COUNT(*). - -=item avg - -Returns the average of defined elements in the group. - -=item sum - -Returns the sum of elements in the group. - -=back - -Here's an example of grouping at work. Suppose you have a very busy server with -hundreds of open connections, and you want to see how many connections are in -what status. Using the built-in grouping rules, you can press 'Q' to enter -L<"Q: Query List"> mode. Press '=' to toggle grouping (if necessary, select the -L<"processlist"> table when prompted). - -Your display might now look like the following: - - Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38-log - - CXN Cmd Cnt ID User Host Time Query - localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM - localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, - localhost Sleep 120 140 webusr localhost 5:18:12 - localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM - -That's actually quite a worrisome picture. You've got a lot of idle connections -(Sleep), and some connections executing queries (Query and Sending Data). -That's okay, but you also have a lot in Statistics status, collectively spending -over a minute. That means the query optimizer is having a really hard time -optimizing your statements. Something is wrong; it should normally take -milliseconds to optimize queries. You might not have seen this pattern if you -didn't look at your connections in aggregate. (This is a made-up example, but -it can happen in real life). - -=head2 PIVOTING - -innotop can pivot a table for more compact display, similar to a Pivot Table in -a spreadsheet (also known as a crosstab). Pivoting a table makes columns into -rows. Assume you start with this table: - - foo bar - === === - 1 3 - 2 4 - -After pivoting, the table will look like this: - - name set0 set1 - ==== ==== ==== - foo 1 2 - bar 3 4 - -To get reasonable results, you might need to group as well as pivoting. -innotop currently does this for L<"S: Variables & Status"> mode. - -=head2 COLORS - -By default, innotop highlights rows with color so you can see at a glance which -rows are more important. You can customize the colorization rules and add your -own to any table. Open the table editor with the '^' key, choose a table if -needed, and press 'o' to open the color editor dialog. - -The color editor dialog displays the rules applied to the table, in the order -they are evaluated. Each row is evaluated against each rule to see if the rule -matches the row; if it does, the row gets the specified color, and no further -rules are evaluated. The rules look like the following: - - state eq Locked black on_red - cmd eq Sleep white - user eq system user white - cmd eq Connect white - cmd eq Binlog Dump white - time > 600 red - time > 120 yellow - time > 60 green - time > 30 cyan - -This is the default rule set for the L<"processlist"> table. In order of -priority, these rules make locked queries black on a red background, "gray out" -connections from replication and sleeping queries, and make queries turn from -cyan to red as they run longer. - -(For some reason, the ANSI color code "white" is actually a light gray. Your -terminal's display may vary; experiment to find colors you like). - -You can use keystrokes to move the rules up and down, which re-orders their -priority. You can also delete rules and add new ones. If you add a new rule, -innotop prompts you for the column, an operator for the comparison, a value -against which to compare the column, and a color to assign if the rule matches. -There is auto-completion and prompting at each step. - -The value in the third step needs to be correctly quoted. innotop does not try -to quote the value because it doesn't know whether it should treat the value as -a string or a number. If you want to compare the column against a string, as -for example in the first rule above, you should enter 'Locked' surrounded by -quotes. If you get an error message about a bareword, you probably should have -quoted something. - -=head2 EXPRESSIONS - -Expressions are at the core of how innotop works, and are what enables you to -extend innotop as you wish. Recall the table lifecycle explained in -L<"TABLES">. Expressions are used in the earliest step, where it extracts -values from a data source to form rows. - -It does this by calling a subroutine for each column, passing it the source data -set, a set of current values, and a set of previous values. These are all -needed so the subroutine can calculate things like the difference between this -tick and the previous tick. - -The subroutines that extract the data from the set are compiled from -expressions. This gives significantly more power than just naming the values to -fill the columns, because it allows the column's value to be calculated from -whatever data is necessary, but avoids the need to write complicated and lengthy -Perl code. - -innotop begins with a string of text that can look as simple as a value's name -or as complicated as a full-fledged Perl expression. It looks at each -'bareword' token in the string and decides whether it's supposed to be a key -into the $set hash. A bareword is an unquoted value that isn't already -surrounded by code-ish things like dollar signs or curly brackets. If innotop -decides that the bareword isn't a function or other valid Perl code, it converts -it into a hash access. After the whole string is processed, innotop compiles a -subroutine, like this: - - sub compute_column_value { - my ( $set, $cur, $pre ) = @_; - my $val = # EXPANDED STRING GOES HERE - return $val; - } - -Here's a concrete example, taken from the header table L<"q_header"> in L<"Q: -Query List"> mode. This expression calculates the qps, or Queries Per Second, -column's values, from the values returned by SHOW STATUS: - - Questions/Uptime_hires - -innotop decides both words are barewords, and transforms this expression into -the following Perl code: - - $set->{Questions}/$set->{Uptime_hires} - -When surrounded by the rest of the subroutine's code, this is executable Perl -that calculates a high-resolution queries-per-second value. - -The arguments to the subroutine are named $set, $cur, and $pre. In most cases, -$set and $cur will be the same values. However, if L<"status_inc"> is set, $cur -will not be the same as $set, because $set will already contain values that are -the incremental difference between $cur and $pre. - -Every column in innotop is computed by subroutines compiled in the same fashion. -There is no difference between innotop's built-in columns and user-defined -columns. This keeps things consistent and predictable. - -=head2 TRANSFORMATIONS - -Transformations change how a value is rendered. For example, they can take a -number of seconds and display it in H:M:S format. The following transformations -are defined: - -=over - -=item commify - -Adds commas to large numbers every three decimal places. - -=item dulint_to_int - -Accepts two unsigned integers and converts them into a single longlong. This is -useful for certain operations with InnoDB, which uses two integers as -transaction identifiers, for example. - -=item no_ctrl_char - -Removes quoted control characters from the value. This is affected by the -L<"charset"> configuration variable. - -This transformation only operates within quoted strings, for example, values to -a SET clause in an UPDATE statement. It will not alter the UPDATE statement, -but will collapse the quoted string to [BINARY] or [TEXT], depending on the -charset. - -=item percent - -Converts a number to a percentage by multiplying it by two, formatting it with -L<"num_digits"> digits after the decimal point, and optionally adding a percent -sign (see L<"show_percent">). - -=item secs_to_time - -Formats a number of seconds as time in days+hours:minutes:seconds format. - -=item set_precision - -Formats numbers with L<"num_digits"> number of digits after the decimal point. - -=item shorten - -Formats a number as a unit of 1024 (k/M/G/T) and with L<"num_digits"> number of -digits after the decimal point. - -=back - -=head2 TABLE EDITOR - -The innotop table editor lets you customize tables with keystrokes. You start -the table editor with the '^' key. If there's more than one table on the -screen, it will prompt you to choose one of them. Once you do, innotop will -show you something like this: - - Editing table definition for Buffer Pool. Press ? for help, q to quit. - - name hdr label src - cxn CXN Connection from which cxn - buf_pool_size Size Buffer pool size IB_bp_buf_poo - buf_free Free Bufs Buffers free in the b IB_bp_buf_fre - pages_total Pages Pages total IB_bp_pages_t - pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m - buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo - total_mem_alloc Memory Total memory allocate IB_bp_total_m - add_pool_alloc Add'l Pool Additonal pool alloca IB_bp_add_poo - -The first line shows which table you're editing, and reminds you again to press -'?' for a list of key mappings. The rest is a tabular representation of the -table's columns, because that's likely what you're trying to edit. However, you -can edit more than just the table's columns; this screen can start the filter -editor, color rule editor, and more. - -Each row in the display shows a single column in the table you're editing, along -with a couple of its properties such as its header and source expression (see -L<"EXPRESSIONS">). - -The key mappings are Vim-style, as in many other places. Pressing 'j' and 'k' -moves the highlight up or down. You can then (d)elete or (e)dit the highlighted -column. You can also (a)dd a column to the table. This actually just activates -one of the columns already defined for the table; it prompts you to choose from -among the columns available but not currently displayed. Finally, you can -re-order the columns with the '+' and '-' keys. - -You can do more than just edit the columns with the table editor, you can also -edit other properties, such as the table's sort expression and group-by -expression. Press '?' to see the full list, of course. - -If you want to really customize and create your own column, as opposed to just -activating a built-in one that's not currently displayed, press the (n)ew key, -and innotop will prompt you for the information it needs: - -=over - -=item * - -The column name: this needs to be a word without any funny characters, e.g. just -letters, numbers and underscores. - -=item * - -The column header: this is the label that appears at the top of the column, in -the table header. This can have spaces and funny characters, but be careful not -to make it too wide and waste space on-screen. - -=item * - -The column's data source: this is an expression that determines what data from -the source (see L<"TABLES">) innotop will put into the column. This can just be -the name of an item in the source, or it can be a more complex expression, as -described in L<"EXPRESSIONS">. - -=back - -Once you've entered the required data, your table has a new column. There is no -difference between this column and the built-in ones; it can have all the same -properties and behaviors. innotop will write the column's definition to the -configuration file, so it will persist across sessions. - -Here's an example: suppose you want to track how many times your slaves have -retried transactions. According to the MySQL manual, the -Slave_retried_transactions status variable gives you that data: "The total -number of times since startup that the replication slave SQL thread has retried -transactions. This variable was added in version 5.0.4." This is appropriate to -add to the L<"slave_sql_status"> table. - -To add the column, switch to the replication-monitoring mode with the 'M' key, -and press the '^' key to start the table editor. When prompted, choose -slave_sql_status as the table, then press 'n' to create the column. Type -'retries' as the column name, 'Retries' as the column header, and -'Slave_retried_transactions' as the source. Now the column is created, and you -see the table editor screen again. Press 'q' to exit the table editor, and -you'll see your column at the end of the table. - -=head1 VARIABLE SETS - -Variable sets are used in L<"S: Variables & Status"> mode to define more easily -what variables you want to monitor. Behind the scenes they are compiled to a -list of expressions, and then into a column list so they can be treated just -like columns in any other table, in terms of data extraction and -transformations. However, you're protected from the tedious details by a syntax -that ought to feel very natural to you: a SQL SELECT list. - -The data source for variable sets, and indeed the entire S mode, is the -combination of SHOW STATUS, SHOW VARIABLES, and SHOW INNODB STATUS. Imagine -that you had a huge table with one column per variable returned from those -statements. That's the data source for variable sets. You can now query this -data source just like you'd expect. For example: - - Questions, Uptime, Questions/Uptime as QPS - -Behind the scenes innotop will split that variable set into three expressions, -compile them and turn them into a table definition, then extract as usual. This -becomes a "variable set," or a "list of variables you want to monitor." - -innotop lets you name and save your variable sets, and writes them to the -configuration file. You can choose which variable set you want to see with the -'c' key, or activate the next and previous sets with the '>' and '<' keys. -There are many built-in variable sets as well, which should give you a good -start for creating your own. Press 'e' to edit the current variable set, or -just to see how it's defined. To create a new one, just press 'c' and type its -name. - -You may want to use some of the functions listed in L<"TRANSFORMATIONS"> to help -format the results. In particular, L<"set_precision"> is often useful to limit -the number of digits you see. Extending the above example, here's how: - - Questions, Uptime, set_precision(Questions/Uptime) as QPS - -Actually, this still needs a little more work. If your L<"interval"> is less -than one second, you might be dividing by zero because Uptime is incremental in -this mode by default. Instead, use Uptime_hires: - - Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS - -This example is simple, but it shows how easy it is to choose which variables -you want to monitor. - -=head1 PLUGINS - -innotop has a simple but powerful plugin mechanism by which you can extend -or modify its existing functionality, and add new functionality. innotop's -plugin functionality is event-based: plugins register themselves to be called -when events happen. They then have a chance to influence the event. - -An innotop plugin is a Perl module placed in innotop's L<"plugin_dir"> -directory. On UNIX systems, you can place a symbolic link to the module instead -of putting the actual file there. innotop automatically discovers the file. If -there is a corresponding entry in the L<"plugins"> configuration file section, -innotop loads and activates the plugin. - -The module must conform to innotop's plugin interface. Additionally, the source -code of the module must be written in such a way that innotop can inspect the -file and determine the package name and description. - -=head2 Package Source Convention - -innotop inspects the plugin module's source to determine the Perl package name. -It looks for a line of the form "package Foo;" and if found, considers the -plugin's package name to be Foo. Of course the package name can be a valid Perl -package name, with double semicolons and so on. - -It also looks for a description in the source code, to make the plugin editor -more human-friendly. The description is a comment line of the form "# -description: Foo", where "Foo" is the text innotop will consider to be the -plugin's description. - -=head2 Plugin Interface - -The innotop plugin interface is quite simple: innotop expects the plugin to be -an object-oriented module it can call certain methods on. The methods are - -=over - -=item new(%variables) - -This is the plugin's constructor. It is passed a hash of innotop's variables, -which it can manipulate (see L<"Plugin Variables">). It must return a reference -to the newly created plugin object. - -At construction time, innotop has only loaded the general configuration and -created the default built-in variables with their default contents (which is -quite a lot). Therefore, the state of the program is exactly as in the innotop -source code, plus the configuration variables from the L<"general"> section in -the config file. - -If your plugin manipulates the variables, it is changing global data, which is -shared by innotop and all plugins. Plugins are loaded in the order they're -listed in the config file. Your plugin may load before or after another plugin, -so there is a potential for conflict or interaction between plugins if they -modify data other plugins use or modify. - -=item register_for_events() - -This method must return a list of events in which the plugin is interested, if -any. See L<"Plugin Events"> for the defined events. If the plugin returns an -event that's not defined, the event is ignored. - -=item event handlers - -The plugin must implement a method named the same as each event for which it has -registered. In other words, if the plugin returns qw(foo bar) from -register_for_events(), it must have foo() and bar() methods. These methods are -callbacks for the events. See L<"Plugin Events"> for more details about each -event. - -=back - -=head2 Plugin Variables - -The plugin's constructor is passed a hash of innotop's variables, which it can -manipulate. It is probably a good idea if the plugin object saves a copy of it -for later use. The variables are defined in the innotop variable -%pluggable_vars, and are as follows: - -=over - -=item action_for - -A hashref of key mappings. These are innotop's global hot-keys. - -=item agg_funcs - -A hashref of functions that can be used for grouping. See L<"GROUPING">. - -=item config - -The global configuration hash. - -=item connections - -A hashref of connection specifications. These are just specifications of how to -connect to a server. - -=item dbhs - -A hashref of innotop's database connections. These are actual DBI connection -objects. - -=item filters - -A hashref of filters applied to table rows. See L<"FILTERS"> for more. - -=item modes - -A hashref of modes. See L<"MODES"> for more. - -=item server_groups - -A hashref of server groups. See L<"SERVER GROUPS">. - -=item tbl_meta - -A hashref of innotop's table meta-data, with one entry per table (see -L<"TABLES"> for more information). - -=item trans_funcs - -A hashref of transformation functions. See L<"TRANSFORMATIONS">. - -=item var_sets - -A hashref of variable sets. See L<"VARIABLE SETS">. - -=back - -=head2 Plugin Events - -Each event is defined somewhere in the innotop source code. When innotop runs -that code, it executes the callback function for each plugin that expressed its -interest in the event. innotop passes some data for each event. The events are -defined in the %event_listener_for variable, and are as follows: - -=over - -=item extract_values($set, $cur, $pre, $tbl) - -This event occurs inside the function that extracts values from a data source. -The arguments are the set of values, the current values, the previous values, -and the table name. - -=item set_to_tbl - -Events are defined at many places in this subroutine, which is responsible for -turning an arrayref of hashrefs into an arrayref of lines that can be printed to -the screen. The events all pass the same data: an arrayref of rows and the name -of the table being created. The events are set_to_tbl_pre_filter, -set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, -set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, -set_to_tbl_post_create. - -=item draw_screen($lines) - -This event occurs inside the subroutine that prints the lines to the screen. -$lines is an arrayref of strings. - -=back - -=head2 Simple Plugin Example - -The easiest way to explain the plugin functionality is probably with a simple -example. The following module adds a column to the beginning of every table and -sets its value to 1. - - use strict; - use warnings FATAL => 'all'; - - package Innotop::Plugin::Example; - # description: Adds an 'example' column to every table - - sub new { - my ( $class, %vars ) = @_; - # Store reference to innotop's variables in $self - my $self = bless { %vars }, $class; - - # Design the example column - my $col = { - hdr => 'Example', - just => '', - dec => 0, - num => 1, - label => 'Example', - src => 'example', # Get data from this column in the data source - tbl => '', - trans => [], - }; - - # Add the column to every table. - my $tbl_meta = $vars{tbl_meta}; - foreach my $tbl ( values %$tbl_meta ) { - # Add the column to the list of defined columns - $tbl->{cols}->{example} = $col; - # Add the column to the list of visible columns - unshift @{$tbl->{visible}}, 'example'; - } - - # Be sure to return a reference to the object. - return $self; - } - - # I'd like to be called when a data set is being rendered into a table, please. - sub register_for_events { - my ( $self ) = @_; - return qw(set_to_tbl_pre_filter); - } - - # This method will be called when the event fires. - sub set_to_tbl_pre_filter { - my ( $self, $rows, $tbl ) = @_; - # Set the example column's data source to the value 1. - foreach my $row ( @$rows ) { - $row->{example} = 1; - } - } - - 1; - -=head2 Plugin Editor - -The plugin editor lets you view the plugins innotop discovered and activate or -deactivate them. Start the editor by pressing $ to start the configuration -editor from any mode. Press the 'p' key to start the plugin editor. You'll see -a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move -the highlight to the desired one, then press the * key to toggle it active or -inactive. Exit the editor and restart innotop for the changes to take effect. - -=head1 SQL STATEMENTS - -innotop uses a limited set of SQL statements to retrieve data from MySQL for -display. The statements are customized depending on the server version against -which they are executed; for example, on MySQL 5 and newer, INNODB_STATUS -executes "SHOW ENGINE INNODB STATUS", while on earlier versions it executes -"SHOW INNODB STATUS". The statements are as follows: - - Statement SQL executed - =================== =============================== - INNODB_STATUS SHOW [ENGINE] INNODB STATUS - KILL_CONNECTION KILL - KILL_QUERY KILL QUERY - OPEN_TABLES SHOW OPEN TABLES - PROCESSLIST SHOW FULL PROCESSLIST - SHOW_MASTER_LOGS SHOW MASTER LOGS - SHOW_MASTER_STATUS SHOW MASTER STATUS - SHOW_SLAVE_STATUS SHOW SLAVE STATUS - SHOW_STATUS SHOW [GLOBAL] STATUS - SHOW_VARIABLES SHOW [GLOBAL] VARIABLES - -=head1 DATA SOURCES - -Each time innotop extracts values to create a table (see L<"EXPRESSIONS"> and -L<"TABLES">), it does so from a particular data source. Largely because of the -complex data extracted from SHOW INNODB STATUS, this is slightly messy. SHOW -INNODB STATUS contains a mixture of single values and repeated values that form -nested data sets. - -Whenever innotop fetches data from MySQL, it adds two extra bits to each set: -cxn and Uptime_hires. cxn is the name of the connection from which the data -came. Uptime_hires is a high-resolution version of the server's Uptime status -variable, which is important if your L<"interval"> setting is sub-second. - -Here are the kinds of data sources from which data is extracted: - -=over - -=item STATUS_VARIABLES - -This is the broadest category, into which the most kinds of data fall. It -begins with the combination of SHOW STATUS and SHOW VARIABLES, but other sources -may be included as needed, for example, SHOW MASTER STATUS and SHOW SLAVE -STATUS, as well as many of the non-repeated values from SHOW INNODB STATUS. - -=item DEADLOCK_LOCKS - -This data is extracted from the transaction list in the LATEST DETECTED DEADLOCK -section of SHOW INNODB STATUS. It is nested two levels deep: transactions, then -locks. - -=item DEADLOCK_TRANSACTIONS - -This data is from the transaction list in the LATEST DETECTED DEADLOCK -section of SHOW INNODB STATUS. It is nested one level deep. - -=item EXPLAIN - -This data is from the result set returned by EXPLAIN. - -=item INNODB_TRANSACTIONS - -This data is from the TRANSACTIONS section of SHOW INNODB STATUS. - -=item IO_THREADS - -This data is from the list of threads in the the FILE I/O section of SHOW INNODB -STATUS. - -=item INNODB_LOCKS - -This data is from the TRANSACTIONS section of SHOW INNODB STATUS and is nested -two levels deep. - -=item OPEN_TABLES - -This data is from SHOW OPEN TABLES. - -=item PROCESSLIST - -This data is from SHOW FULL PROCESSLIST. - -=item OS_WAIT_ARRAY - -This data is from the SEMAPHORES section of SHOW INNODB STATUS and is nested one -level deep. It comes from the lines that look like this: - - --Thread 1568861104 has waited at btr0cur.c line 424 .... - -=back - -=head1 MYSQL PRIVILEGES - -=over - -=item * - -You must connect to MySQL as a user who has the SUPER privilege for many of the -functions. - -=item * - -If you don't have the SUPER privilege, you can still run some functions, but you -won't necessarily see all the same data. - -=item * - -You need the PROCESS privilege to see the list of currently running queries in Q -mode. - -=item * - -You need special privileges to start and stop slave servers. - -=item * - -You need appropriate privileges to create and drop the deadlock tables if needed -(see L<"SERVER CONNECTIONS">). - -=back - -=head1 SYSTEM REQUIREMENTS - -You need Perl to run innotop, of course. You also need a few Perl modules: DBI, -DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most -Perl distributions, but in case they are not, I recommend using versions -distributed with your operating system or Perl distribution, not from CPAN. -Term::ReadKey in particular has been known to cause problems if installed from -CPAN. - -If you have Term::ANSIColor, innotop will use it to format headers more readably -and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for -terminal formatting codes to be honored). If you install Term::ReadLine, -preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. - -I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from -people successfully running it on Red Hat, CentOS, Solaris, and Mac OSX. I -don't see any reason why it won't work on other UNIX-ish operating systems, but -I don't know for sure. It also runs on Windows under ActivePerl without -problem. - -I use innotop on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, 5.1.15, -and 5.2.3. If it doesn't run correctly for you, that is a bug and I hope you -report it. - -=head1 FILES - -$HOMEDIR/.innotop is used to store configuration information. Files include the -configuration file innotop.ini, the core_dump file which contains verbose error -messages if L<"debug"> is enabled, and the plugins/ subdirectory. - -=head1 GLOSSARY OF TERMS - -=over - -=item tick - -A tick is a refresh event, when innotop re-fetches data from connections and -displays it. - -=back - -=head1 ACKNOWLEDGEMENTS - -I'm grateful to the following people for various reasons, and hope I haven't -forgotten to include anyone: - -Allen K. Smith, -Aurimas Mikalauskas, -Bartosz Fenski, -Brian Miezejewski, -Christian Hammers, -Cyril Scetbon, -Dane Miller, -David Multer, -Dr. Frank Ullrich, -Giuseppe Maxia, -Google.com Site Reliability Engineers, -Jan Pieter Kunst, -Jari Aalto, -Jay Pipes, -Jeremy Zawodny, -Johan Idren, -Kristian Kohntopp, -Lenz Grimmer, -Maciej Dobrzanski, -Michiel Betel, -MySQL AB, -Paul McCullagh, -Sebastien Estienne, -Sourceforge.net, -Steven Kreuzer, -The Gentoo MySQL Team, -Trevor Price, -Yaar Schnitman, -and probably more people I've neglected to include. - -(If I misspelled your name, it's probably because I'm afraid of putting -international characters into this documentation; earlier versions of Perl might -not be able to compile it then). - -=head1 COPYRIGHT, LICENSE AND WARRANTY - -This program is copyright (c) 2006 Baron Schwartz. -Feedback and improvements are welcome. - -THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, version 2; OR the Perl Artistic License. On UNIX and similar -systems, you can issue `man perlgpl' or `man perlartistic' to read these -licenses. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA. - -Execute innotop and press '!' to see this information at any time. - -=head1 AUTHOR - -Baron Schwartz. - -=head1 BUGS - -You can report bugs, ask for improvements, and get other help and support at -L. There are mailing lists, forums, -a bug tracker, etc. Please use these instead of contacting me directly, as it -makes my job easier and benefits others if the discussions are permanent and -public. Of course, if you need to contact me in private, please do. - -=cut diff --git a/build/debian/additions/innotop/innotop.1 b/build/debian/additions/innotop/innotop.1 deleted file mode 100644 index ef708c3974c..00000000000 --- a/build/debian/additions/innotop/innotop.1 +++ /dev/null @@ -1,2086 +0,0 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "INNOTOP 1p" -.TH INNOTOP 1p "2007-11-09" "perl v5.8.8" "User Contributed Perl Documentation" -.SH "NAME" -innotop \- MySQL and InnoDB transaction/status monitor. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -To monitor servers normally: -.PP -.Vb 1 -\& innotop -.Ve -.PP -To monitor InnoDB status information from a file: -.PP -.Vb 1 -\& innotop /var/log/mysql/mysqld.err -.Ve -.PP -To run innotop non-interactively in a pipe-and-filter configuration: -.PP -.Vb 1 -\& innotop \-\-count 5 \-d 1 \-n -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -innotop monitors MySQL servers. Each of its modes shows you a different aspect -of what's happening in the server. For example, there's a mode for monitoring -replication, one for queries, and one for transactions. innotop refreshes its -data periodically, so you see an updating view. -.PP -innotop has lots of features for power users, but you can start and run it with -virtually no configuration. If you're just getting started, see -\&\*(L"\s-1QUICK\-START\s0\*(R". Press '?' at any time while running innotop for -context-sensitive help. -.SH "QUICK-START" -.IX Header "QUICK-START" -To start innotop, open a terminal or command prompt. If you have installed -innotop on your system, you should be able to just type \*(L"innotop\*(R" and press -Enter; otherwise, you will need to change to innotop's directory and type \*(L"perl -innotop\*(R". -.PP -The first thing innotop needs to know is how to connect to a MySQL server. You -can just enter the hostname of the server, for example \*(L"localhost\*(R" or -\&\*(L"127.0.0.1\*(R" if the server is on the same machine as innotop. After this innotop -will prompt you for a \s-1DSN\s0 (data source name). You should be able to just accept -the defaults by pressing Enter. -.PP -When innotop asks you about a table to use when resetting InnoDB deadlock -information, just accept the default for now. This is an advanced feature you -can configure later (see \*(L"D: InnoDB Deadlocks\*(R" for more). -.PP -If you have a .my.cnf file with your MySQL connection defaults, innotop can read -it, and you won't need to specify a username and password if it's in that file. -Otherwise, you should answer 'y' to the next couple of prompts. -.PP -After this, you should be connected, and innotop should show you something like -the following: -.PP -.Vb 1 -\& InnoDB Txns (? for help) localhost, 01:11:19, InnoDB 10s :\-), 50 QPS, -.Ve -.PP -.Vb 2 -\& CXN History Versions Undo Dirty Buf Used Bufs Txns MaxTxn -\& localhost 7 2035 0 0 0.00% 92.19% 1 07:34 -.Ve -.PP -.Vb 5 -\& CXN ID User Host Txn Status Time Undo Query Tex -\& localhost 98379 user1 webserver ACTIVE 07:34 0 SELECT `c -\& localhost 98450 user1 webserver ACTIVE 01:06 0 INSERT IN -\& localhost 97750 user1 webserver not starte 00:00 0 -\& localhost 98375 user1 appserver not starte 00:00 0 -.Ve -.PP -(This sample is truncated at the right so it will fit on a terminal when running -\&'man innotop') -.PP -This sample comes from a quiet server with few transactions active. If your -server is busy, you'll see more output. Notice the first line on the screen, -which tells you what mode you're in and what server you're connected to. You -can change to other modes with keystrokes; press 'Q' to switch to a list of -currently running queries. -.PP -Press the '?' key to see what keys are active in the current mode. You can -press any of these keys and innotop will either take the requested action or -prompt you for more input. If your system has Term::ReadLine support, you can -use \s-1TAB\s0 and other keys to auto-complete and edit input. -.PP -To quit innotop, press the 'q' key. -.SH "OPTIONS" -.IX Header "OPTIONS" -innotop is mostly configured via its configuration file, but some of the -configuration options can come from the command line. You can also specify a -file to monitor for InnoDB status output; see \*(L"\s-1MONITORING\s0 A \s-1FILE\s0\*(R" for more -details. -.PP -You can negate some options by prefixing the option name with \-\-no. For -example, \-\-noinc (or \-\-no\-inc) negates \*(L"\-\-inc\*(R". -.IP "\-\-help" 4 -.IX Item "--help" -Print a summary of command-line usage and exit. -.IP "\-\-color" 4 -.IX Item "--color" -Enable or disable terminal coloring. Corresponds to the \*(L"color\*(R" config file -setting. -.IP "\-\-config" 4 -.IX Item "--config" -Specifies a configuration file to read. This option is non\-sticky, that is to -say it does not persist to the configuration file itself. -.IP "\-\-nonint" 4 -.IX Item "--nonint" -Enable non-interactive operation. See \*(L"\s-1NON\-INTERACTIVE\s0 \s-1OPERATION\s0\*(R" for more. -.IP "\-\-count" 4 -.IX Item "--count" -Refresh only the specified number of times (ticks) before exiting. Each refresh -is a pause for \*(L"interval\*(R" seconds, followed by requesting data from MySQL -connections and printing it to the terminal. -.IP "\-\-delay" 4 -.IX Item "--delay" -Specifies the amount of time to pause between ticks (refreshes). Corresponds to -the configuration option \*(L"interval\*(R". -.IP "\-\-mode" 4 -.IX Item "--mode" -Specifies the mode in which innotop should start. Corresponds to the -configuration option \*(L"mode\*(R". -.IP "\-\-inc" 4 -.IX Item "--inc" -Specifies whether innotop should display absolute numbers or relative numbers -(offsets from their previous values). Corresponds to the configuration option -\&\*(L"status_inc\*(R". -.IP "\-\-version" 4 -.IX Item "--version" -Output version information and exit. -.SH "HOTKEYS" -.IX Header "HOTKEYS" -innotop is interactive, and you control it with key\-presses. -.IP "\(bu" 4 -Uppercase keys switch between modes. -.IP "\(bu" 4 -Lowercase keys initiate some action within the current mode. -.IP "\(bu" 4 -Other keys do something special like change configuration or show the -innotop license. -.PP -Press '?' at any time to see the currently active keys and what they do. -.SH "MODES" -.IX Header "MODES" -Each of innotop's modes retrieves and displays a particular type of data from -the servers you're monitoring. You switch between modes with uppercase keys. -The following is a brief description of each mode, in alphabetical order. To -switch to the mode, press the key listed in front of its heading in the -following list: -.IP "B: InnoDB Buffers" 4 -.IX Item "B: InnoDB Buffers" -This mode displays information about the InnoDB buffer pool, page statistics, -insert buffer, and adaptive hash index. The data comes from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. -.Sp -This mode contains the \*(L"buffer_pool\*(R", \*(L"page_statistics\*(R", -\&\*(L"insert_buffers\*(R", and \*(L"adaptive_hash_index\*(R" tables by default. -.IP "C: Command Summary" 4 -.IX Item "C: Command Summary" -This mode is similar to mytop's Command Summary mode. It shows the -\&\*(L"cmd_summary\*(R" table, which looks something like the following: -.Sp -.Vb 8 -\& Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40 -\& _____________________ Command Summary _____________________ -\& Name Value Pct Last Incr Pct -\& Select_scan 3244858 69.89% 2 100.00% -\& Select_range 1354177 29.17% 0 0.00% -\& Select_full_join 39479 0.85% 0 0.00% -\& Select_full_range_join 4097 0.09% 0 0.00% -\& Select_range_check 0 0.00% 0 0.00% -.Ve -.Sp -The command summary table is built by extracting variables from -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". The variables must be numeric and must match the prefix -given by the \*(L"cmd_filter\*(R" configuration variable. The variables are then -sorted by value descending and compared to the last variable, as shown above. -The percentage columns are percentage of the total of all variables in the -table, so you can see the relative weight of the variables. -.Sp -The example shows what you see if the prefix is \*(L"Select_\*(R". The default -prefix is \*(L"Com_\*(R". You can choose a prefix with the 's' key. -.Sp -It's rather like running \s-1SHOW\s0 \s-1VARIABLES\s0 \s-1LIKE\s0 \*(L"prefix%\*(R" with memory and -nice formatting. -.Sp -Values are aggregated across all servers. The Pct columns are not correctly -aggregated across multiple servers. This is a known limitation of the grouping -algorithm that may be fixed in the future. -.IP "D: InnoDB Deadlocks" 4 -.IX Item "D: InnoDB Deadlocks" -This mode shows the transactions involved in the last InnoDB deadlock. A second -table shows the locks each transaction held and waited for. A deadlock is -caused by a cycle in the waits-for graph, so there should be two locks held and -one waited for unless the deadlock information is truncated. -.Sp -InnoDB puts deadlock information before some other information in the \s-1SHOW\s0 -\&\s-1INNODB\s0 \s-1STATUS\s0 output. If there are a lot of locks, the deadlock information can -grow very large, and there is a limit on the size of the \s-1SHOW\s0 \s-1INNODB\s0 -\&\s-1STATUS\s0 output. A large deadlock can fill the entire output, or even be -truncated, and prevent you from seeing other information at all. If you are -running innotop in another mode, for example T mode, and suddenly you don't see -anything, you might want to check and see if a deadlock has wiped out the data -you need. -.Sp -If it has, you can create a small deadlock to replace the large one. Use the -\&'w' key to 'wipe' the large deadlock with a small one. This will not work -unless you have defined a deadlock table for the connection (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"). -.Sp -You can also configure innotop to automatically detect when a large deadlock -needs to be replaced with a small one (see \*(L"auto_wipe_dl\*(R"). -.Sp -This mode displays the \*(L"deadlock_transactions\*(R" and \*(L"deadlock_locks\*(R" tables -by default. -.IP "F: InnoDB Foreign Key Errors" 4 -.IX Item "F: InnoDB Foreign Key Errors" -This mode shows the last InnoDB foreign key error information, such as the -table where it happened, when and who and what query caused it, and so on. -.Sp -InnoDB has a huge variety of foreign key error messages, and many of them are -just hard to parse. innotop doesn't always do the best job here, but there's -so much code devoted to parsing this messy, unparseable output that innotop is -likely never to be perfect in this regard. If innotop doesn't show you what -you need to see, just look at the status text directly. -.Sp -This mode displays the \*(L"fk_error\*(R" table by default. -.IP "I: InnoDB I/O Info" 4 -.IX Item "I: InnoDB I/O Info" -This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O, -file I/O miscellaneous, and log statistics. It displays the \*(L"io_threads\*(R", -\&\*(L"pending_io\*(R", \*(L"file_io_misc\*(R", and \*(L"log_statistics\*(R" tables by default. -.IP "L: Locks" 4 -.IX Item "L: Locks" -This mode shows information about current locks. At the moment only InnoDB -locks are supported, and by default you'll only see locks for which transactions -are waiting. This information comes from the \s-1TRANSACTIONS\s0 section of the InnoDB -status text. If you have a very busy server, you may have frequent lock waits; -it helps to be able to see which tables and indexes are the \*(L"hot spot\*(R" for -locks. If your server is running pretty well, this mode should show nothing. -.Sp -You can configure MySQL and innotop to monitor not only locks for which a -transaction is waiting, but those currently held, too. You can do this with the -InnoDB Lock Monitor (). It's -not documented in the MySQL manual, but creating the lock monitor with the -following statement also affects the output of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, which innotop -uses: -.Sp -.Vb 1 -\& CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB; -.Ve -.Sp -This causes InnoDB to print its output to the MySQL file every 16 seconds or so, -as stated in the manual, but it also makes the normal \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output -include lock information, which innotop can parse and display (that's the -undocumented feature). -.Sp -This means you can do what may have seemed impossible: to a limited extent -(InnoDB truncates some information in the output), you can see which transaction -holds the locks something else is waiting for. You can also enable and disable -the InnoDB Lock Monitor with the key mappings in this mode. -.Sp -This mode displays the \*(L"innodb_locks\*(R" table by default. Here's a sample of -the screen when one connection is waiting for locks another connection holds: -.Sp -.Vb 7 -\& _________________________________ InnoDB Locks __________________________ -\& CXN ID Type Waiting Wait Active Mode DB Table Index -\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY -\& localhost 12 TABLE 0 00:10 00:10 IX test t1 -\& localhost 12 RECORD 1 00:10 00:10 X test t1 PRIMARY -\& localhost 11 TABLE 0 00:00 00:25 IX test t1 -\& localhost 11 RECORD 0 00:00 00:25 X test t1 PRIMARY -.Ve -.Sp -You can see the first connection, \s-1ID\s0 12, is waiting for a lock on the \s-1PRIMARY\s0 -key on test.t1, and has been waiting for 10 seconds. The second connection -isn't waiting, because the Waiting column is 0, but it holds locks on the same -index. That tells you connection 11 is blocking connection 12. -.IP "M: Master/Slave Replication Status" 4 -.IX Item "M: Master/Slave Replication Status" -This mode shows the output of \s-1SHOW\s0 \s-1SLAVE\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 in three -tables. The first two divide the slave's status into \s-1SQL\s0 and I/O thread status, -and the last shows master status. Filters are applied to eliminate non-slave -servers from the slave tables, and non-master servers from the master table. -.Sp -This mode displays the \*(L"slave_sql_status\*(R", \*(L"slave_io_status\*(R", and -\&\*(L"master_status\*(R" tables by default. -.IP "O: Open Tables" 4 -.IX Item "O: Open Tables" -This section comes from MySQL's \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0 command. By default it is -filtered to show tables which are in use by one or more queries, so you can -get a quick look at which tables are 'hot'. You can use this to guess which -tables might be locked implicitly. -.Sp -This mode displays the \*(L"open_tables\*(R" mode by default. -.IP "Q: Query List" 4 -.IX Item "Q: Query List" -This mode displays the output from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0, much like \fBmytop\fR's -query list mode. This mode does \fBnot\fR show InnoDB-related information. This -is probably one of the most useful modes for general usage. -.Sp -There is an informative header that shows general status information about -your server. You can toggle it on and off with the 'h' key. By default, -innotop hides inactive processes and its own process. You can toggle these on -and off with the 'i' and 'a' keys. -.Sp -You can \s-1EXPLAIN\s0 a query from this mode with the 'e' key. This displays the -query's full text, the results of \s-1EXPLAIN\s0, and in newer MySQL versions, even -the optimized query resulting from \s-1EXPLAIN\s0 \s-1EXTENDED\s0. innotop also tries to -rewrite certain queries to make them EXPLAIN\-able. For example, \s-1INSERT/SELECT\s0 -statements are rewritable. -.Sp -This mode displays the \*(L"q_header\*(R" and \*(L"processlist\*(R" tables by default. -.IP "R: InnoDB Row Operations and Semaphores" 4 -.IX Item "R: InnoDB Row Operations and Semaphores" -This mode shows InnoDB row operations, row operation miscellaneous, semaphores, -and information from the wait array. It displays the \*(L"row_operations\*(R", -\&\*(L"row_operation_misc\*(R", \*(L"semaphores\*(R", and \*(L"wait_array\*(R" tables by default. -.IP "S: Variables & Status" 4 -.IX Item "S: Variables & Status" -This mode calculates statistics, such as queries per second, and prints them out -in several different styles. You can show absolute values, or incremental values -between ticks. -.Sp -You can switch between the views by pressing a key. The 's' key prints a -single line each time the screen updates, in the style of \fBvmstat\fR. The 'g' -key changes the view to a graph of the same numbers, sort of like \fBtload\fR. -The 'v' key changes the view to a pivoted table of variable names on the left, -with successive updates scrolling across the screen from left to right. You can -choose how many updates to put on the screen with the \*(L"num_status_sets\*(R" -configuration variable. -.Sp -Headers may be abbreviated to fit on the screen in interactive operation. You -choose which variables to display with the 'c' key, which selects from -predefined sets, or lets you create your own sets. You can edit the current set -with the 'e' key. -.Sp -This mode doesn't really display any tables like other modes. Instead, it uses -a table definition to extract and format the data, but it then transforms the -result in special ways before outputting it. It uses the \*(L"var_status\*(R" table -definition for this. -.IP "T: InnoDB Transactions" 4 -.IX Item "T: InnoDB Transactions" -This mode shows transactions from the InnoDB monitor's output, in \fBtop\fR\-like -format. This mode is the reason I wrote innotop. -.Sp -You can kill queries or processes with the 'k' and 'x' keys, and \s-1EXPLAIN\s0 a query -with the 'e' or 'f' keys. InnoDB doesn't print the full query in transactions, -so explaining may not work right if the query is truncated. -.Sp -The informational header can be toggled on and off with the 'h' key. By -default, innotop hides inactive transactions and its own transaction. You can -toggle this on and off with the 'i' and 'a' keys. -.Sp -This mode displays the \*(L"t_header\*(R" and \*(L"innodb_transactions\*(R" tables by -default. -.SH "INNOTOP STATUS" -.IX Header "INNOTOP STATUS" -The first line innotop displays is a \*(L"status bar\*(R" of sorts. What it contains -depends on the mode you're in, and what servers you're monitoring. The first -few words are always the innotop mode, such as \*(L"InnoDB Txns\*(R" for T mode, -followed by a reminder to press '?' for help at any time. -.Sh "\s-1ONE\s0 \s-1SERVER\s0" -.IX Subsection "ONE SERVER" -The simplest case is when you're monitoring a single server. In this case, the -name of the connection is next on the status line. This is the name you gave -when you created the connection \*(-- most likely the MySQL server's hostname. -This is followed by the server's uptime. -.PP -If you're in an InnoDB mode, such as T or B, the next word is \*(L"InnoDB\*(R" followed -by some information about the \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output used to render the -screen. The first word is the number of seconds since the last \s-1SHOW\s0 \s-1INNODB\s0 -\&\s-1STATUS\s0, which InnoDB uses to calculate some per-second statistics. The next is -a smiley face indicating whether the InnoDB output is truncated. If the smiley -face is a :\-), all is well; there is no truncation. A :^| means the transaction -list is so long, InnoDB has only printed out some of the transactions. Finally, -a frown :\-( means the output is incomplete, which is probably due to a deadlock -printing too much lock information (see \*(L"D: InnoDB Deadlocks\*(R"). -.PP -The next two words indicate the server's queries per second (\s-1QPS\s0) and how many -threads (connections) exist. Finally, the server's version number is the last -thing on the line. -.Sh "\s-1MULTIPLE\s0 \s-1SERVERS\s0" -.IX Subsection "MULTIPLE SERVERS" -If you are monitoring multiple servers (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"), the status -line does not show any details about individual servers. Instead, it shows the -names of the connections that are active. Again, these are connection names you -specified, which are likely to be the server's hostname. A connection that has -an error is prefixed with an exclamation point. -.PP -If you are monitoring a group of servers (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R"), the status -line shows the name of the group. If any connection in the group has an -error, the group's name is followed by the fraction of the connections that -don't have errors. -.PP -See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R" for more details about innotop's error handling. -.Sh "\s-1MONITORING\s0 A \s-1FILE\s0" -.IX Subsection "MONITORING A FILE" -If you give a filename on the command line, innotop will not connect to \s-1ANY\s0 -servers at all. It will watch the specified file for InnoDB status output and -use that as its data source. It will always show a single connection called -\&'file'. And since it can't connect to a server, it can't determine how long the -server it's monitoring has been up; so it calculates the server's uptime as time -since innotop started running. -.SH "SERVER ADMINISTRATION" -.IX Header "SERVER ADMINISTRATION" -While innotop is primarily a monitor that lets you watch and analyze your -servers, it can also send commands to servers. The most frequently useful -commands are killing queries and stopping or starting slaves. -.PP -You can kill a connection, or in newer versions of MySQL kill a query but not a -connection, from \*(L"Q: Query List\*(R" and \*(L"T: InnoDB Transactions\*(R" modes. -Press 'k' to issue a \s-1KILL\s0 command, or 'x' to issue a \s-1KILL\s0 \s-1QUERY\s0 command. -innotop will prompt you for the server and/or connection \s-1ID\s0 to kill (innotop -does not prompt you if there is only one possible choice for any input). -innotop pre-selects the longest-running query, or the oldest connection. -Confirm the command with 'y'. -.PP -In \*(L"M: Master/Slave Replication Status\*(R" mode, you can start and stop slaves -with the 'a' and 'o' keys, respectively. You can send these commands to many -slaves at once. innotop fills in a default command of \s-1START\s0 \s-1SLAVE\s0 or \s-1STOP\s0 \s-1SLAVE\s0 -for you, but you can actually edit the command and send anything you wish, such -as \s-1SET\s0 \s-1GLOBAL\s0 SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event -when it starts. -.PP -You can also ask innotop to calculate the earliest binlog in use by any slave -and issue a \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0 on the master. Use the 'b' key for this. innotop -will prompt you for a master to run the command on, then prompt you for the -connection names of that master's slaves (there is no way for innotop to -determine this reliably itself). innotop will find the minimum binlog in use by -these slave connections and suggest it as the argument to \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0. -.SH "SERVER CONNECTIONS" -.IX Header "SERVER CONNECTIONS" -When you create a server connection, innotop asks you for a series of inputs, as -follows: -.IP "\s-1DSN\s0" 4 -.IX Item "DSN" -A \s-1DSN\s0 is a Data Source Name, which is the initial argument passed to the \s-1DBI\s0 -module for connecting to a server. It is usually of the form -.Sp -.Vb 1 -\& DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME -.Ve -.Sp -Since this \s-1DSN\s0 is passed to the DBD::mysql driver, you should read the driver's -documentation at \*(L"http://search.cpan.org/dist/DBD\-mysql/lib/DBD/mysql.pm\*(R" for -the exact details on all the options you can pass the driver in the \s-1DSN\s0. You -can read more about \s-1DBI\s0 at , and especially at -. -.Sp -The mysql_read_default_group=mysql option lets the \s-1DBD\s0 driver read your MySQL -options files, such as ~/.my.cnf on UNIX-ish systems. You can use this to avoid -specifying a username or password for the connection. -.IP "InnoDB Deadlock Table" 4 -.IX Item "InnoDB Deadlock Table" -This optional item tells innotop a table name it can use to deliberately create -a small deadlock (see \*(L"D: InnoDB Deadlocks\*(R"). If you specify this option, -you just need to be sure the table doesn't exist, and that innotop can create -and drop the table with the InnoDB storage engine. You can safely omit or just -accept the default if you don't intend to use this. -.IP "Username" 4 -.IX Item "Username" -innotop will ask you if you want to specify a username. If you say 'y', it will -then prompt you for a user name. If you have a MySQL option file that specifies -your username, you don't have to specify a username. -.Sp -The username defaults to your login name on the system you're running innotop on. -.IP "Password" 4 -.IX Item "Password" -innotop will ask you if you want to specify a password. Like the username, the -password is optional, but there's an additional prompt that asks if you want to -save the password in the innotop configuration file. If you don't save it in -the configuration file, innotop will prompt you for a password each time it -starts. Passwords in the innotop configuration file are saved in plain text, -not encrypted in any way. -.PP -Once you finish answering these questions, you should be connected to a server. -But innotop isn't limited to monitoring a single server; you can define many -server connections and switch between them by pressing the '@' key. See -\&\*(L"\s-1SWITCHING\s0 \s-1BETWEEN\s0 \s-1CONNECTIONS\s0\*(R". -.PP -To create a new connection, press the '@' key and type the name of the new -connection, then follow the steps given above. -.SH "SERVER GROUPS" -.IX Header "SERVER GROUPS" -If you have multiple MySQL instances, you can put them into named groups, such -as 'all', 'masters', and 'slaves', which innotop can monitor all together. -.PP -You can choose which group to monitor with the '#' key, and you can press the -\&\s-1TAB\s0 key to switch to the next group. If you're not currently monitoring a -group, pressing \s-1TAB\s0 selects the first group. -.PP -To create a group, press the '#' key and type the name of your new group, then -type the names of the connections you want the group to contain. -.SH "SWITCHING BETWEEN CONNECTIONS" -.IX Header "SWITCHING BETWEEN CONNECTIONS" -innotop lets you quickly switch which servers you're monitoring. The most basic -way is by pressing the '@' key and typing the name(s) of the connection(s) you -want to use. This setting is per\-mode, so you can monitor different connections -in each mode, and innotop remembers which connections you choose. -.PP -You can quickly switch to the 'next' connection in alphabetical order with the -\&'n' key. If you're monitoring a server group (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R") this will -switch to the first connection. -.PP -You can also type many connection names, and innotop will fetch and display data -from them all. Just separate the connection names with spaces, for example -\&\*(L"server1 server2.\*(R" Again, if you type the name of a connection that doesn't -exist, innotop will prompt you for connection information and create the -connection. -.PP -Another way to monitor multiple connections at once is with server groups. You -can use the \s-1TAB\s0 key to switch to the 'next' group in alphabetical order, or if -you're not monitoring any groups, \s-1TAB\s0 will switch to the first group. -.PP -innotop does not fetch data in parallel from connections, so if you are -monitoring a large group or many connections, you may notice increased delay -between ticks. -.PP -When you monitor more than one connection, innotop's status bar changes. See -\&\*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R". -.SH "ERROR HANDLING" -.IX Header "ERROR HANDLING" -Error handling is not that important when monitoring a single connection, but is -crucial when you have many active connections. A crashed server or lost -connection should not crash innotop. As a result, innotop will continue to run -even when there is an error; it just won't display any information from the -connection that had an error. Because of this, innotop's behavior might confuse -you. It's a feature, not a bug! -.PP -innotop does not continue to query connections that have errors, because they -may slow innotop and make it hard to use, especially if the error is a problem -connecting and causes a long time\-out. Instead, innotop retries the connection -occasionally to see if the error still exists. If so, it will wait until some -point in the future. The wait time increases in ticks as the Fibonacci series, -so it tries less frequently as time passes. -.PP -Since errors might only happen in certain modes because of the \s-1SQL\s0 commands -issued in those modes, innotop keeps track of which mode caused the error. If -you switch to a different mode, innotop will retry the connection instead of -waiting. -.PP -By default innotop will display the problem in red text at the bottom of the -first table on the screen. You can disable this behavior with the -\&\*(L"show_cxn_errors_in_tbl\*(R" configuration option, which is enabled by default. -If the \*(L"debug\*(R" option is enabled, innotop will display the error at the -bottom of every table, not just the first. And if \*(L"show_cxn_errors\*(R" is -enabled, innotop will print the error text to \s-1STDOUT\s0 as well. Error messages -might only display in the mode that caused the error, depending on the mode and -whether innotop is avoiding querying that connection. -.SH "NON-INTERACTIVE OPERATION" -.IX Header "NON-INTERACTIVE OPERATION" -You can run innotop in non-interactive mode, in which case it is entirely -controlled from the configuration file and command-line options. To start -innotop in non-interactive mode, give the L\*(L"<\-\-nonint\*(R"> command-line option. -This changes innotop's behavior in the following ways: -.IP "\(bu" 4 -Certain Perl modules are not loaded. Term::Readline is not loaded, since -innotop doesn't prompt interactively. Term::ANSIColor and Win32::Console::ANSI -modules are not loaded. Term::ReadKey is still used, since innotop may have to -prompt for connection passwords when starting up. -.IP "\(bu" 4 -innotop does not clear the screen after each tick. -.IP "\(bu" 4 -innotop does not persist any changes to the configuration file. -.IP "\(bu" 4 -If \*(L"\-\-count\*(R" is given and innotop is in incremental mode (see \*(L"status_inc\*(R" -and \*(L"\-\-inc\*(R"), innotop actually refreshes one more time than specified so it -can print incremental statistics. This suppresses output during the first -tick, so innotop may appear to hang. -.IP "\(bu" 4 -innotop only displays the first table in each mode. This is so the output can -be easily processed with other command-line utilities such as awk and sed. To -change which tables display in each mode, see \*(L"\s-1TABLES\s0\*(R". Since \*(L"Q: Query List\*(R" mode is so important, innotop automatically disables the \*(L"q_header\*(R" -table. This ensures you'll see the \*(L"processlist\*(R" table, even if you have -innotop configured to show the q_header table during interactive operation. -Similarly, in \*(L"T: InnoDB Transactions\*(R" mode, the \*(L"t_header\*(R" table is -suppressed so you see only the \*(L"innodb_transactions\*(R" table. -.IP "\(bu" 4 -All output is tab-separated instead of being column-aligned with whitespace, and -innotop prints the full contents of each table instead of only printing one -screenful at a time. -.IP "\(bu" 4 -innotop only prints column headers once instead of every tick (see -\&\*(L"hide_hdr\*(R"). innotop does not print table captions (see -\&\*(L"display_table_captions\*(R"). innotop ensures there are no empty lines in the -output. -.IP "\(bu" 4 -innotop does not honor the \*(L"shorten\*(R" transformation, which normally shortens -some numbers to human-readable formats. -.IP "\(bu" 4 -innotop does not print a status line (see \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R"). -.SH "CONFIGURING" -.IX Header "CONFIGURING" -Nearly everything about innotop is configurable. Most things are possible to -change with built-in commands, but you can also edit the configuration file. -.PP -While running innotop, press the '$' key to bring up the configuration editing -dialog. Press another key to select the type of data you want to edit: -.IP "S: Statement Sleep Times" 4 -.IX Item "S: Statement Sleep Times" -Edits \s-1SQL\s0 statement sleep delays, which make innotop pause for the specified -amount of time after executing a statement. See \*(L"\s-1SQL\s0 \s-1STATEMENTS\s0\*(R" for a -definition of each statement and what it does. By default innotop does not -delay after any statements. -.Sp -This feature is included so you can customize the side-effects caused by -monitoring your server. You may not see any effects, but some innotop users -have noticed that certain MySQL versions under very high load with InnoDB -enabled take longer than usual to execute \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0. If innotop calls -\&\s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0 immediately afterward, the processlist contains more -queries than the machine actually averages at any given moment. Configuring -innotop to pause briefly after calling \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0 alleviates this -effect. -.Sp -Sleep times are stored in the \*(L"stmt_sleep_times\*(R" section of the configuration -file. Fractional-second sleeps are supported, subject to your hardware's -limitations. -.IP "c: Edit Columns" 4 -.IX Item "c: Edit Columns" -Starts the table editor on one of the displayed tables. See \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R". -An alternative way to start the table editor without entering the configuration -dialog is with the '^' key. -.IP "g: General Configuration" 4 -.IX Item "g: General Configuration" -Starts the configuration editor to edit global and mode-specific configuration -variables (see \*(L"\s-1MODES\s0\*(R"). innotop prompts you to choose a variable from among -the global and mode-specific ones depending on the current mode. -.IP "k: Row-Coloring Rules" 4 -.IX Item "k: Row-Coloring Rules" -Starts the row-coloring rules editor on one of the displayed table(s). See -\&\*(L"\s-1COLORS\s0\*(R" for details. -.IP "p: Manage Plugins" 4 -.IX Item "p: Manage Plugins" -Starts the plugin configuration editor. See \*(L"\s-1PLUGINS\s0\*(R" for details. -.IP "s: Server Groups" 4 -.IX Item "s: Server Groups" -Lets you create and edit server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". -.IP "t: Choose Displayed Tables" 4 -.IX Item "t: Choose Displayed Tables" -Lets you choose which tables to display in this mode. See \*(L"\s-1MODES\s0\*(R" and -\&\*(L"\s-1TABLES\s0\*(R". -.SH "CONFIGURATION FILE" -.IX Header "CONFIGURATION FILE" -innotop's default configuration file location is in \f(CW$HOME\fR/.innotop, but can be -overridden with the \*(L"\-\-config\*(R" command-line option. You can edit it by hand -safely. innotop reads the configuration file when it starts, and writes it out -again when it exits, so any changes you make while innotop is running will be -lost. -.PP -innotop doesn't store its entire configuration in the configuration file. It -has a huge set of default configuration that it holds only in memory, and the -configuration file only overrides these defaults. When you customize a default -setting, innotop notices, and then stores the customizations into the file. -This keeps the file size down, makes it easier to edit, and makes upgrades -easier. -.PP -A configuration file can be made read\-only. See \*(L"readonly\*(R". -.PP -The configuration file is arranged into sections like an \s-1INI\s0 file. Each -section begins with [section\-name] and ends with [/section\-name]. Each -section's entries have a different syntax depending on the data they need to -store. You can put comments in the file; any line that begins with a # -character is a comment. innotop will not read the comments, so it won't write -them back out to the file when it exits. Comments in read-only configuration -files are still useful, though. -.PP -The first line in the file is innotop's version number. This lets innotop -notice when the file format is not backwards\-compatible, and upgrade smoothly -without destroying your customized configuration. -.PP -The following list describes each section of the configuration file and the data -it contains: -.IP "general" 4 -.IX Item "general" -The 'general' section contains global configuration variables and variables that -may be mode\-specific, but don't belong in any other section. The syntax is a -simple key=value list. innotop writes a comment above each value to help you -edit the file by hand. -.RS 4 -.IP "S_func" 4 -.IX Item "S_func" -Controls S mode presentation (see \*(L"S: Variables & Status\*(R"). If g, values are -graphed; if s, values are like vmstat; if p, values are in a pivoted table. -.IP "S_set" 4 -.IX Item "S_set" -Specifies which set of variables to display in \*(L"S: Variables & Status\*(R" mode. -See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". -.IP "auto_wipe_dl" 4 -.IX Item "auto_wipe_dl" -Instructs innotop to automatically wipe large deadlocks when it notices them. -When this happens you may notice a slight delay. At the next tick, you will -usually see the information that was being truncated by the large deadlock. -.IP "charset" 4 -.IX Item "charset" -Specifies what kind of characters to allow through the \*(L"no_ctrl_char\*(R" -transformation. This keeps non-printable characters from confusing a -terminal when you monitor queries that contain binary data, such as images. -.Sp -The default is 'ascii', which considers anything outside normal \s-1ASCII\s0 to be a -control character. The other allowable values are 'unicode' and 'none'. 'none' -considers every character a control character, which can be useful for -collapsing \s-1ALL\s0 text fields in queries. -.IP "cmd_filter" 4 -.IX Item "cmd_filter" -This is the prefix that filters variables in \*(L"C: Command Summary\*(R" mode. -.IP "color" 4 -.IX Item "color" -Whether terminal coloring is permitted. -.IP "cxn_timeout" 4 -.IX Item "cxn_timeout" -On MySQL versions 4.0.3 and newer, this variable is used to set the connection's -timeout, so MySQL doesn't close the connection if it is not used for a while. -This might happen because a connection isn't monitored in a particular mode, for -example. -.IP "debug" 4 -.IX Item "debug" -This option enables more verbose errors and makes innotop more strict in some -places. It can help in debugging filters and other user-defined code. It also -makes innotop write a lot of information to \*(L"debugfile\*(R" when there is a -crash. -.IP "debugfile" 4 -.IX Item "debugfile" -A file to which innotop will write information when there is a crash. See -\&\*(L"\s-1FILES\s0\*(R". -.IP "display_table_captions" 4 -.IX Item "display_table_captions" -innotop displays a table caption above most tables. This variable suppresses or -shows captions on all tables globally. Some tables are configured with the -hide_caption property, which overrides this. -.IP "global" 4 -.IX Item "global" -Whether to show \s-1GLOBAL\s0 variables and status. innotop only tries to do this on -servers which support the \s-1GLOBAL\s0 option to \s-1SHOW\s0 \s-1VARIABLES\s0 and \s-1SHOW\s0 \s-1STATUS\s0. In -some MySQL versions, you need certain privileges to do this; if you don't have -them, innotop will not be able to fetch any variable and status data. This -configuration variable lets you run innotop and fetch what data you can even -without the elevated privileges. -.Sp -I can no longer find or reproduce the situation where \s-1GLOBAL\s0 wasn't allowed, but -I know there was one. -.IP "graph_char" 4 -.IX Item "graph_char" -Defines the character to use when drawing graphs in \*(L"S: Variables & Status\*(R" -mode. -.IP "header_highlight" 4 -.IX Item "header_highlight" -Defines how to highlight column headers. This only works if Term::ANSIColor is -available. Valid values are 'bold' and 'underline'. -.IP "hide_hdr" 4 -.IX Item "hide_hdr" -Hides column headers globally. -.IP "interval" 4 -.IX Item "interval" -The interval at which innotop will refresh its data (ticks). The interval is -implemented as a sleep time between ticks, so the true interval will vary -depending on how long it takes innotop to fetch and render data. -.Sp -This variable accepts fractions of a second. -.IP "mode" 4 -.IX Item "mode" -The mode in which innotop should start. Allowable arguments are the same as the -key presses that select a mode interactively. See \*(L"\s-1MODES\s0\*(R". -.IP "num_digits" 4 -.IX Item "num_digits" -How many digits to show in fractional numbers and percents. This variable's -range is between 0 and 9 and can be set directly from \*(L"S: Variables & Status\*(R" -mode with the '+' and '\-' keys. It is used in the \*(L"set_precision\*(R", -\&\*(L"shorten\*(R", and \*(L"percent\*(R" transformations. -.IP "num_status_sets" 4 -.IX Item "num_status_sets" -Controls how many sets of status variables to display in pivoted \*(L"S: Variables & Status\*(R" mode. It also controls the number of old sets of variables innotop -keeps in its memory, so the larger this variable is, the more memory innotop -uses. -.IP "plugin_dir" 4 -.IX Item "plugin_dir" -Specifies where plugins can be found. By default, innotop stores plugins in the -\&'plugins' subdirectory of your innotop configuration directory. -.IP "readonly" 4 -.IX Item "readonly" -Whether the configuration file is readonly. This cannot be set interactively, -because it would prevent itself from being written to the configuration file. -.IP "show_cxn_errors" 4 -.IX Item "show_cxn_errors" -Makes innotop print connection errors to \s-1STDOUT\s0. See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". -.IP "show_cxn_errors_in_tbl" 4 -.IX Item "show_cxn_errors_in_tbl" -Makes innotop display connection errors as rows in the first table on screen. -See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R". -.IP "show_percent" 4 -.IX Item "show_percent" -Adds a '%' character after the value returned by the \*(L"percent\*(R" -transformation. -.IP "show_statusbar" 4 -.IX Item "show_statusbar" -Controls whether to show the status bar in the display. See \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R". -.IP "skip_innodb" 4 -.IX Item "skip_innodb" -Disables fetching \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, in case your server(s) do not have InnoDB -enabled and you don't want innotop to try to fetch it. This can also be useful -when you don't have the \s-1SUPER\s0 privilege, required to run \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. -.IP "status_inc" 4 -.IX Item "status_inc" -Whether to show absolute or incremental values for status variables. -Incremental values are calculated as an offset from the last value innotop saw -for that variable. This is a global setting, but will probably become -mode-specific at some point. Right now it is honored a bit inconsistently; some -modes don't pay attention to it. -.RE -.RS 4 -.RE -.IP "plugins" 4 -.IX Item "plugins" -This section holds a list of package names of active plugins. If the plugin -exists, innotop will activate it. See \*(L"\s-1PLUGINS\s0\*(R" for more information. -.IP "filters" 4 -.IX Item "filters" -This section holds user-defined filters (see \*(L"\s-1FILTERS\s0\*(R"). Each line is in the -format filter_name=text='filter text' tbls='table list'. -.Sp -The filter text is the text of the subroutine's code. The table list is a list -of tables to which the filter can apply. By default, user-defined filters apply -to the table for which they were created, but you can manually override that by -editing the definition in the configuration file. -.IP "active_filters" 4 -.IX Item "active_filters" -This section stores which filters are active on each table. Each line is in the -format table_name=filter_list. -.IP "tbl_meta" 4 -.IX Item "tbl_meta" -This section stores user-defined or user-customized columns (see \*(L"\s-1COLUMNS\s0\*(R"). -Each line is in the format col_name=properties, where the properties are a -name=quoted\-value list. -.IP "connections" 4 -.IX Item "connections" -This section holds the server connections you have defined. Each line is in the -format name=properties, where the properties are a name=value list. The -properties are self\-explanatory, and the only one that is treated specially is -\&'pass' which is only present if 'savepass' is set. See \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R". -.IP "active_connections" 4 -.IX Item "active_connections" -This section holds a list of which connections are active in each mode. Each -line is in the format mode_name=connection_list. -.IP "server_groups" 4 -.IX Item "server_groups" -This section holds server groups. Each line is in the format -name=connection_list. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". -.IP "active_server_groups" 4 -.IX Item "active_server_groups" -This section holds a list of which server group is active in each mode. Each -line is in the format mode_name=server_group. -.IP "max_values_seen" 4 -.IX Item "max_values_seen" -This section holds the maximum values seen for variables. This is used to scale -the graphs in \*(L"S: Variables & Status\*(R" mode. Each line is in the format -name=value. -.IP "active_columns" 4 -.IX Item "active_columns" -This section holds table column lists. Each line is in the format -tbl_name=column_list. See \*(L"\s-1COLUMNS\s0\*(R". -.IP "sort_cols" 4 -.IX Item "sort_cols" -This section holds the sort definition. Each line is in the format -tbl_name=column_list. If a column is prefixed with '\-', that column sorts -descending. See \*(L"\s-1SORTING\s0\*(R". -.IP "visible_tables" 4 -.IX Item "visible_tables" -This section defines which tables are visible in each mode. Each line is in the -format mode_name=table_list. See \*(L"\s-1TABLES\s0\*(R". -.IP "varsets" 4 -.IX Item "varsets" -This section defines variable sets for use in \*(L"S: Status & Variables\*(R" mode. -Each line is in the format name=variable_list. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". -.IP "colors" 4 -.IX Item "colors" -This section defines colorization rules. Each line is in the format -tbl_name=property_list. See \*(L"\s-1COLORS\s0\*(R". -.IP "stmt_sleep_times" 4 -.IX Item "stmt_sleep_times" -This section contains statement sleep times. Each line is in the format -statement_name=sleep_time. See \*(L"S: Statement Sleep Times\*(R". -.IP "group_by" 4 -.IX Item "group_by" -This section contains column lists for table group_by expressions. Each line is -in the format tbl_name=column_list. See \*(L"\s-1GROUPING\s0\*(R". -.SH "CUSTOMIZING" -.IX Header "CUSTOMIZING" -You can customize innotop a great deal. For example, you can: -.IP "\(bu" 4 -Choose which tables to display, and in what order. -.IP "\(bu" 4 -Choose which columns are in those tables, and create new columns. -.IP "\(bu" 4 -Filter which rows display with built-in filters, user-defined filters, and -quick\-filters. -.IP "\(bu" 4 -Sort the rows to put important data first or group together related rows. -.IP "\(bu" 4 -Highlight rows with color. -.IP "\(bu" 4 -Customize the alignment, width, and formatting of columns, and apply -transformations to columns to extract parts of their values or format the values -as you wish (for example, shortening large numbers to familiar units). -.IP "\(bu" 4 -Design your own expressions to extract and combine data as you need. This gives -you unlimited flexibility. -.PP -All these and more are explained in the following sections. -.Sh "\s-1TABLES\s0" -.IX Subsection "TABLES" -A table is what you'd expect: a collection of columns. It also has some other -properties, such as a caption. Filters, sorting rules, and colorization rules -belong to tables and are covered in later sections. -.PP -Internally, table meta-data is defined in a data structure called \f(CW%tbl_meta\fR. -This hash holds all built-in table definitions, which contain a lot of default -instructions to innotop. The meta-data includes the caption, a list of columns -the user has customized, a list of columns, a list of visible columns, a list of -filters, color rules, a sort-column list, sort direction, and some information -about the table's data sources. Most of this is customizable via the table -editor (see \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R"). -.PP -You can choose which tables to show by pressing the '$' key. See \*(L"\s-1MODES\s0\*(R" and -\&\*(L"\s-1TABLES\s0\*(R". -.PP -The table life-cycle is as follows: -.IP "\(bu" 4 -Each table begins with a data source, which is an array of hashes. See below -for details on data sources. -.IP "\(bu" 4 -Each element of the data source becomes a row in the final table. -.IP "\(bu" 4 -For each element in the data source, innotop extracts values from the source and -creates a row. This row is another hash, which later steps will refer to as -\&\f(CW$set\fR. The values innotop extracts are determined by the table's columns. Each -column has an extraction subroutine, compiled from an expression (see -\&\*(L"\s-1EXPRESSIONS\s0\*(R"). The resulting row is a hash whose keys are named the same as -the column name. -.IP "\(bu" 4 -innotop filters the rows, removing those that don't need to be displayed. See -\&\*(L"\s-1FILTERS\s0\*(R". -.IP "\(bu" 4 -innotop sorts the rows. See \*(L"\s-1SORTING\s0\*(R". -.IP "\(bu" 4 -innotop groups the rows together, if specified. See \*(L"\s-1GROUPING\s0\*(R". -.IP "\(bu" 4 -innotop colorizes the rows. See \*(L"\s-1COLORS\s0\*(R". -.IP "\(bu" 4 -innotop transforms the column values in each row. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". -.IP "\(bu" 4 -innotop optionally pivots the rows (see \*(L"\s-1PIVOTING\s0\*(R"), then filters and sorts -them. -.IP "\(bu" 4 -innotop formats and justifies the rows as a table. During this step, innotop -applies further formatting to the column values, including alignment, maximum -and minimum widths. innotop also does final error checking to ensure there are -no crashes due to undefined values. innotop then adds a caption if specified, -and the table is ready to print. -.PP -The lifecycle is slightly different if the table is pivoted, as noted above. To -clarify, if the table is pivoted, the process is extract, group, transform, -pivot, filter, sort, create. If it's not pivoted, the process is extract, -filter, sort, group, color, transform, create. This slightly convoluted process -doesn't map all that well to \s-1SQL\s0, but pivoting complicates things pretty -thoroughly. Roughly speaking, filtering and sorting happen as late as needed to -effect the final result as you might expect, but as early as possible for -efficiency. -.PP -Each built-in table is described below: -.IP "adaptive_hash_index" 4 -.IX Item "adaptive_hash_index" -Displays data about InnoDB's adaptive hash index. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "buffer_pool" 4 -.IX Item "buffer_pool" -Displays data about InnoDB's buffer pool. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "cmd_summary" 4 -.IX Item "cmd_summary" -Displays weighted status variables. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "deadlock_locks" 4 -.IX Item "deadlock_locks" -Shows which locks were held and waited for by the last detected deadlock. Data -source: \*(L"\s-1DEADLOCK_LOCKS\s0\*(R". -.IP "deadlock_transactions" 4 -.IX Item "deadlock_transactions" -Shows transactions involved in the last detected deadlock. Data source: -\&\*(L"\s-1DEADLOCK_TRANSACTIONS\s0\*(R". -.IP "explain" 4 -.IX Item "explain" -Shows the output of \s-1EXPLAIN\s0. Data source: \*(L"\s-1EXPLAIN\s0\*(R". -.IP "file_io_misc" 4 -.IX Item "file_io_misc" -Displays data about InnoDB's file and I/O operations. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "fk_error" 4 -.IX Item "fk_error" -Displays various data about InnoDB's last foreign key error. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "innodb_locks" 4 -.IX Item "innodb_locks" -Displays InnoDB locks. Data source: \*(L"\s-1INNODB_LOCKS\s0\*(R". -.IP "innodb_transactions" 4 -.IX Item "innodb_transactions" -Displays data about InnoDB's current transactions. Data source: -\&\*(L"\s-1INNODB_TRANSACTIONS\s0\*(R". -.IP "insert_buffers" 4 -.IX Item "insert_buffers" -Displays data about InnoDB's insert buffer. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "io_threads" 4 -.IX Item "io_threads" -Displays data about InnoDB's I/O threads. Data source: \*(L"\s-1IO_THREADS\s0\*(R". -.IP "log_statistics" 4 -.IX Item "log_statistics" -Displays data about InnoDB's logging system. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "master_status" 4 -.IX Item "master_status" -Displays replication master status. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "open_tables" 4 -.IX Item "open_tables" -Displays open tables. Data source: \*(L"\s-1OPEN_TABLES\s0\*(R". -.IP "page_statistics" 4 -.IX Item "page_statistics" -Displays InnoDB page statistics. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "pending_io" 4 -.IX Item "pending_io" -Displays InnoDB pending I/O operations. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "processlist" 4 -.IX Item "processlist" -Displays current MySQL processes (threads/connections). Data source: -\&\*(L"\s-1PROCESSLIST\s0\*(R". -.IP "q_header" 4 -.IX Item "q_header" -Displays various status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "row_operation_misc" 4 -.IX Item "row_operation_misc" -Displays data about InnoDB's row operations. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "row_operations" 4 -.IX Item "row_operations" -Displays data about InnoDB's row operations. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "semaphores" 4 -.IX Item "semaphores" -Displays data about InnoDB's semaphores and mutexes. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "slave_io_status" 4 -.IX Item "slave_io_status" -Displays data about the slave I/O thread. Data source: -\&\*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "slave_sql_status" 4 -.IX Item "slave_sql_status" -Displays data about the slave \s-1SQL\s0 thread. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "t_header" 4 -.IX Item "t_header" -Displays various InnoDB status values. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "var_status" 4 -.IX Item "var_status" -Displays user-configurable data. Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R". -.IP "wait_array" 4 -.IX Item "wait_array" -Displays data about InnoDB's \s-1OS\s0 wait array. Data source: \*(L"\s-1OS_WAIT_ARRAY\s0\*(R". -.Sh "\s-1COLUMNS\s0" -.IX Subsection "COLUMNS" -Columns belong to tables. You can choose a table's columns by pressing the '^' -key, which starts the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" and lets you choose and edit columns. -Pressing 'e' from within the table editor lets you edit the column's properties: -.IP "\(bu" 4 -hdr: a column header. This appears in the first row of the table. -.IP "\(bu" 4 -just: justification. '\-' means left-justified and '' means right\-justified, -just as with printf formatting codes (not a coincidence). -.IP "\(bu" 4 -dec: whether to further align the column on the decimal point. -.IP "\(bu" 4 -num: whether the column is numeric. This affects how values are sorted -(lexically or numerically). -.IP "\(bu" 4 -label: a small note about the column, which appears in dialogs that help the -user choose columns. -.IP "\(bu" 4 -src: an expression that innotop uses to extract the column's data from its -source (see \*(L"\s-1DATA\s0 \s-1SOURCES\s0\*(R"). See \*(L"\s-1EXPRESSIONS\s0\*(R" for more on expressions. -.IP "\(bu" 4 -minw: specifies a minimum display width. This helps stabilize the display, -which makes it easier to read if the data is changing frequently. -.IP "\(bu" 4 -maxw: similar to minw. -.IP "\(bu" 4 -trans: a list of column transformations. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". -.IP "\(bu" 4 -agg: an aggregate function. See \*(L"\s-1GROUPING\s0\*(R". The default is \*(L"first\*(R". -.IP "\(bu" 4 -aggonly: controls whether the column only shows when grouping is enabled on the -table (see \*(L"\s-1GROUPING\s0\*(R"). By default, this is disabled. This means columns -will always be shown by default, whether grouping is enabled or not. If a -column's aggonly is set true, the column will appear when you toggle grouping on -the table. Several columns are set this way, such as the count column on -\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R", so you don't see a count when the -grouping isn't enabled, but you do when it is. -.Sh "\s-1FILTERS\s0" -.IX Subsection "FILTERS" -Filters remove rows from the display. They behave much like a \s-1WHERE\s0 clause in -\&\s-1SQL\s0. innotop has several built-in filters, which remove irrelevant information -like inactive queries, but you can define your own as well. innotop also lets -you create quick\-filters, which do not get saved to the configuration file, and -are just an easy way to quickly view only some rows. -.PP -You can enable or disable a filter on any table. Press the '%' key (mnemonic: % -looks kind of like a line being filtered between two circles) and choose which -table you want to filter, if asked. You'll then see a list of possible filters -and a list of filters currently enabled for that table. Type the names of -filters you want to apply and press Enter. -.PP -\fIUSER-DEFINED \s-1FILTERS\s0\fR -.IX Subsection "USER-DEFINED FILTERS" -.PP -If you type a name that doesn't exist, innotop will prompt you to create the -filter. Filters are easy to create if you know Perl, and not hard if you don't. -What you're doing is creating a subroutine that returns true if the row should -be displayed. The row is a hash reference passed to your subroutine as \f(CW$set\fR. -.PP -For example, imagine you want to filter the processlist table so you only see -queries that have been running more than five minutes. Type a new name for your -filter, and when prompted for the subroutine body, press \s-1TAB\s0 to initiate your -terminal's auto\-completion. You'll see the names of the columns in the -\&\*(L"processlist\*(R" table (innotop generally tries to help you with auto-completion -lists). You want to filter on the 'time' column. Type the text \*(L"$set\->{time} > -300\*(R" to return true when the query is more than five minutes old. That's all -you need to do. -.PP -In other words, the code you're typing is surrounded by an implicit context, -which looks like this: -.PP -.Vb 4 -\& sub filter { -\& my ( $set ) = @_; -\& # YOUR CODE HERE -\& } -.Ve -.PP -If your filter doesn't work, or if something else suddenly behaves differently, -you might have made an error in your filter, and innotop is silently catching -the error. Try enabling \*(L"debug\*(R" to make innotop throw an error instead. -.PP -\fIQUICK-FILTERS\fR -.IX Subsection "QUICK-FILTERS" -.PP -innotop's quick-filters are a shortcut to create a temporary filter that doesn't -persist when you restart innotop. To create a quick\-filter, press the '/' key. -innotop will prompt you for the column name and filter text. Again, you can use -auto-completion on column names. The filter text can be just the text you want -to \*(L"search for.\*(R" For example, to filter the \*(L"processlist\*(R" table on queries -that refer to the products table, type '/' and then 'info product'. -.PP -The filter text can actually be any Perl regular expression, but of course a -literal string like 'product' works fine as a regular expression. -.PP -Behind the scenes innotop compiles the quick-filter into a specially tagged -filter that is otherwise like any other filter. It just isn't saved to the -configuration file. -.PP -To clear quick\-filters, press the '\e' key and innotop will clear them all at -once. -.Sh "\s-1SORTING\s0" -.IX Subsection "SORTING" -innotop has sensible built-in defaults to sort the most important rows to the -top of the table. Like anything else in innotop, you can customize how any -table is sorted. -.PP -To start the sort dialog, start the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" with the '^' key, choose a -table if necessary, and press the 's' key. You'll see a list of columns you can -use in the sort expression and the current sort expression, if any. Enter a -list of columns by which you want to sort and press Enter. If you want to -reverse sort, prefix the column name with a minus sign. For example, if you -want to sort by column a ascending, then column b descending, type 'a \-b'. You -can also explicitly add a + in front of columns you want to sort ascending, but -it's not required. -.PP -Some modes have keys mapped to open this dialog directly, and to quickly reverse -sort direction. Press '?' as usual to see which keys are mapped in any mode. -.Sh "\s-1GROUPING\s0" -.IX Subsection "GROUPING" -innotop can group, or aggregate, rows together (I use the terms -interchangeably). This is quite similar to an \s-1SQL\s0 \s-1GROUP\s0 \s-1BY\s0 clause. You can -specify to group on certain columns, or if you don't specify any, the entire set -of rows is treated as one group. This is quite like \s-1SQL\s0 so far, but unlike \s-1SQL\s0, -you can also select un-grouped columns. innotop actually aggregates every -column. If you don't explicitly specify a grouping function, the default is -\&'first'. This is basically a convenience so you don't have to specify an -aggregate function for every column you want in the result. -.PP -You can quickly toggle grouping on a table with the '=' key, which toggles its -aggregate property. This property doesn't persist to the config file. -.PP -The columns by which the table is grouped are specified in its group_by -property. When you turn grouping on, innotop places the group_by columns at the -far left of the table, even if they're not supposed to be visible. The rest of -the visible columns appear in order after them. -.PP -Two tables have default group_by lists and a count column built in: -\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R". The grouping is by connection -and status, so you can quickly see how many queries or transactions are in a -given status on each server you're monitoring. The time columns are aggregated -as a sum; other columns are left at the default 'first' aggregation. -.PP -By default, the table shown in \*(L"S: Variables & Status\*(R" mode also uses -grouping so you can monitor variables and status across many servers. The -default aggregation function in this mode is 'avg'. -.PP -Valid grouping functions are defined in the \f(CW%agg_funcs\fR hash. They include -.IP "first" 4 -.IX Item "first" -Returns the first element in the group. -.IP "count" 4 -.IX Item "count" -Returns the number of elements in the group, including undefined elements, much -like \s-1SQL\s0's \s-1COUNT\s0(*). -.IP "avg" 4 -.IX Item "avg" -Returns the average of defined elements in the group. -.IP "sum" 4 -.IX Item "sum" -Returns the sum of elements in the group. -.PP -Here's an example of grouping at work. Suppose you have a very busy server with -hundreds of open connections, and you want to see how many connections are in -what status. Using the built-in grouping rules, you can press 'Q' to enter -\&\*(L"Q: Query List\*(R" mode. Press '=' to toggle grouping (if necessary, select the -\&\*(L"processlist\*(R" table when prompted). -.PP -Your display might now look like the following: -.PP -.Vb 1 -\& Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38\-log -.Ve -.PP -.Vb 5 -\& CXN Cmd Cnt ID User Host Time Query -\& localhost Query 49 12933 webusr localhost 19:38 SELECT * FROM -\& localhost Sending Da 23 2383 webusr localhost 12:43 SELECT col1, -\& localhost Sleep 120 140 webusr localhost 5:18:12 -\& localhost Statistics 12 19213 webusr localhost 01:19 SELECT * FROM -.Ve -.PP -That's actually quite a worrisome picture. You've got a lot of idle connections -(Sleep), and some connections executing queries (Query and Sending Data). -That's okay, but you also have a lot in Statistics status, collectively spending -over a minute. That means the query optimizer is having a really hard time -optimizing your statements. Something is wrong; it should normally take -milliseconds to optimize queries. You might not have seen this pattern if you -didn't look at your connections in aggregate. (This is a made-up example, but -it can happen in real life). -.Sh "\s-1PIVOTING\s0" -.IX Subsection "PIVOTING" -innotop can pivot a table for more compact display, similar to a Pivot Table in -a spreadsheet (also known as a crosstab). Pivoting a table makes columns into -rows. Assume you start with this table: -.PP -.Vb 4 -\& foo bar -\& === === -\& 1 3 -\& 2 4 -.Ve -.PP -After pivoting, the table will look like this: -.PP -.Vb 4 -\& name set0 set1 -\& ==== ==== ==== -\& foo 1 2 -\& bar 3 4 -.Ve -.PP -To get reasonable results, you might need to group as well as pivoting. -innotop currently does this for \*(L"S: Variables & Status\*(R" mode. -.Sh "\s-1COLORS\s0" -.IX Subsection "COLORS" -By default, innotop highlights rows with color so you can see at a glance which -rows are more important. You can customize the colorization rules and add your -own to any table. Open the table editor with the '^' key, choose a table if -needed, and press 'o' to open the color editor dialog. -.PP -The color editor dialog displays the rules applied to the table, in the order -they are evaluated. Each row is evaluated against each rule to see if the rule -matches the row; if it does, the row gets the specified color, and no further -rules are evaluated. The rules look like the following: -.PP -.Vb 9 -\& state eq Locked black on_red -\& cmd eq Sleep white -\& user eq system user white -\& cmd eq Connect white -\& cmd eq Binlog Dump white -\& time > 600 red -\& time > 120 yellow -\& time > 60 green -\& time > 30 cyan -.Ve -.PP -This is the default rule set for the \*(L"processlist\*(R" table. In order of -priority, these rules make locked queries black on a red background, \*(L"gray out\*(R" -connections from replication and sleeping queries, and make queries turn from -cyan to red as they run longer. -.PP -(For some reason, the \s-1ANSI\s0 color code \*(L"white\*(R" is actually a light gray. Your -terminal's display may vary; experiment to find colors you like). -.PP -You can use keystrokes to move the rules up and down, which re-orders their -priority. You can also delete rules and add new ones. If you add a new rule, -innotop prompts you for the column, an operator for the comparison, a value -against which to compare the column, and a color to assign if the rule matches. -There is auto-completion and prompting at each step. -.PP -The value in the third step needs to be correctly quoted. innotop does not try -to quote the value because it doesn't know whether it should treat the value as -a string or a number. If you want to compare the column against a string, as -for example in the first rule above, you should enter 'Locked' surrounded by -quotes. If you get an error message about a bareword, you probably should have -quoted something. -.Sh "\s-1EXPRESSIONS\s0" -.IX Subsection "EXPRESSIONS" -Expressions are at the core of how innotop works, and are what enables you to -extend innotop as you wish. Recall the table lifecycle explained in -\&\*(L"\s-1TABLES\s0\*(R". Expressions are used in the earliest step, where it extracts -values from a data source to form rows. -.PP -It does this by calling a subroutine for each column, passing it the source data -set, a set of current values, and a set of previous values. These are all -needed so the subroutine can calculate things like the difference between this -tick and the previous tick. -.PP -The subroutines that extract the data from the set are compiled from -expressions. This gives significantly more power than just naming the values to -fill the columns, because it allows the column's value to be calculated from -whatever data is necessary, but avoids the need to write complicated and lengthy -Perl code. -.PP -innotop begins with a string of text that can look as simple as a value's name -or as complicated as a full-fledged Perl expression. It looks at each -\&'bareword' token in the string and decides whether it's supposed to be a key -into the \f(CW$set\fR hash. A bareword is an unquoted value that isn't already -surrounded by code-ish things like dollar signs or curly brackets. If innotop -decides that the bareword isn't a function or other valid Perl code, it converts -it into a hash access. After the whole string is processed, innotop compiles a -subroutine, like this: -.PP -.Vb 5 -\& sub compute_column_value { -\& my ( $set, $cur, $pre ) = @_; -\& my $val = # EXPANDED STRING GOES HERE -\& return $val; -\& } -.Ve -.PP -Here's a concrete example, taken from the header table \*(L"q_header\*(R" in \*(L"Q: Query List\*(R" mode. This expression calculates the qps, or Queries Per Second, -column's values, from the values returned by \s-1SHOW\s0 \s-1STATUS:\s0 -.PP -.Vb 1 -\& Questions/Uptime_hires -.Ve -.PP -innotop decides both words are barewords, and transforms this expression into -the following Perl code: -.PP -.Vb 1 -\& $set\->{Questions}/$set\->{Uptime_hires} -.Ve -.PP -When surrounded by the rest of the subroutine's code, this is executable Perl -that calculates a high-resolution queries-per-second value. -.PP -The arguments to the subroutine are named \f(CW$set\fR, \f(CW$cur\fR, and \f(CW$pre\fR. In most cases, -\&\f(CW$set\fR and \f(CW$cur\fR will be the same values. However, if \*(L"status_inc\*(R" is set, \f(CW$cur\fR -will not be the same as \f(CW$set\fR, because \f(CW$set\fR will already contain values that are -the incremental difference between \f(CW$cur\fR and \f(CW$pre\fR. -.PP -Every column in innotop is computed by subroutines compiled in the same fashion. -There is no difference between innotop's built-in columns and user-defined -columns. This keeps things consistent and predictable. -.Sh "\s-1TRANSFORMATIONS\s0" -.IX Subsection "TRANSFORMATIONS" -Transformations change how a value is rendered. For example, they can take a -number of seconds and display it in H:M:S format. The following transformations -are defined: -.IP "commify" 4 -.IX Item "commify" -Adds commas to large numbers every three decimal places. -.IP "dulint_to_int" 4 -.IX Item "dulint_to_int" -Accepts two unsigned integers and converts them into a single longlong. This is -useful for certain operations with InnoDB, which uses two integers as -transaction identifiers, for example. -.IP "no_ctrl_char" 4 -.IX Item "no_ctrl_char" -Removes quoted control characters from the value. This is affected by the -\&\*(L"charset\*(R" configuration variable. -.Sp -This transformation only operates within quoted strings, for example, values to -a \s-1SET\s0 clause in an \s-1UPDATE\s0 statement. It will not alter the \s-1UPDATE\s0 statement, -but will collapse the quoted string to [\s-1BINARY\s0] or [\s-1TEXT\s0], depending on the -charset. -.IP "percent" 4 -.IX Item "percent" -Converts a number to a percentage by multiplying it by two, formatting it with -\&\*(L"num_digits\*(R" digits after the decimal point, and optionally adding a percent -sign (see \*(L"show_percent\*(R"). -.IP "secs_to_time" 4 -.IX Item "secs_to_time" -Formats a number of seconds as time in days+hours:minutes:seconds format. -.IP "set_precision" 4 -.IX Item "set_precision" -Formats numbers with \*(L"num_digits\*(R" number of digits after the decimal point. -.IP "shorten" 4 -.IX Item "shorten" -Formats a number as a unit of 1024 (k/M/G/T) and with \*(L"num_digits\*(R" number of -digits after the decimal point. -.Sh "\s-1TABLE\s0 \s-1EDITOR\s0" -.IX Subsection "TABLE EDITOR" -The innotop table editor lets you customize tables with keystrokes. You start -the table editor with the '^' key. If there's more than one table on the -screen, it will prompt you to choose one of them. Once you do, innotop will -show you something like this: -.PP -.Vb 1 -\& Editing table definition for Buffer Pool. Press ? for help, q to quit. -.Ve -.PP -.Vb 9 -\& name hdr label src -\& cxn CXN Connection from which cxn -\& buf_pool_size Size Buffer pool size IB_bp_buf_poo -\& buf_free Free Bufs Buffers free in the b IB_bp_buf_fre -\& pages_total Pages Pages total IB_bp_pages_t -\& pages_modified Dirty Pages Pages modified (dirty IB_bp_pages_m -\& buf_pool_hit_rate Hit Rate Buffer pool hit rate IB_bp_buf_poo -\& total_mem_alloc Memory Total memory allocate IB_bp_total_m -\& add_pool_alloc Add\(aql Pool Additonal pool alloca IB_bp_add_poo -.Ve -.PP -The first line shows which table you're editing, and reminds you again to press -\&'?' for a list of key mappings. The rest is a tabular representation of the -table's columns, because that's likely what you're trying to edit. However, you -can edit more than just the table's columns; this screen can start the filter -editor, color rule editor, and more. -.PP -Each row in the display shows a single column in the table you're editing, along -with a couple of its properties such as its header and source expression (see -\&\*(L"\s-1EXPRESSIONS\s0\*(R"). -.PP -The key mappings are Vim\-style, as in many other places. Pressing 'j' and 'k' -moves the highlight up or down. You can then (d)elete or (e)dit the highlighted -column. You can also (a)dd a column to the table. This actually just activates -one of the columns already defined for the table; it prompts you to choose from -among the columns available but not currently displayed. Finally, you can -re-order the columns with the '+' and '\-' keys. -.PP -You can do more than just edit the columns with the table editor, you can also -edit other properties, such as the table's sort expression and group-by -expression. Press '?' to see the full list, of course. -.PP -If you want to really customize and create your own column, as opposed to just -activating a built-in one that's not currently displayed, press the (n)ew key, -and innotop will prompt you for the information it needs: -.IP "\(bu" 4 -The column name: this needs to be a word without any funny characters, e.g. just -letters, numbers and underscores. -.IP "\(bu" 4 -The column header: this is the label that appears at the top of the column, in -the table header. This can have spaces and funny characters, but be careful not -to make it too wide and waste space on\-screen. -.IP "\(bu" 4 -The column's data source: this is an expression that determines what data from -the source (see \*(L"\s-1TABLES\s0\*(R") innotop will put into the column. This can just be -the name of an item in the source, or it can be a more complex expression, as -described in \*(L"\s-1EXPRESSIONS\s0\*(R". -.PP -Once you've entered the required data, your table has a new column. There is no -difference between this column and the built-in ones; it can have all the same -properties and behaviors. innotop will write the column's definition to the -configuration file, so it will persist across sessions. -.PP -Here's an example: suppose you want to track how many times your slaves have -retried transactions. According to the MySQL manual, the -Slave_retried_transactions status variable gives you that data: \*(L"The total -number of times since startup that the replication slave \s-1SQL\s0 thread has retried -transactions. This variable was added in version 5.0.4.\*(R" This is appropriate to -add to the \*(L"slave_sql_status\*(R" table. -.PP -To add the column, switch to the replication-monitoring mode with the 'M' key, -and press the '^' key to start the table editor. When prompted, choose -slave_sql_status as the table, then press 'n' to create the column. Type -\&'retries' as the column name, 'Retries' as the column header, and -\&'Slave_retried_transactions' as the source. Now the column is created, and you -see the table editor screen again. Press 'q' to exit the table editor, and -you'll see your column at the end of the table. -.SH "VARIABLE SETS" -.IX Header "VARIABLE SETS" -Variable sets are used in \*(L"S: Variables & Status\*(R" mode to define more easily -what variables you want to monitor. Behind the scenes they are compiled to a -list of expressions, and then into a column list so they can be treated just -like columns in any other table, in terms of data extraction and -transformations. However, you're protected from the tedious details by a syntax -that ought to feel very natural to you: a \s-1SQL\s0 \s-1SELECT\s0 list. -.PP -The data source for variable sets, and indeed the entire S mode, is the -combination of \s-1SHOW\s0 \s-1STATUS\s0, \s-1SHOW\s0 \s-1VARIABLES\s0, and \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. Imagine -that you had a huge table with one column per variable returned from those -statements. That's the data source for variable sets. You can now query this -data source just like you'd expect. For example: -.PP -.Vb 1 -\& Questions, Uptime, Questions/Uptime as QPS -.Ve -.PP -Behind the scenes innotop will split that variable set into three expressions, -compile them and turn them into a table definition, then extract as usual. This -becomes a \*(L"variable set,\*(R" or a \*(L"list of variables you want to monitor.\*(R" -.PP -innotop lets you name and save your variable sets, and writes them to the -configuration file. You can choose which variable set you want to see with the -\&'c' key, or activate the next and previous sets with the '>' and '<' keys. -There are many built-in variable sets as well, which should give you a good -start for creating your own. Press 'e' to edit the current variable set, or -just to see how it's defined. To create a new one, just press 'c' and type its -name. -.PP -You may want to use some of the functions listed in \*(L"\s-1TRANSFORMATIONS\s0\*(R" to help -format the results. In particular, \*(L"set_precision\*(R" is often useful to limit -the number of digits you see. Extending the above example, here's how: -.PP -.Vb 1 -\& Questions, Uptime, set_precision(Questions/Uptime) as QPS -.Ve -.PP -Actually, this still needs a little more work. If your \*(L"interval\*(R" is less -than one second, you might be dividing by zero because Uptime is incremental in -this mode by default. Instead, use Uptime_hires: -.PP -.Vb 1 -\& Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS -.Ve -.PP -This example is simple, but it shows how easy it is to choose which variables -you want to monitor. -.SH "PLUGINS" -.IX Header "PLUGINS" -innotop has a simple but powerful plugin mechanism by which you can extend -or modify its existing functionality, and add new functionality. innotop's -plugin functionality is event\-based: plugins register themselves to be called -when events happen. They then have a chance to influence the event. -.PP -An innotop plugin is a Perl module placed in innotop's \*(L"plugin_dir\*(R" -directory. On \s-1UNIX\s0 systems, you can place a symbolic link to the module instead -of putting the actual file there. innotop automatically discovers the file. If -there is a corresponding entry in the \*(L"plugins\*(R" configuration file section, -innotop loads and activates the plugin. -.PP -The module must conform to innotop's plugin interface. Additionally, the source -code of the module must be written in such a way that innotop can inspect the -file and determine the package name and description. -.Sh "Package Source Convention" -.IX Subsection "Package Source Convention" -innotop inspects the plugin module's source to determine the Perl package name. -It looks for a line of the form \*(L"package Foo;\*(R" and if found, considers the -plugin's package name to be Foo. Of course the package name can be a valid Perl -package name, with double semicolons and so on. -.PP -It also looks for a description in the source code, to make the plugin editor -more human\-friendly. The description is a comment line of the form \*(L"# -description: Foo\*(R", where \*(L"Foo\*(R" is the text innotop will consider to be the -plugin's description. -.Sh "Plugin Interface" -.IX Subsection "Plugin Interface" -The innotop plugin interface is quite simple: innotop expects the plugin to be -an object-oriented module it can call certain methods on. The methods are -.IP "new(%variables)" 4 -.IX Item "new(%variables)" -This is the plugin's constructor. It is passed a hash of innotop's variables, -which it can manipulate (see \*(L"Plugin Variables\*(R"). It must return a reference -to the newly created plugin object. -.Sp -At construction time, innotop has only loaded the general configuration and -created the default built-in variables with their default contents (which is -quite a lot). Therefore, the state of the program is exactly as in the innotop -source code, plus the configuration variables from the \*(L"general\*(R" section in -the config file. -.Sp -If your plugin manipulates the variables, it is changing global data, which is -shared by innotop and all plugins. Plugins are loaded in the order they're -listed in the config file. Your plugin may load before or after another plugin, -so there is a potential for conflict or interaction between plugins if they -modify data other plugins use or modify. -.IP "\fIregister_for_events()\fR" 4 -.IX Item "register_for_events()" -This method must return a list of events in which the plugin is interested, if -any. See \*(L"Plugin Events\*(R" for the defined events. If the plugin returns an -event that's not defined, the event is ignored. -.IP "event handlers" 4 -.IX Item "event handlers" -The plugin must implement a method named the same as each event for which it has -registered. In other words, if the plugin returns qw(foo bar) from -\&\fIregister_for_events()\fR, it must have \fIfoo()\fR and \fIbar()\fR methods. These methods are -callbacks for the events. See \*(L"Plugin Events\*(R" for more details about each -event. -.Sh "Plugin Variables" -.IX Subsection "Plugin Variables" -The plugin's constructor is passed a hash of innotop's variables, which it can -manipulate. It is probably a good idea if the plugin object saves a copy of it -for later use. The variables are defined in the innotop variable -\&\f(CW%pluggable_vars\fR, and are as follows: -.IP "action_for" 4 -.IX Item "action_for" -A hashref of key mappings. These are innotop's global hot\-keys. -.IP "agg_funcs" 4 -.IX Item "agg_funcs" -A hashref of functions that can be used for grouping. See \*(L"\s-1GROUPING\s0\*(R". -.IP "config" 4 -.IX Item "config" -The global configuration hash. -.IP "connections" 4 -.IX Item "connections" -A hashref of connection specifications. These are just specifications of how to -connect to a server. -.IP "dbhs" 4 -.IX Item "dbhs" -A hashref of innotop's database connections. These are actual \s-1DBI\s0 connection -objects. -.IP "filters" 4 -.IX Item "filters" -A hashref of filters applied to table rows. See \*(L"\s-1FILTERS\s0\*(R" for more. -.IP "modes" 4 -.IX Item "modes" -A hashref of modes. See \*(L"\s-1MODES\s0\*(R" for more. -.IP "server_groups" 4 -.IX Item "server_groups" -A hashref of server groups. See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R". -.IP "tbl_meta" 4 -.IX Item "tbl_meta" -A hashref of innotop's table meta\-data, with one entry per table (see -\&\*(L"\s-1TABLES\s0\*(R" for more information). -.IP "trans_funcs" 4 -.IX Item "trans_funcs" -A hashref of transformation functions. See \*(L"\s-1TRANSFORMATIONS\s0\*(R". -.IP "var_sets" 4 -.IX Item "var_sets" -A hashref of variable sets. See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R". -.Sh "Plugin Events" -.IX Subsection "Plugin Events" -Each event is defined somewhere in the innotop source code. When innotop runs -that code, it executes the callback function for each plugin that expressed its -interest in the event. innotop passes some data for each event. The events are -defined in the \f(CW%event_listener_for\fR variable, and are as follows: -.ie n .IP "extract_values($set, $cur\fR, \f(CW$pre\fR, \f(CW$tbl)" 4 -.el .IP "extract_values($set, \f(CW$cur\fR, \f(CW$pre\fR, \f(CW$tbl\fR)" 4 -.IX Item "extract_values($set, $cur, $pre, $tbl)" -This event occurs inside the function that extracts values from a data source. -The arguments are the set of values, the current values, the previous values, -and the table name. -.IP "set_to_tbl" 4 -.IX Item "set_to_tbl" -Events are defined at many places in this subroutine, which is responsible for -turning an arrayref of hashrefs into an arrayref of lines that can be printed to -the screen. The events all pass the same data: an arrayref of rows and the name -of the table being created. The events are set_to_tbl_pre_filter, -set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize, -set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create, -set_to_tbl_post_create. -.IP "draw_screen($lines)" 4 -.IX Item "draw_screen($lines)" -This event occurs inside the subroutine that prints the lines to the screen. -\&\f(CW$lines\fR is an arrayref of strings. -.Sh "Simple Plugin Example" -.IX Subsection "Simple Plugin Example" -The easiest way to explain the plugin functionality is probably with a simple -example. The following module adds a column to the beginning of every table and -sets its value to 1. -.PP -.Vb 2 -\& use strict; -\& use warnings FATAL => \(aqall\(aq; -.Ve -.PP -.Vb 2 -\& package Innotop::Plugin::Example; -\& # description: Adds an \(aqexample\(aq column to every table -.Ve -.PP -.Vb 4 -\& sub new { -\& my ( $class, %vars ) = @_; -\& # Store reference to innotop\(aqs variables in $self -\& my $self = bless { %vars }, $class; -.Ve -.PP -.Vb 11 -\& # Design the example column -\& my $col = { -\& hdr => \(aqExample\(aq, -\& just => \(aq\(aq, -\& dec => 0, -\& num => 1, -\& label => \(aqExample\(aq, -\& src => \(aqexample\(aq, # Get data from this column in the data source -\& tbl => \(aq\(aq, -\& trans => [], -\& }; -.Ve -.PP -.Vb 8 -\& # Add the column to every table. -\& my $tbl_meta = $vars{tbl_meta}; -\& foreach my $tbl ( values %$tbl_meta ) { -\& # Add the column to the list of defined columns -\& $tbl\->{cols}\->{example} = $col; -\& # Add the column to the list of visible columns -\& unshift @{$tbl\->{visible}}, \(aqexample\(aq; -\& } -.Ve -.PP -.Vb 3 -\& # Be sure to return a reference to the object. -\& return $self; -\& } -.Ve -.PP -.Vb 5 -\& # I\(aqd like to be called when a data set is being rendered into a table, please. -\& sub register_for_events { -\& my ( $self ) = @_; -\& return qw(set_to_tbl_pre_filter); -\& } -.Ve -.PP -.Vb 8 -\& # This method will be called when the event fires. -\& sub set_to_tbl_pre_filter { -\& my ( $self, $rows, $tbl ) = @_; -\& # Set the example column\(aqs data source to the value 1. -\& foreach my $row ( @$rows ) { -\& $row\->{example} = 1; -\& } -\& } -.Ve -.PP -.Vb 1 -\& 1; -.Ve -.Sh "Plugin Editor" -.IX Subsection "Plugin Editor" -The plugin editor lets you view the plugins innotop discovered and activate or -deactivate them. Start the editor by pressing $ to start the configuration -editor from any mode. Press the 'p' key to start the plugin editor. You'll see -a list of plugins innotop discovered. You can use the 'j' and 'k' keys to move -the highlight to the desired one, then press the * key to toggle it active or -inactive. Exit the editor and restart innotop for the changes to take effect. -.SH "SQL STATEMENTS" -.IX Header "SQL STATEMENTS" -innotop uses a limited set of \s-1SQL\s0 statements to retrieve data from MySQL for -display. The statements are customized depending on the server version against -which they are executed; for example, on MySQL 5 and newer, \s-1INNODB_STATUS\s0 -executes \*(L"\s-1SHOW\s0 \s-1ENGINE\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R", while on earlier versions it executes -\&\*(L"\s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R". The statements are as follows: -.PP -.Vb 12 -\& Statement SQL executed -\& =================== =============================== -\& INNODB_STATUS SHOW [ENGINE] INNODB STATUS -\& KILL_CONNECTION KILL -\& KILL_QUERY KILL QUERY -\& OPEN_TABLES SHOW OPEN TABLES -\& PROCESSLIST SHOW FULL PROCESSLIST -\& SHOW_MASTER_LOGS SHOW MASTER LOGS -\& SHOW_MASTER_STATUS SHOW MASTER STATUS -\& SHOW_SLAVE_STATUS SHOW SLAVE STATUS -\& SHOW_STATUS SHOW [GLOBAL] STATUS -\& SHOW_VARIABLES SHOW [GLOBAL] VARIABLES -.Ve -.SH "DATA SOURCES" -.IX Header "DATA SOURCES" -Each time innotop extracts values to create a table (see \*(L"\s-1EXPRESSIONS\s0\*(R" and -\&\*(L"\s-1TABLES\s0\*(R"), it does so from a particular data source. Largely because of the -complex data extracted from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, this is slightly messy. \s-1SHOW\s0 -\&\s-1INNODB\s0 \s-1STATUS\s0 contains a mixture of single values and repeated values that form -nested data sets. -.PP -Whenever innotop fetches data from MySQL, it adds two extra bits to each set: -cxn and Uptime_hires. cxn is the name of the connection from which the data -came. Uptime_hires is a high-resolution version of the server's Uptime status -variable, which is important if your \*(L"interval\*(R" setting is sub\-second. -.PP -Here are the kinds of data sources from which data is extracted: -.IP "\s-1STATUS_VARIABLES\s0" 4 -.IX Item "STATUS_VARIABLES" -This is the broadest category, into which the most kinds of data fall. It -begins with the combination of \s-1SHOW\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1VARIABLES\s0, but other sources -may be included as needed, for example, \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1SLAVE\s0 -\&\s-1STATUS\s0, as well as many of the non-repeated values from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. -.IP "\s-1DEADLOCK_LOCKS\s0" 4 -.IX Item "DEADLOCK_LOCKS" -This data is extracted from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 -section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested two levels deep: transactions, then -locks. -.IP "\s-1DEADLOCK_TRANSACTIONS\s0" 4 -.IX Item "DEADLOCK_TRANSACTIONS" -This data is from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0 -section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. It is nested one level deep. -.IP "\s-1EXPLAIN\s0" 4 -.IX Item "EXPLAIN" -This data is from the result set returned by \s-1EXPLAIN\s0. -.IP "\s-1INNODB_TRANSACTIONS\s0" 4 -.IX Item "INNODB_TRANSACTIONS" -This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0. -.IP "\s-1IO_THREADS\s0" 4 -.IX Item "IO_THREADS" -This data is from the list of threads in the the \s-1FILE\s0 I/O section of \s-1SHOW\s0 \s-1INNODB\s0 -\&\s-1STATUS\s0. -.IP "\s-1INNODB_LOCKS\s0" 4 -.IX Item "INNODB_LOCKS" -This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested -two levels deep. -.IP "\s-1OPEN_TABLES\s0" 4 -.IX Item "OPEN_TABLES" -This data is from \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0. -.IP "\s-1PROCESSLIST\s0" 4 -.IX Item "PROCESSLIST" -This data is from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0. -.IP "\s-1OS_WAIT_ARRAY\s0" 4 -.IX Item "OS_WAIT_ARRAY" -This data is from the \s-1SEMAPHORES\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested one -level deep. It comes from the lines that look like this: -.Sp -.Vb 1 -\& \-\-Thread 1568861104 has waited at btr0cur.c line 424 .... -.Ve -.SH "MYSQL PRIVILEGES" -.IX Header "MYSQL PRIVILEGES" -.IP "\(bu" 4 -You must connect to MySQL as a user who has the \s-1SUPER\s0 privilege for many of the -functions. -.IP "\(bu" 4 -If you don't have the \s-1SUPER\s0 privilege, you can still run some functions, but you -won't necessarily see all the same data. -.IP "\(bu" 4 -You need the \s-1PROCESS\s0 privilege to see the list of currently running queries in Q -mode. -.IP "\(bu" 4 -You need special privileges to start and stop slave servers. -.IP "\(bu" 4 -You need appropriate privileges to create and drop the deadlock tables if needed -(see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"). -.SH "SYSTEM REQUIREMENTS" -.IX Header "SYSTEM REQUIREMENTS" -You need Perl to run innotop, of course. You also need a few Perl modules: \s-1DBI\s0, -DBD::mysql, Term::ReadKey, and Time::HiRes. These should be included with most -Perl distributions, but in case they are not, I recommend using versions -distributed with your operating system or Perl distribution, not from \s-1CPAN\s0. -Term::ReadKey in particular has been known to cause problems if installed from -\&\s-1CPAN\s0. -.PP -If you have Term::ANSIColor, innotop will use it to format headers more readably -and compactly. (Under Microsoft Windows, you also need Win32::Console::ANSI for -terminal formatting codes to be honored). If you install Term::ReadLine, -preferably Term::ReadLine::Gnu, you'll get nice auto-completion support. -.PP -I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from -people successfully running it on Red Hat, CentOS, Solaris, and Mac \s-1OSX\s0. I -don't see any reason why it won't work on other UNIX-ish operating systems, but -I don't know for sure. It also runs on Windows under ActivePerl without -problem. -.PP -I use innotop on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, 5.1.15, -and 5.2.3. If it doesn't run correctly for you, that is a bug and I hope you -report it. -.SH "FILES" -.IX Header "FILES" -$HOMEDIR/.innotop is used to store configuration information. Files include the -configuration file innotop.ini, the core_dump file which contains verbose error -messages if \*(L"debug\*(R" is enabled, and the plugins/ subdirectory. -.SH "GLOSSARY OF TERMS" -.IX Header "GLOSSARY OF TERMS" -.IP "tick" 4 -.IX Item "tick" -A tick is a refresh event, when innotop re-fetches data from connections and -displays it. -.SH "ACKNOWLEDGEMENTS" -.IX Header "ACKNOWLEDGEMENTS" -I'm grateful to the following people for various reasons, and hope I haven't -forgotten to include anyone: -.PP -Allen K. Smith, -Aurimas Mikalauskas, -Bartosz Fenski, -Brian Miezejewski, -Christian Hammers, -Cyril Scetbon, -Dane Miller, -David Multer, -Dr. Frank Ullrich, -Giuseppe Maxia, -Google.com Site Reliability Engineers, -Jan Pieter Kunst, -Jari Aalto, -Jay Pipes, -Jeremy Zawodny, -Johan Idren, -Kristian Kohntopp, -Lenz Grimmer, -Maciej Dobrzanski, -Michiel Betel, -MySQL \s-1AB\s0, -Paul McCullagh, -Sebastien Estienne, -Sourceforge.net, -Steven Kreuzer, -The Gentoo MySQL Team, -Trevor Price, -Yaar Schnitman, -and probably more people I've neglected to include. -.PP -(If I misspelled your name, it's probably because I'm afraid of putting -international characters into this documentation; earlier versions of Perl might -not be able to compile it then). -.SH "COPYRIGHT, LICENSE AND WARRANTY" -.IX Header "COPYRIGHT, LICENSE AND WARRANTY" -This program is copyright (c) 2006 Baron Schwartz. -Feedback and improvements are welcome. -.PP -\&\s-1THIS\s0 \s-1PROGRAM\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 -\&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 -\&\s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. -.PP -This program is free software; you can redistribute it and/or modify it under -the terms of the \s-1GNU\s0 General Public License as published by the Free Software -Foundation, version 2; \s-1OR\s0 the Perl Artistic License. On \s-1UNIX\s0 and similar -systems, you can issue `man perlgpl' or `man perlartistic' to read these -licenses. -.PP -You should have received a copy of the \s-1GNU\s0 General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, \s-1MA\s0 02111\-1307 \s-1USA\s0. -.PP -Execute innotop and press '!' to see this information at any time. -.SH "AUTHOR" -.IX Header "AUTHOR" -Baron Schwartz. -.SH "BUGS" -.IX Header "BUGS" -You can report bugs, ask for improvements, and get other help and support at -. There are mailing lists, forums, -a bug tracker, etc. Please use these instead of contacting me directly, as it -makes my job easier and benefits others if the discussions are permanent and -public. Of course, if you need to contact me in private, please do. diff --git a/build/debian/additions/msql2mysql.1 b/build/debian/additions/msql2mysql.1 deleted file mode 100644 index 8fe05e7415d..00000000000 --- a/build/debian/additions/msql2mysql.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -msql2mysql \- MySQL importer for msql style data. -.SH SYNOPSIS -msql2mysql [options] -.SH DESCRIPTION -This program imports old msql database files. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/my.cnf b/build/debian/additions/my.cnf deleted file mode 100644 index 997523b9c2f..00000000000 --- a/build/debian/additions/my.cnf +++ /dev/null @@ -1,129 +0,0 @@ -# -# The MySQL database server configuration file. -# -# You can copy this to one of: -# - "/etc/mysql/my.cnf" to set global options, -# - "~/.my.cnf" to set user-specific options. -# -# One can use all long options that the program supports. -# Run program with --help to get a list of available options and with -# --print-defaults to see which it would actually understand and use. -# -# For explanations see -# http://dev.mysql.com/doc/mysql/en/server-system-variables.html - -# This will be passed to all mysql clients -# It has been reported that passwords should be enclosed with ticks/quotes -# escpecially if they contain "#" chars... -# Remember to edit /etc/mysql/debian.cnf when changing the socket location. -[client] -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -# Here is entries for some specific programs -# The following values assume you have at least 32M ram - -# This was formally known as [safe_mysqld]. Both versions are currently parsed. -[mysqld_safe] -socket = /var/run/mysqld/mysqld.sock -nice = 0 - -[mysqld] -# -# * Basic Settings -# -user = mysql -pid-file = /var/run/mysqld/mysqld.pid -socket = /var/run/mysqld/mysqld.sock -port = 3306 -basedir = /usr -datadir = /var/lib/mysql -tmpdir = /tmp -language = /usr/share/mysql/english -skip-external-locking -# -# For compatibility to other Debian packages that still use -# libmysqlclient10 and libmysqlclient12. -old_passwords = 1 -# -# Instead of skip-networking the default is now to listen only on -# localhost which is more compatible and is not less secure. -bind-address = 127.0.0.1 -# -# * Fine Tuning -# -key_buffer = 16M -max_allowed_packet = 16M -thread_stack = 128K -thread_cache_size = 8 -# This replaces the startup script and checks MyISAM tables if needed -# the first time they are touched -myisam-recover = BACKUP -#max_connections = 100 -#table_cache = 64 -#thread_concurrency = 10 -# -# * Query Cache Configuration -# -query_cache_limit = 1M -query_cache_size = 16M -# -# * Logging and Replication -# -# Both location gets rotated by the cronjob. -# Be aware that this log type is a performance killer. -# As of 5.1 you can enable the at runtime! -#log_type = FILE -#general_log = /var/log/mysql/mysql.log -# -# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf. -# -# Here you can see queries with especially long duration -#log_slow_queries = /var/log/mysql/mysql-slow.log -#long_query_time = 2 -#log-queries-not-using-indexes -# -# The following can be used as easy to replay backup logs or for replication. -# note: if you are setting up a replication slave, see README.Debian about -# other settings you may need to change. -#server-id = 1 -#log_bin = /var/log/mysql/mysql-bin.log -expire_logs_days = 10 -max_binlog_size = 100M -#binlog_do_db = include_database_name -#binlog_ignore_db = include_database_name -# -# * InnoDB -# -# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. -# Read the manual for more InnoDB related options. There are many! -# -# * Security Features -# -# Read the manual, too, if you want chroot! -# chroot = /var/lib/mysql/ -# -# For generating SSL certificates I recommend the OpenSSL GUI "tinyca". -# -# ssl-ca=/etc/mysql/cacert.pem -# ssl-cert=/etc/mysql/server-cert.pem -# ssl-key=/etc/mysql/server-key.pem - - - -[mysqldump] -quick -quote-names -max_allowed_packet = 16M - -[mysql] -#no-auto-rehash # faster start of mysql but no tab completition - -[isamchk] -key_buffer = 16M - -# -# * IMPORTANT: Additional settings that can override those from this file! -# The files must end with '.cnf', otherwise they'll be ignored. -# -!includedir /etc/mysql/conf.d/ diff --git a/build/debian/additions/my_print_defaults.1 b/build/debian/additions/my_print_defaults.1 deleted file mode 100644 index ebef4157016..00000000000 --- a/build/debian/additions/my_print_defaults.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -my_print_defaults \- MySQL helper script that prints defaults. -.SH SYNOPSIS -my_print_defaults [options] -.SH DESCRIPTION -Prints all arguments that is give to some program using the default files. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/myisam_ftdump.1 b/build/debian/additions/myisam_ftdump.1 deleted file mode 100644 index e2de358efcc..00000000000 --- a/build/debian/additions/myisam_ftdump.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -myisam_ftdump \- Dumps full text tables. -.SH SYNOPSIS -myisam_ftdump [options] -.SH DESCRIPTION -Dumps information and contents of full text tables. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/myisamchk.1 b/build/debian/additions/myisamchk.1 deleted file mode 100644 index fe7f34961e0..00000000000 --- a/build/debian/additions/myisamchk.1 +++ /dev/null @@ -1,17 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -myisamchk \- Checks MySQL myisam type databases. -.SH SYNOPSIS -myisamchk [options] -.SH DESCRIPTION -Description, check and repair of ISAM tables. -Used without options all tables on the command will be checked for errors - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/myisamlog.1 b/build/debian/additions/myisamlog.1 deleted file mode 100644 index 959d547df94..00000000000 --- a/build/debian/additions/myisamlog.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -myisamlog \- MySQL helper script. -.SH SYNOPSIS -myisamlog [options] -.SH DESCRIPTION -Function unknown. Mail to ch@debian.org. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/myisampack.1 b/build/debian/additions/myisampack.1 deleted file mode 100644 index 93168304a17..00000000000 --- a/build/debian/additions/myisampack.1 +++ /dev/null @@ -1,19 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -myisampack \- Compresses MySQL database files. -.SH SYNOPSIS -myisampack [options] -.SH DESCRIPTION -Pack a MyISAM-table to take much less space. -Keys are not updated, you must run myisamchk -rq on the datafile -afterwards to update the keys. -You should give the .MYI file as the filename argument. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql-server.lintian-overrides b/build/debian/additions/mysql-server.lintian-overrides deleted file mode 100644 index ae589c2472e..00000000000 --- a/build/debian/additions/mysql-server.lintian-overrides +++ /dev/null @@ -1,2 +0,0 @@ -W: mysql-dfsg source: maintainer-script-lacks-debhelper-token debian/percona-xtradb-server.postinst -W: percona-xtradb-server: possible-bashism-in-maintainer-script postinst:68 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}' diff --git a/build/debian/additions/mysql_config.1 b/build/debian/additions/mysql_config.1 deleted file mode 100644 index 88095e22b9e..00000000000 --- a/build/debian/additions/mysql_config.1 +++ /dev/null @@ -1,17 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqlconfig \- MySQL compile settings. -.SH SYNOPSIS -mysqlconfig [options] -.SH DESCRIPTION -This program is only useful for people who want to compile agains -libmysqlclient. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_convert_table_format.1 b/build/debian/additions/mysql_convert_table_format.1 deleted file mode 100644 index 3c23581df43..00000000000 --- a/build/debian/additions/mysql_convert_table_format.1 +++ /dev/null @@ -1,17 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_convert_table_format \- MySQL table converter. -.SH SYNOPSIS -mysql_convert_table_format [options] -.SH DESCRIPTION -Conversion of a MySQL tables to other table types. -If no tables has been specifed, all tables in the database will be converted. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_find_rows.1 b/build/debian/additions/mysql_find_rows.1 deleted file mode 100644 index 35a70b1f960..00000000000 --- a/build/debian/additions/mysql_find_rows.1 +++ /dev/null @@ -1,18 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_find_rows \- MySQL shell skript for searching in update logs. -.SH SYNOPSIS -mysql_find_rows [options] -.SH DESCRIPTION -Prints all SQL queries that matches a regexp or contains a 'use -database' or 'set ..' command to stdout. A SQL query may contain -newlines. This is useful to find things in a MySQL update log. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_fix_extensions.1 b/build/debian/additions/mysql_fix_extensions.1 deleted file mode 100644 index 3f0a028ca3f..00000000000 --- a/build/debian/additions/mysql_fix_extensions.1 +++ /dev/null @@ -1,18 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_fix_extensions \- Corrects MySQL database file names. -.SH SYNOPSIS -mysql_fix_extensions -.SH DESCRIPTION -Makes .frm lowercase and .MYI/MYD/ISM/ISD uppercase -useful when datafiles are copied from windows. -Does not work with RAID, with InnoDB or BDB tables. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (8) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_install_db.1 b/build/debian/additions/mysql_install_db.1 deleted file mode 100644 index 11f1f2967a2..00000000000 --- a/build/debian/additions/mysql_install_db.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_install_db \- MySQL helper program. -.SH SYNOPSIS -mysql_install_db [options] -.SH DESCRIPTION -This program is normally not needed by any user. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_secure_installation.1 b/build/debian/additions/mysql_secure_installation.1 deleted file mode 100644 index d65b7f5d09d..00000000000 --- a/build/debian/additions/mysql_secure_installation.1 +++ /dev/null @@ -1,17 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_secure_installation \- Secures the MySQL access control lists. -.SH SYNOPSIS -mysql_secure_installation [options] -.SH DESCRIPTION -This interactive programm suggests changes like removing anonymous users that -are supposed to make your installation more secure. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (8) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_setpermission.1 b/build/debian/additions/mysql_setpermission.1 deleted file mode 100644 index 77167e0d58f..00000000000 --- a/build/debian/additions/mysql_setpermission.1 +++ /dev/null @@ -1,23 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_setpermission \- Adds MySQL users or changes passwords. -.SH SYNOPSIS -mysql_setpermission [options] -.SH DESCRIPTION -The permission setter is a little program which can help you add users -or databases or change passwords in MySQL. Keep in mind that we don't -check permissions which already been set in MySQL. So if you can't -connect to MySQL using the permission you just added, take a look at -the permissions which have already been set in MySQL. - -The permission setter first reads your .my.cnf file in your Home -directory if it exists. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysql_tableinfo.1 b/build/debian/additions/mysql_tableinfo.1 deleted file mode 100644 index 1de4f5d5943..00000000000 --- a/build/debian/additions/mysql_tableinfo.1 +++ /dev/null @@ -1,322 +0,0 @@ -.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "MYSQL_TABLEINFO 1" -.TH MYSQL_TABLEINFO 1 "2003-04-05" "perl v5.8.0" "User Contributed Perl Documentation" -.SH "NAME" -mysql_tableinfo \- creates and populates information tables with -the output of SHOW DATABASES, SHOW TABLES (or SHOW TABLE STATUS), -SHOW COLUMNS and SHOW INDEX. -.PP -This is version 1.1. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 1 -\& mysql_tableinfo [OPTIONS] database_to_write [database_like_wild] [table_like_wild] -.Ve -.PP -.Vb 2 -\& Do not backquote (``) database_to_write, -\& and do not quote ('') database_like_wild or table_like_wild -.Ve -.PP -.Vb 1 -\& Examples: -.Ve -.PP -.Vb 1 -\& mysql_tableinfo info -.Ve -.PP -.Vb 1 -\& mysql_tableinfo info this_db -.Ve -.PP -.Vb 1 -\& mysql_tableinfo info %a% b% -.Ve -.PP -.Vb 1 -\& mysql_tableinfo info --clear-only -.Ve -.PP -.Vb 1 -\& mysql_tableinfo info --col --idx --table-status -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -mysql_tableinfo asks a MySQL server information about its -databases, tables, table columns and index, and stores this -in tables called `db`, `tbl` (or `tbl_status`), `col`, `idx` -(with an optional prefix specified with \-\-prefix). -After that, you can query these information tables, for example -to build your admin scripts with \s-1SQL\s0 queries, like -.PP -\&\s-1SELECT\s0 \s-1CONCAT\s0(\*(L"\s-1CHECK\s0 \s-1TABLE\s0 \*(R",`database`,\*(L".\*(R",`table`,\*(L" \s-1EXTENDED\s0;\*(R") -\&\s-1FROM\s0 info.tbl \s-1WHERE\s0 ... ; -.PP -as people usually do with some other \s-1RDBMS\s0 -(note: to increase the speed of your queries on the info tables, -you may add some index on them). -.PP -The database_like_wild and table_like_wild instructs the program -to gather information only about databases and tables -whose names match these patterns. If the info -tables already exist, their rows matching the patterns are simply -deleted and replaced by the new ones. That is, -old rows not matching the patterns are not touched. -If the database_like_wild and table_like_wild arguments -are not specified on the command-line they default to \*(L"%\*(R". -.PP -The program : -.PP -\&\- does \s-1CREATE\s0 \s-1DATABASE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write -where database_to_write is the database name specified on the command\-line. -.PP -\&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`db` -.PP -\&\- fills database_to_write.`db` with the output of -\&\s-1SHOW\s0 \s-1DATABASES\s0 \s-1LIKE\s0 database_like_wild -.PP -\&\- does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`tbl` -(respectively database_to_write.`tbl_status` -if the \-\-tbl\-status option is on) -.PP -\&\- for every found database, -fills database_to_write.`tbl` (respectively database_to_write.`tbl_status`) -with the output of -\&\s-1SHOW\s0 \s-1TABLES\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild -(respectively \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 \s-1FROM\s0 found_db \s-1LIKE\s0 table_like_wild) -.PP -\&\- if the \-\-col option is on, - * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`col` - * for every found table, - fills database_to_write.`col` with the output of - \s-1SHOW\s0 \s-1COLUMNS\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db -.PP -\&\- if the \-\-idx option is on, - * does \s-1CREATE\s0 \s-1TABLE\s0 \s-1IF\s0 \s-1NOT\s0 \s-1EXISTS\s0 database_to_write.`idx` - * for every found table, - fills database_to_write.`idx` with the output of - \s-1SHOW\s0 \s-1INDEX\s0 \s-1FROM\s0 found_tbl \s-1FROM\s0 found_db -.PP -Some options may modify this general scheme (see below). -.PP -As mentioned, the contents of the info tables are the output of -\&\s-1SHOW\s0 commands. In fact the contents are slightly more complete : -.PP -\&\- the `tbl` (or `tbl_status`) info table - has an extra column which contains the database name, -.PP -\&\- the `col` info table - has an extra column which contains the table name, - and an extra column which contains, for each described column, - the number of this column in the table owning it (this extra column - is called `Seq_in_table`). `Seq_in_table` makes it possible for you - to retrieve your columns in sorted order, when you are querying - the `col` table. -.PP -\&\- the `index` info table - has an extra column which contains the database name. -.PP -Caution: info tables contain certain columns (e.g. -Database, Table, Null...) whose names, as they are MySQL reserved words, -need to be backquoted (`...`) when used in \s-1SQL\s0 statements. -.PP -Caution: as information fetching and info tables filling happen at the -same time, info tables may contain inaccurate information about -themselves. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\-\-clear" 4 -.IX Item "--clear" -Does \s-1DROP\s0 \s-1TABLE\s0 on the info tables (only those that the program is -going to fill, for example if you do not use \-\-col it won't drop -the `col` table) and processes normally. Does not drop database_to_write. -.IP "\-\-clear\-only" 4 -.IX Item "--clear-only" -Same as \-\-clear but exits after the DROPs. -.IP "\-\-col" 4 -.IX Item "--col" -Adds columns information (into table `col`). -.IP "\-\-idx" 4 -.IX Item "--idx" -Adds index information (into table `idx`). -.IP "\-\-prefix prefix" 4 -.IX Item "--prefix prefix" -The info tables are named from the concatenation of prefix and, -respectively, db, tbl (or tbl_status), col, idx. Do not quote ('') -or backquote (``) prefix. -.IP "\-q, \-\-quiet" 4 -.IX Item "-q, --quiet" -Does not warn you about what the script is going to do (\s-1DROP\s0 \s-1TABLE\s0 etc) -and does not ask for a confirmation before starting. -.IP "\-\-tbl\-status" 4 -.IX Item "--tbl-status" -Instead of using \s-1SHOW\s0 \s-1TABLES\s0, uses \s-1SHOW\s0 \s-1TABLE\s0 \s-1STATUS\s0 -(much more complete information, but slower). -.IP "\-\-help" 4 -.IX Item "--help" -Display helpscreen and exit -.IP "\-u, \-\-user=#" 4 -.IX Item "-u, --user=#" -user for database login if not current user. Give a user -who has sufficient privileges (\s-1CREATE\s0, ...). -.IP "\-p, \-\-password=# (INSECURE)" 4 -.IX Item "-p, --password=# (INSECURE)" -password to use when connecting to server. -WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time. -.IP "\-h, \-\-host=#" 4 -.IX Item "-h, --host=#" -host to connect to -.IP "\-P, \-\-port=#" 4 -.IX Item "-P, --port=#" -port to use when connecting to server -.IP "\-S, \-\-socket=#" 4 -.IX Item "-S, --socket=#" -\&\s-1UNIX\s0 domain socket to use when connecting to server -.SH "WARRANTY" -.IX Header "WARRANTY" -This software is free and comes without warranty of any kind. You -should never trust backup software without studying the code yourself. -Study the code inside this script and only rely on it if \fIyou\fR believe -that it does the right thing for you. -.Sp -Patches adding bug fixes, documentation and new features are welcome. -.SH "TO DO" -.IX Header "TO DO" -Use extended inserts to be faster (for servers with many databases -or tables). But to do that, must care about net\-buffer\-length. -.SH "AUTHOR" -.IX Header "AUTHOR" -2002\-06\-18 Guilhem Bichot (guilhem.bichot@mines\-paris.org) -.Sp -And all the authors of mysqlhotcopy, which served as a model for -the structure of the program. diff --git a/build/debian/additions/mysql_waitpid.1 b/build/debian/additions/mysql_waitpid.1 deleted file mode 100644 index f6877865ba8..00000000000 --- a/build/debian/additions/mysql_waitpid.1 +++ /dev/null @@ -1,20 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysql_waitpid \- Waits a specified amount of seconds for a PID to terminate. -.SH SYNOPSIS -mysql_waitpid [options] -.SH DESCRIPTION -Description: Waits for a program, which program id is #pid, to -terminate within #time seconds. If the program terminates within -this time, or if the #pid no longer exists, value 0 is returned. -Otherwise 1 is returned. Both #pid and #time must be positive -integer arguments. - -See mysql_waitpid for options. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqlbinlog.1 b/build/debian/additions/mysqlbinlog.1 deleted file mode 100644 index fcdf2a083f4..00000000000 --- a/build/debian/additions/mysqlbinlog.1 +++ /dev/null @@ -1,17 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqlbinlog \- Dumps MySQL binary logs. -.SH SYNOPSIS -mysqlbinlog [options] -.SH DESCRIPTION -Dumps a MySQL binary log in a format usable for viewing or for pipeing to -the mysql command line client - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqlbug.1 b/build/debian/additions/mysqlbug.1 deleted file mode 100644 index 133330dd897..00000000000 --- a/build/debian/additions/mysqlbug.1 +++ /dev/null @@ -1,14 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqlbug \- MySQL bug reporting tool. -.SH SYNOPSIS -mysqlbug [options] -.SH DESCRIPTION -Interactive bug reporting tool. Use reportbug on Debian systems. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqlcheck.1 b/build/debian/additions/mysqlcheck.1 deleted file mode 100644 index b36ba2d1eb1..00000000000 --- a/build/debian/additions/mysqlcheck.1 +++ /dev/null @@ -1,28 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqlcheck \- MySQL program for repairing, checking and optimizing tables. -.SH SYNOPSIS -mysqlcheck | mysqlanalyze | mysqloptimize [options] -.SH DESCRIPTION -This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a) -or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be -used same time. It works on MyISAM and in some cases on BDB tables. -Please consult the MySQL manual for latest information about the -above. The options -c,-r,-a and -o are exclusive to each other, which -means that the last option will be used, if several was specified. - -The option -c will be used by default, if none was specified. You -can change the default behavior by making a symbolic link, or -copying this file somewhere with another name, the alternatives are: -mysqlrepair: The default option will be -r -mysqlanalyze: The default option will be -a -mysqloptimize: The default option will be -o - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (8) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqld_safe_syslog.cnf b/build/debian/additions/mysqld_safe_syslog.cnf deleted file mode 100644 index 3b0445d6bd8..00000000000 --- a/build/debian/additions/mysqld_safe_syslog.cnf +++ /dev/null @@ -1,2 +0,0 @@ -[mysqld_safe] -syslog diff --git a/build/debian/additions/mysqldumpslow.1 b/build/debian/additions/mysqldumpslow.1 deleted file mode 100644 index 0431ef04cbb..00000000000 --- a/build/debian/additions/mysqldumpslow.1 +++ /dev/null @@ -1,50 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqldumpslow \- Parse and summarize the MySQL slow query log. -.SH SYNOPSIS -mysqldumpslow [options] -.SH DESCRIPTION -This program parses and summarizes a 'slow query log'. - -.TP -\fB\-v\fR -verbose -.TP -\fB\-d\fR -debug -.TP -\fB\-s=WORD\fR -what to sort by (t, at, l, al, r, ar etc) -.TP -\fB\-r\fR -reverse the sort order (largest last instead of first) -.TP -\fB\-t=NUMBER\fR -just show the top n queries -.TP -\fB\-a\fR -don't abstract all numbers to N and strings to 'S' -.TP -\fB\-n=NUMBER\fR -abstract numbers with at least n digits within names -.TP -\fB\-g=WORD\fR -grep: only consider stmts that include this string -.TP -\fB\-h=WORD\fR -hostname of db server for *-slow.log filename (can be wildcard) -.TP -\fB\-i=WORD\fR -name of server instance (if using mysql.server startup script) -.TP -\fB\-l\fR -don't subtract lock time from total time - -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers based on -the commends in the code. - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqlimport.1 b/build/debian/additions/mysqlimport.1 deleted file mode 100644 index 9007307a328..00000000000 --- a/build/debian/additions/mysqlimport.1 +++ /dev/null @@ -1,20 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqlimport \- Imports text files with MySQL database queries. -.SH SYNOPSIS -mysqlimport [options] -.SH DESCRIPTION -Loads tables from text files in various formats. The base name of the -text file must be the name of the table that should be used. -If one uses sockets to connect to the MySQL server, the server will open and -read the text file directly. In other cases the client will open the text -file. The SQL command 'LOAD DATA INFILE' is used to import the rows. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/mysqlmanager.1 b/build/debian/additions/mysqlmanager.1 deleted file mode 100644 index ebb69adbd09..00000000000 --- a/build/debian/additions/mysqlmanager.1 +++ /dev/null @@ -1,49 +0,0 @@ -.TH mysql 1 "March 2005" "MySQL 4.1" "MySQL database" -.SH NAME -mysqlmanager \- Manages instances of MySQL server. -.SH SYNOPSIS -.B mysqlmanager -[\fIOPTIONS\fR] -.SH DESCRIPTION -Manages instances of MySQL server. -.TP -\-?, \fB\-\-help\fR -Display this help and exit. -.TP -\fB\-P\fR, \fB\-\-port=\fR# -Port number to listen on. -.TP -\fB\-l\fR, \fB\-\-log\fR=\fIname\fR -Path to log file. -.TP -\fB\-b\fR, \fB\-\-bind\-address=\fR# -Address to listen on. -.HP -\fB\-B\fR, \fB\-\-tcp\-backlog=\fR# Size of TCP/IP listen queue. -.HP -\fB\-g\fR, \fB\-\-greeting\fR=\fIname\fR Set greeting on connect. -.TP -\fB\-m\fR, \fB\-\-max\-command\-len=\fR# -Maximum command length. -.TP -\fB\-d\fR, \fB\-\-one\-thread\fR -Use one thread ( for debugging). -.TP -\fB\-C\fR, \fB\-\-connect\-retries=\fR# -Number of attempts to establish MySQL connection. -.TP -\fB\-p\fR, \fB\-\-password\-file\fR=\fIname\fR -Password file for manager. -.HP -\fB\-f\fR, \fB\-\-pid\-file\fR=\fIname\fR Pid file to use. -.TP -\fB\-V\fR, \fB\-\-version\fR -Output version information and exit. -.SH "SEE ALSO" -The full documentation for -.B mysqlmanager -is available in the package mysql-doc-4.1 or on the MySQL -homepage www.mysql.com. -.SH AUTHOR -This manpage was created by Christian Hammers -using help2man. diff --git a/build/debian/additions/mysqlreport b/build/debian/additions/mysqlreport deleted file mode 100644 index 402a5be835d..00000000000 --- a/build/debian/additions/mysqlreport +++ /dev/null @@ -1,1298 +0,0 @@ -#!/usr/bin/perl -w - -# mysqlreport v3.5 Apr 16 2008 -# http://hackmysql.com/mysqlreport - -# mysqlreport makes an easy-to-read report of important MySQL status values. -# Copyright 2006-2008 Daniel Nichter -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# The GNU General Public License is available at: -# http://www.gnu.org/copyleft/gpl.html - -use strict; -use File::Temp qw(tempfile); -use DBI; -use Getopt::Long; -eval { require Term::ReadKey; }; -my $RK = ($@ ? 0 : 1); - -sub have_op; - -my $WIN = ($^O eq 'MSWin32' ? 1 : 0); -my %op; -my %mycnf; # ~/.my.cnf -my ($tmpfile_fh, $tmpfile); -my ($stat_name, $stat_val, $stat_label); -my $MySQL_version; -my (%stats, %vars); # SHOW STATUS, SHOW VARIABLES -my (%DMS_vals, %Com_vals, %ib_vals); -my ($dbh, $query); -my ($questions, $key_read_ratio, $key_write_ratio, $dms, $slow_query_t); -my ($key_cache_block_size, $key_buffer_used, $key_buffer_usage); -my ($qc_mem_used, $qc_hi_r, $qc_ip_r); # Query Cache -my $have_innodb_vals; -my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio); -my ($relative_live, $relative_infiles); -my $real_uptime; -my (%stats_present, %stats_past); # For relative reports - -GetOptions ( - \%op, - "user=s", - "password:s", - "host=s", - "port=s", - "socket=s", - "no-mycnf", - "infile|in=s", - "outfile=s", - "flush-status", - "email=s", - "r|relative:i", - "c|report-count=i", - "detach", - "help|?", - "debug" -); - -show_help_and_exit() if $op{'help'}; - -get_user_mycnf() unless $op{'no-mycnf'}; - -# Command line options override ~/.my.cnf -$mycnf{'host'} = $op{'host'} if have_op 'host'; -$mycnf{'port'} = $op{'port'} if have_op 'port'; -$mycnf{'socket'} = $op{'socket'} if have_op 'socket'; -$mycnf{'user'} = $op{'user'} if have_op 'user'; - -$mycnf{'user'} ||= $ENV{'USER'}; - -if(exists $op{'password'}) -{ - if($op{'password'} eq '') # Prompt for password - { - Term::ReadKey::ReadMode(2) if $RK; - print "Password for database user $mycnf{'user'}: "; - chomp($mycnf{'pass'} = ); - Term::ReadKey::ReadMode(0), print "\n" if $RK; - } - else { $mycnf{'pass'} = $op{'password'}; } # Use password given on command line -} - -$op{'com'} ||= 3; -$op{'c'} ||= 1; # Used in collect_reports() if --r given integer value - -$relative_live = 0; -$relative_infiles = 0; - -if(defined $op{'r'}) -{ - if($op{r}) { $relative_live = 1; } # if -r was given an integer value - else { $relative_infiles = 1; } -} - -# The report is written to a tmp file first. -# Later it will be moved to $op{'outfile'} or emailed $op{'email'} if needed. -($tmpfile_fh, $tmpfile) = tempfile() or die "Cannot open temporary file for writing: $!\n"; - -if($op{'detach'}) -{ - $SIG{'TERM'} = 'sig_handler'; - - if(fork()) - { - print "mysqlreport has forked and detached.\n"; - print "While running detached, mysqlreport writes reports to '$tmpfile'.\n"; - - exit; - } - - open(STDIN, " $tmpfile") or die "Cannot dup STDOUT: $!\n"; - open(STDERR, "> $tmpfile") or die "Cannot dup STDERR: $!\n"; -} - -select $tmpfile_fh; -$| = 1 if ($op{'detach'} || $relative_live); - -print "tmp file: $tmpfile\n" if $op{debug}; - -# Connect to MySQL -if(!$op{'infile'} && !$relative_infiles) -{ - connect_to_MySQL(); -} - -$have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version() - -if(defined $op{'r'}) -{ - if($relative_live) - { - print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'}; - get_MySQL_version(); - collect_reports(); - } - - if($relative_infiles) { read_relative_infiles(); } -} -else -{ - if(!$op{'infile'}) - { - get_MySQL_version(); - get_vals(); - get_vars(); - } - else - { - read_infile($op{'infile'}); - } - - get_Com_values(); - - set_myisam_vals(); - set_ib_vals() if $have_innodb_vals; - - write_report(); -} - -exit_tasks_and_cleanup(); - -exit; - -# -# Subroutines -# -sub show_help_and_exit -{ - print <<"HELP"; -mysqlreport v3.5 Apr 16 2008 -mysqlreport makes an easy-to-read report of important MySQL status values. - -Command line options (abbreviations work): - --user USER Connect to MySQL as USER - --password PASS Use PASS or prompt for MySQL user's password - --host ADDRESS Connect to MySQL at ADDRESS - --port PORT Connect to MySQL at PORT - --socket SOCKET Connect to MySQL at SOCKET - --no-mycnf Don't read ~/.my.cnf - --infile FILE Read status values from FILE instead of MySQL - --outfile FILE Write report to FILE - --email ADDRESS Email report to ADDRESS (doesn't work on Windows) - --flush-status Issue FLUSH STATUS; after getting current values - --relative X Generate relative reports. If X is an integer, - reports are live from the MySQL server X seconds apart. - If X is a list of infiles (file1 file2 etc.), - reports are generated from the infiles in the order - that they are given. - --report-count N Collect N number of live relative reports (default 1) - --detach Fork and detach from terminal (run in background) - --help Prints this - --debug Print debugging information - -Visit http://hackmysql.com/mysqlreport for more information. -HELP - - exit; -} - -sub get_user_mycnf -{ - print "get_user_mycnf\n" if $op{debug}; - - return if $WIN; - open MYCNF, "$ENV{HOME}/.my.cnf" or return; - while() - { - if(/^(.+?)\s*=\s*"?(.+?)"?\s*$/) - { - $mycnf{$1} = $2; - print "get_user_mycnf: read '$1 = $2'\n" if $op{debug}; - } - } - $mycnf{'pass'} ||= $mycnf{'password'} if exists $mycnf{'password'}; - close MYCNF; -} - -sub connect_to_MySQL -{ - print "connect_to_MySQL\n" if $op{debug}; - - my $dsn; - - if($mycnf{'socket'} && -S $mycnf{'socket'}) - { - $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}"; - } - elsif($mycnf{'host'}) - { - $dsn = "DBI:mysql:host=$mycnf{host}" . ($mycnf{port} ? ";port=$mycnf{port}" : ""); - } - else - { - $dsn = "DBI:mysql:host=localhost"; - } - - print "connect_to_MySQL: DBI DSN: $dsn\n" if $op{debug}; - - $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die; -} - -sub collect_reports -{ - print "collect_reports\n" if $op{debug}; - - my $i; - - get_vals(); - get_vars(); - - get_Com_values(); - - %stats_past = %stats; - - set_myisam_vals(); - set_ib_vals() if $have_innodb_vals; - - print "#\n# Beginning report, 0 0:0:0\n#\n"; - - write_report(); - - for($i = 0; $i < $op{'c'}; $i++) - { - $dbh->disconnect(); - - sleep($op{'r'}); - - connect_to_MySQL(); - - print "\n#\n# Interval report " , $i + 1 , ", +", sec_to_dhms(($i + 1) * $op{'r'}), "\n#\n"; - - get_vals(); - - write_relative_report(); - } -} - -sub read_relative_infiles -{ - print "read_relative_infiles\n" if $op{debug}; - - my $slurp; # Used to check infiles for multiple sets of status values - my $n_stats; # Number of multiple sets of status values in an infile - my $infile; - my $report_n; # Report number - - $report_n = 1; - - foreach $infile (@ARGV) - { - # Read all of infile into $slurp - open INFILE, "< $infile" or warn and next; - $slurp = do { local $/; }; - close INFILE; - - $n_stats = 0; - - # Count number of status value sets - $n_stats++ while $slurp =~ /Aborted_clients/g; - - print "read_relative_infiles: found $n_stats sets of status values in file '$infile'\n" - if $op{debug}; - - if($n_stats == 1) - { - read_infile($infile); - relative_infile_report($report_n++); - } - - if($n_stats > 1) - { - my @tmpfile_fh; - my @tmpfile_name; - my $i; - my $stat_n; # Status value set number - - # Create a tmp file for each set of status values - for($i = 0; $i < $n_stats; $i++) - { - my ($fh, $name) = tempfile() - or die "read_relative_infiles: cannot open temporary file for writing: $!\n"; - - push(@tmpfile_fh, $fh); - push(@tmpfile_name, $name); - - print "read_relative_infiles: created tmp file '$name' for set $i\n" if $op{debug}; - } - - $i = 0; - $stat_n = 0; - - select $tmpfile_fh[$i]; - - # Read infile again and copy each set of status values to seperate tmp files - open INFILE, "< $infile" or warn and next; - while() - { - next if /^\+/; - next if /^$/; - - # The infile must begin with the system variable values. - # Therefore, the first occurance of Aborted_clients indicates the beginning - # of the first set of status values if no sets have occured yet ($stat_n == 0). - # In this case, the following status values are printed to the current fh, - # along with the system variable values read thus far, until Aborted_clients - # occurs again. Then begins the second and subsequent sets of status values. - - if(/Aborted_clients/) - { - print and next if $stat_n++ == 0; - select $tmpfile_fh[++$i]; - } - - print; - } - close INFILE; - - # Re-select the main tmp file into which the reports are being written. - select $tmpfile_fh; - - for($i = 0; $i < $n_stats; $i++) - { - close $tmpfile_fh[$i]; - - print "read_relative_infiles: reading set $i tmp file '$tmpfile_name[$i]'\n" - if $op{debug}; - - read_infile($tmpfile_name[$i]); - relative_infile_report($report_n++); - - if($WIN) { `del $tmpfile_name[$i]`; } - else { `rm -f $tmpfile_name[$i]`; } - - print "read_relative_infiles: deleted set $i tmp file '$tmpfile_name[$i]'\n" - if $op{debug}; - } - - } # if($n_stats > 1) - } # foreach $infile (@files) -} - -sub relative_infile_report -{ - print "relative_infile_report\n" if $op{debug}; - - my $report_n = shift; - - if($report_n == 1) - { - get_Com_values(); - - %stats_past = %stats; - - set_myisam_vals(); - set_ib_vals() if $have_innodb_vals; - - print "#\n# Beginning report, 0 0:0:0\n#\n"; - - write_report(); - } - else - { - print "\n#\n# Interval report ", $report_n - 1, ", +", - sec_to_dhms($stats{Uptime} - $stats_past{Uptime}), - "\n#\n"; - - write_relative_report(); - } -} - -sub get_vals -{ - print "get_vals\n" if $op{debug}; - - my @row; - - # Get status values - if($MySQL_version >= 50002) - { - $query = $dbh->prepare("SHOW GLOBAL STATUS;"); - } - else - { - $query = $dbh->prepare("SHOW STATUS;"); - } - $query->execute(); - while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; } - - $real_uptime = $stats{'Uptime'}; -} - -sub get_vars -{ - print "get_vars\n" if $op{debug}; - - my @row; - - # Get server system variables - $query = $dbh->prepare("SHOW VARIABLES;"); - $query->execute(); - while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; } - - # table_cache was renamed to table_open_cache in MySQL 5.1.3 - if($MySQL_version >= 50103) - { - $vars{'table_cache'} = $vars{'table_open_cache'}; - } -} - -sub read_infile -{ - print "read_infile\n" if $op{debug}; - - my $infile = shift; - - # Default required system variable values if not set in INFILE. - # As of mysqlreport v3.5 the direct output from SHOW VARIABLES; - # can be put into INFILE instead. See http://hackmysql.com/mysqlreportdoc - # for details. - $vars{'version'} = "0.0.0" if !exists $vars{'version'}; - $vars{'table_cache'} = 64 if !exists $vars{'table_cache'}; - $vars{'max_connections'} = 100 if !exists $vars{'max_connections'}; - $vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M - $vars{'thread_cache_size'} = 0 if !exists $vars{'thread_cache_size'}; - $vars{'tmp_table_size'} = 0 if !exists $vars{'tmp_table_size'}; - $vars{'long_query_time'} = '?' if !exists $vars{'long_query_time'}; - $vars{'log_slow_queries'} = '?' if !exists $vars{'log_slow_queries'}; - - # One should also add: - # key_cache_block_size - # query_cache_size - # to INFILE if needed. - - open INFILE, "< $infile" or die "Cannot open INFILE '$infile': $!\n"; - - while() - { - last if !defined $_; - - next if /^\+/; # skip divider lines - next if /^$/; # skip blank lines - - next until /(Aborted_clients|back_log|=)/; - - if($1 eq 'Aborted_clients') # status values - { - print "read_infile: start stats\n" if $op{debug}; - - while($_) - { - chomp; - if(/([A-Za-z_]+)[\s\t|]+(\d+)/) - { - $stats{$1} = $2; - print "read_infile: save $1 = $2\n" if $op{debug}; - } - else { print "read_infile: ignore '$_'\n" if $op{debug}; } - - last if $1 eq 'Uptime'; # exit while() if end of status values - $_ = ; # otherwise, read next line of status values - } - } - elsif($1 eq 'back_log') # system variable values - { - print "read_infile: start vars\n" if $op{debug}; - - while($_) - { - chomp; - if(/([A-Za-z_]+)[\s\t|]+([\w\.\-]+)/) # This will exclude some vars - { # like pid_file which we don't need - $vars{$1} = $2; - print "read_infile: save $1 = $2\n" if $op{debug}; - } - else { print "read_infile: ignore '$_'\n" if $op{debug}; } - - last if $1 eq 'wait_timeout'; # exit while() if end of vars - $_ = ; # otherwise, read next line of vars - } - } - elsif($1 eq '=') # old style, manually added system variable values - { - print "read_infile: start old vars\n" if $op{debug}; - - while($_ && $_ =~ /=/) - { - chomp; - if(/^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/) # e.g.: key_buffer_size = 128M - { - $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2); - print "read_infile: read '$_' as $1 = $vars{$1}\n" if $op{debug}; - } - else { print "read_infile: ignore '$_'\n" if $op{debug}; } - - $_ = ; # otherwise, read next line of old vars - } - - redo; - } - else - { - print "read_infile: unrecognized line: '$_'\n" if $op{debug}; - } - } - - close INFILE; - - $real_uptime = $stats{'Uptime'}; - - $vars{'table_cache'} = $vars{'table_open_cache'} if exists $vars{'table_open_cache'}; - - get_MySQL_version(); -} - -sub get_MySQL_version -{ - print "get_MySQL_version\n" if $op{debug}; - - return if $MySQL_version; - - my ($major, $minor, $patch); - - if($op{'infile'} || $relative_infiles) - { - ($major, $minor, $patch) = ($vars{'version'} =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); - } - else - { - my @row; - - $query = $dbh->prepare("SHOW VARIABLES LIKE 'version';"); - $query->execute(); - @row = $query->fetchrow_array(); - ($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/); - } - - $MySQL_version = sprintf("%d%02d%02d", $major, $minor, $patch); - - # Innodb_ status values were added in 5.0.2 - if($MySQL_version < 50002) - { - $have_innodb_vals = 0; - print "get_MySQL_version: no InnoDB reports because MySQL version is older than 5.0.2\n" if $op{debug}; - } -} - -sub set_myisam_vals -{ - print "set_myisam_vals\n" if $op{debug}; - - $questions = $stats{'Questions'}; - - $key_read_ratio = sprintf "%.2f", - ($stats{'Key_read_requests'} ? - 100 - ($stats{'Key_reads'} / $stats{'Key_read_requests'}) * 100 : - 0); - - $key_write_ratio = sprintf "%.2f", - ($stats{'Key_write_requests'} ? - 100 - ($stats{'Key_writes'} / $stats{'Key_write_requests'}) * 100 : - 0); - - $key_cache_block_size = (defined $vars{'key_cache_block_size'} ? - $vars{'key_cache_block_size'} : - 1024); - - $key_buffer_used = $stats{'Key_blocks_used'} * $key_cache_block_size; - - if(defined $stats{'Key_blocks_unused'}) # MySQL 4.1.2+ - { - $key_buffer_usage = $vars{'key_buffer_size'} - - ($stats{'Key_blocks_unused'} * $key_cache_block_size); - } - else { $key_buffer_usage = -1; } - - # Data Manipulation Statements: http://dev.mysql.com/doc/refman/5.0/en/data-manipulation.html - %DMS_vals = - ( - SELECT => $stats{'Com_select'}, - INSERT => $stats{'Com_insert'} + $stats{'Com_insert_select'}, - REPLACE => $stats{'Com_replace'} + $stats{'Com_replace_select'}, - UPDATE => $stats{'Com_update'} + - (exists $stats{'Com_update_multi'} ? $stats{'Com_update_multi'} : 0), - DELETE => $stats{'Com_delete'} + - (exists $stats{'Com_delete_multi'} ? $stats{'Com_delete_multi'} : 0) - ); - - $dms = $DMS_vals{SELECT} + $DMS_vals{INSERT} + $DMS_vals{REPLACE} + $DMS_vals{UPDATE} + $DMS_vals{DELETE}; - - $slow_query_t = format_u_time($vars{long_query_time}); - -} - -sub set_ib_vals -{ - print "set_ib_vals\n" if $op{debug}; - - $ib_bp_used = ($stats{'Innodb_buffer_pool_pages_total'} - - $stats{'Innodb_buffer_pool_pages_free'}) * - $stats{'Innodb_page_size'}; - - $ib_bp_total = $stats{'Innodb_buffer_pool_pages_total'} * $stats{'Innodb_page_size'}; - - $ib_bp_read_ratio = sprintf "%.2f", - ($stats{'Innodb_buffer_pool_read_requests'} ? - 100 - ($stats{'Innodb_buffer_pool_reads'} / - $stats{'Innodb_buffer_pool_read_requests'}) * 100 : - 0); -} - -sub write_relative_report -{ - print "write_relative_report\n" if $op{debug}; - - %stats_present = %stats; - - for(keys %stats) - { - if($stats_past{$_} =~ /\d+/) - { - if($stats_present{$_} >= $stats_past{$_}) # Avoid negative values - { - $stats{$_} = $stats_present{$_} - $stats_past{$_}; - } - } - } - - # These values are either "at present" or "high water marks". - # Therefore, it is more logical to not relativize these values. - # Doing otherwise causes strange and misleading values. - $stats{'Key_blocks_used'} = $stats_present{'Key_blocks_used'}; - $stats{'Open_tables'} = $stats_present{'Open_tables'}; - $stats{'Max_used_connections'} = $stats_present{'Max_used_connections'}; - $stats{'Threads_running'} = $stats_present{'Threads_running'}; - $stats{'Threads_connected'} = $stats_present{'Threads_connected'}; - $stats{'Threads_cached'} = $stats_present{'Threads_cached'}; - $stats{'Qcache_free_blocks'} = $stats_present{'Qcache_free_blocks'}; - $stats{'Qcache_total_blocks'} = $stats_present{'Qcache_total_blocks'}; - $stats{'Qcache_free_memory'} = $stats_present{'Qcache_free_memory'}; - if($have_innodb_vals) - { - $stats{'Innodb_page_size'} = $stats_present{'Innodb_page_size'}; - $stats{'Innodb_buffer_pool_pages_data'} = $stats_present{'Innodb_buffer_pool_pages_data'}; - $stats{'Innodb_buffer_pool_pages_dirty'} = $stats_present{'Innodb_buffer_pool_pages_dirty'}; - $stats{'Innodb_buffer_pool_pages_free'} = $stats_present{'Innodb_buffer_pool_pages_free'}; - $stats{'Innodb_buffer_pool_pages_latched'} = $stats_present{'Innodb_buffer_pool_pages_latched'}; - $stats{'Innodb_buffer_pool_pages_misc'} = $stats_present{'Innodb_buffer_pool_pages_misc'}; - $stats{'Innodb_buffer_pool_pages_total'} = $stats_present{'Innodb_buffer_pool_pages_total'}; - $stats{'Innodb_data_pending_fsyncs'} = $stats_present{'Innodb_data_pending_fsyncs'}; - $stats{'Innodb_data_pending_reads'} = $stats_present{'Innodb_data_pending_reads'}; - $stats{'Innodb_data_pending_writes'} = $stats_present{'Innodb_data_pending_writes'}; - - # Innodb_row_lock_ values were added in MySQL 5.0.3 - if($MySQL_version >= 50003) - { - $stats{'Innodb_row_lock_current_waits'} = $stats_present{'Innodb_row_lock_current_waits'}; - $stats{'Innodb_row_lock_time_avg'} = $stats_present{'Innodb_row_lock_time_avg'}; - $stats{'Innodb_row_lock_time_max'} = $stats_present{'Innodb_row_lock_time_max'}; - } - } - - get_Com_values(); - - %stats_past = %stats_present; - - set_myisam_vals(); - set_ib_vals() if $have_innodb_vals; - - write_report(); -} - -sub write_report -{ - print "write_report\n" if $op{debug}; - - $~ = 'MYSQL_TIME', write; - $~ = 'KEY_BUFF_MAX', write; - if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write } - $~ = 'KEY_RATIOS', write; - write_DTQ(); - $~ = 'SLOW_DMS', write; - write_DMS(); - write_Com(); - $~ = 'SAS', write; - write_qcache(); - $~ = 'REPORT_END', write; - $~ = 'TAB', write; - - write_InnoDB() if $have_innodb_vals; -} - -sub sec_to_dhms # Seconds to days hours:minutes:seconds -{ - my $s = shift; - my ($d, $h, $m) = (0, 0, 0); - - return '0 0:0:0' if $s <= 0; - - if($s >= 86400) - { - $d = int $s / 86400; - $s -= $d * 86400; - } - - if($s >= 3600) - { - $h = int $s / 3600; - $s -= $h * 3600; - } - - $m = int $s / 60; - $s -= $m * 60; - - return "$d $h:$m:$s"; -} - -sub make_short -{ - my ($number, $kb, $d) = @_; - my $n = 0; - my $short; - - $d ||= 2; - - if($kb) { while ($number > 1023) { $number /= 1024; $n++; }; } - else { while ($number > 999) { $number /= 1000; $n++; }; } - - $short = sprintf "%.${d}f%s", $number, ('','k','M','G','T')[$n]; - if($short =~ /^(.+)\.(00)$/) { return $1; } # 12.00 -> 12 but not 12.00k -> 12k - - return $short; -} - -# What began as a simple but great idea has become the new standard: -# long_query_time in microseconds. For MySQL 5.1.21+ and 6.0.4+ this -# is now standard. For 4.1 and 5.0 patches, the architects of this -# idea provide: http://www.mysqlperformanceblog.com/mysql-patches/ -# Relevant notes in MySQL manual: -# http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html -# http://dev.mysql.com/doc/refman/6.0/en/slow-query-log.html -# -# The format_u_time sub simply beautifies long_query_time. - -sub format_u_time # format microsecond (µ) time value -{ - # 0.000000 - 0.000999 = 0 - 999 µ - # 0.001000 - 0.999999 = 1 ms - 999.999 ms - # 1.000000 - n.nnnnnn = 1 s - n.nnnnn s - - my $t = shift; - my $f; # formatted µ time - my $u = chr(($WIN ? 230 : 181)); - - $t = 0 if $t < 0; - - if($t > 0 && $t <= 0.000999) - { - $f = ($t * 1000000) . " $u"; - } - elsif($t >= 0.001000 && $t <= 0.999999) - { - $f = ($t * 1000) . ' ms'; - } - elsif($t >= 1) - { - $f = ($t * 1) . ' s'; # * 1 to remove insignificant zeros - } - else - { - $f = 0; # $t should = 0 at this point - } - - return $f; -} - -sub perc # Percentage -{ - my($is, $of) = @_; - $is = 0 if (not defined $is); - return sprintf "%.2f", ($is * 100) / ($of ||= 1); -} - -sub t # Time average per second -{ - my $val = shift; - return 0 if !$val; - return(make_short($val / $stats{'Uptime'}, 0, 1)); -} - -sub email_report # Email given report to $op{'email'} -{ - print "email_report\n" if $op{debug}; - - return if $WIN; - - my $report = shift; - - open SENDMAIL, "|/usr/sbin/sendmail -t"; - print SENDMAIL "From: mysqlreport\n"; - print SENDMAIL "To: $op{email}\n"; - print SENDMAIL "Subject: MySQL status report on " . ($mycnf{'host'} || 'localhost') . "\n\n"; - print SENDMAIL `cat $report`; - close SENDMAIL; -} - -sub cat_report # Print given report to screen -{ - print "cat_report\n" if $op{debug}; - - my $report = shift; - my @report; - - open REPORT, "< $report"; - @report = ; - close REPORT; - print @report; -} - -sub get_Com_values -{ - print "get_Com_values\n" if $op{debug}; - - %Com_vals = (); - - # Make copy of just the Com_ values - for(keys %stats) - { - if(grep /^Com_/, $_ and $stats{$_} > 0) - { - /^Com_(.*)/; - $Com_vals{$1} = $stats{$_}; - } - } - - # Remove DMS values - delete $Com_vals{'select'}; - delete $Com_vals{'insert'}; - delete $Com_vals{'insert_select'}; - delete $Com_vals{'replace'}; - delete $Com_vals{'replace_select'}; - delete $Com_vals{'update'}; - delete $Com_vals{'update_multi'} if exists $Com_vals{'update_multi'}; - delete $Com_vals{'delete'}; - delete $Com_vals{'delete_multi'} if exists $Com_vals{'delete_multi'}; -} - -sub write_DTQ # Write DTQ report in descending order by values -{ - print "write_DTQ\n" if $op{debug}; - - $~ = 'DTQ'; - - my %DTQ; - my $first = 1; - - # Total Com values - $stat_val = 0; - for(values %Com_vals) { $stat_val += $_; } - $DTQ{'Com_'} = $stat_val; - - $DTQ{'DMS'} = $dms; - $DTQ{'QC Hits'} = $stats{'Qcache_hits'} if $stats{'Qcache_hits'} != 0; - $DTQ{'COM_QUIT'} = int (($stats{'Connections'} - 2) - ($stats{'Aborted_clients'} / 2)); - - $stat_val = 0; - for(values %DTQ) { $stat_val += $_; } - if($questions != $stat_val) - { - $DTQ{($questions > $stat_val ? '+Unknown' : '-Unknown')} = abs $questions - $stat_val; - } - - for(sort { $DTQ{$b} <=> $DTQ{$a} } keys(%DTQ)) - { - if($first) { $stat_label = '%Total:'; $first = 0; } - else { $stat_label = ''; } - - $stat_name = $_; - $stat_val = $DTQ{$_}; - write; - } -} - -sub write_DMS # Write DMS report in descending order by values -{ - print "write_DMS\n" if $op{debug}; - - $~ = 'DMS'; - - for(sort { $DMS_vals{$b} <=> $DMS_vals{$a} } keys(%DMS_vals)) - { - $stat_name = $_; - $stat_val = $DMS_vals{$_}; - write; - } -} - -sub write_Com # Write COM report in descending order by values -{ - print "write_Com\n" if $op{debug}; - - my $i = $op{'com'}; - - $~ = 'COM_1'; - - # Total Com values and write first line of COM report - $stat_label = '%Total:' unless $op{'dtq'}; - $stat_val = 0; - for(values %Com_vals) { $stat_val += $_; } - write; - - $~ = 'COM_2'; - - # Sort remaining Com values, print only the top $op{'com'} number of values - for(sort { $Com_vals{$b} <=> $Com_vals{$a} } keys(%Com_vals)) - { - $stat_name = $_; - $stat_val = $Com_vals{$_}; - write; - - last if !(--$i); - } -} - -sub write_qcache -{ - print "write_qcache\n" if $op{debug}; - - # Query cache was added in 4.0.1, but have_query_cache was added in 4.0.2, - # ergo this method is slightly more reliable - return if not exists $vars{'query_cache_size'}; - return if $vars{'query_cache_size'} == 0; - - $qc_mem_used = $vars{'query_cache_size'} - $stats{'Qcache_free_memory'}; - $qc_hi_r = sprintf "%.2f", $stats{'Qcache_hits'} / ($stats{'Qcache_inserts'} ||= 1); - $qc_ip_r = sprintf "%.2f", $stats{'Qcache_inserts'} / ($stats{'Qcache_lowmem_prunes'} ||= 1); - - $~ = 'QCACHE'; - write; -} - -sub write_InnoDB -{ - print "write_InnoDB\n" if $op{debug}; - - return if not defined $stats{'Innodb_page_size'}; - - $stats{'Innodb_buffer_pool_pages_latched'} = 0 if not defined $stats{'Innodb_buffer_pool_pages_latched'}; - - $~ = 'IB'; - write; - - # Innodb_row_lock_ values were added in MySQL 5.0.3 - if($MySQL_version >= 50003) - { - $~ = 'IB_LOCK'; - write; - } - - # Data, Pages, Rows - $~ = 'IB_DPR'; - write; -} - -sub have_op -{ - my $key = shift; - return 1 if (exists $op{$key} && $op{$key} ne ''); - return 0; -} - -sub sig_handler -{ - print "\nReceived signal at " , scalar localtime , "\n"; - exit_tasks_and_cleanup(); - exit; -} - -sub exit_tasks_and_cleanup -{ - print "exit_tasks_and_cleanup\n" if $op{debug}; - - close $tmpfile_fh; - select STDOUT unless $op{'detach'}; - - email_report($tmpfile) if $op{'email'}; - - cat_report($tmpfile) unless $op{'detach'}; - - if($op{'outfile'}) - { - if($WIN) { `move $tmpfile $op{outfile}`; } - else { `mv $tmpfile $op{outfile}`; } - } - else - { - if($WIN) { `del $tmpfile`; } - else { `rm -f $tmpfile`; } - } - - if(!$op{'infile'} && !$relative_infiles) - { - if($op{'flush-status'}) - { - $query = $dbh->prepare("FLUSH STATUS;"); - $query->execute(); - } - - $query->finish(); - $dbh->disconnect(); - } -} - -# -# Formats -# - -format MYSQL_TIME = -MySQL @<<<<<<<<<<<<<<<< uptime @<<<<<<<<<<< @>>>>>>>>>>>>>>>>>>>>>>>> -$vars{'version'}, sec_to_dhms($real_uptime), (($op{infile} || $relative_infiles) ? '' : scalar localtime) -. - -format KEY_BUFF_MAX = - -__ Key _________________________________________________________________ -Buffer used @>>>>>> of @>>>>>> %Used: @>>>>> -make_short($key_buffer_used, 1), make_short($vars{'key_buffer_size'}, 1), perc($key_buffer_used, $vars{'key_buffer_size'}) -. - -format KEY_BUFF_USAGE = - Current @>>>>>> %Usage: @>>>>> -make_short($key_buffer_usage, 1), perc($key_buffer_usage, $vars{'key_buffer_size'}) -. - -format KEY_RATIOS = -Write hit @>>>>>% -$key_write_ratio -Read hit @>>>>>% -$key_read_ratio - -__ Questions ___________________________________________________________ -Total @>>>>>>>> @>>>>>/s -make_short($questions), t($questions) -. - -format DTQ = - @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>>> @>>>>> -$stat_name, make_short($stat_val), t($stat_val), $stat_label, perc($stat_val, $questions) -. - -format SLOW_DMS = -Slow @<<<<<<< @>>>>>> @>>>>>/s @>>>>> %DMS: @>>>>> Log: @>> -$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'} -DMS @>>>>>>>> @>>>>>/s @>>>>> -make_short($dms), t($dms), perc($dms, $questions) -. - -format DMS = - @<<<<<<< @>>>>>>>> @>>>>>/s @>>>>> @>>>>> -$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions), perc($stat_val, $dms) -. - -format COM_1 = -Com_ @>>>>>>>> @>>>>>/s @>>>>> -make_short($stat_val), t($stat_val), perc($stat_val, $questions) -. - -format COM_2 = - @<<<<<<<<<< @>>>>>> @>>>>>/s @>>>>> -$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions) -. - -format SAS = - -__ SELECT and Sort _____________________________________________________ -Scan @>>>>>> @>>>>/s %SELECT: @>>>>> -make_short($stats{'Select_scan'}), t($stats{'Select_scan'}), perc($stats{'Select_scan'}, $stats{'Com_select'}) -Range @>>>>>> @>>>>/s @>>>>> -make_short($stats{'Select_range'}), t($stats{'Select_range'}), perc($stats{'Select_range'}, $stats{'Com_select'}) -Full join @>>>>>> @>>>>/s @>>>>> -make_short($stats{'Select_full_join'}), t($stats{'Select_full_join'}), perc($stats{'Select_full_join'}, $stats{'Com_select'}) -Range check @>>>>>> @>>>>/s @>>>>> -make_short($stats{'Select_range_check'}), t($stats{'Select_range_check'}), perc($stats{'Select_range_check'}, $stats{'Com_select'}) -Full rng join @>>>>>> @>>>>/s @>>>>> -make_short($stats{'Select_full_range_join'}), t($stats{'Select_full_range_join'}), perc($stats{'Select_full_range_join'}, $stats{'Com_select'}) -Sort scan @>>>>>> @>>>>/s -make_short($stats{'Sort_scan'}), t($stats{'Sort_scan'}) -Sort range @>>>>>> @>>>>/s -make_short($stats{'Sort_range'}), t($stats{'Sort_range'}) -Sort mrg pass @>>>>>> @>>>>/s -make_short($stats{'Sort_merge_passes'}), t($stats{'Sort_merge_passes'}) -. - -format QCACHE = - -__ Query Cache _________________________________________________________ -Memory usage @>>>>>> of @>>>>>> %Used: @>>>>> -make_short($qc_mem_used, 1), make_short($vars{'query_cache_size'}, 1), perc($qc_mem_used, $vars{'query_cache_size'}) -Block Fragmnt @>>>>>% -perc($stats{'Qcache_free_blocks'}, $stats{'Qcache_total_blocks'}) -Hits @>>>>>> @>>>>/s -make_short($stats{'Qcache_hits'}), t($stats{'Qcache_hits'}) -Inserts @>>>>>> @>>>>/s -make_short($stats{'Qcache_inserts'}), t($stats{'Qcache_inserts'}) -Insrt:Prune @>>>>>>:1 @>>>>/s -make_short($qc_ip_r), t($stats{'Qcache_inserts'} - $stats{'Qcache_lowmem_prunes'}) -Hit:Insert @>>>>>>:1 -$qc_hi_r, t($qc_hi_r) -. - -# Not really the end... -format REPORT_END = - -__ Table Locks _________________________________________________________ -Waited @>>>>>>>> @>>>>>/s %Total: @>>>>> -make_short($stats{'Table_locks_waited'}), t($stats{'Table_locks_waited'}), perc($stats{'Table_locks_waited'}, $stats{'Table_locks_waited'} + $stats{'Table_locks_immediate'}); -Immediate @>>>>>>>> @>>>>>/s -make_short($stats{'Table_locks_immediate'}), t($stats{'Table_locks_immediate'}) - -__ Tables ______________________________________________________________ -Open @>>>>>>>> of @>>> %Cache: @>>>>> -$stats{'Open_tables'}, $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'}) -Opened @>>>>>>>> @>>>>>/s -make_short($stats{'Opened_tables'}), t($stats{'Opened_tables'}) - -__ Connections _________________________________________________________ -Max used @>>>>>>>> of @>>> %Max: @>>>>> -$stats{'Max_used_connections'}, $vars{'max_connections'}, perc($stats{'Max_used_connections'}, $vars{'max_connections'}) -Total @>>>>>>>> @>>>>>/s -make_short($stats{'Connections'}), t($stats{'Connections'}) - -__ Created Temp ________________________________________________________ -Disk table @>>>>>>>> @>>>>>/s -make_short($stats{'Created_tmp_disk_tables'}), t($stats{'Created_tmp_disk_tables'}) -Table @>>>>>>>> @>>>>>/s Size: @>>>>> -make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'}), make_short($vars{'tmp_table_size'}, 1, 1) -File @>>>>>>>> @>>>>>/s -make_short($stats{'Created_tmp_files'}), t($stats{'Created_tmp_files'}) -. - -format TAB = - -__ Threads _____________________________________________________________ -Running @>>>>>>>> of @>>> -$stats{'Threads_running'}, $stats{'Threads_connected'} -Cached @>>>>>>>> of @>>> %Hit: @>>>>> -$stats{'Threads_cached'}, $vars{'thread_cache_size'}, make_short(100 - perc($stats{'Threads_created'}, $stats{'Connections'})) -Created @>>>>>>>> @>>>>>/s -make_short($stats{'Threads_created'}), t($stats{'Threads_created'}) -Slow @>>>>>>>> @>>>>>/s -$stats{'Slow_launch_threads'}, t($stats{'Slow_launch_threads'}) - -__ Aborted _____________________________________________________________ -Clients @>>>>>>>> @>>>>>/s -make_short($stats{'Aborted_clients'}), t($stats{'Aborted_clients'}) -Connects @>>>>>>>> @>>>>>/s -make_short($stats{'Aborted_connects'}), t($stats{'Aborted_connects'}) - -__ Bytes _______________________________________________________________ -Sent @>>>>>>>> @>>>>>/s -make_short($stats{'Bytes_sent'}), t($stats{'Bytes_sent'}) -Received @>>>>>>>> @>>>>>/s -make_short($stats{'Bytes_received'}), t($stats{'Bytes_received'}) -. - -format IB = - -__ InnoDB Buffer Pool __________________________________________________ -Usage @>>>>>> of @>>>>>> %Used: @>>>>> -make_short($ib_bp_used, 1), make_short($ib_bp_total, 1), perc($ib_bp_used, $ib_bp_total) -Read hit @>>>>>% -$ib_bp_read_ratio; -Pages - Free @>>>>>>>> %Total: @>>>>> -make_short($stats{'Innodb_buffer_pool_pages_free'}), perc($stats{'Innodb_buffer_pool_pages_free'}, $stats{'Innodb_buffer_pool_pages_total'}) - Data @>>>>>>>> @>>>>> %Drty: @>>>>> -make_short($stats{'Innodb_buffer_pool_pages_data'}), perc($stats{'Innodb_buffer_pool_pages_data'}, $stats{'Innodb_buffer_pool_pages_total'}), perc($stats{'Innodb_buffer_pool_pages_dirty'}, $stats{'Innodb_buffer_pool_pages_data'}) - Misc @>>>>>>>> @>>>>> - $stats{'Innodb_buffer_pool_pages_misc'}, perc($stats{'Innodb_buffer_pool_pages_misc'}, $stats{'Innodb_buffer_pool_pages_total'}) - Latched @>>>>>>>> @>>>>> -$stats{'Innodb_buffer_pool_pages_latched'}, perc($stats{'Innodb_buffer_pool_pages_latched'}, $stats{'Innodb_buffer_pool_pages_total'}) -Reads @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_buffer_pool_read_requests'}), t($stats{'Innodb_buffer_pool_read_requests'}) - From file @>>>>>>>> @>>>>>/s @>>>>> -make_short($stats{'Innodb_buffer_pool_reads'}), t($stats{'Innodb_buffer_pool_reads'}), perc($stats{'Innodb_buffer_pool_reads'}, $stats{'Innodb_buffer_pool_read_requests'}) - Ahead Rnd @>>>>>>>> @>>>>>/s -$stats{'Innodb_buffer_pool_read_ahead_rnd'}, t($stats{'Innodb_buffer_pool_read_ahead_rnd'}) - Ahead Sql @>>>>>>>> @>>>>>/s -$stats{'Innodb_buffer_pool_read_ahead_seq'}, t($stats{'Innodb_buffer_pool_read_ahead_seq'}) -Writes @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_buffer_pool_write_requests'}), t($stats{'Innodb_buffer_pool_write_requests'}) -Flushes @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_buffer_pool_pages_flushed'}), t($stats{'Innodb_buffer_pool_pages_flushed'}) -Wait Free @>>>>>>>> @>>>>>/s -$stats{'Innodb_buffer_pool_wait_free'}, t($stats{'Innodb_buffer_pool_wait_free'}) -. - -format IB_LOCK = - -__ InnoDB Lock _________________________________________________________ -Waits @>>>>>>>> @>>>>>/s -$stats{'Innodb_row_lock_waits'}, t($stats{'Innodb_row_lock_waits'}) -Current @>>>>>>>> -$stats{'Innodb_row_lock_current_waits'} -Time acquiring - Total @>>>>>>>> ms -$stats{'Innodb_row_lock_time'} - Average @>>>>>>>> ms -$stats{'Innodb_row_lock_time_avg'} - Max @>>>>>>>> ms -$stats{'Innodb_row_lock_time_max'} -. - -format IB_DPR = - -__ InnoDB Data, Pages, Rows ____________________________________________ -Data - Reads @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_data_reads'}), t($stats{'Innodb_data_reads'}) - Writes @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_data_writes'}), t($stats{'Innodb_data_writes'}) - fsync @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_data_fsyncs'}), t($stats{'Innodb_data_fsyncs'}) - Pending - Reads @>>>>>>>> -$stats{'Innodb_data_pending_reads'}, t($stats{'Innodb_data_pending_reads'}) - Writes @>>>>>>>> -$stats{'Innodb_data_pending_writes'}, t($stats{'Innodb_data_pending_writes'}) - fsync @>>>>>>>> -$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fsyncs'}) - -Pages - Created @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_pages_created'}), t($stats{'Innodb_pages_created'}) - Read @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_pages_read'}), t($stats{'Innodb_pages_read'}) - Written @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_pages_written'}), t($stats{'Innodb_pages_written'}) - -Rows - Deleted @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_rows_deleted'}), t($stats{'Innodb_rows_deleted'}) - Inserted @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_rows_inserted'}), t($stats{'Innodb_rows_inserted'}) - Read @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_rows_read'}), t($stats{'Innodb_rows_read'}) - Updated @>>>>>>>> @>>>>>/s -make_short($stats{'Innodb_rows_updated'}), t($stats{'Innodb_rows_updated'}) -. diff --git a/build/debian/additions/mysqlreport.1 b/build/debian/additions/mysqlreport.1 deleted file mode 100644 index 5ae6b9e3b92..00000000000 --- a/build/debian/additions/mysqlreport.1 +++ /dev/null @@ -1,180 +0,0 @@ -.TH "mysqlreport" "1" "2.5 2006-09-01 (docrev 2006-05-19)" "Daniel Nichter" "MYSQL" -.SH "NAME" -.LP -mysqlreport \- Makes a friendly report of important MySQL status values -.SH "SYNTAX" -.LP -mysqlreport [\fIoptions\fP] -.SH "DESCRIPTION" -.LP -mysqlreport makes a friendly report of important MySQL status values. Actually, -it makes a friendly report of nearly every status value from SHOW STATUS. -Unlike SHOW STATUS which simply dumps over 100 values to screen in one long -list, mysqlreport interprets and formats the values and presents the basic -values and many more inferred values in a human\-readable format. Numerous -example reports are available at the mysqlreport web page at -http://hackmysql.com/mysqlreport. - -The benefit of mysqlreport is that it allows you to very quickly see a wide -array of performance indicators for your MySQL server which would otherwise -need to be calculated by hand from all the various SHOW STATUS values. For -example, the Index Read Ratio is an important value but it's not present in -SHOW STATUS; it's an inferred value (the ratio of Key_reads to -Key_read_requests). - -This documentation outlines all the command line options in mysqlreport, most -of which control which reports are printed. This document does not address -how to interpret these reports; that topic is covered in the document Guide -To Understanding mysqlreport at http://hackmysql.com/mysqlreportguide. - -.SH "OPTIONS" -Technically, command line options are in the form \-\-option, but \-option works -too. All options can be abbreviated if the abbreviation is unique. For example, -option \-\-host can be abbreviated \-\-ho but not \-\-h because \-\-h is ambiguous: it -could mean \-\-host or \-\-help. - -.LP - -.TP -\fB\-\-help\fR -Output help information and exit. - -.TP -\fB\-\-user USER\fR - -.TP -\fB\-\-password\fR -As of version 2.3 \-\-password can take the password on the -command line like "\-\-password FOO". Using \-\-password -alone without giving a password on the command line -causes mysqlreport to prompt for a password. - -.TP -\fB\-\-host ADDRESS\fR - -.TP -\fB\-\-port PORT\fR - -.TP -\fB\-\-socket SOCKET\fR - -.TP -\fB\-\-no\-mycnf\fR -\-\-no\-mycnf makes mysqlreport not read ~/.my.cnf which it does by default -otherwise. \-\-user and \-\-password always override values from ~/.my.cnf. - -.TP -\fB\-\-dtq\fR -Print Distribution of Total Queries (DTQ) report (under -Total in Questions report). Queries (or Questions) can -be divided into four main areas: DMS (see \-\-dms below), -Com_ (see \-\-com below), COM_QUIT (see COM_QUIT and -Questions at http://hackmysql.com/com_quit), and -Unknown. \-\-dtq lists the number of queries in each of -these areas in descending order. - -.TP -\fB\-\-dms\fR -Print Data Manipulation Statements (DMS) report (under -DMS in Questions report). DMS are those from the MySQL -manual section 13.2. Data Manipulation Statements. -(Currently, mysqlreport considers only SELECT, INSERT, -REPLACE, UPDATE, and DELETE.) Each DMS is listed in -descending order by count. - -.TP -\fB\-\-com N\fR -Print top N number of non\-DMS Com_ status values in -descending order (after DMS in Questions report). If N -is not given, default is 3. Such non\-DMS Com_ values -include Com_change_db, Com_show_tables, Com_rollback, -etc. - -.TP -\fB\-\-sas\fR -Print report for Select_ and Sort_ status values (after -Questions report). See MySQL Select and Sort Status -Variables at http://hackmysql.com/selectandsort. - -.TP -\fB\-\-tab\fR -Print Threads, Aborted, and Bytes status reports (after -Created temp report). As of mysqlreport v2.3 the -Threads report reports on all Threads_ status values. - -.TP -\fB\-\-qcache\fR -Print Query Cache report. -.TP -\fB\-\-all\fR -Equivalent to "\-\-dtq \-\-dms \-\-com 3 \-\-sas \-\-qcache". -(Notice \-\-tab is not invoked by \-\-all.) - -.TP -\fB\-\-infile FILE\fR -Instead of getting SHOW STATUS values from MySQL, read -values from FILE. FILE is often a copy of the output of -SHOW STATUS including formatting characters (|, +, \-). -mysqlreport expects FILE to have the format -" value number " where value is only alpha and -underscore characters (A\-Z and _) and number is a -positive integer. Anything before, between, or after -value and number is ignored. mysqlreport also needs -the following MySQL server variables: version, -table_cache, max_connections, key_buffer_size, -query_cache_size. These values can be specified in -INFILE in the format "name = value" where name is one -of the aforementioned server variables and value is a -positive integer with or without a trailing M and -possible periods (for version). For example, to specify -an 18M key_buffer_size: key_buffer_size = 18M. Or, a -256 table_cache: table_cache = 256. The M implies -Megabytes not million, so 18M means 18,874,368 not -18,000,000. If these server variables are not specified -the following defaults are used (respectively) which -may cause strange values to be reported: 0.0.0, 64, -100, 8M, 0. - -.TP -\fB\-\-outfile FILE\fR -After printing the report to screen, print the report -to FILE too. Internally, mysqlreport always writes the -report to a temp file first: /tmp/mysqlreport.PID on -*nix, c:\mysqlreport.PID on Windows (PID is the -script's process ID). Then it prints the temp file to -screen. Then if \-\-outfile is specified, the temp file -is copied to OUTFILE. After \-\-email (below), the temp -file is deleted. - -.TP -\fB\-\-email ADDRESS\fR -After printing the report to screen, email the report -to ADDRESS. This option requires sendmail in -/usr/sbin/, therefore it does not work on Windows. -/usr/sbin/sendmail can be a sym link to qmail, for -example, or any MTA that emulates sendmail's \-t -command line option and operation. The FROM: field is -"mysqlreport", SUBJECT: is "MySQL status report". - -.TP -\fB\-\-flush\-status\fR -Execute a "FLUSH STATUS;" after generating the reports. -If you do not have permissions in MySQL to do this an -error from DBD::mysql::st will be printed after the -reports. - -.SH "AUTHORS" -.LP -Daniel Nichter - -If mysqlreport breaks, send me a message from -http://hackmysql.com/feedback -with the error. - -.SH "SEE ALSO" -.LP -mytop(1) -.LP -The comprehensive Guide To Understanding mysqlreport at -http://hackmysql.com/mysqlreportguide. - diff --git a/build/debian/additions/mysqltest.1 b/build/debian/additions/mysqltest.1 deleted file mode 100644 index 3469765fe3b..00000000000 --- a/build/debian/additions/mysqltest.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -mysqltest \- Regressiontest program for MySQL. -.SH SYNOPSIS -mysqltest [options] -.SH DESCRIPTION -Runs a test against the mysql server and compares output with a results file. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/pack_isam.1 b/build/debian/additions/pack_isam.1 deleted file mode 100644 index cad153eedee..00000000000 --- a/build/debian/additions/pack_isam.1 +++ /dev/null @@ -1,19 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -myisampack \- Compresses MySQL database files. -.SH SYNOPSIS -myisampack [options] -.SH DESCRIPTION -Pack a ISAM-table to take much smaller space -Keys are not updated, so you must run isamchk -rq on any table -that has keys after you have compressed it -You should give the .ISM file as the filename argument - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/resolve_stack_dump.1 b/build/debian/additions/resolve_stack_dump.1 deleted file mode 100644 index 2a1e2770275..00000000000 --- a/build/debian/additions/resolve_stack_dump.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -resolve_stack_dump \- MySQL helper program for reporting bugs. -.SH SYNOPSIS -resolve_stack_dump [options] -.SH DESCRIPTION -Resolve numeric stack strace dump into symbols. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/additions/resolveip.1 b/build/debian/additions/resolveip.1 deleted file mode 100644 index 7aa9439394d..00000000000 --- a/build/debian/additions/resolveip.1 +++ /dev/null @@ -1,16 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database" -.SH NAME -resolveip \- MySQL helper program to retrive IP addresses. -.SH SYNOPSIS -resolveip [options] -.SH DESCRIPTION -Get hostname based on IP-address or IP-address based on hostname. - -For more information start the program with '--help'. -.SH "SEE ALSO" -mysql (1), mysqld (1) -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/build/debian/changelog b/build/debian/changelog deleted file mode 100644 index 6dc9b561634..00000000000 --- a/build/debian/changelog +++ /dev/null @@ -1,4186 +0,0 @@ -percona-xtradb-dfsg-5.1 (5.1.36-1) experimental; urgency=low - - [TODO] - * Link libmysqlclient.so to libmysqlclient_r.so to help applications - like Apache where some modules, like libaprutil, want to use the thread - safe library and some, like PHP, do not. As the client library just copies - data between client and server, we do not expect significant performance - losses. (thanks to Stefan Fritsch). Closes: #450535 - - Add the following to libmysqlclient16.links: - usr/lib/libmysqlclient_r.so.16.0.0 usr/lib/libmysqlclient.so.16.0.0 - - * Ex-maintainer upload :) - * New upstream release. - * SECURITY: Upstream fix for "mysql client does not escape strings in - --html mode." (CVE-2008-4456) Closes: #526254 - * Upstream fixes REPEAT() function. Closes: #447028 - * Upstream fixes problems when mixing ORDER and GROUP BY. Closes: #470854 - * There were many innodb fixes in the last two years, probably - also for this unreproducible crash. CLoses: #447713 - * Removed amd64 specific -fPIC compiler option that was introduced - especially for building the NDB cluster module which is no longer - part of this package (thanks to Modestas Vainius). Closes: #508406 - * Put /etc/mysql/conf.d to mysql-server-5.1.dirs (thanks to Alexander - Gerasiov). Closes: #515145 - * Fixed mysql-test suite by adding 50_mysql-test__db_test.dpatch. - It now passes 100% of the tests again. Also Closes: #533999 - * Preinst now prevents Installation if NDB configuration is detected. - * Applied Ubuntu patch that fixes privilege bootstrapping in postinst - (thanks to Mathias Gug). Closes: #535492 - * Applied Ubuntu patch that sets the debconf prio for the root password - question to high and prevents it from being asked on 5.0 -> 5.1 upgrades - (thanks to Mathias Gug). Closes: #535500 - * Removed the check for ISAM tables as the only supported upgrade path is - from lenny's MySQL-5.0. - * Added /etc/mysql/conf.d/mysqld_safe_syslog.cnf which enables mysqld_safe - to pipe all mysqld output into the syslog. The reason for not letting dpkg - handle it via a normal config file change was that my.cnf is usually - heavily tuned by the admin so the setting would go lost too easily. - * Updated mysqlreport to version 3.5 (including two minor patches by me). - - -- Christian Hammers Wed, 01 Jul 2009 20:54:58 +0200 - -mysql-dfsg-5.1 (5.1.34-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Mon, 20 Apr 2009 20:23:10 +0200 - -mysql-dfsg-5.1 (5.1.33-2) experimental; urgency=low - - * Remove no longer active developers from uploaders field. - * Drop workaround for upgrades from MySQL 3.23, not necessary any more. - - -- Norbert Tretkowski Tue, 07 Apr 2009 11:23:25 +0200 - -mysql-dfsg-5.1 (5.1.33-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Thu, 02 Apr 2009 21:12:23 +0200 - -mysql-dfsg-5.1 (5.1.32-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Fri, 06 Mar 2009 18:48:23 +0100 - -mysql-dfsg-5.1 (5.1.31-2) experimental; urgency=low - - * Update SSL certificates, and re-enable SSL related tests when running - the testsuite. - - -- Norbert Tretkowski Tue, 10 Feb 2009 16:08:42 +0100 - -mysql-dfsg-5.1 (5.1.31-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Sun, 08 Feb 2009 17:07:11 +0100 - -mysql-dfsg-5.1 (5.1.30-2) experimental; urgency=low - - * Drop MySQL Cluster support, it's deprecated since 5.1.24-RC. - * Fix FTBFS if build twice in a row. (closes: #487091) - - -- Norbert Tretkowski Fri, 05 Dec 2008 21:04:55 +0100 - -mysql-dfsg-5.1 (5.1.30-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Thu, 27 Nov 2008 09:09:55 +0100 - -mysql-dfsg-5.1 (5.1.29rc-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Mon, 27 Oct 2008 20:00:43 +0100 - -mysql-dfsg-5.1 (5.1.26rc-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Mon, 14 Jul 2008 21:46:59 +0200 - -mysql-dfsg-5.1 (5.1.25rc-1) experimental; urgency=low - - * New upstream release. - - -- Norbert Tretkowski Sat, 21 Jun 2008 13:55:02 +0200 - -mysql-dfsg-5.1 (5.1.24rc-1) experimental; urgency=low - - * New upstream release. - * Ignore errors in testsuite on ia64 and s390. - - -- Norbert Tretkowski Wed, 16 Apr 2008 22:03:44 +0200 - -mysql-dfsg-5.1 (5.1.23rc-1) experimental; urgency=low - - * New upstream release. - - [ Christian Hammers ] - * Add PIC support for NDB libraries on amd64 (thanks to Monty Taylor). - * Add extra information when aborting due to a detected downgrade (thanks to - Raphael Pinson). - * Move libndbclient.so.3 to its own package as it now has a version != 0 - (thanks to Raphael Pinson for reminding me). - - [ Monty Taylor ] - * Remove 85_ndb__staticlib.dpatch since we have a libndbclient package now. - * Add myself to the uploaders so that I don't get complaints about package - signing. - * Add libndbclient-dev package to go with libndbclient3. - - [ Norbert Tretkowski ] - * Update patches: - + 41_scripts__mysql_install_db.sh__no_test.dpatch - * Drop patches: - + 70_upstream_debian__configure.dpatch - + 71_upstream_debian__Makefile.in.dpatch - + 99_TEMP_minmax.dpatch - * Remove Adam Conrad from uploaders on his request. Thanks for your work in - the past! - * Ignore errors in testsuite on amd64 and i386. - - -- Norbert Tretkowski Fri, 29 Feb 2008 10:38:27 +0100 - -mysql-dfsg-5.1 (5.1.22rc-1) experimental; urgency=low - - * New upstream version. - * Let mysql-server-5.1 pre-depend on debconf as it uses it in the preinst. - * Fixed mysql-client-5.1 menu entry for upcoming menu policy 1.4. - - -- Christian Hammers Tue, 02 Oct 2007 22:45:37 +0200 - -mysql-dfsg-5.1 (5.1.21beta-1) experimental; urgency=low - - * My "Greetings from FrOSCon!" release. - * New upstream version. - * libmysqlclient.so.15 has been superseded by libmysqlclient.so.16. - * Renamed libmysqlclient15-dev to libmysqlclient-dev but added an empty - package libmysqlclient15-dev to ease the transition for packages with - a versioned build-dep to libmysqlclient15-dev which is something that - currently does not work with "Provides:". - * Synced with 5.0 branch up to subversion release r909. - * Commented out most of the compile conditionals in the hope that - all architectures can be build the same way. - * Added a lot of new binaries and manpages. - * Switched to plugin based engines. - - -- Christian Hammers Sat, 25 Aug 2007 14:24:40 +0200 - -mysql-dfsg-5.1 (5.1.19beta-1) experimental; urgency=low - - * New upstream release. - - -- Christian Hammers Mon, 11 Jun 2007 23:18:35 +0200 - -mysql-dfsg-5.1 (5.1.16beta-4) experimental; urgency=high - - * Merged with 5.0 r850: - * SECURITY: - In some previous versions mysql_install_db was not idempotent and did - always create passwordless root accounts although it should only on - initial installs (thanks to Olaf van der Spek). Closes: #418672 - * Added check for passwordless root accounts to debian-start. - * As MySQL-5.0 is, at least currently, incompatible with Kernel 2.4 the - installation is aborted for such old kernels. Debian Etch does not - support them anyway according to the release notes but this might be - unexpected and many production servers still have self build ones - installed (thanks to Marc-Christian Petersen). See: #416841 - * Adjusted TeX build-deps to texlive. - * Added innotop. - * Changed maintainer email address to - pkg-mysql-commits@lists.alioth.debian.org - - -- Christian Hammers Thu, 19 Apr 2007 19:29:29 +0200 - -mysql-dfsg-5.1 (5.1.16beta-3) experimental; urgency=low - - * Merged with 5.0 r837: - * Activated the blackhole engine as it's needed for replicating partition - designs (thanks to Cyril SCETBON). - * Fixed segfault on i486 systems without cpuid instruction (thanks to - Lennart Sorensen). Closes: #410474 - * Only use of the non-essential debconf package in postrm if it is - still installed (thanks to Michael Ablassmeier). Closes: #416838 - - -- Christian Hammers Sun, 18 Mar 2007 21:48:11 +0100 - -mysql-dfsg-5.1 (5.1.16beta-2) experimental; urgency=low - - * Merged with 5.0 r818: - * Fixed FTBFS on Sparc introduced with the "make -j" trick in - 5.0.32-8 (thanks to Frank Lichtenheld). Closes: #415026 - - -- Christian Hammers Sun, 18 Mar 2007 21:20:11 +0100 - -mysql-dfsg-5.1 (5.1.16beta-1) experimental; urgency=low - - * New upstream release. - * SECURITY: Using an INFORMATION_SCHEMA table with ORDER BY in a subquery - could cause a server crash (CVE-2007-1420). - * Added temporary patch 90_TEMP_sqlparse-ifdef to avoid build problems. - * Merged with 5.0 r809: - * Updated mysqlreport to latest upstream (and patched --help usage - message and "return if qcache_size==0"). - * Merged with 5.0 r798: - * Adapt MAKE_J to use the -j option with the number of available - processors. (thanks to Raphael Pinson). - * Merged with 5.0 r758: - * Changed minimum required version in dh_makeshlibs to 5.0.27-1 as - 5.0.26 had an ABI breakage in it! - This is the cause for Perl programs crashing with the following error: - Transactions not supported by database at /usr/lib/perl5/DBI.pm line 672 - * Added some more comments to the default my.cnf. - * Added support for /etc/mysql/conf.d/. - * The debian-start script that runs on every server start now first upgrades - the system tables (if neccessary) and then check them as it sometimes did - not work the other way around (e.g. for MediaWiki). The script now uses - mysql_update instead of mysql_update_script as recommended. See: 409780 - - -- Christian Hammers Fri, 2 Mar 2007 01:00:55 +0100 - -mysql-dfsg-5.1 (5.1.15beta-1) experimental; urgency=low - - * New upstream release. - [Monty Taylor] - * Removed patches/25_mysys__default.c - fixed upstream. - * Removed patches/26_client__mysql_upgrade.c - fixed upstream. - * Removed patches/29_scripts__mysqlbug.sh - fixed upstream. - * Removed patches/39_scripts__mysqld_safe.sh__port_dir - fixed upstream. - * Removed patches/42_scripts__mysqldumpslow__slowdir - fixed upstream. - * Removed patches/45_warn-CLI-passwords - fixed upstream. - * Removed patches/89_ndb__records.dpatch - fixed upstream. - * Removed patches/86_ndbapi_tc_selection.dpatch - fixed upstream. - [Christian Hammers] - * Synced with 5.0.32-4. - * mysql-server-5.0 pre-depends on adduser now and has --disabled-login - explicitly added to be on the safe side (thanks to the puiparts team). - Closes: #408362 - * Corrections the terminology regarding NDB in the comments of all config - files and init scripts (thanks to Geert Vanderkelen of MySQL). - - -- Christian Hammers Wed, 7 Feb 2007 11:34:52 -0200 - -mysql-dfsg-5.1 (5.1.14beta-2) experimental; urgency=low - - [Christian Hammers] - * Readded 85_ndb__staticlib.dpatch with slight modifications. - * Backported debian-start scripts from 5.0. - [Monty Taylor] - * Now build-depends on bison. - * Updated to standards 3.7.2. - * Removed references to comp_err. - * build-depend on automake1.9 to match upstream - * Merged runlevel changes from 5.0. - * Added 26_client__mysql_upgrade.c.dpatch to fix a segfault in mysql_upgrade - when using a password. It's been fixed upstream in 5.1.15. - * Moved BDB check to sanity_checks() and added a note about deprecation. - * Use my_print_defaults instead of mysqld --print-defaults - * Changed NDB Data and Management node startup seqence. Prevented both - from restarting on upgrade to address rolling upgrade issues. - * Added a "start-initial" option to the Data Node init script to support - initial node starts. - * Added 86_ndbapi_tc_selection.dpatch to fix a bug that causes a segfault - when using the NdbApi. http://bugs.mysql.com/bug.php?id=24914 - Fixed in 5.1.15 - * Added 89_ndb__records.dpatch to fix - http://bugs.mysql.com/bug.php?id=25567, which causes a table scan per - table per query. - - -- Christian Hammers Wed, 31 Jan 2007 01:17:35 +0100 - -mysql-dfsg-5.1 (5.1.14beta-1) experimental; urgency=low - - * New upstream. - * Removed references to mysql_explain_log - * Changed context for patch to mysqld_multi.1 - * Removed 70_kfreebsd.dpatch - applied to upstream - * Removed 87_ps_Hurd - applied to upstream - * Replaced --without-readline to --with-libedit to configure options, as - --without-readline doesn't seem to do the right thing anymore. - - -- Monty Taylor Wed, 10 Jan 2007 12:59:55 -0800 - -mysql-dfsg-5.1 (5.1.11beta-1) experimental; urgency=low - - * Starting new 5.1 branch! - * FIXME: Following patch couldn't be applied: - ## 85_ndb__staticlib.dpatch by - * FIXME: Following patch couldn't be applied: - ## 86_PATH_MAX.dpatch - - -- Christian Hammers Sat, 29 Jul 2006 11:35:42 +0200 - -mysql-dfsg-5.0 (5.0.51a-19) UNRELEASED; urgency=low - - * New patch 50_fix_mysqldump2.dpatch from 5.0.60 to fix dumping databases - from mysql 4.0 server. (closes: #507789) - * Don't create a guest account during bootstrap. (closes: #463704) - - -- Norbert Tretkowski Thu, 04 Dec 2008 23:07:19 +0100 - -mysql-dfsg-5.0 (5.0.51a-18) testing-proposed-updates; urgency=high - - * SECURITY: - Fix for CVE-2008-4098: Inadequate validation of paths used in DATA - DIRECTORY and INDEX DIRECTORY clauses of CREATE TABLE statements enabled - attackers to write to tables in other databases to which they could not - ordinarily have access. - - -- Devin Carraway Tue, 25 Nov 2008 05:38:45 +0000 - -mysql-dfsg-5.0 (5.0.51a-17) testing-proposed-updates; urgency=low - - * Don't use commented out passwords from debian.cnf. (closes: #453820) - * Update watch file to recognize releases > 5.0.45. - - -- Norbert Tretkowski Sun, 02 Nov 2008 13:31:32 +0100 - -mysql-dfsg-5.0 (5.0.51a-16) unstable; urgency=low - - * New patch 60_rpl_test_failure.dpatch from 5.0.54 to fix a race condition - with the rpl_packet test in some cases. (closes: #501413) - - -- Norbert Tretkowski Thu, 09 Oct 2008 08:50:43 +0200 - -mysql-dfsg-5.0 (5.0.51a-15) unstable; urgency=high - - * SECURITY: - Fix for CVE-2008-3963: An empty bit-string literal (b'') caused a server - crash. Now the value is parsed as an empty bit value (which is treated as - an empty string in string context or 0 in numeric context). - (closes: #498362) - - -- Norbert Tretkowski Sun, 14 Sep 2008 18:27:46 +0200 - -mysql-dfsg-5.0 (5.0.51a-14) unstable; urgency=low - - * Update debconf translations: - - Swedish, from Martin Bagge. (closes: #491688) - - Netherlands, from Thijs Kinkhorst. (closes: #492723) - - -- Norbert Tretkowski Sun, 07 Sep 2008 20:18:31 +0200 - -mysql-dfsg-5.0 (5.0.51a-13) unstable; urgency=medium - - * New patch 59_fix_relay_logs_corruption.dpatch from 5.0.56 to fix - corruption in relay logs. (closes: #463515) - - -- Norbert Tretkowski Wed, 03 Sep 2008 09:13:46 +0200 - -mysql-dfsg-5.0 (5.0.51a-12) unstable; urgency=low - - * Disable rpl_ndb_innodb_trans test when running the testsuite, fails - randomly on i386. (closes: #494238) - - -- Norbert Tretkowski Sat, 09 Aug 2008 15:56:45 +0200 - -mysql-dfsg-5.0 (5.0.51a-11) unstable; urgency=low - - * Disable innodb_handler test when running the testsuite, fails randomly - on s390. (closes: #491363) - - -- Norbert Tretkowski Wed, 23 Jul 2008 08:34:51 +0200 - -mysql-dfsg-5.0 (5.0.51a-10) unstable; urgency=high - - * Merge testing-security upload to finally fix CVE-2008-2079, thanks to - Devin Carraway and Steffen Joeris. (closes: #480292) - * New patch 58_disable-ndb-backup-print.dpatch from 5.0.54 to disable - ndb_backup_print, ndb_alter_table and ndb_replace tests when running the - testsuite. (closes: #474893) - * Reenable error handling in testsuite on i386, disabling it was just a - workaround for the problem which is now fixed with the above patch. - * Update debconf translations: - - Vietnamese, from Clytie Siddall. (closes: #486443) - - Spanish, from Javier Fernández-Sanguino Peña. (closes: #488740) - - Slovak, from helix84. (closes: #489266) - * Make lintian happy: - - Fix build-dependency on -1 revision. - - Fix deprecated chown usage. - - Fix spelling error in description. - - -- Norbert Tretkowski Tue, 15 Jul 2008 19:37:35 +0200 - -mysql-dfsg-5.0 (5.0.51a-9+lenny2) testing-security; urgency=high - - * Non-maintainer upload by the security team. - * Correct error number in symlink.test to avoid FTBFS on some archs. - - -- Steffen Joeris Sun, 13 Jul 2008 11:44:57 +0000 - -mysql-dfsg-5.0 (5.0.51a-9+lenny1) testing-security; urgency=high - - * Non-maintainer upload by the security team. - * Correct and expand 92_SECURITY_CVE-2008-2079.dpatch to cover all symlinks - and check the output of fn_format(). (closes: #480292) - Fixes: CVE-2008-2079 - - -- Steffen Joeris Sat, 12 Jul 2008 05:30:39 +0000 - -mysql-dfsg-5.0 (5.0.51a-9) unstable; urgency=low - - * Ignore errors in testsuite on i386. (workaround for #474893) - - -- Norbert Tretkowski Wed, 25 Jun 2008 15:07:03 +0200 - -mysql-dfsg-5.0 (5.0.51a-8) unstable; urgency=low - - * New patch 80_fix_user_setup_on_localhost.dpatch from Daniel Hahler to fix - a duplicate key error when install MySQL server on a host with hostname - localhost. (closes: #478319) - * Really fix build on non-linux systems, this time without producing a build - error on some architectures. (closes: #485971) - * Update debconf translations: - - French, from Christian Perrier. (closes: #478553) - - German, from Alwin Meschede. (closes: #478672) - - Italian, from Luca Monducci. (closes: #479363) - - Czech, from Miroslav Kure. (closes: #480924) - - Galician, from Jacobo Tarrio. (closes: #480965) - - Basque, from Piarres Beobide. (closes: #481840) - - Swedish, from Martin Bagge. (closes: #482466, #486307) - - Turkish, from Mert Dirik. (closes: #484704) - - Russian, from Yuri Kozlov. (closes: #486149) - - Finnish, from Esko Arajärvi. (closes: #486554) - - Portuguese, from Miguel Figueiredo. (closes: #486709) - - Romanian, from Eddy Petrișor. (closes: #486944) - - Japanese, from Hideki Yamane. (closes: #487270) - - -- Norbert Tretkowski Sat, 21 Jun 2008 19:20:48 +0200 - -mysql-dfsg-5.0 (5.0.51a-7) unstable; urgency=high - - [ Norbert Tretkowski ] - * SECURITY: - Fix for CVE-2008-2079: It was possible to circumvent privileges through - the creation of MyISAM tables employing the DATA DIRECTORY and INDEX - DIRECTORY options to overwrite existing table files in the MySQL data - directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX - DIRECTORY is now disallowed. Patch from openSUSE 11.0, thanks to Michal - Marek. (closes: #480292) - * Fix build on non-linux systems, like hurd-i386. (closes: #480362) - * Include symlinks for mysqlcheck. (closes: #480647) - - [ Monty Taylor ] - * Remove ndb_cpcd, as it is only for the NDB test suite and not useful as a - public program. - * Fix debian-start.inc.sh for table names with characters needing quotes. - Thanks Felix Rublack! (closes: #480525, #481154, #481303, #484012) - * Delete mysql-common.README.Debian. Nothing in it was relevant, and the - useful information is in mysql-server anyway. (closes: #480940) - * Remove a spurious HOME= in logrotate script. - - -- Norbert Tretkowski Thu, 05 Jun 2008 11:49:45 +0200 - -mysql-dfsg-5.0 (5.0.51a-6) unstable; urgency=low - - * Fix debian-start.inc.sh to not print the row counts of the tables - queried. (closes: #478256, #479697) - - -- Monty Taylor Wed, 14 May 2008 00:47:46 -0700 - -mysql-dfsg-5.0 (5.0.51a-5) unstable; urgency=medium - - * New patch 57_fix_mysql_replication.dpatch from 5.0.54 to fix directory for - relay logs when using replication. - - -- Norbert Tretkowski Sun, 27 Apr 2008 13:55:04 +0200 - -mysql-dfsg-5.0 (5.0.51a-4) unstable; urgency=low - - [ Monty Taylor ] - * Remove build of ndb docs, since they are not installed. Removed build deps - on TeX and doxygen since that's all they were there for. - * Replace script in check_for_crashed_tables with a myisam-recover option - and a script to trigger a check of those tables. (thanks HarrisonF and - kolbe) - * Replace direct calls to test suite with calls to the make targets used by - the MySQL build and qa teams for releases. - * Add --skip-ndbcluster to the postinst bootstrap command. It's really a - workaround for a bug in 5.1, but it's probably a good idea anyway since we - certainly don't need cluster to spin up, and if people have enabled - cluster in their my.cnf file, there could be postinst issues if cluster - isn't running. - * Remove reference to configure options that no longer exist. - * Add myself to uploaders. - - [ Norbert Tretkowski ] - * New patch 56_fix_order_by.dpatch from Ubuntu to fix ORDER BY not working - with GROUP BY. (closes: #471737) - * Add note about filename extensions in the /etc/mysql/conf.d/ directory in - my.cnf. (closes: #461759) - * Confirm password on install, patch from Nicolas Valcárcel. - (closes: #471887) - * Remove Adam Conrad from uploaders on his request. Thanks for your work in - the past! - * Use lsb_release to detect distribution. - - -- Norbert Tretkowski Sat, 05 Apr 2008 21:51:43 +0200 - -mysql-dfsg-5.0 (5.0.51a-3) unstable; urgency=low - - * Disable patch 60_raise-max-keylength.dpatch in default build, but still - ship it in the source package. - - -- Norbert Tretkowski Sun, 17 Feb 2008 18:54:42 +0100 - -mysql-dfsg-5.0 (5.0.51a-2) unstable; urgency=low - - * Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from - upstream. - * Ignore errors in testsuite on powerpc. - - -- Norbert Tretkowski Sun, 17 Feb 2008 12:42:58 +0100 - -mysql-dfsg-5.0 (5.0.51a-1) unstable; urgency=low - - [ Norbert Tretkowski ] - * New upstream security hotfix release. Low priority upload anyway because - 5.0.51-3 already contained all security fixes. - * Remove patches: - + debian/patches/51_mysqlcheck-result.dpatch - + debian/patches/92_SECURITY_CVE-2007-6303.dpatch - + debian/patches/93_SECURITY_CVE-2007-6304.dpatch - + debian/patches/94_SECURITY_CVE-2008-0226+0227.dpatch - * Add recommendation on libhtml-template-perl to -server package, used by - ndb_size. (closes: #462265) - * New patch 60_raise-max-keylength.dpatch to raise the maximum key length to - 4005 bytes or 1335 UTF-8 characters. (closes: #463137) - * New patch 51_sort-order.dpatch from 5.0.52 to fix incorrect order when - using range conditions on 2 tables or more. - * Support DEB_BUILD_OPTIONS option 'nocheck' to skip tests. - * Update mysqlreport to 3.4a release. - - [ Luk Claes ] - * Updated Japanese debconf translation. (closes: #462158) - - -- Norbert Tretkowski Wed, 06 Feb 2008 11:57:45 +0100 - -mysql-dfsg-5.0 (5.0.51-3) unstable; urgency=high - - * SECURITY: - Fix for CVE-2008-0226 and CVE-2008-0227: Three vulnerabilities in yaSSL - versions 1.7.5 and earlier were discovered that could lead to a server - crash or execution of unauthorized code. The exploit requires a server - with yaSSL enabled and TCP/IP connections enabled, but does not require - valid MySQL account credentials. The exploit does not apply to OpenSSL. - (closes: #460873) - * Fix LSB header in init scripts (patch from Petter Reinholdtsen). - (closes: #458798) - * Run testsuite on all archs, but ignore errors on alpha, arm, armel, hppa, - mipsel and sparc. (closes: #460402) - - -- Norbert Tretkowski Wed, 23 Jan 2008 11:37:11 +0100 - -mysql-dfsg-5.0 (5.0.51-2) unstable; urgency=low - - [ Monty Taylor ] - * Added --with-system-type to set the version_compile_os field. - * Cleaned up some lintian warnings. - * Removed 43_scripts__mysql_update__password.dpatch since we don't use - mysql_upgrade_shell anymore and use mysql_upgrade instead. - * Removed 88_mctype_attrib.dpatch, http://bugs.mysql.com/bug.php?id=25118 is - closed with http://lists.mysql.com/commits/24337 - * Added mysql-community/mysql-enterprise virtual packages in provides and - conflicts to ease transitions between versions. - - [ Norbert Tretkowski ] - * Add -fPIC to CFLAGS to allow other packages to be built against - libmysqld.a on amd64. (closes: #457915) - * New patch 55_testsuite-2008.dpatch to fix FTBFS in testsuite. - (closes: #458695) - * New patch 54_ssl-client-support.dpatch to fix SSL client support. - * Don't run testsuite on alpha, arm, hppa, mipsel and sparc. - - -- Norbert Tretkowski Wed, 02 Jan 2008 18:40:04 +0100 - -mysql-dfsg-5.0 (5.0.51-1) unstable; urgency=low - - * New upstream release. - + Fix a crash in mysql_client_test due to gcc 4.x optimizations. - (closes: #452558) - * Update patches: - + debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch - + debian/patches/89_ndb__staticlib.dpatch - * Run testsuite after build. - * Re-add manpages, they are licensed under GPL now and redistribution is - permitted. - * Drop linux-libc-dev build-dependency, it's now being pulled by libc-dev - which is build-essential. (closes: #431018) - * Remove old optimizations for MySQL 3.23.x, they are no longer required. - (closes: #436552) - * Don't fail when upgrading mysql-common if $datadir is empty or not defined - (patch from Edward Allcutt). (closes: #453127) - * New patch from 5.0.52 to fix mysqldump because 'null' is shown as type of - fields for view with bad definer. (closes: #454227) - * New patch from 5.0.52 to fix mysqlcheck test result. - * New patch from 5.0.52 to fix wrong optimization in ndb code when building - with gcc 4.2.x. - * New patch from 5.0.54 to fix wrong number output due to integer overflow - when building with gcc 4.2.x. - * New Finnish debconf translation from Esko Arajärvi. (closes: #448776) - * Update Basque debconf translation from Aitor Ibañez. (closes: #456193) - * Add Vcs-* and Homepage fields to source stanza in control file. - * Update mysqlreport to 3.2 release. - * Let mysql-server-5.0 pre-depend on debconf, because it's preinst is using - it. - * Drop menu item for innotop. - - -- Norbert Tretkowski Fri, 14 Dec 2007 09:59:36 +0100 - -mysql-dfsg-5.0 (5.0.45-5) unstable; urgency=high - - * SECURITY: - Fix for CVE-2007-6303: ALTER VIEW retained the original DEFINER value, - even when altered by another user, which could allow that user to gain the - access rights of the view. Now ALTER VIEW is allowed only to the original - definer or users with the SUPER privilege. (closes: #455737) - * SECURITY: - Fix for CVE-2007-6304: When using a FEDERATED table, the local server can - be forced to crash if the remote server returns a result with fewer columns - than expected. - - -- Norbert Tretkowski Wed, 12 Dec 2007 20:23:43 +0100 - -mysql-dfsg-5.0 (5.0.45-4) unstable; urgency=high - - * SECURITY: - Fix for CVE-2007-5969: Using RENAME TABLE against a table with explicit - DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system - table information by replacing the file to which the symlink points. - (closes: #455010) - - -- Norbert Tretkowski Sun, 09 Dec 2007 12:29:54 +0100 - -mysql-dfsg-5.0 (5.0.45-3) unstable; urgency=high - - * SECURITY: - Fix for CVE-2007-5925: The convert_search_mode_to_innobase function in - ha_innodb.cc in the InnoDB engine in MySQL 5.1.23-BK and earlier allows - remote authenticated users to cause a denial of service (database crash) - via a certain CONTAINS operation on an indexed column, which triggers an - assertion error. (closes: #451235) - - -- Norbert Tretkowski Thu, 15 Nov 2007 18:40:11 +0100 - -mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low - - * Package is now team-maintained. (closes: #421026) - - [ Sean Finney ] - * New/updated debconf translations: - - Spanish, from Javier Fernández-Sanguino Peña (closes: #426442). - - German, from Alwin Meschede (closes: #426545). - - Danish, from Claus Hindsgaul (closes: #426783). - - French, from Christian Perrier (closes: #430944). - * Add Recommends on libterm-readkey-perl for mysql-client-5.0 package, used - by mysqlreport add-on to mask password entry (closes: #438375). - - [ Norbert Tretkowski ] - * Add myself to uploaders. - * Suggest usage of an update statement on the user table to change the mysql - root user password instead using mysqladmin, to catch all root users from - all hosts. (closes: #435744) - * Remove informations about a crash in the server during flush-logs when - having expire_logs_days enabled but log-bin not, this bug was fixed in - 5.0.32 already. (closes: #368547) - * Disable log_bin option in default config file and add a note to the NEWS - file. (closes: #349661) - * Fix FTBFS if build twice in a row. (closes: #442684) - * Remove check for buggy options from init script. - * Update innotop to 1.6.0 release. - * Add mysqlreport and innotop to mysql-client description. - * Use shorter server version string. - - -- Norbert Tretkowski Wed, 14 Nov 2007 20:00:06 +0100 - -mysql-dfsg-5.0 (5.0.45-1) unstable; urgency=low - - * New upstream release. - - [sean finney] - * removed patches that are incorporated into the latest release: - - 70_cpuid_on_i486.dpatch - - 91_SECURITY_CVE-2007-2691_alter-drop - * new patch 90_upstreamdebiandir.dpatch to keep a few lingering references - to the upstream ./debian dir out of the build, at least until we find - a nice way to collaborate on sharing the directory. - * updated CRUFT list to fix double-build breakage (closes: #424590). - * add conditional build-deps for linux-libc-dev to fix FTBFS for - non-linux arch's (closes: #431018). - * added notes to my.cnf and README.Debian about setting tmpdir when - configuring a replication slave. thanks to Rudy Gevaert for pointing - this out (closes: #431825). - - -- sean finney Tue, 17 Jul 2007 23:50:33 +0200 - -mysql-dfsg-5.0 (5.0.41a-1) unstable; urgency=high - - [sean finney] - * SECURITY: - Fix for CVE-2007-2691: DROP/RENAME TABLE statements (closes: #424778). - [Christian Hammers] - * Removed all manpages from the source (therefore the "41a") as they - are not licensed under the GPL and redistribution is not permitted - (thanks to Mathias Gug). Closes: #430018 - * Added linux-libc-dev to the build-depends as else an illegal dependency to - asm/atomic.h is generated in /usr/include/mysql/my_global.h. Closes: 424276 - [Christian Perrier] - * Debconf templates and debian/control reviewed by the debian-l10n- - english team as part of the Smith review project. Closes: #419974 - * Debconf translation updates: - - French. Closes: #422187 - - Galician. Closes: #420118 - - Italian. Closes: #421349 - - Brazilian Portuguese. Closes: #421516 - - Arabic. Closes: #421751 - - Czech. Closes: #421766 - - Portuguese. Closes: #422428 - - -- Christian Hammers Sun, 24 Jun 2007 21:12:42 +0200 - -mysql-dfsg-5.0 (5.0.41-2) unstable; urgency=low - - * the previous "translation changes" inadvertently introduced unrelated - changes in the package control file. - - -- sean finney Sun, 13 May 2007 12:32:45 +0200 - -mysql-dfsg-5.0 (5.0.41-1) unstable; urgency=low - - * New upstream release - [sean finney] - * Bump the priority of the debconf prompt for the root password to high, to - ensure the question shows up in a default installation (closes: #418672). - * Debconf templates and debian/control reviewed by the debian-l10n- - english team as part of the Smith review project. Closes: #419974 - * Debconf translation updates: - - French. Closes: #422187 - - Galician. Closes: #420118 - - Italian. Closes: #421349 - - Brazilian Portuguese. Closes: #421516 - - Arabic. Closes: #421751 - - Czech. Closes: #421766 - - Portuguese. Closes: #422428 - * massaged the local PATH_MAX patch. - * removed temp sql parsing patch which has been incorporated upstream - * upstream no longer includes the mysql_create_system_tables command, - so removed our local patches for it. - * the following issues may have been fixed in a previous version of - mysql-server-5.0, but the exact version is not clear so they will be - marked as fixed in this version. - * lots of NDB-related fixes, including those related to problems with - AUTO_INCREMENT (closes: #310878). - * fix for "connections remaining in sleep state" (closes: #318011). - * fix for "denies queries randomly" (closes: #399602). - * problems indexing on char() binary fields were ISAM specific, which is - no longer supported (closes: #326698). - * fix for problems with "complicated joins" (closes: 348682). - * fix for problems with "flushing logs, server crash" (closes: #348682). - * fix for AUTO_INCREMENT and duplicate keys (closes: #416145). - * fix for "DROP FUNCTIONS doesn't work" (closes: #290670). - - -- sean finney Sat, 12 May 2007 12:10:20 +0200 - -mysql-dfsg-5.0 (5.0.38-3) unstable; urgency=low - - * Added innotop. - * Changed maintainer email address to - pkg-mysql-commits@lists.alioth.debian.org - - -- Christian Hammers Thu, 19 Apr 2007 19:21:15 +0200 - -mysql-dfsg-5.0 (5.0.38-2) unstable; urgency=high - - * SECURITY: - In some previous versions mysql_install_db was not idempotent and did - always create passwordless root accounts although it should only on - initial installs (thanks to Olaf van der Spek). Closes: #418672 - * Added check for passwordless root accounts to debian-start. - * As MySQL-5.0 is, at least currently, incompatible with Kernel 2.4 the - installation is aborted for such old kernels. Debian Etch does not support - them anyway according to the release notes but this might be unexpected - and many production servers still have self build ones installed (thanks - to Marc-Christian Petersen). See: #416841 - * Adjusted TeX build-deps to texlive. - - -- Christian Hammers Tue, 17 Apr 2007 01:00:41 +0200 - -mysql-dfsg-5.0 (5.0.38-1) unstable; urgency=low - - * New upstream release. - * Activated the blackhole engine as it's needed for replicating partition - designs (thanks to Cyril SCETBON). - * Fixed segfault on i486 systems without cpuid instruction (thanks to - Lennart Sorensen). Closes: #410474 - * Only use of the non-essential debconf package in postrm if it is still - installed (thanks to Michael Ablassmeier). Closes: #416838 - - -- Christian Hammers Thu, 5 Apr 2007 22:43:41 +0200 - -mysql-dfsg-5.0 (5.0.36-1) unstable; urgency=low - - * New upstream release. - Closes: #400460, #408159, #408533 - - -- Christian Hammers Thu, 22 Mar 2007 22:16:31 +0100 - -mysql-dfsg-5.0 (5.0.32-10) unstable; urgency=high - - * Really fixed FTBFS on Sparc introduced with the "make -j" trick in - 5.0.32-8 (thanks to Frank Lichtenheld). Closes: #415026 - - -- Christian Hammers Sun, 18 Mar 2007 20:52:33 +0100 - -mysql-dfsg-5.0 (5.0.32-9) unstable; urgency=high - - * Fixed FTBFS on Sparc introduced with the "make -j" trick in 5.0.32-8 - (thanks to Frank Lichtenheld). Closes: #415026 - - -- Christian Hammers Tue, 15 Mar 2007 18:55:42 +0100 - -mysql-dfsg-5.0 (5.0.32-8) unstable; urgency=high - - [Sean Finney] - * SECURITY: - - CVE-2007-1420: Single Row Subselect DoS. Specially crafted subselect - queries could crash the mysql server. Patch backported from upstream - changeset 19685 (46_CVE-2007-1420_subselect_dos.dpatch) - closes: #414790. - [Christian Hammers] - * Adapt MAKE_J to use the -j option with the number of available processors. - (thanks to Raphael Pinson). - * Updated mysqlreport to latest upstream (and patched --help usage message - and "return if qcache_size==0"). - - -- sean finney Wed, 14 Mar 2007 20:19:08 +0100 - -mysql-dfsg-5.0 (5.0.32-7) unstable; urgency=low - - * Updated French Debconf translation (thanks to Christian Perrier). - Closes: #411330 - * Updated Danish Debconf translation (thanks to Claus Hindsgaul). - Closes: #411328 - * Updated Portuguese Debconf translation (thanks to "Traduz"). - Closes: #411339 - * Updated Czech Debconf translation (thanks to Miroslav Kure). - Closes: #411341 - * Added Norwegian Debconf translation (thanks to Bjorn Steensrud). - Closes: #411345 - * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino - Pena). Closes: #411347 - * Updated Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #411368 - * Updated Swedish Debconf translation (thanks to Andreas Henriksson). - Closes: #411370 - * Updated Italian Debconf translation (thanks to Luca Monducci). - Closes: #411377 - * Updated Galician Debconf translation (thanks to Jacobo Tarrio). - Closes: #411379 - * Updated Russian Debconf translation (thanks to Yuriy Talakan). - Closes: #411442 - * Updated Basque Debconf translation (thanks to Piarres Beobide). - Closes: #411457 - * Updated German Debconf translation (thanks to Alwin Meschede). - Closes: #411480 - * Updated Dutch Debconf translation (thanks to Thijs Kinkhorst). - * Updated Brazilian Portuguese translation (thanks to Andre Luis Lopes). - Closes: #411536 - * Updated Romanian Debconf translation (thanks to Stan Ioan-Eugen). - Closes: #411764 - - -- Christian Hammers Fri, 16 Feb 2007 23:20:42 +0100 - -mysql-dfsg-5.0 (5.0.32-6) unstable; urgency=low - - * Changed wording in Debconf templates to better fit to the graphical - interface (thanks to Frank Kuester). Closes: #411165 - * Lintian suggested style changes to some other Debconf questions. - * Removed accidently stdout output from init script. - - -- Christian Hammers Fri, 16 Feb 2007 20:29:18 +0100 - -mysql-dfsg-5.0 (5.0.32-5) unstable; urgency=medium - - * Backported upstream patch for a bug that crashed the server when using - certain join/group/limit combinations. - Users of the Joomla CMS seemed to be affected by this. Closes: #403721 - * The debian-start script that runs on every server start now first upgrades - the system tables (if neccessary) and then check them as it sometimes did - not work the other way around (e.g. for MediaWiki). The script now uses - mysql_update instead of mysql_update_script as recommended. Closes: 409780 - * Remove the Debconf generated config file in postrm. - - -- Christian Hammers Thu, 15 Feb 2007 04:47:04 +0100 - -mysql-dfsg-5.0 (5.0.32-4) unstable; urgency=high - - [Christian Hammers] - * Changed minimum required version in dh_makeshlibs to 5.0.27-1 as - 5.0.26 had an ABI breakage in it! - This is the cause for Perl programs crashing with the following error: - "Transactions not supported by database at /usr/lib/perl5/DBI.pm line 672" - * The old_passwords setting that is set according to a Debconf question is - now written to /etc/mysql/conf.d/old_passwords.cnf instead directly to the - conffile /etc/mysql/my.cnf which would be fobidden by policy (thanks to - Robert Bihlmeyer). Closes: #409750 - * Added some more comments to the default my.cnf. - [Monty Taylor] - * Added bison to build dependencies. - * Added a "start-initial" option to the Data Node init script to support - initial node starts. - * Changed NDB Data and Management node startup seqence. Prevented both from - restarting on upgrade to address rolling upgrade issues. - * Updated build-depends to depend on automake1.9 instead of automake1.8 - to match what upstream uses. - - -- Christian Hammers Wed, 31 Jan 2007 01:14:09 +0100 - -mysql-dfsg-5.0 (5.0.32-3) unstable; urgency=high - - * mysql-server-5.0 pre-depends on adduser now and has --disabled-login - explicitly added to be on the safe side (thanks to the puiparts team). - Closes: #408362 - * Corrections the terminology regarding NDB in the comments of all config - files and init scripts (thanks to Geert Vanderkelen of MySQL). - * Updated Swedish Debconf translation (thanks to Andreas Henriksson). - Closes: #407859 - * Updated Czech Debconf translation (thanks to Miroslav Kure). - Closes: #407809 - - -- Christian Hammers Thu, 11 Jan 2007 11:18:47 +0100 - -mysql-dfsg-5.0 (5.0.32-2) unstable; urgency=high - - * The last upload suffered from a regression that made NDB totally - unusable and caused a dependency to libmysqlclient15-dev in the - mysql-server-5.0 package. The relevant 85_* patch was re-added again. - Closes: #406435 - * Added lintian-overrides for an error that does not affect our packages. - There are now only warnings and not errors left. - - -- Christian Hammers Tue, 9 Jan 2007 23:55:10 +0100 - -mysql-dfsg-5.0 (5.0.32-1) unstable; urgency=high - - * New upstream version. - * SECURITY: mysql_fix_privilege_tables.sql altered the - table_privs.table_priv column to contain too few privileges, causing - loss of the CREATE VIEW and SHOW VIEW privileges. (MySQL Bug#20589) - * SECURITY (DoS): ALTER TABLE statements that performed both RENAME TO - and {ENABLE|DISABLE} KEYS operations caused a server crash. (MySQL - Bug#24089) - * SECURITY (DoS): LAST_DAY('0000-00-00') could cause a server crash. - (MySQL Bug#23653) - * SECURITY (DoS): Using EXPLAIN caused a server crash for queries that - selected from INFORMATION_SCHEMA in a subquery in the FROM clause. - (MySQL Bug#22413) - * SECURITY (DoS): Invalidating the query cache (e.g. when using stored procedures) - caused a server crash for INSERT INTO ... SELECT statements that - selected from a view. (MySQL Bug#20045) - * Using mysql_upgrade with a password crashed the server. Closes: #406229 - * yaSSL crashed on pre-Pentium Intel and Cyrix CPUs. (MySQL Bug#21765) - Closes: #383759 - * Lots of small fixes to the NDB cluster storage engine. - * Updated Japanese Debconf template (thanks to Hideki Yamane). - Closes: #405793 - * Fixed comment regarding "mycheck" in debian-start (thanks to - Enrico Zini). Closes: #405787 - - -- Christian Hammers Sat, 6 Jan 2007 14:26:20 +0100 - -mysql-dfsg-5.0 (5.0.30-3) unstable; urgency=low - - * Updated Brazilian Debconf translation (thanks to Andre Luis Lopes). - Closes: #403821 - * Added Romanian Debconf translation (thanks to Stan Ioan-Eugen). - Closes: #403943 - * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino - Pena). Closes: #404084 - * Updated Galician Debconf translation (thanks to Jacobo Tarrio). - Closes: #404318 - * Updated Dutch Debconf translation (thanks to Vincent Zweije). - Closes: #404566 - * Updated Danish Debconf translation (thanks to Claus Hindsgaul). - Closes: #405018 - - -- Christian Hammers Thu, 21 Dec 2006 21:35:09 +0100 - -mysql-dfsg-5.0 (5.0.30-2) unstable; urgency=high - - * Fixed upstream regression in header files that lead to FTBFS for - mysql-admin, mysql-query-browser and probably other pacakges. - (thanks to Andreas Henriksson). Closes: #403081, #403082 - * Fixed some upstream scripts by replacing /etc by /etc/mysql (thanks to - Julien Antony). Closes: #401083 - * Updated French Debconf translation (thanks to Christian Perrier). - Closes: #401434 - * Added Spanish Debconf translation (thanks to Javier Fernandez-Sanguino - Pena). Closes: #401953 - * Marked a Debconf question that is just a dummy and only internally - used as not-needing-translation. Closes: #403163 - * Fixed mysqlslowdump patch to not remove the usage() function (thanks - to Monty Tailor). - - -- Christian Hammers Sun, 3 Dec 2006 19:20:10 +0100 - -mysql-dfsg-5.0 (5.0.30-1) unstable; urgency=low - - * New upstream version (switch to the MySQL Enterprise branch). - * Upstream bugfix for the Innodb performance bug: - "Very poor performance with multiple queries running - concurrently (Bug#15815)". - * Upstream bugfix for a possible server crash: - "Selecting from a MERGE table could result in a server crash if the - underlying tables had fewer indexes than the MERGE table itself - (Bug#22937)" - * Upstream bugfies for *lot* of NDB problems. - * Upstream bugfix for Innodb optimizer bug. Closes: #397597 - * Updated Italian Debconf translation (thanks to Luca Monducci). - Closes: #401305 - * Updated debian/watch file to MySQL Enterprise branch. - - -- Christian Hammers Sat, 2 Dec 2006 16:36:38 +0100 - -mysql-dfsg-5.0 (5.0.27-2) unstable; urgency=medium - - * Disabled YaSSL x86 assembler as it was reported to crash applications - like pam-mysql or proftpd-mysql which are linked against libmysqlclient - on i486 and Cyrix (i586) CPUs. Closes: #385147 - * Adjusted mysql-server-4.1 priority to extra and section to oldlibs - according to the ftp masters overrides. - * Updated German Debconf translation (thanks to Alwin Meschede). - Closes: #400809 - - -- Christian Hammers Wed, 22 Nov 2006 13:36:31 +0100 - -mysql-dfsg-5.0 (5.0.27-1) unstable; urgency=medium - - * New upstream version (but no codechange, the only difference to 5.0.26 - was a patch to the ABI change which Debian already included. - * When dist-upgrading from mysql-server-4.1/sarge dpkg does not longer - ask unnecessary "config file has changed" questions regarding - /etc/init.d/mysql, /etc/logrotate.d/mysql-server and - /etc/mysql/debian-start just because these files previously belonged - to mysql-server-4.1 and not to mysql-server-5.0. - To archive this mysql-server-5.0 now pre-depends on mysql-common which - provides current versions of those files. - * The automatic run mysql_upgrade now works with non-standard datadir - settings, too (thanks to Benjami Villoslada). Closes: #394607 - * Debconf now asks if the old_passwords option is really needed. - * Improved explanations of the old_passwords variable in my.cnf. - * Removed possibly leftover cron script from MySQL-4.1 (thanks to - Mario Oyorzabal Salgado). Closes: #390889 - * Postrm ignores failed "userdel mysql". - * Updated Danish Debconf translation (thanks to Claus Hindsgaul). - Closes: #398784 - * Added Euskarian Debconf translation (thanks to Piarres Beobide). - Closes: #399045 - * Updated Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #399074 - * Updated German Debconf translation (thanks to Alwin Meschede). - Closes: #399087 - * New Portuguese debconf translations from Miguel Figueiredo. - Closes: #398186 - - -- Christian Hammers Tue, 7 Nov 2006 21:26:25 +0100 - -mysql-dfsg-5.0 (5.0.26-3) unstable; urgency=high - - [sean finney] - * Fix for the deadly ISAM trap. Now during upgrades we will do our - very best to convert pre-existing ISAM format tables using the - binaries from the previous package. Success is not guaranteed, but - this is probably as good as it gets. Note that this also necessitates - re-introducing an (empty transitional) mysql-server-4.1 package. - Closes: #354544, #354850 - * Remove a couple spurious and wrongly placed WARNING statements from - 45_warn-CLI-passwords.dpatch. thanks to Dan Jacobsen for pointing these - out. Closes: #394262 - - -- sean finney Fri, 03 Nov 2006 18:34:46 +0100 - -mysql-dfsg-5.0 (5.0.26-2) unstable; urgency=high - - * Fixed FTBFS for Alpha by applying an upstream patch (thanks to Falk - Hueffner). Closes: #395921 - - -- Christian Hammers Sat, 28 Oct 2006 20:13:46 +0200 - -mysql-dfsg-5.0 (5.0.26-1) unstable; urgency=high - - * SECURITY: - This combined release of 5.0.25 and 5.0.26 fixes lot of possible server - crashs so it should get into Etch. Quoting the changelog (bug numbers are - bugs.mysql.com ones): - - character_set_results can be NULL to signify no conversion, but some - code did not check for NULL, resulting in a server crash. (Bug#21913) - - Using cursors with READ COMMITTED isolation level could cause InnoDB to - crash. (Bug#19834) - - Some prepared statements caused a server crash when executed a second - time. (Bug#21166) - - When DROP DATABASE or SHOW OPEN TABLES was issued while concurrently - issuing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other - statement that required a name lock) in another connection, the server - crashed. (Bug#21216) - - Use of zero-length variable names caused a server crash. (Bug#20908) - - For InnoDB tables, the server could crash when executing NOT IN () - subqueries. (Bug#21077) - - Repeated DROP TABLE statements in a stored procedure could sometimes - cause the server to crash. (Bug#19399) - - Performing an INSERT on a view that was defined using a SELECT that - specified a collation and a column alias caused the server to crash - (Bug#21086). - - A query of the form shown here caused the server to crash. (Bug#21007) - - NDB Cluster: Some queries involving joins on very large NDB tables could - crash the MySQL server. (Bug#21059) - - The character set was not being properly initialized for CAST() with a - type like CHAR(2) BINARY, which resulted in incorrect results or even a - server crash. (Bug#17903) - - For certain queries, the server incorrectly resolved a reference to an - aggregate function and crashed. (Bug#20868) - - The server crashed when using the range access method to execut a - subquery with a ORDER BY DESC clause. (Bug#20869) - - Triggers on tables in the mysql database caused a server crash. Triggers - for tables in this database now are disallowed. (Bug#18361) - - Using SELECT on a corrupt MyISAM table using the dynamic record format - could cause a server crash. (Bug#19835) - - Use of MIN() or MAX() with GROUP BY on a ucs2 column could cause a - server crash. (Bug#20076) - - Selecting from a MERGE table could result in a server crash if the - underlying tables had fewer indexes than the MERGE table itself. - (Bug#21617, Bug#22937) - - * New upstream release. - - This bug would cause trouble for Sarge->Etch upgrades, it was supposed to - have been fixed in 5.0.16 but that apparently did not fix the whole - problem: - Using tables from MySQL 4.x in MySQL 5.x, in particular those with VARCHAR - fields and using INSERT DELAYED to update data in the table would result in - either data corruption or a server crash. (Bug#16611, Bug#16218, Bug#17294) - Closes: #386337 - - Fixes data corruption as an automatic client reconnect used to set - the wrong character set. Closes: #365050 - - Fixes an undefined ulong type in an include file. Closes: #389102 - - Fixes wrong output format when using Unicode characters. Closes: #355302 - - Fixes mysql_upgrade when using a password. Closes: #371841 - - [Christian Hammers] - * Removed --sysconfdir from debian/rules as it puts /etc/mysql/ at the - end of the my.cnf search patch thus overriding $HOME/my.cnf - (thanks to Christoph Biedl). Closes: #394992 - * The provided patch from bug #385947 was wrong, the variable is called - BLOCKSIZE not BLOCK_SIZE according to "strings `which df`" (thanks to - Bruno Muller). Closes: #385947 - - [sean finney] - * new dutch debconf translations from Vincent Zweije (closes: #392809). - * new japanese debconf translations from Hideki Yamane (closes: #391625). - * new italian debconf translations from Luca Monducci (closes: #391741). - * new french debconf translations from Christian Perrier (closes: #393334). - * ran debconf-updatepo to merge the fuzzies into svn. - * massage the following patches so they continue to apply cleanly: - - 44_scripts__mysql_config__libs.dpatch to cleanly apply. - - 45_warn-CLI-passwords.dpatch - - 96_TEMP__libmysqlclient_ssl_symbols.dpatch (note, this patch might - no longer be needed, but is retained "just in case" after massaging it) - * the following patches have been incorporated upstream: - - 70_kfreebsd.dpatch - - 80_hurd_mach.dpatch - - 87_ps_Hurd.dpatch - - 90_TEMP__client__mysql_upgrade__O_EXEC.dpatch - - 91_TEMP__client__mysql_upgrade__password.dpatch - - 92_TEMP__client__mysql_upgrade__defaultgroups.dpatch - - 94_TEMP__CVE-2006-4227.dpatch - - 95_TEMP__CVE-2006-4226.dpatch - * the udf_example.cc has disappeared from the source code, but there's - a udf_example.c which seems to be a good example to use instead :) - * update documentation in the configuration to no longer reference - using my.cnf in the DATADIR, as it's never been the recommended - method for debian systems and hasn't worked since 5.0 was released - anyway (closes: #393868). - - -- Christian Hammers Wed, 25 Oct 2006 19:54:04 +0200 - -mysql-dfsg-5.0 (5.0.24a-9) unstable; urgency=medium - - * Having expire_logs_days enabled but log-bin not crashes the server. Using - both or none of those options is safe. To prevent this happening during the - nightly log rotation via /etc/logrotate.d/mysql the initscript checks for - malicious combination of options. See: #368547 - * The Sarge package "mysql-server" which used to include the mysqld daemon - may still be in unselected-configured state (i.e. after a remove but not - purge) in which case its now obsolete cronscript has to be moved away - (thanks to Charles Lepple). Closes: #385669 - * Updated Danish Debconf translation (thanks to Claus Hindsgaul). - Closes: #390315 - * Updated Frensh Debconf translation (thanks to Christian Perrier). - Closes: #390980 - - -- Christian Hammers Tue, 3 Oct 2006 14:55:31 +0200 - -mysql-dfsg-5.0 (5.0.24a-8) unstable; urgency=low - - * (broken upload) - - -- Christian Hammers Tue, 3 Oct 2006 14:55:31 +0200 - -mysql-dfsg-5.0 (5.0.24a-7) unstable; urgency=low - - * Stopped mysql_config from announcing unnecessary library dependencies - which until now cause "NEEDED" dependencies in the "readelf -d" output - of libraries who only depend on libmysqlclient.so (thanks to Michal - Cihar). Closes: #390692 - - -- Christian Hammers Sun, 1 Oct 2006 23:59:43 +0200 - -mysql-dfsg-5.0 (5.0.24a-6) unstable; urgency=low - - [sean finney] - * finally add support for setting a root password at install. - while this is not a random password as requested in one bug - report, we believe it is the best solution and provides a - means to set a random password via preseeding if it's really - desired (Closes: #316127, #298295). - - -- sean finney Sun, 01 Oct 2006 23:34:30 +0200 - -mysql-dfsg-5.0 (5.0.24a-5) unstable; urgency=low - - * Added ${shlibs:Depends} to debian/control section libmysqlclient-dev as it - contains the experimental /usr/lib/mysql/libndbclient.so.0.0.0. - * Bumped standards version to 3.7.2. - * Added LSB info section to init scripts. - * Rephrased Debconf templates as suggested by lintian. - * Added benchmark suite in /usr/share/mysql/sql-bench/. - * The mysql.timezone* tables are now filled by the postinst script (thanks - to Mark Sheppard). Closes: #388491 - * Moved Debconf install notes to README.Debian. Displaying them with - medium priority was a bug anyway. Closes: #388941 - * Replaced /usr/bin/mysql_upgrade by /usr/bin/mysql_upgrade_shell in - /etc/mysql/debian-start.sh as it works without errors (thanks to Javier - Kohen). Closes: #389443 - - -- Christian Hammers Wed, 20 Sep 2006 15:01:42 +0200 - -mysql-dfsg-5.0 (5.0.24a-4) unstable; urgency=high - - * libmysqlclient.so.15 from 5.0.24 accidentaly exports some symbols that are - historically exported by OpenSSL's libcrypto.so. This bug was supposed to - be fixed in 5.0.24a bug according to the mysql bug tracking system will - only be fixed in 5.0.25 so I backported the patch. People already reported - crashing apps due to this (thanks to Duncan Simpson). See also: #385348 - Closes: #388262 - * Fixed BLOCKSIZE to BLOCK_SIZE in initscript (thanks to Bruno Muller). - Closes: #385947 - * Added hint to "--extended-insert=0" to mysqldump manpage (thanks to Martin - Schulze). - * Documented the meaning of "NDB" in README.Debian (thanks to Dan Jacobson). - Closes: #386274 - * Added patch to build on hurd-i386 (thanks to Cyril Brulebois). Closes: #387369 - * Fixed debian-start script to work together with the recend LSB modifications in - the initscript (thanks to wens). Closes: #387481 - * Reverted tmpdir change in my.cnf back to /tmp to comply with FHS (thanks - to Alessandro Valente). Closes: #382778 - * Added logcheck filter rule (thanks to Paul Wise). Closes: #381043 - * I will definetly not disable InnoDB but added a note to the default my.cnf - that disabling it saves about 100MB virtual memory (thanks to Olivier - Berger). Closes: #384399 - * Added thread_cache_size=8 to default my.cnf as this variable seems to have - a negligible memory footprint but can improve performance when lots of - threads connect simultaneously as often seen on web servers. - - -- Christian Hammers Mon, 4 Sep 2006 00:21:50 +0200 - -mysql-dfsg-5.0 (5.0.24a-3) unstable; urgency=low - - * Fixed potential tempfile problem in the newly added mysqlreport script. - - -- Christian Hammers Sun, 3 Sep 2006 23:17:24 +0200 - -mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low - - * Added "mysqlreport" (GPL'ed) from hackmysql.com. - * Temporarily disabled expire_days option as it causes the server - to crash. See #368547 - * Made output of init scripts LSB compliant (thanks to David Haerdeman). - Closes: #385874 - - -- Christian Hammers Sun, 3 Sep 2006 19:06:53 +0200 - -mysql-dfsg-5.0 (5.0.24a-1) unstable; urgency=high - - * New upstream version. - * The shared library in the 5.0.24 upstream release accidently exported - some symbols that are also exported by the OpenSSL libraries (notably - BN_bin2bn) causing unexpected behaviour in applications using these - functions (thanks to Peter Cernak). Closes: #385348 - * Added note about possible crash on certain i486 clone CPUs. - * Made recipient address of startup mysqlcheck output configurable - (thanks to Mattias Guns). Closes: #385119 - - -- Christian Hammers Mon, 28 Aug 2006 01:22:12 +0200 - -mysql-dfsg-5.0 (5.0.24-3) unstable; urgency=high - - * SECURITY: - CVE-2006-4226: - When run on case-sensitive filesystems, MySQL allows remote - authenticated users to create or access a database when the database - name differs only in case from a database for which they have - permissions. - CVE-2006-4227: - MySQL evaluates arguments of suid routines in the security context of - the routine's definer instead of the routine's caller, which allows - remote authenticated users to gain privileges through a routine that - has been made available using GRANT EXECUTE. - Thanks to Stefan Fritsch for reporting. Closes: #384798 - - -- Christian Hammers Sat, 26 Aug 2006 04:55:17 +0200 - -mysql-dfsg-5.0 (5.0.24-2) unstable; urgency=high - - * 5.0.24-1 introduced an ABI incompatibility, which this patch reverts. - Programs compiled against 5.0.24-1 are not compatible with any other - version and needs a rebuild. - This bug already caused a lot of segfaults and crashes in various - programs. Thanks to Chad MILLER from MySQL for quickly providing a patch. - The shlibdeps version has been increased to 5.0.24-2. - Closes: #384047, #384221, #383700 - - -- Christian Hammers Fri, 25 Aug 2006 21:47:35 +0200 - -mysql-dfsg-5.0 (5.0.24-1) unstable; urgency=high - - * SECURITY: Upstream fixes a security bug which allows a user to continue - accessing a table using a MERGE TABLE after the right to direct access to - the database has been revoked (CVE-2006-4031, MySQL bug #15195). - (Well they did not exactly fixed it, they documented the behaviour and - allow the admin to disable merge table alltogether...). Closes: #380271 - * SECURITY: Applied patch that fixes a possibly insecure filehandling - in the recently added mysql_upgrade binary file (MySQL bug #10320). - * New upstream version. - - Fixes nasty MySQL bug #19618 that leads to crashes when using - "SELECT ... WHERE ... not in (1, -1)" (e.g. vbulletin was affected). - - Fixes upstream bug #16803 so that linking ~/.mysql_history to /dev/null - now has the desired effect of having no history. - * Really fixed the runlevels. Closes: #377651 - * Added patch for broken upstream handling of "host=" to mysql_upgrade.c. - * Adjusted /etc/mysql/debian-start to new mysql_upgrade.c - - -- Christian Hammers Tue, 8 Aug 2006 00:44:13 +0200 - -mysql-dfsg-5.0 (5.0.22-5) unstable; urgency=low - - * Added further line to the logcheck ignore files (thanks to Paul Wise). - Closes: #381038 - - -- Christian Hammers Wed, 2 Aug 2006 00:28:50 +0200 - -mysql-dfsg-5.0 (5.0.22-4) unstable; urgency=low - - * Upstream fixes a bug in the (never released) version 5.0.23 which could - maybe used to crash the server if the mysqlmanager daemon is in use - which is not yet the default in Debian. (CVE-2006-3486 *DISPUTED*) - * Changed runlevel priority of mysqld from 20 to 19 so that it gets started - before apache and proftpd etc. which might depend on an already running - database server (thanks to Martin Gruner). Closes: #377651 - * Added patch which sets PATH_MAX in ndb (thanks to Cyril Brulebois). - Closes: #378949 - * Activated YaSSL as licence issues are settled according to: - http://bugs.mysql.com/?id=16755. This also closes the FTBFS bug - regarding OpenSSL as it is discouraged to use now. Closes: #368639 - * Removed SSL-MINI-HOWTO as the official documentation is good enough now. - * mysql_upgrade no longer gives --password on the commandline which would - be insecure (thanks to Dean Gaudet). Closes: #379199 - * Adjusted debian/patches/45* to make consecutive builds in the same source - tree possible (thanks to Bob Tanner). Closes: #368661 - * mysql-server-5.0 is now suggesting tinyca as yaSSL is enabled and tinyca - was found to be really cool :) - * Moved tempdir from /tmp to /var/tmp as it will more likely have enough - free space as /tmp is often on the root partition and /var or at least - /var/tmp is on a bigger one. - - -- Christian Hammers Mon, 10 Jul 2006 23:30:26 +0200 - -mysql-dfsg-5.0 (5.0.22-3) unstable; urgency=low - - * Added patch for MySQL bug #19618: "select x from x - where x not in(1,-1)" may crash the server" (thanks to - Ruben Puettmann). - - -- Christian Hammers Fri, 9 Jun 2006 01:41:44 +0200 - -mysql-dfsg-5.0 (5.0.22-2) unstable; urgency=high - - * Fixed debian-sys-maint related bug in postinst (thanks to - Jean-Christophe Dubacq). Closes: #369970 - * The last upload was a security patch (which I did not know as I - uploaded before the announcement came). I now added the CVE id for - reference and set urgency to high as the last entry did not. - - -- Christian Hammers Wed, 31 May 2006 01:04:11 +0200 - -mysql-dfsg-5.0 (5.0.22-1) unstable; urgency=low - - * SECURITY: This upstream release fixes an SQL-injection with multibyte - encoding problem. (CVE-2006-2753) - * New upstream release. - * Upstream fixes REPAIR TABLE problem. Closes: #354300 - * Upstream fixes problem that empty strings in varchar and text columns - are displayed as NULL. Closes: #368663 - - -- Christian Hammers Tue, 30 May 2006 23:43:24 +0200 - -mysql-dfsg-5.0 (5.0.21-4) unstable; urgency=low - - * Added "BLOCKSIZE=" to the diskfree check (thanks to Farzad FARID). - Closes: #367027, #367083 - * Further fixed mysql_upgrade upstream script (thanks to Andreas Pakulat) - Closes: #366155 - * Adjusted the /proc test in debian/rules from /proc/1 to /proc/self - to make building on grsec systems possible (thanks to K. Rosenegger). - Closes: #366824 - * Updated Russion Debconf translation (thanks to Yuriy Talakan). - Closes: #367141 - * Updated Czech Debconf translation (thanks to Kiroslav Kure). - Closes: #367160 - * Updated Galician Debconf translation (thanks to Jacobo Tarrio). - Closes: #367384 - * Updated Swedish Debconf translation (thanks to Daniel Nylander). - Closes: #368186 - - -- Christian Hammers Wed, 10 May 2006 08:45:42 +0200 - -mysql-dfsg-5.0 (5.0.21-3) unstable; urgency=low - - * Fixed FTBFS problem which was caused by a patch that modifies Makefile.am - as well as Makefile.in and was not deteced because my desktop was fast - enough to patch both files within the same second and so fooled automake. - (thanks to Blars Blarson for notifying me). Closes: #366534 - - -- Christian Hammers Sat, 6 May 2006 19:03:58 +0200 - -mysql-dfsg-5.0 (5.0.21-2) unstable; urgency=low - - * Fixed bug in postinst that did not correctly rewrite - /etc/mysql/debian.cnf (thanks to Daniel Leidert). - Closes: #365433, #366155 - - -- Christian Hammers Thu, 4 May 2006 02:37:03 +0200 - -mysql-dfsg-5.0 (5.0.21-1) unstable; urgency=high - - * SECURITY: New upstream release with some security relevant bugfixes: - * "Buffer over-read in check_connection with usernames lacking a - trailing null byte" (CVE-2006-1516) - * "Anonymous Login Handshake - Information Leakage" (CVE-2006-1517) - * "COM_TABLE_DUMP Information Leakage and Arbitrary command execution" - (CVE-2006-1518) - Closes: #365938, #365939 - * Added diskfree check to the init script (thanks to Tim Baverstock). - Closes: #365460 - * First amd64 upload! - - -- Christian Hammers Sat, 29 Apr 2006 04:31:27 +0200 - -mysql-dfsg-5.0 (5.0.20a-2) unstable; urgency=low - - * The new mysql-upgrade which is started from /etc/mysql/debian-start - does now use the debian-sys-maint user for authentication (thanks to - Philipp). Closes: #364991 - * Wrote patch debian/patches/43* which adds a password option to - mysql_update. See MySQL bug #19400. - * Added "Provides: libmysqlclient-dev" to libmysqlclient15-dev as I saw no - obvious reasons against it (problems should be documented in - debian/README.Maintainer!) (thanks to Olaf van der Spek). Closes: #364899 - * Updated Netherlands debconf translation (thanks to Vincent Zweije) - Closes: #364464 - * Updated French debconf translation (thanks to Christian Perrier) - Closes: #364401 - * Updated Danish debconf translation (thanks to Claus Hindsgaul) - Closes: #365135 - - -- Christian Hammers Wed, 26 Apr 2006 01:14:53 +0200 - -mysql-dfsg-5.0 (5.0.20a-1) unstable; urgency=low - - * New upstream release. - * Added the new mysql_upgrade script and added it to - /etc/mysql/debian-start (thanks to Alessandro Polverini). - The script is currently very noise that is a known bug and will be - fixed in the next release! - Closes: #363458 - * No longer creates the "test" database. This actuallay had been tried - to archive before (at least patches) exists but apparently was not the - case in the last versions (thanks to Olaf van der Spek). Closes: #362126 - * Reformatted libmysqlclient15off.NEWS.Debian to changelog format - (thanks to Peter Palfrader). Closes: #363062 - - -- Christian Hammers Sat, 15 Apr 2006 13:05:22 +0200 - -mysql-dfsg-5.0 (5.0.20-1) unstable; urgency=high - - * Upstream contains a fix for a nasty bug (MySQL#18153) that users - already experienced and that caused corrupted triggers after - REPAIR/OPTIMIZE/ALTER TABLE statements. - (thanks to Jerome Despatis for pointing out) - * Added patch for the "updates on multiple tables is buggy after - upgrading from 4.1 to 5.0" problem which MySQL has been committed - for the upcoming 5.0.21 release. Closes #352704 - * Added Netherlands debconf translation (thanks to Vincent Zweije). - Closes: #360443 - * Added Galician debconf translation (thanks to Jacobo Tarrio). - Closes: #361257 - - -- Christian Hammers Fri, 7 Apr 2006 00:00:43 +0200 - -mysql-dfsg-5.0 (5.0.19-3) unstable; urgency=high - - [ Christian Hammers ] - * Fixed libmysqlclient15.README.Debian regarding package name changes - (thanks to Leppo). - * Moved libheap.a etc. back to /usr/lib/mysql/ as their names are just - too generic. Closes: #353924 - [ Sean Finney ] - * updated danish debconf translation, thanks to Claus Hindsgaul - (closes: #357424). - [ Adam Conrad ] - * Send stderr from 'find' in preinst to /dev/null to tidy up chatter. - * Backport patch for CVE-2006-0903 from the upcoming release to resolve - a log bypass vulnerability when using non-binary logs (closes: #359701) - - -- Adam Conrad Tue, 4 Apr 2006 15:23:18 +1000 - -mysql-dfsg-5.0 (5.0.19-2) unstable; urgency=medium - - * New upstream release. - * Renamed package libmysqlclient15 to libmysqlclient15off due to - binary incompatible changes. - See /usr/share/doc/libmysqlclient15off/README.Debian - * Updated Czech debconf translation (thanks to Miroslav Kure). - Closes: #356503 - * Updated French debconf translation (thanks to Christian Perrier). - Closes: #356332 - * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702 - * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian - file is (thanks to Ross Boylan). Closes: #355978 - - -- Christian Hammers Fri, 17 Mar 2006 02:32:19 +0100 - -mysql-dfsg-5.0 (5.0.19-1) experimental; urgency=medium - - * New upstream release. - * SECURITY: CVE-2006-3081: A bug where str_to_date(1,NULL) lead to a - server crash has been fixed. - (this note has been added subsequently for reference) - * Renamed package libmysqlclient15 to libmysqlclient15off. - See /usr/share/doc/libmysqlclient15off/NEWS.Debian - * Updated Czech debconf translation (thanks to Miroslav Kure). - Closes: #356503 - * Updated French debconf translation (thanks to Christian Perrier). - Closes: #356332 - * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702 - * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian - file is (thanks to Ross Boylan). Closes: #355978 - - -- Christian Hammers Tue, 14 Mar 2006 22:56:13 +0100 - -mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=medium - - [ Christian Hammers ] - * When using apt-get the check for left-over ISAM tables can abort the - installation of mysql-server-5.0 but not prevent the mysql-server-4.1 - package from getting removed. The only thing I can do is reflect this - in the Debconf notice that is shown and suggest to reinstall - mysql-server-4.1 for converting. See: #354850 - * Suggests removing of /etc/cron.daily/mysql-server in last NEWS message - (thanks to Mourad De Clerck). Closes: #354111 - * Added versioned symbols for kfreebsd and Hurd, too (thanks to Aurelien - Jarno and Michael Bank). Closes: #353971 - * Added versioned symbols for kfreebsd, too (thanks to Aurelien Jarno). - Closes: #353971 - [ Adam Conrad ] - * Add 39_scripts__mysqld_safe.sh__port_dir.dpatch to ensure that the - permissions on /var/run/mysqld are always correct, even on a tmpfs. - - -- Christian Hammers Mon, 6 Mar 2006 21:42:13 +0100 - -mysql-dfsg-5.0 (5.0.18-8) unstable; urgency=low - - * The rotation of the binary logs is now configured via - expire-logs-days in /etc/mysql/my.cnf and handled completely - by the server and no longer in configured in debian-log-rotate.conf - and handled by a cron job. Thanks to David Johnson. - See /usr/share/doc/mysql-server-5.0/NEWS.Debian - * Ran aspell over some files in debian/ and learned a lot :) - * debian/rules: Added check if versioned symbols are really there. - * Updated SSL-MINI-HOWTO. - * Updated copyright (removed the parts regarding the now removed - BerkeleyDB table handler and mysql-doc package). - * Relocated a variable in preinst (thanks to Michael Heldebrant). - Closes: #349258, #352587, #351216 - * Updated Danish debconf translation (thanks to Claus Hindsgaul). - Closes: #349013 - * Updated Swedish debconf translation (thanks to Daniel Nylander). - Closes: #349522 - * Updated French debconf translation (thanks to Christian Perrier). - Closes: #349592 - * Fixed typo in README.Debian (thanks to Vincent Ricard). - * Prolonged waiting time for mysqld in the init script. Closes: #352070 - - -- Christian Hammers Mon, 23 Jan 2006 23:13:46 +0100 - -mysql-dfsg-5.0 (5.0.18-7) unstable; urgency=low - - * Made mailx in debian-start.inc.sh optional and changed the dependency on it - on it to a mere recommendation. Closes: #316297 - * the previous FTBFS patches for GNU/Hurd inadvertently led to configure - being regenerating, losing a couple trivial things like our versioned - symbols patch, causing many nasty problems (closes: #348854). - - -- sean finney Fri, 20 Jan 2006 20:59:27 +0100 - -mysql-dfsg-5.0 (5.0.18-6) unstable; urgency=low - - * Added version comment (thanks to Daniel van Eeden). - * Added two patches to build on GNU/Hurd (thanks to Michael Bank). - Closes: #348182 - * Abort upgrade if old and now unsupported ISAM tables are present - (thanks to David Coe). Closes: #345895 - - -- Christian Hammers Tue, 17 Jan 2006 19:25:59 +0100 - -mysql-dfsg-5.0 (5.0.18-5) unstable; urgency=low - - * Bump shlibdeps for libmysqlclient15 to (>= 5.0.15-1), which was - the first non-beta release from upstream, as well as being shortly - after we broke the ABI in Debian by introducing versioned symbols. - - -- Adam Conrad Fri, 13 Jan 2006 13:18:03 +1100 - -mysql-dfsg-5.0 (5.0.18-4) unstable; urgency=low - - * Munge our dependencies further to smooth upgrades even more, noting - that we really need 5.0 to conflict with 4.1, and stealing a page from - the book of mysql-common, it doesn't hurt to hint package managers in - the direction of "hey, this stuff is a complete replacement for 4.1" - * Change the description of mysql-server and mysql-client to remove the - references to it being "transition", and instead point out that it's - the way to get the "current best version" of each package installed. - - -- Adam Conrad Wed, 11 Jan 2006 11:39:45 +1100 - -mysql-dfsg-5.0 (5.0.18-3) unstable; urgency=low - - * Make the mysql-{client,server}-5.0 conflict against mysql-{client,server} - versioned, so they can be installed side-by-side and upgrade properly. - * Add myself to Uploaders; since I have access to the alioth repository. - - -- Adam Conrad Tue, 10 Jan 2006 19:15:48 +1100 - -mysql-dfsg-5.0 (5.0.18-2) unstable; urgency=low - - * Removed the transitional package that forced an upgrade from - mysql-server-4.1 to mysql-server-5.0 as I was convinced that - having a general "mysql-server" package with adjusted dependencies - is enough (thanks to Adam Conrad). - * Updated logcheck.ignore files (thanks to Jamie McCarthy). Closes: #340193 - - -- Christian Hammers Mon, 9 Jan 2006 21:54:53 +0100 - -mysql-dfsg-5.0 (5.0.18-1) unstable; urgency=low - - * New upstream version. - * Added empty transitional packages that force an upgrade from the - server and client packages that have been present in Sarge. - * Fixed SSL-MINI-HOWTO (thanks to Jonas Smedegaard). Closes: #340589 - - -- Christian Hammers Mon, 2 Jan 2006 21:17:51 +0100 - -mysql-dfsg-5.0 (5.0.17-1) unstable; urgency=low - - * Never released as Debian package. - - -- Christian Hammers Thu, 22 Dec 2005 07:49:52 +0100 - -mysql-dfsg-5.0 (5.0.16-1) unstable; urgency=low - - * New upstream version. - * Removed the error logs from the logrotate script as Debian does - not use them anymore. Closes: #339628 - - -- Christian Hammers Tue, 22 Nov 2005 01:19:11 +0100 - -mysql-dfsg-5.0 (5.0.15-2) unstable; urgency=medium - - * Added 14_configure__gcc-atomic.h.diff to fix FTBFS on m68k - (thanks to Stephen R Marenka). Closes: #337082 - * Removed dynamic linking against libstdc++ as it was not really - needed (thanks to Adam Conrad). Closes: #328613 - * Fixed the "/var/lib/mysql is a symlink" workaround that accidently - left a stalled symlink (thanks to Thomas Lamy). Closes: #336759 - * As the init script cannot distinguish between a broken startup and - one that just takes very long the "failed" message now says - "or took more than 6s" (thanks to Olaf van der Spek). Closes: #335547 - - -- Christian Hammers Thu, 3 Nov 2005 22:00:15 +0100 - -mysql-dfsg-5.0 (5.0.15-1) unstable; urgency=low - - * New upstream version. 5.0 has finally been declared STABLE! - * Added small patch to debian/rules that fixed sporadic build errors - where stdout and stderr were piped together, got mixed up and broke - * Added --with-big-tables to ./configure (thanks to tj.trevelyan). - Closes: #333090 - * Added capability to parse "-rc" to debian/watch. - * Fixed cronscript (thanks to Andrew Deason). Closes: #335244 - * Added Swedish debconf translation (thanks to Daniel Nylander). - Closes: #333670 - * Added comment to README.Debian regarding applications that manually - set new-style passwords... Closes: #334444 - * Sean Finney: - - Fix duplicate reference to [-e|--extended-insert]. Closes: #334957 - - Fix default behavior for mysqldumpslow. Closes: #334517 - - Reference documentation issue in mysql manpage. Closes: #335219 - - -- Christian Hammers Fri, 30 Sep 2005 00:10:39 +0200 - -mysql-dfsg-5.0 (5.0.13rc-1) unstable; urgency=low - - * New upstream release. Now "release-candidate"! - * Removed any dynamic link dependencies to libndbclient.so.0 which - is due to its version only distributed as a static library. - * Sean Finney: - - FTBFS fix related to stripping rpath in debian/rules - - -- Christian Hammers Mon, 26 Sep 2005 22:09:26 +0200 - -mysql-dfsg-5.0 (5.0.12beta-5) unstable; urgency=low - - * The recent FTBFS were probably result of a timing bug in the - debian/patches/75_*.dpatch file where Makefile.in got patched just - before the Makefile.shared which it depended on. For that reason - only some of the autobuilders failed. Closes: #330149 - * Fixed chrpath removal (option -k had to be added). - * Corrected debconf dependency as requested by Joey Hess. - - -- Christian Hammers Mon, 26 Sep 2005 18:37:07 +0200 - -mysql-dfsg-5.0 (5.0.12beta-4) unstable; urgency=low - - * Removed experimental shared library libndbclient.so.0.0.0 as it - is doomed to cause trouble as long as it is present in both MySQL 4.1 - and 5.0 without real soname and its own package. We still have - libndbclient.a for developers. (thanks to Adam Conrad and - mediaforest.net). Closes: #329772 - - -- Christian Hammers Fri, 23 Sep 2005 12:36:48 +0200 - -mysql-dfsg-5.0 (5.0.12beta-3) unstable; urgency=medium - - * Symbol versioning support! wooooohoooooo! - (thanks to Steve Langasek) Closes: #236288 - * Moved libndbcclient.so.0 to the -dev package as it is provided by - libmysqlclient14 and -15 which must be installable simultaneously. - * Removed mysql-*-doc suggestions. - - -- Christian Hammers Tue, 20 Sep 2005 00:07:03 +0200 - -mysql-dfsg-5.0 (5.0.12beta-2) unstable; urgency=low - - * Added patch to build on GNU/kFreeBSD (thanks to Aurelien Jarno). - Closes: #327702 - * Added patch that was already been present on the 4.1 branch which - makes the "status" command of the init script more sensible - (thanks to Stephen Gildea). Closes: #311836 - * Added Vietnamese Debconf translation (thanks to Clytie Siddal). - Closes: #313006 - * Updated German Debconf translation (thanks to Jens Seidel). - Closes: #313957 - * Corrected commends in example debian-log-rotate.conf. The default is - unlike the mysql-sever-4.1 package which needed to stay backwards - compatible now 2 to avoid filling up the disk endlessly. - * Fixed watch file to be "-beta" aware. - - -- Christian Hammers Thu, 15 Sep 2005 20:50:19 +0200 - -mysql-dfsg-5.0 (5.0.12beta-1) unstable; urgency=medium - - * Christian Hammers: - - New upstream release. - - Changed build-dep to libreadline5-dev as requested by Matthias Klose. - Closes: #326316 - - Applied fix for changed output format of SHOW MASTER LOGS for - binary log rotation (thanks to Martin Krueger). Closes: #326427, #326427 - - Removed explicit setting of $PATH as I saw no sense in it and - it introduced a bug (thanks to Quim Calpe). Closes: #326769 - - Removed PID file creation from /etc/init.d/mysql-ndb as it does - not work with this daemon (thanks to Quim Calpe). - - Updated French Debconf translation (thanks to Christian Perrier). - Closes: #324805 - - Moved conflicts line in debian/control from libmysqlclient15 to - libmysqlclient15-dev and removed some pre-sarge conflicts as - suggested by Adam Majer. Closes: #324623 - * Sean Finney: - - For posterity, CAN-2005-2558 has been fixed since 5.0.7beta. - - -- Christian Hammers Thu, 15 Sep 2005 19:58:22 +0200 - -mysql-dfsg-5.0 (5.0.11beta-3) unstable; urgency=low - - * Temporarily build only with -O2 to circumvent gcc internal errors - (thanks to Matthias Klose). Related to: #321165 - - -- Christian Hammers Thu, 18 Aug 2005 15:44:04 +0200 - -mysql-dfsg-5.0 (5.0.11beta-2) unstable; urgency=low - - * Fixed README.Debian regarding the status of mysql-doc. - * Added "set +e" around chgrp in mysql-server-5.0.preinst to - not fail on .journal files (thanks to Christophe Nowicki). - Closes: #318435 - - -- Christian Hammers Sun, 14 Aug 2005 18:02:08 +0200 - -mysql-dfsg-5.0 (5.0.11beta-1) unstable; urgency=low - - * New upstream version. - * Added Danish Debconf translations (thanks to Claus Hindsgaul). - Closes: #322384 - * Updated Czech Debconf translations (thanks to Miroslav Kure). - Closes: #321765 - - -- Christian Hammers Sat, 13 Aug 2005 11:56:15 +0000 - -mysql-dfsg-5.0 (5.0.10beta-1) unstable; urgency=low - - * New upstream release. - * Christian Hammers: - - Added check for mounted /proc to debian/rules. - * Sean Finney: - - fix for fix_mysql_privilege_tables/mysql_fix_privilege_tables typo - in mysql-server-5.0's README.Debian (see #319838). - - -- Christian Hammers Sun, 31 Jul 2005 00:30:45 +0200 - -mysql-dfsg-5.0 (5.0.7beta-1) unstable; urgency=low - - * Second try for new upstream release. - * Renamed mysql-common-5.0 to mysql-common as future libmysqlclient16 - from e.g. MySQL-5.1 would else introduce mysql-common-5.1 which makes - a simultanous installation of libmysqlclient14 impossible as that - depends on either mysql-common or mysql-common-5.0 but not on future - versions. Thus we decided to always let the newest MySQL version - provide mysql-common. - * Added ${misc:Depends} as suggested by debhelper manpage. - * Raised standard in control file to 3.6.2. - * Removed DH_COMPAT from rules in faviour of debian/compat. - * Checkes for presence of init script before executing it in preinst. - Referres: 315959 - * Added 60_includes_mysys.h__gcc40.dpatch for GCC-4.0 compatibility. - - -- Christian Hammers Wed, 29 Jun 2005 00:39:05 +0200 - -mysql-dfsg-5.0 (5.0.5beta-1) unstable; urgency=low - - * New major release! Still beta so be carefull... - * Added federated storage engine. - - -- Christian Hammers Wed, 8 Jun 2005 19:29:45 +0200 - -mysql-dfsg-4.1 (4.1.12-1) unstable; urgency=low - - * Christian Hammers: - - New upstream release. - - Disabled BerkeleyDB finally. It has been obsoleted by InnoDB. - * Sean Finney: - - Updated French translation from Christian Perrier (Closes: #310526). - - Updated Japanese translation from Hideki Yamane (Closes: #310263). - - Updated Russian translation from Yuriy Talakan (Closes: #310197). - - -- Christian Hammers Sat, 4 Jun 2005 05:49:11 +0200 - -mysql-dfsg-4.1 (4.1.11a-4) unstable; urgency=high - - * Fixed FTBFS problem which was caused due to the fact that last uploads - BerkeleyDB patch was tried to applied on all architectures and not only - on those where BerkeleyDB is actually beeing built. Closes: #310296 - - -- Christian Hammers Mon, 23 May 2005 00:54:51 +0200 - -mysql-dfsg-4.1 (4.1.11a-3) unstable; urgency=high - - * Added patch from Piotr Roszatycki to compile the bundled db3 library - that is needed for the BerkeleyDB support with versioned symbols so - that mysqld no longer crashes when it gets linked together with the - Debian db3 version which happens when e.g. using libnss-db. - Closes: #308966 - - -- Christian Hammers Thu, 19 May 2005 01:41:14 +0200 - -mysql-dfsg-4.1 (4.1.11a-2) unstable; urgency=high - - * Okay, the hackery with /var/lib/dpkg/info/mysql-server.list will not - stand and is removed from the preinst of mysql-server. - * New workaround for the symlink problem that does not involve mucking - with dpkg's file lists is storing the symlinks in a temporary location - across upgrades. - As this sometimes fails since apt-get does not always call new.preinst - before old.postrm, some remarks were added to README.Debian and the - Debconf installation notes to minimize the inconvinience this causes. - - -- sean finney Sun, 15 May 2005 10:25:31 -0400 - -mysql-dfsg-4.1 (4.1.11a-1) unstable; urgency=high - - * Added the "a" to the version number to be able to upload a new - .orig.tar.gz file which now has the non-free Docs/ directory removed - as this has been forgotten in the 4.1.11 release (thanks to Goeran - Weinholt). Closes: #308691 - * The Woody package listed /var/lib/mysql and /var/log/mysql in its - /var/lib/dpkg/info/mysql-server.list. These directories are often - replaced by symlinks to data partitions which triggers a dpkg bug - that causes these symlinks to be removed on upgrades. The new preinst - prevents this by removing the two lines from the .list file - (thanks to Andreas Barth and Jamin W. Collins). See dpkg bug #287978. - * Updated French Debconf translation (thanks to Christian Perrier). - Closes: #308353 - - -- Christian Hammers Thu, 12 May 2005 21:52:46 +0200 - -mysql-dfsg-4.1 (4.1.11-3) unstable; urgency=high - - * The "do you want to remove /var/lib/mysql when purging the package" flag - from old versions is removed once this package is beeing installed so - that purging an old Woody mysql-server package while having a - mysql-server-4.1 package installed can no longer lead to the removal of - all databases. Additionaly clarified the wording of this versions Debconf - template and added a check that skips this purge in the postrm script - if another mysql-server* package has /usr/sbin/mysqld installed. - (thanks to Adrian Bunk for spotting that problem) Closes: #307473 - * Cronfile was not beeing installed as the filename was not in the - correct format for "dh_installcron --name" (thanks to Tomislav - Gountchev). Closes: #302712 - - -- Christian Hammers Sat, 23 Apr 2005 22:55:15 +0200 - -mysql-dfsg-4.1 (4.1.11-2) unstable; urgency=low - - * Sean Finney: - - don't freak out if we can't remove /etc/mysql during purge. - - debian/rules clean works again. - * Christian Hammers: - - Fixed typo in README.Debian (thanks to Joerg Rieger). Closes: #304897 - - Completely removed the passwordless test user as it was not only - insecure but also lead to irritations as MySQL checks first the - permissions of this user and then those of a password having one. - See bug report from Hilko Bengen for details. Closes: #301741 - - -- Christian Hammers Sat, 16 Apr 2005 15:55:00 +0200 - -mysql-dfsg-4.1 (4.1.11-1) unstable; urgency=low - - * New upstream version. - * Upstream fix for charset/collation problem. Closes: #282256 - * Upstream fix for subselect crash. Closes: #297687 - * Corrected minor issue in Debconf template regarding skip-networking - (thanks to Isaac Clerencia). Closes: #303417 - * Made dependency to gawk unnecessary (thanks to Zoran Dzelajlija). - Closes: #302284 - * Removed obsolete 50_innodb_mixlen.dpatch. - * Removed obsolete 51_CAN-2004-0957_db_grant_underscore.dpatch. - - -- Christian Hammers Fri, 8 Apr 2005 00:23:53 +0200 - -mysql-dfsg-4.1 (4.1.10a-7) unstable; urgency=low - - * Sean Finney: - - fix for the mysteriously disappeared cronjob. thanks to - Peter Palfrader for pointing out this omission. - (closes: #302712). - - -- sean finney Sat, 02 Apr 2005 16:54:13 -0500 - -mysql-dfsg-4.1 (4.1.10a-6) unstable; urgency=high - - * Sean Finney: - - the previous upload did not completely address the issue. this one - should do so. d'oh. - - -- sean finney Thu, 31 Mar 2005 03:35:50 +0000 - -mysql-dfsg-4.1 (4.1.10a-5) unstable; urgency=high - - * Sean Finney: - - the following security issue is addressed in this upload: - CAN-2004-0957 (grant privilege escalation on tables with underscores) - thanks to sergei at mysql for all his help with this. - - -- sean finney Wed, 30 Mar 2005 21:19:26 -0500 - -mysql-dfsg-4.1 (4.1.10a-4) unstable; urgency=low - - * Sean Finney: - - FTBFS fix for amd64/gcc-4.0. Thanks to Andreas Jochens - for reporting this (closes: #301807). - - ANSI-compatible quoting fix in daily cron job. thanks to - Karl Hammar for pointing out the problem in - the 4.0 branch. - - Added myself as a co-maintainer in the control file (closes: #295312). - - -- sean finney Tue, 29 Mar 2005 18:54:42 -0500 - -mysql-dfsg-4.1 (4.1.10a-3) unstable; urgency=low - - * BerkeleyDB is now disabled by default as its use is discouraged by MySQL. - * Added embedded server libraries as they finally do compile. - They are currently in libmysqlclient-dev as they are still - experimental and only available as .a library (thanks to Keith Packard). - Closes: #297062 - * Fixed obsolete "tail" syntax (thanks to Sven Mueller). Closes: #301413 - * Added CAN numbers for the latest security bugfix upload. - * Updated manpage of mysqlmanager (thanks to Justin Pryzby). Closes: #299844 - * Added comments to default configuration. - - -- Christian Hammers Sun, 20 Mar 2005 17:40:18 +0100 - -mysql-dfsg-4.1 (4.1.10a-2) unstable; urgency=low - - * Disabled "--with-mysqld-ldflags=-all-static" as it causes sig11 crashes - if LDAP is used for groups in /etc/nsswitch.conf. Confirmed by Sean Finney - and Daniel Dehennin. Closes: #299382 - - -- Christian Hammers Mon, 14 Mar 2005 03:01:03 +0100 - -mysql-dfsg-4.1 (4.1.10a-1) unstable; urgency=high - - * SECURITY: - - The following security related updates are addressed: - CAN-2005-0711 (temporary file creation with "CREATE TEMPORARY TABLE") - CAN-2005-0709 (arbitrary library injection in udf_init()) - CAN-2005-0710 (arbitrary code execution via "CREATE FUNCTION") - Closes: #299029, #299031, #299065 - * New Upstream Release. - - Fixes some server crash conditions. - - Upstream includes fix for TMPDIR overriding my.cnf tmpdir setting - Closes: #294347 - - Fixes InnoDB error message. Closes: #298875 - - Fixes resouce limiting. Closes: #285044 - * Improved checking whether or not the server is alive in the init script - which should make it possible to run several mysqld instances in - different chroot environments. Closes: #297772 - * Fixed cron script name as dots are not allowed (thanks to Michel - v/d Ven). Closes: #298447 - * Added -O3 and --with-mysqld-ldflags=-all-static as MySQL recommends to - build the server binary statically in order to gain about 13% more - performance (thanks to Marcin Kowalski). - * Added patch to let mysqld_safe react to signals (thanks to Erich - Schubert). Closes: #208364 - * (Thanks to Sean Finney for doing a great share of work for this release!) - - -- Christian Hammers Thu, 3 Mar 2005 02:36:39 +0100 - -mysql-dfsg-4.1 (4.1.10-4) unstable; urgency=medium - - * Fixed bug that prevented MySQL from starting after upgrades. - Closes: #297198, #296403 - * Added comment about logging to syslog to the default my.cnf - and the logrotate script (thanks to Ryszard Lach). Closes: #295507 - - -- Christian Hammers Thu, 3 Mar 2005 00:28:02 +0100 - -mysql-dfsg-4.1 (4.1.10-3) unstable; urgency=low - - * Sean Finney: Cronjobs now exit silently when the server package - has been removed but not purged (thanks to Vineet Kumar). - Closes: #297404 - * Fixed comments of /etc/mysql/debian-log-rotate.conf (thanks to - Philip Ross). Closes: #297467 - * Made mysqld_safe reacting sane on signals (thanks to Erich Schubert). - Closes: #208364 - - -- Christian Hammers Tue, 1 Mar 2005 19:44:34 +0100 - -mysql-dfsg-4.1 (4.1.10-2) unstable; urgency=low - - * Converted to dpatch. - * debian/ is now maintained via Subversion on svn.debian.org. - - -- Christian Hammers Tue, 1 Mar 2005 02:16:36 +0100 - -mysql-dfsg-4.1 (4.1.10-1) unstable; urgency=low - - * New upstream version. - * Upstream fixed memleak bug. Closes: #205587 - * Added debian/copyright.more for personal reference. - * Lowered default query cache size as suggested by Arjen from MySQL. - * Switched from log to log-bin as suggested by Arjen from MySQL. - * Fixed typo in my.cnf (thanks to Sebastian Feltel). Closes: #295247 - * Replaced --defaults-extra-file by --defaults-file in Debian scripts - as former lets password/host etc be overwriteable by /root/.my.cnf. - Added socket to /etc/mysql/debian.cnf to let it work. (thanks to - SATOH Fumiyasu). Closes: #295170 - - -- Christian Hammers Tue, 15 Feb 2005 23:47:02 +0100 - -mysql-dfsg-4.1 (4.1.9-4) unstable; urgency=low - - * Improved the way mysqld is started and registered with update-rc.d - in cases where the admin modifies the runlevel configuration. - Most notably removed the debconf question whether or not mysql should - start on when booting. Closes: #274264 - * Renamed configuration option old-passwords to the more preferred - naming convention old_passwords. Same for some others (thanks to - Patrice Pawlak). Closes: #293983 - - -- Christian Hammers Tue, 8 Feb 2005 02:21:18 +0100 - -mysql-dfsg-4.1 (4.1.9-3) unstable; urgency=low - - * Renamed ca_ES.po to ca.po to reach a broader audience (thanks to - Christian Perrier). Closes: #293786 - * Expicitly disabled mysqlfs support as it has never been enabled by - configure during the autodetection but fails due to broken upstream - code when users try to build the package theirselves while having - liborbit-dev installed which triggers the mysqlfs autodetection - (thanks to Max Kellermann). Closes: #293431 - * Added dependencies to gawk as one script does not work with original-awk - (thanks to Petr Ferschmann). Closes: #291634 - - -- Christian Hammers Sun, 6 Feb 2005 23:33:11 +0100 - -mysql-dfsg-4.1 (4.1.9-2) unstable; urgency=high - - * SECURITY: - For historical reasons /usr/share/mysql/ was owned and writable by - the user "mysql". This is a security problem as some scripts that - are run by root are in this directory and could be modified and used - by a malicious user who already has mysql privileges to gain full root - rights (thanks to Matt Brubeck). Closes: #293345 - * Changed "skip-networking" to "bind-address 127.0.0.1" which is more - compatible and not less secure but maybe even more, as less people enable - networking for all interfaces (thanks to Arjen Lentz). - * Enabled InnoDB by default as recommended by Arjen Lentz from MySQL. - * Added remarks about hosts.allow to README.Debian (thanks to David - Chappell). Closes: #291300 - * mysql-server-4.1 now provides mysql-server (thanks to Paul van den Berg). - Closes: #287735 - - -- Christian Hammers Wed, 2 Feb 2005 23:31:55 +0100 - -mysql-dfsg-4.1 (4.1.9-1) unstable; urgency=low - - * New upstream version. - * mysql-client-4.1 now provides "mysql-client" so that packages depending - on mysql-client (ca. 40) can now be used with MySQL-4.1, too. - - -- Christian Hammers Sun, 23 Jan 2005 22:52:48 +0100 - -mysql-dfsg-4.1 (4.1.8a-6) unstable; urgency=high - - * SECURITY: - Javier Fernandez-Sanguino Pena from the Debian Security Audit Project - discovered a temporary file vulnerability in the mysqlaccess script of - MySQL that could allow an unprivileged user to let root overwrite - arbitrary files via a symlink attack and could also could unveil the - contents of a temporary file which might contain sensitive information. - (CAN-2005-0004, http://lists.mysql.com/internals/20600) Closes: #291122 - - -- Christian Hammers Tue, 18 Jan 2005 23:11:48 +0100 - -mysql-dfsg-4.1 (4.1.8a-5) unstable; urgency=medium - - * Fixed important upstream bug that causes from_unixtime(0) to return - NULL instead of "1970-01-01 00:00:00" which fails on NOT NULL columns. - Closes: #287792 - * Fixes upstream bug in mysql_list_fields() . Closes: #282486 - * Fixes bug that lead to double rotated logfiles when mysql-server 4.0 - was previously installed (thanks to Olaf van der Spek). Closes: #289851 - * Fixed typo in README.Debian (thanks to Mark Nipper). Closes: #289131 - * Changed max_allowed_packet in my.cnf to 16M as in 4.0.x (thanks to - Olaf van der Spek). Closes: #289840 - * Updated French debconf translation (thanks to Christian Perrier). - Closes: #287955 - - -- Christian Hammers Thu, 13 Jan 2005 01:29:05 +0100 - -mysql-dfsg-4.1 (4.1.8a-4) unstable; urgency=low - - * Broken patch again :-( - - -- Christian Hammers Sun, 9 Jan 2005 23:47:55 +0100 - -mysql-dfsg-4.1 (4.1.8a-3) unstable; urgency=low - - * The mutex patch was a bit too x86 centric. This broke the alpha build. - - -- Christian Hammers Sun, 9 Jan 2005 14:18:49 +0100 - -mysql-dfsg-4.1 (4.1.8a-2) unstable; urgency=medium - - * Some Makefiles that were patched by me got overwritten by the GNU - autotools, probably because I also patched ./configure. Fixed now, - the critical mutex patch is now back in again. Closes: #286961 - * Added patch to make MySQL compile on ARM (thanks to Adam Majer). - Closes: #285071 - - -- Christian Hammers Thu, 6 Jan 2005 09:30:13 +0100 - -mysql-dfsg-4.1 (4.1.8a-1) unstable; urgency=medium - - * Upstream 4.1.8 had some problems in their GNU Autotools files so they - released 4.1.8a. Debian's 4.1.8 was fixed by running autoreconf but this - again overwrote MySQL changes to ltmain.sh which are supposed to fix some - problems on uncommon architectures (maybe the FTBFS on alpha, arm, m68k - and sparc?). - * libmysqlclient_r.so.14 from 4.1.8-3 also missed a link dependency to - libz which lead to unresolved symbols visible with "ldd -r" (thanks - to Laurent Bonnaud). Closes: #287573 - - -- Christian Hammers Wed, 29 Dec 2004 14:26:33 +0100 - -mysql-dfsg-4.1 (4.1.8-3) unstable; urgency=low - - * Fixed checking for error messages by forcing english language - output by adding LC_ALL=C to debian-start (thanks to Rene - Konasz) Closes: #285709 - * Fixed bashisms in Debian scripts. Closes: #286863 - * Updated Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #287003 - * Improved 4.0 to 4.1 upgrade if /var/lib/mysql is a symlink - (thanks to Thomas Lamy). Closes: #286560 - * Added patch for FTBFS problem where no LinuxThreads can be found. - I don't know if this still applies but it should not hurt. - The patch is debian/patches/configure__AMD64-LinuxThreads-vs-NPTL.diff - - -- Christian Hammers Sun, 26 Dec 2004 14:04:20 +0100 - -mysql-dfsg-4.1 (4.1.8-2) unstable; urgency=low - - * If /var/lib/mysql is a symlink then it is kept as such. - * Added the old-passwords option to the default my.cnf to stay - compatible to clients that are still compiled to libmysqlclient10 - and libmysqlclient12 for licence reasons. - * Adjusted tetex build-deps to ease backporting (thanks to Norbert - Tretkowski from backports.org). - - -- Christian Hammers Tue, 21 Dec 2004 01:00:27 +0100 - -mysql-dfsg-4.1 (4.1.8-1) unstable; urgency=medium - - * New upstream version. Closes: #286175 - * Added conflict to libmysqlclient-dev (thanks to Adam Majer). - Closes: #286538 - * Added debconf-updatepo to debian/rules:clean. - * Updated Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #285107 - * Updated French Debconf translation (thanks to Christian Perrier). - Closes: #285977 - * Renamed cz.po to cs.po (thanks to Miroslav Kure). Closes: #285438 - * Aplied patch for changed server notice to debian-start (thanks to - Adam Majer). Closes: #286035 - * Changed nice value in default my.cnf as nohup changed its behaviour - (thanks to Dariush Pietrzak). Closes: #285446 - * Increased verbosity of preinst script in cases where it cannot stop - a running server (thanks to Jan Minar). Closes: #285982 - * Splitted the code parts of /etc/mysql/debian-start to - /usr/share/mysql/debian-start.inc.sh (thanks to Jan Minar). - Closes: #285988 - - -- Christian Hammers Mon, 20 Dec 2004 00:33:21 +0100 - -mysql-dfsg-4.1 (4.1.7-4) unstable; urgency=medium - - * Removed OpenSSL support. - After a short discussion with MySQL, I decided to drop OpenSSL support as - 1. MySQL started shipping their binaries without it, too and do not - seem to support it in favour of using a different library somewhen. - 2. MySQL did not adjust their licence to grant permission to link - against OpenSSL. - 3. Even if they did, third parties who use libmysqlclient.so often - do not realise licencing problems or even do not want OpenSSL. - (thanks to Jordi Mallach and the responders to MySQL bug #6924) - Closes: #283786 - * debian/control: Improved depends and conflicts to mysql-4.0. - - -- Christian Hammers Thu, 2 Dec 2004 22:02:28 +0100 - -mysql-dfsg-4.1 (4.1.7-3) unstable; urgency=low - - * Raised version to make it higher as the one in experimental. - - -- Christian Hammers Wed, 1 Dec 2004 21:09:20 +0100 - -mysql-dfsg-4.1 (4.1.7-2) unstable; urgency=low - - * Patched scripts/mysql_install_db so that it no longer creates a - passwordless test database during installation (thanks to Patrick - Schnorbus). Closes: #281158 - * Added Czech debconf translation (thanks to Miroslav Kure). - Closes: #283222 - - -- Christian Hammers Wed, 1 Dec 2004 01:29:31 +0100 - -mysql-dfsg-4.1 (4.1.7-1) unstable; urgency=low - - * New upstream branch! - * Adjusted debian/control to make this package suitable to get parallel - to version 4.0.x into unstable and sarge. The package names are - different so that "mysql-server" still defaults to the rock-stable - 4.0 instead to this announced-to-be-stable 4.1. - * Added --with-mutex=i86/gcc-assemler to the Berkeley-DB configure - to prevent the use of NPLT threads when compiling under kernel 2.6 - because the binaries are else not runable on kernel 2.4 hosts. - Closes: #278638, #274598 - - -- Christian Hammers Sun, 31 Oct 2004 20:15:03 +0100 - -mysql-dfsg (4.1.6-1) experimental; urgency=low - - * New upstream version. - * Fixed symlinks in libmysqlclient-dev package. Closes: #277028 - * This time I did not update the libtool files as they were pretty - up to date and I want to have a shorter diff file. - - -- Christian Hammers Wed, 20 Oct 2004 00:07:58 +0200 - -mysql-dfsg (4.1.5-3) experimental; urgency=low - - * debian/postinst: mysql_install_db changed parameter from --IN-RPM - to --rpm which caused problems during installs. Closes: #276320 - - -- Christian Hammers Sat, 16 Oct 2004 20:36:46 +0200 - -mysql-dfsg (4.1.5-2) experimental; urgency=low - - * Activated support for ndb clustering (thanks to Kevin M. Rosenberg). - Closes: #275109 - - -- Christian Hammers Wed, 6 Oct 2004 01:58:00 +0200 - -mysql-dfsg (4.1.5-1) experimental; urgency=low - - * WARNING: - The upstream branch 4.1 is still considered BETA. - The Debian packages for 4.1 were done without big testing. If you miss - a new functionality or binary, contact me and I check add the relevant - configure option or include the program. - * New MAJOR upstream version. - Thanks to the great demand here's now the first MySQL 4.1 experimental - release. FEEDBACK IS WELCOME. - * 4.0->4.1 notes: - - debian/patches/alpha.diff could not be applied, I fix that later - - debian/patches/scripts__mysql_install_db.sh.diff was obsolete - - debian/patches/scripts__Makefile.in was neccessary due to a dependency - to the removed non-free Docs/ directory. Upstream has been contacted. - - Build-Deps: += automake1.7 - - debian/rules: embedded servers examples did not compile, removed - - -- Christian Hammers Sun, 26 Sep 2004 19:46:47 +0200 - -mysql-dfsg (4.0.21-3) unstable; urgency=low - - * Upstream tried to fix a security bug in mysqlhotcopy and broke it :-) - Applied a patch (see debian/patches) from Martin Pitt. Closes: #271632 - * Between 4.0.20 and 4.0.21 the Debian specific changes in - /usr/bin/mysqld_safe that piped the error log to syslog got lost - and are now back again. - * Fixed capitalization in debconf headings. - * Changed wording of the initscript status message to make heartbeat - happier. Closes: #271591 - - -- Christian Hammers Fri, 17 Sep 2004 18:42:25 +0200 - -mysql-dfsg (4.0.21-2) unstable; urgency=medium - - * The dependencies between mysql-client and libmysqlclient12 were - too loose, when upgrading only the client this can lead to non working - binaries due to relocation errors (thanks to Dominic Cleal). - Closes: #271803 - * Fixed typo in mysqldump.1 manpage (thanks to Nicolas Francois). - Closes: #271334 - - -- Christian Hammers Wed, 15 Sep 2004 15:38:11 +0200 - -mysql-dfsg (4.0.21-1) unstable; urgency=high - - * SECURITY: - This upstream version fixes some security problems that might at least - allow a DoS attack on the server. - * Fixed an old bug in concurrent accesses to `MERGE' tables (even - one `MERGE' table and `MyISAM' tables), that could've resulted in - a crash or hang of the server. (Bug #2408) - * Fixed bug in privilege checking where, under some conditions, one - was able to grant privileges on the database, he has no privileges - on. (Bug #3933) - * Fixed crash in `MATCH ... AGAINST()' on a phrase search operator - with a missing closing double quote. (Bug #3870) - * Fixed potential memory overrun in `mysql_real_connect()' (which - required a compromised DNS server and certain operating systems). - (Bug #4017) - * New upstream version. - * Fixes bug that made x="foo" in WHERE sometimes the same as x="foo ". - Closes: #211618 - * Updated Japanese Debconf translation (thanks to Hideki Yamane). - Closes: #271097 - - -- Christian Hammers Sat, 11 Sep 2004 23:15:44 +0200 - -mysql-dfsg (4.0.20-14) unstable; urgency=low - - * Dave Rolsky spottet that -DBIG_JOINS was not properly enabled. - It allowes joining 64 instead of an 32 tables to join. - - -- Christian Hammers Thu, 9 Sep 2004 20:24:02 +0200 - -mysql-dfsg (4.0.20-13) unstable; urgency=medium - - * Fixed a bug in the initscript which caused the check for not properly - closed i.e. corrupt tables that is executed when the server starts - not to run in background as supposed. - Although the check does not repair anything on servers with several - thousand tables the script was reported to take some minutes which - is quite annoying. (Thanks to Jakob Goldbach). Closes: #270800 - - -- Christian Hammers Thu, 9 Sep 2004 17:11:05 +0200 - -mysql-dfsg (4.0.20-12) unstable; urgency=medium - - * Filter messages regarding table handles that do not support CHECK TABLE - in the script that checks for corrupted tables on every start which lead - to unnecessary mails (thanks to David Everly). Closes: #269811 - * Added a note to the corrupt-table-check mail which notes that a - false-positive is reported in the case that immediately after starting - the server a client starts using a table (thanks to Uwe Kappe). - Closes: #269985 - * Added "quote-names" as default to the [mysqldump] section in - /etc/mysql/my.cnf as too many users stumble over dump files that - could not be read in again due to the valid use of reserved words - as table names. This has also be done by upstream in 4.1.1 and has - no known drawbacks. Closes: #269865 - * Binary logs can now be rotated as well. Defaults to off, though, for - compatibilty reasons (thanks to Mark Ferlatte). Closes: #94230, #269110 - * The mysql user "debian-sys-maint" now gets all possible rights which - makes binary logging possible and helps other package maintainer who - wants to use it to create package specific databases and users. - * Added example how to change daemon nice level via /etc/mysql/my.cnf - * Updated French debconf translations (thanks to Christian Perrier). - Closes: #265811 - * Renamed options in the default config file that still had old names - (thanks to Yves Kreis). Closes: #266445 - * Fixed spelling in debconf note. - * Added -l and -L to dh_shlibdeps. - - -- Christian Hammers Fri, 3 Sep 2004 20:10:46 +0200 - -mysql-dfsg (4.0.20-11) unstable; urgency=high - - * SECURITY - This version fixes a security flaw in mysqlhotcopy which created - temporary files in /tmp which had predictable filenames and such - could be used for a tempfile run attack. - The issue has been recorded as CAN-2004-0457. - - -- Christian Hammers Sat, 14 Aug 2004 18:27:19 +0200 - -mysql-dfsg (4.0.20-10) unstable; urgency=low - - * MySQL finally updated their copyright page and installed v1.5 of - the "Free/Libre and Open Source Software License (FLOSS) - Exception" - which will hopefully end the license hell they created by putting the - client libraries under GPL instead of LGPL which conflicts with PHP and - other software that used to link against MySQL. - The license text is not yet in any release MySQL version but visible - on their web site and copied into the debian/copyright file. - Special thanks to Zak Greant and the debian-legal list - for helping to solve this release critical problem. - Closes: #242449 - * Updated Brazil debconf translation (thanks to Andre Luis Lopes). - Closes: #264233 - * Updated Japanese debconf translation (thanks to Hideki Yamane). - Closes: #264620 - * Fixed minor typo in debconf description (thanks to TROJETTE Mohammed - Adnene). Closes: #264840 - * Improved init and preinst script which now detects stalled servers which - do no longer communicate but are present in the process list (thanks to - Henrik Johansson). Closes: #263215 - - -- Christian Hammers Mon, 9 Aug 2004 19:44:28 +0200 - -mysql-dfsg (4.0.20-9) unstable; urgency=medium - - * Partly reverted the last patch which gave the mysql-user - "debian-sys-maint" more rights as there are old versions of MySQL which - have fewer privlige columns. Now only those are set (thanks to Alan Tam). - Closes: #263111 - - -- Christian Hammers Tue, 3 Aug 2004 13:03:02 +0200 - -mysql-dfsg (4.0.20-8) unstable; urgency=low - - * The mysqlcheck that is started from the initscript will now be - backgrounded because it might else prevent the boot process to continue. - It also now notifies root by mail and syslog if a table is corrupt. - * The "debian-sys-maint" MySQL user now has almost full rights so that other - packages might use this account to create databases and user (thanks to - Andreas Barth). Closes: #262541 - * Added paranoid rules for logcheck. - - -- Christian Hammers Sun, 1 Aug 2004 21:00:55 +0200 - -mysql-dfsg (4.0.20-8) unstable; urgency=low - - * Upload stalled. Not released. - - -- Christian Hammers Sun, 1 Aug 2004 20:27:55 +0200 - -mysql-dfsg (4.0.20-7) unstable; urgency=medium - - * Solved the upstream bug that error messages of the server are written - in a file that is then rotated away leaving mysqld logging effectively - to /dev/null. It now logs to a /usr/bin/logger process which puts the - messages into the syslog. - Modified files: /etc/init.d/mysql, /usr/bin/mysqld_safe and the - logchecker files. Closes: #254070 - * The initscript does no longer call mysqlcheck directly but via - /etc/mysql/debian-start which is a user customizable config script. - * Splitted the debconf "install and update notes" and only show them - when it is appropriate (thanks to Steve Langasek). Closes: #240515 - * Added NEWS.Debian. - * Added hint to -DBIG_ROWS, which is currently not used, to README.Debian. - * Corrected typo in myisampack manpage (thanks to Marc Lehmann). - Closes: #207090 - * Added Catalan debconf translation (thanks to Aleix Badia i Bosch). - Closes: #236651 - - -- Christian Hammers Wed, 28 Jul 2004 01:41:51 +0200 - -mysql-dfsg (4.0.20-6) unstable; urgency=low - - * The build arch detected by configure was "pc-linux-gnu (i686)" - instead of "pc-linux-gnu (i386)". Was no problem AFAIK but - Adam Majer asked me to explicitly change it to i386. Closes: #261382 - * Removed some unused shell scripts from /usr/share/mysql. - * Added lintian overrides. - * Removed rpath by using chrpath. - - -- Christian Hammers Mon, 26 Jul 2004 00:17:12 +0200 - -mysql-dfsg (4.0.20-5) unstable; urgency=medium - - * The mysqlcheck in the init script is only called when the server - is really alive. Also, the mysql-user 'debian-sys-maint' now has - global select rights (thanks to Nathan Poznick). Closes: #261130 - * Moved the debconf question whether to remove the databases or not - from mysql-server.config to mysql-server.postrm so that it shows - up on purge time and not months earlier (thanks to Wouter Verhelst). - Closes: #251838 - - -- Christian Hammers Fri, 23 Jul 2004 22:41:13 +0200 - -mysql-dfsg (4.0.20-4) unstable; urgency=low - - * Added a "mysqlcheck -A --fast" to the 'start' section of the - init script to help admins detect corrupt tables after a server crash. - Currently it exists with an error message but leaves the server - running. Feedback appreciated! - * Made postinst script more robust by calling db_stop earlier and - so prevent pipe-deadlocks. - * Fixed minor typos in initscript (thanks to "C.Y.M."). Closes: 259518 - * Added the undocumented "-DBIG_JOINS" that MySQL apparently uses in - their MAX binaries. It enables 62 instead of 30 tables in a "join". - (thanks to Dave Rolsky). Closes: #260843 - * Added a "df --portability /var/lib/mysql/." check to the preinst - script as users experienced hard to kill hanging mysqlds in such - a situation (thanks to Vaidas Pilkauskas). Closes: #260306 - - -- Christian Hammers Fri, 23 Jul 2004 00:51:32 +0200 - -mysql-dfsg (4.0.20-3) unstable; urgency=low - - * Improved tolerance if the init script has been deleted (thanks to - Leonid Shulov for spotting the problem). - * Minor wording changes to README.Debian generalizing /root/ by $HOME - (thanks to Santiago Vila). Closes: #257725 - * Added Japanese debconf translation (thanks to Hideki Yamane). - Closes: #256485 - * Fixed commend in my.cnf regarding logfile directory (thanks to Jayen - Ashar). Closes: #253434 - * Correted "ease to" by "ease of" in package description (thanks to - Johannes Berg). Closes: #253510 - - -- Christian Hammers Fri, 9 Jul 2004 00:57:42 +0200 - -mysql-dfsg (4.0.20-2) unstable; urgency=low - - * Removed RPM .spec file from the included documentation as it is pretty - useless (thanks to Loic Minier). - * Added turkish debconf translation (thanks to Recai Oktas). Closes: #252802 - - -- Christian Hammers Sun, 6 Jun 2004 14:48:26 +0200 - -mysql-dfsg (4.0.20-1) unstable; urgency=low - - * New upstream version. - - -- Christian Hammers Mon, 31 May 2004 23:36:39 +0200 - -mysql-dfsg (4.0.18-8) unstable; urgency=low - - * Updated french translation (thanks to Christian Perrier). Closes: #246789 - - -- Christian Hammers Tue, 4 May 2004 23:26:54 +0200 - -mysql-dfsg (4.0.18-7) unstable; urgency=low - - * Added CVE ids for the recent security fixes. - 4.0.18-4 is CAN-2004-0381 (mysqlbug) and - 4.0.18-6 is CAN-2004-0388 (mysql_multi) - - -- Christian Hammers Mon, 19 Apr 2004 18:32:03 +0200 - -mysql-dfsg (4.0.18-6) unstable; urgency=medium - - * SECURITY: - Fixed minor tempfile-run security problem in mysqld_multi. - Unprivileged users could create symlinks to files which were then - unknowingly overwritten by run when this script gets executed. - Upstream informed. Thanks to Martin Schulze for finding this. - - -- Christian Hammers Wed, 7 Apr 2004 01:28:22 +0200 - -mysql-dfsg (4.0.18-5) unstable; urgency=low - - * Little improvements in debian scripts for last upload. - * Added check to logrotate script for the case that a mysql - server is running but not be accessible with the username and - password from /etc/mysql/debian.conf (thanks to Jeffrey W. Baker). - Closes: 239421 - - -- Christian Hammers Sun, 4 Apr 2004 15:27:40 +0200 - -mysql-dfsg (4.0.18-4) unstable; urgency=medium - - * SECURITY: - Aplied fix for unprobable tempfile-symlink security problem in - mysqlbug reported by Shaun Colley on bugtraq on 2004-03-24. - * Updated french debconf translation (thanks to Christian Perrier). - Closes: #236878 - * Updated portugesian debconf translation (thanks to Nuno Senica). - Closes: #239168 - * Updated german debconf translation (thanks to Alwin Meschede). - Closes: #241749 - * Improved debconf template regarding fix_privileges_tables (thanks - to Matt Zimmermann for suggestions). Closes: #219400 - * Improved README.Debian regarding to password settings (thanks to - Yann Dirson). Closes: #241328 - - -- Christian Hammers Sat, 3 Apr 2004 19:52:15 +0200 - -mysql-dfsg (4.0.18-3) unstable; urgency=medium - - * Added Build-Depend to po-debconf to let it build everywhere. - - -- Christian Hammers Wed, 31 Mar 2004 23:43:33 +0200 - -mysql-dfsg (4.0.18-2) unstable; urgency=low - - * Added a "2>/dev/null" to a "which" command as there are two - "which" versions in Debian of which one needs it. Closes: #235363 - - -- Christian Hammers Tue, 2 Mar 2004 23:31:28 +0100 - -mysql-dfsg (4.0.18-1) unstable; urgency=low - - * New upstream version. - * Should now compile and run on ia64 (thanks to Thorsten Werner and - David Mosberger-Tang). Closes: #226863 #228834 - * Converted init scripts to invoce-rc.d (thanks to Erich Schubert). - Closes: 232118 - * Secondlast upload changed logfile location. Closes: #182655 - * Updated Brasilian translation (thanks to Andre Luis Lopes). Closes: - #219847 - - -- Christian Hammers Tue, 17 Feb 2004 23:44:58 +0100 - -mysql-dfsg (4.0.17-2) unstable; urgency=low - - * Improved manpage for mysqldumpslow.1 (thanks to Anthony DeRobertis). - Closes: #231039 - * Improved stopping of crashed daemons in init script (thanks to - Matthias Urlichs). Closes: #230327 - - -- Christian Hammers Mon, 9 Feb 2004 21:54:29 +0100 - -mysql-dfsg (4.0.17-1) unstable; urgency=low - - * Made logging into /var/log/mysql/ the default. Closes: #225206 - - * New upstream version. Closes: #225028 - * Turned on a 25MB query cache by default (thanks to Cyril Bouthors). - Closes: #226789 - * Updated russian translation (thanks to Ilgiz Kalmetev). Closes: #219263 - * Upstream fixes the problem that AND was not commutative (thanks for - Iain D Broadfoot for mentioning). Closes: #227927 - * Fixed minor typo in my.cnf comments (thanks to James Renken). - Closes: #221496 - * Better documents regex. Closes: #214952 - * Fixed minor germanism in debconf template (thanks to Marc Haber). - Closes: #224148 - * Added explaining comment to my.cnf regarding quoted passwords - (Thanks to Patrick von der Hagen). Closes: #224906 - * Changed "find -exec" to "find -print0 | xargs -0" in preinst to - speed it up. Thanks to Cyril Bouthors. Closes: #220229 - - -- Christian Hammers Sun, 18 Jan 2004 16:16:25 +0100 - -mysql-dfsg (4.0.16-2) unstable; urgency=low - - * Tried to repair undefined weak symbols by adding a little Makefile - patch. Closes: #215973 - - -- Christian Hammers Mon, 27 Oct 2003 22:52:10 +0100 - -mysql-dfsg (4.0.16-1) unstable; urgency=low - - * New upstream release. - (Mostly little memory problems and other bugfixes it seems) - * Replaced "." by ":" in chown calls to comply with the env setting - "_POSIX2_VERSION=2000112" (thanks to Robert Luberda). Closes: #217399 - * Adjusted syntax in my.cnf to 4.x standard (thanks to Guillaume Plessis). - Closes: #217273 - * Improved README.Debian password instructions (thanks to Levi Waldron). - Closes: #215046 - * Improved NIS warning debconf-template (thanks to Jeff Breidenbach). - Closes: #215791 - * Explicitly added libssl-dev to the libmysqlclient-dev package as it - is needed for mysql_config and the libmysqlclient package only depends - on libssl which has no unnumbered .so version (thanks to Simon Peter - and Davor Ocelic). Closes: #214436, #216162 - * Added "-lwrap" to "mysql_config --libmysqld-libs" and filed it as - upstream bug #1650 (thanks to Noah Levitt). Closes: #214636 - - -- Christian Hammers Sat, 25 Oct 2003 01:09:27 +0200 - -mysql-dfsg (4.0.15a-1) unstable; urgency=low - - * Same package as 4.0.15-2 but I could not convince the Debian - installer to move the packages out of incoming. - - -- Christian Hammers Tue, 7 Oct 2003 15:10:26 +0200 - -mysql-dfsg (4.0.15-2) unstable; urgency=low - - * Updated package description (thanks to Adrian Bunk). Closes: #210988 - * Fixed small typos in manpages (thanks to Nicolas Francois). - Closes: #211983 - * More updates to package description (thanks to Matthias Lutz/ddtp). - Closes: #213456 - * Updated standards to 3.6.1. - * Closes "new 4.0.15 available" bug. Closes: #213349 - * Updated README.Debian with notes regarding the MySQL manual section - "2.4 Post-installation Setup and Testing" (thanks to Daniel B.). - Closes: #210841 - - -- Christian Hammers Fri, 3 Oct 2003 15:59:39 +0200 - -mysql-dfsg (4.0.15-1) unstable; urgency=high - - * SECURITY: - Users who are able to use the "ALTER TABLE" command on the "mysql" - database may be able to exploit this vulnerability to gain a shell with - the privileges of the mysql server (usually running as the 'mysql' user). - Closes: #210403 - * Fixes small description typos (thanks to Oscar Jarkvik). - * Updated Brazilian Portuguese debconf translation. (thanks to Andre Luis - Lopes). Closes: 208030 - * Replaced depricated '.' by ':' in chown (thanks to Matt Zimmerman). - * Fixed manpage typo (thanks to Marc Lehmann). Closes: #207090 - - -- Christian Hammers Fri, 3 Oct 2003 15:59:35 +0200 - -mysql-dfsg (4.0.14-1) unstable; urgency=low - - * New upstream version. - - -- Christian Hammers Sun, 24 Aug 2003 16:40:36 +0200 - -mysql-dfsg (4.0.13-3) unstable; urgency=low - - * Now start mysqld as default unless you choose not when configurig - with debconf priority low. So packages depending on the server when - installing can access it. Thanks Matt Zimmermann (Closes: #200277) - * Made mysql-server de-installable if the config and database files were - removed by hand before. Thanks to Ard van Breemen (Closes: #200304) - - -- Christian Hammers Tue, 8 Jul 2003 22:30:40 +0200 - -mysql-dfsg (4.0.13-2) unstable; urgency=low - - * Added "nice" option for mysqld_safe to give mysqld a different priority. - Submitted to upstream as MySQL Bug #627. Closes: #192087 - * Fixed possible unbound variable in init script. Closes: #194621 - * Fixed french debconf translation (thx Christian Perrier) Closes: #194739 - * Get rid of automake1.5 (for Eric Dorland). - - -- Christian Hammers Wed, 11 Jun 2003 18:58:32 +0200 - -mysql-dfsg (4.0.13-1) unstable; urgency=medium - - * New upstream version. - !!! Fixes a very bad natural join bug which justifies the urgency=medium. - !!! http://bugs.mysql.com/bug.php?id=291 - * Fixed mysql_fix_privileges manpage (Frederic Briere) Closes: #191776 - * preinst: "which" is more chatty normal executable than as builtin. - (Thanks to David B Harris). Closes: #188659 - - -- Christian Hammers Tue, 6 May 2003 22:03:45 +0200 - -mysql-dfsg (4.0.12-3) unstable; urgency=medium - - * Reincluded new way of creating my debian-sys-maint user from - an old release from experimental. Now works again with old - and new privilege table format. (Thanks to Vincent Danjean - for spotting the problem) Closes: #188201 - * Reincluded hurd build dependency fix from 3.23 branch. - (Thanks to Robert Millan). Closes: #185929 - * Fixed soname in libmysqlclient-dev. Closes: #188160 - * Remove /var/log/mysql/ when purging the package. Closes: #188064 - * Removed /usr/share/doc/mysql/ from mysql-server. Closes: #188066 - * Let group "adm" be able to read logfiles. Closes: #188067 - * Do not call usermod on every upgrade. Closes: #188248 - (Thanks to Philippe Troin for the last three) - * Fixed mysql-server.preinst so that it works on shells where - which is a builtin, too. (Thanks to Erich Schubert) Closes: #181525 - - -- Christian Hammers Fri, 11 Apr 2003 11:32:45 +0200 - -mysql-dfsg (4.0.12-2) unstable; urgency=low - - * - * NEW MAJOR UPSTREAM RELEASE: - * - MySQL 4 has finally been declared as 'stable'. Hurray! Read changelogs. - Thanks to all testers, esp. Jose Luis Tallon, of the versions - that were in the "experimental" section before. - * Modified postinst script to run mysql_fix_privileges on every update. - IMPORTANT: Please report if this breaks anything, it is not supposed to. - * Wrote a SSL-MINI-HOWTO.txt! - * Added zlib1g-dev to libmysqlclient12-dev. Closes: 186656 - * Changed section of libmysqlclient12-dev to libdevel. - * Added even more selfwritten manpages. - * Fixed typos. - - -- Christian Hammers Sun, 6 Apr 2003 13:47:32 +0200 - -mysql-dfsg (4.0.10.gamma-1) experimental; urgency=low - - * New upstream version. - * They merged some of my patches from debian/patches. Whoa! - * This release should fix the error-logfile problem where mysqld - keeps the error.log open while logrotate removes it. - - -- Christian Hammers Wed, 12 Feb 2003 22:39:48 +0100 - -mysql-dfsg (4.0.9.gamma-1) experimental; urgency=low - - * New upstream version. - * Updated the GNU autoconf files to make building on MIPS work. - See bug #176829. - - -- Christian Hammers Wed, 29 Jan 2003 22:07:44 +0100 - -mysql-dfsg (4.0.8.gamma-1) experimental; urgency=low - - * New upstream release. - * Improved logging of init script. Closes: #174790 - * We have now libmysqlclient.so.12 instead of .11. - - -- Christian Hammers Thu, 9 Jan 2003 20:14:11 +0100 - -mysql-dfsg (4.0.7.gamma-1) experimental; urgency=high - - * SECURITY: This version fixes an upstream security release that is only - present in the 4.x branch which is currently only in the - experimental distribution and therefore will not get a DSA. - * New upstream release. - - -- Christian Hammers Sat, 28 Dec 2002 15:51:39 +0100 - -mysql-dfsg (4.0.6.gamma-2) experimental; urgency=low - - * Added --system to addgroup. Closes: #173866 - - -- Christian Hammers Sat, 21 Dec 2002 15:28:26 +0100 - -mysql-dfsg (4.0.6.gamma-1) experimental; urgency=low - - * New upstream version. Now Gamma! - * There are no longer changes to the .orig.tar.gz neccessary to make diff - happy. docs/ has still to be deleted, although, as it is non-free. - * Incorporated patches from unstable. - * Added mysqlmanager and a couple of other new scripts. - * Enabled libmysqld embedded server library. - * Enabled SSL and Virtual-IO support. - (CORBA based MySQL-FS seems to be not existing..) - - -- Christian Hammers Fri, 20 Dec 2002 22:30:51 +0100 - -mysql-dfsg (4.0.5a.beta-3) experimental; urgency=low - - * Modified postinst to work with old and new mysql.user table format - and fixed spelling typo in postinst. Thanks to Roger Aich. - * Updated config.{guess,sub} to make the mipsel porters happy. - Thanks to Ryan Murray. Closes: #173553 - - -- Christian Hammers Wed, 18 Dec 2002 15:56:34 +0100 - -mysql-dfsg (4.0.5a.beta-2) experimental; urgency=low - - * Upstream removed option "--skip-gemini". So did I. Closes: 173142 - - -- Christian Hammers Tue, 17 Dec 2002 10:35:49 +0100 - -mysql-dfsg (4.0.5a.beta-1) experimental; urgency=low - - * First 4.x experimental package due to continuous user requests :-) - Please test and report! - * upstream: safe_mysqld has been renamed to mysqld_safe - * upstream: new library soname version libmysqlclient.so.11 - * Renamed libmysqlclientXX-dev to libmysqlclient-dev as I don't plan to - support more than one development environment and this makes the - dependencies easier. - * FIXME: Skipped parts of the debian/patches/alpha patch as the global.h - is not existing. - * FIXME: How to get rid this? Old ltconfig patch already applied. - "lintian: binary-or-shlib-defines-rpath ./usr/bin/mysql /usr/lib/mysql" - - -- Christian Hammers Sun, 1 Dec 2002 18:32:32 +0100 - -mysql-dfsg (3.23.53-4) unstable; urgency=medium - - * Fixed errno.h problem. Closes: #168533, #168535 - - -- Christian Hammers Sun, 10 Nov 2002 18:32:08 +0100 - -mysql-dfsg (3.23.53-3) unstable; urgency=medium - - * Changed automake build-dep to unversioned automake1.4. Closes: #166391 - * Fixed description. Closes: #167270 - (Thanks to Soren Boll Overgaard) - - -- Christian Hammers Tue, 5 Nov 2002 01:25:01 +0100 - -mysql-dfsg (3.23.53-2) unstable; urgency=low - - * Reverted user creation in init scripts. Closes: #166432 - (Thanks to Birzan George Cristian) - - -- Christian Hammers Thu, 31 Oct 2002 15:36:25 +0100 - -mysql-dfsg (3.23.53-1) unstable; urgency=low - - * New upstream release. - - -- Christian Hammers Thu, 24 Oct 2002 23:04:16 +0200 - -mysql-dfsg (3.23.52-3) unstable; urgency=low - - * Substituted the first-install 'debian-sys-maint' user creation by - something ANSI SQL compliant. Closes: #163497 - (Thanks to Karl Hammar) - * Tightend dependency to debhelper (>= 4.0.12) to be sure that - debconf-utils gets installed, too, as I use dh_installdebconf. - * Fixed upstream manpage bug in mysqldump.1. Closes: #159779 - (Thanks to Colin Watson) - * Added comment about MIN_WORD_LEN to mysql-server.README.Debian - (Thanks to Philipp Dreimann) - * Added a dependency for zlib1g-dev to libmysqlclient10-dev. - (Thanks to Jordi Mallach) - - -- Christian Hammers Sun, 15 Sep 2002 17:14:44 +0200 - -mysql-dfsg (3.23.52-2) unstable; urgency=low - - * Fixed typo in preinst scripts. - * Removed bashism in init script. - * Fixed ambiguous debconf example. Closes: #158884 - - -- Christian Hammers Fri, 30 Aug 2002 00:51:29 +0200 - -mysql-dfsg (3.23.52-1) unstable; urgency=low - - * New upstream version. Closes: #157731 - * Clearified the meaning of the debian-sys-maint special user in the - README.Debian file. Closes: #153702 - * Wrote some words regarding the skip-networking in README.Debian. - Closes: #157038 - * Added dependency to passwd. - * Fixes typo and unnecessarily complication in is_mysql_alive(). - * Added check for /etc/mysql/my.cnf in init script. - - -- Christian Hammers Tue, 27 Aug 2002 01:53:32 +0200 - -mysql-dfsg (3.23.51-4) unstable; urgency=low - - * Added a compressed "nm mysqld" output to allow people to trace - core dumps with /usr/bin/resolve_stack_dump as suggested in the - INSTALL-SOURCE file. Thanks to atudor@labs.agilent.com for the hint. - - -- Christian Hammers Wed, 24 Jul 2002 20:44:55 +0200 - -mysql-dfsg (3.23.51-3) unstable; urgency=low - - * Corrected copyright file: the MySQL client library is licenced under - the LGPL-2 not the GPL. From version 4.x it actually will be GPL this - is why parts of http://www.mysql.com/ already say so. Closes: #153591 - * Corrected german translation. - Thanks to Roland Rosenfeld . Closes: #151903 - - -- Christian Hammers Thu, 11 Jul 2002 20:32:28 +0200 - -mysql-dfsg (3.23.51-2) unstable; urgency=low - - * Improved NIS tolerance in preinst script. - - -- Christian Hammers Sun, 7 Jul 2002 04:43:28 +0200 - -mysql-dfsg (3.23.51-1) unstable; urgency=medium - - * New upstream version. - * I applied a patch that fixes a binary imcompatibility in - the shared libary libmysqlclient.so.10 between 3.23.50 and - some versions earlier. Upstream has been contacted and asked - for clarification. Closes: #149952 - * Added support for NIS i.e. it shows a warning and fails if the - needed 'mysql' user does not exists but works if it does. - Closes: #143282, #147869 - * Substituted $0 in init scripts by something really weird so that - "./S20mysql restart" works now, too. (BTW: S20? install file-rc!!!) - Closes: #148658 - * Now postinst works even if /etc/init.d/mysql is removed. Closes: #151021 - * Decided to leave "set +x" in postinst but wrote comment. Closes: #151022 - - -- Christian Hammers Sun, 7 Jul 2002 04:43:25 +0200 - -mysql-dfsg (3.23.50-1) unstable; urgency=medium - - * New upstream version. - Fixes a very annoying and important bug that lets all mysql programs - including perl scripts etc. segfault when using the read_default_group() - function. 3.23.50 is currently a pre-release and expected to be released - next week. I plan to propose it for woody as soon as its stability has - been proven. The following bug reports are all regarding this issue. - Closes: #144960, #145322, #136798, #138143, - - -- Christian Hammers Sat, 18 May 2002 21:14:01 +0200 - -mysql-dfsg (3.23.49x-1) unstable; urgency=low - - * I had to split the package to seperate the manual as it is not GPL - like the rest of the software and docs but under a license that - e.g. forbids selling printed versions. - . - The upstream authors were contacted a while ago but did not like to - change the situation. - . - The names of the resulting packages have not changed as the manual - already was in a seperate mysql-doc package due to it's size. - The source packages are now splitted from one "mysql" to - "mysql-dfsg" in main and "mysql-nonfree" in non-free. - * No code change! - The "x" at the end of the version number ist just to be able to - upload a new source package. ("a" was already taken by upstream - for their binary upload correction) - - -- Christian Hammers Wed, 8 May 2002 02:01:41 +0200 - -mysql (3.23.49-8) unstable; urgency=low - - * Substituted $0 in init script to let e.g. "/etc# ./init.d/mysql restart" - works, too. Closes: #141555 - - -- Christian Hammers Sun, 7 Apr 2002 15:00:44 +0200 - -mysql (3.23.49-7) unstable; urgency=low - - * The Makefiles are totally broken for the --enable-local-infile - option. I now patched libmysql/libmysql.c#mysql_init() manually. - Closes: #138347 - - -- Christian Hammers Fri, 29 Mar 2002 23:55:15 +0100 - -mysql (3.23.49-6) unstable; urgency=low - - * Moved mysqlcheck from server to client package. Closes: #139799 - * Added manpage for mysqlhotcopy. Regarding: #87097 - * Added 'sharedscripts' directive to the logrotate script. - * Replaced grep by /usr/bin/getent to let the group/user checking work - on NIS/LDAP systems, too. Closes: #115677, #101529 - - -- Christian Hammers Fri, 22 Mar 2002 22:40:51 +0100 - -mysql (3.23.49-5) unstable; urgency=low - - * Added skip-innodb to default my.cnf. - * Enabled --enable-local-infile, it seems to be a new option that - defaults to disable a formerly enabled feaure. Closes: #137115 - - -- Christian Hammers Sat, 16 Mar 2002 00:29:10 +0100 - -mysql (3.23.49-4) unstable; urgency=medium - - * Recompiled against fixed libz. - - * Enabled --enable-local-infile, it seems to be a new option that - defaults to disable a formerly enabled feaure. Closes: #137115 - * Fixed README.compile_on_potato. Closes: #136529 - * Now a ext3 .jounal file in /var/lib/mysql does not prevent the - installation (happens when creating a jounal on an already mounted - partition). Closes: #137146 - - -- Christian Hammers Wed, 13 Mar 2002 13:34:24 +0100 - -mysql (3.23.49-3) unstable; urgency=low - - * Added Russian translation. Closes: #135846 - * Fixed installation of .info documents. Closes: #135030 - - -- Christian Hammers Wed, 27 Feb 2002 23:36:35 +0100 - -mysql (3.23.49-2) unstable; urgency=low - - * Updated french translation and split template files. Closes: #134754 - * Fixed a small debian.cnf related bug in mysql-server.postinst. - - -- Christian Hammers Tue, 19 Feb 2002 23:13:58 +0100 - -mysql (3.23.49-1) unstable; urgency=low - - * New upstream release. - (Mainly InnoDB related fixes) - * Exported a $HOME variable in the scripts so that /root/.my.cnf - is not read anymore. This will avoid problems when admins put - only passwords but no usernames in this file. Closes: #132048 - * New debian-sys-maint password algorithm (now ~96bit :-)) Closes: #133863 - * Recreating debian-sys-main pwd on every install to help people who - accidently delete user or password files... - * Added /var/log/mysql so that user can put the binary logs in there as - mysql cannot write the .001 etc files itself in /var/log which is - owned by root. - - -- Christian Hammers Thu, 14 Feb 2002 22:17:45 +0100 - -mysql (3.23.47-6) unstable; urgency=low - - * Dropped a sentence about the new debian-sys-maint user in the - debconf note and updated the README.Debian. Related: #132048 - * Added more french translation. Closes: #132390 - - -- Christian Hammers Wed, 6 Feb 2002 09:41:29 +0100 - -mysql (3.23.47-5) unstable; urgency=low - - * Fixed grammar error in template. Closes: #132238 - * Really fixed typo in logrotate script. Closes: #131711 - - -- Christian Hammers Tue, 5 Feb 2002 14:20:08 +0100 - -mysql (3.23.47-4) unstable; urgency=medium - - * Fixes typo in postinst that let init script fail. Closes: #131743 - * Fixed bashism bug that failed on ash. Closes: #131697 - * Fixed typo in logrotate script. Closes: #131711 - - -- Christian Hammers Thu, 31 Jan 2002 23:58:46 +0100 - -mysql (3.23.47-3) unstable; urgency=low - - * Added new Debian specific mysql user called 'debian-sys-maint' which - is used for pinging the server status, flushing the logs or shutting - down the server in maintenance scripts. The credentials of this user - are stored in the UID0-only readable file /etc/mysql/debian.cnf. - Closes: #129887, #130326, #99274 - * Fixed unintended server startup at boottime. Closes: #122676, #130105 - * New upstream fixes command line parsing bug: Closes: #128473 - * Fixed manpage headers to let apropos work: Closes: #119122 - * Added "status" options for /etc/init.d/mysql. Closes: #129020 - - -- Christian Hammers Sun, 27 Jan 2002 19:46:11 +0100 - -mysql (3.23.47-2) unstable; urgency=low - - * Enhanced init scripts by using mysqladmin instead of kill $pid. - Thanks to Aaron Brick. - - -- Christian Hammers Fri, 18 Jan 2002 01:42:23 +0100 - -mysql (3.23.47-1) unstable; urgency=low - - * New upstream release. - * Updated brazilian translation of debconf descriptions. Closes: #123332 - - -- Christian Hammers Sun, 6 Jan 2002 21:11:17 +0100 - -mysql (3.23.46-3) unstable; urgency=low - - * Fixed bug in postinst where a script was accidently called with - "bash -c