From 6bd24f07d4357d32a4bc7208654dc8bd0df30b76 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 16 Jul 2013 14:55:47 +0200 Subject: [PATCH] Percona-Server-5.5.32-rel31.0.tar.gz --- btr/btr0cur.c | 43 +- buf/buf0buf.c | 28 +- buf/buf0rea.c | 2 +- dict/dict0crea.c | 54 +- dict/dict0dict.c | 137 +- dict/dict0load.c | 9 +- dyn/dyn0dyn.c | 8 +- fil/fil0fil.c | 128 +- fsp/fsp0fsp.c | 15 +- handler/ha_innodb.cc | 235 ++- handler/i_s.cc | 20 +- ibuf/ibuf0ibuf.c | 28 +- include/buf0buf.h | 7 +- include/db0err.h | 1 + include/dict0dict.h | 22 +- include/dict0mem.h | 12 +- include/dict0types.h | 5 +- include/dyn0dyn.h | 84 +- include/dyn0dyn.ic | 141 +- include/fil0fil.h | 13 +- include/ha_prototypes.h | 33 +- include/log0log.h | 4 +- include/log0online.h | 2 + include/mtr0mtr.h | 10 +- include/os0file.h | 8 +- include/page0zip.ic | 26 +- include/srv0srv.h | 10 + include/ut0dbg.h | 40 - lock/lock0lock.c | 9 +- log/log0log.c | 16 +- log/log0online.c | 204 ++- log/log0recv.c | 34 +- mem/mem0mem.c | 8 +- mtr/mtr0mtr.c | 145 +- os/os0file.c | 67 +- page/page0zip.c | 27 +- percona-suite/grep.inc | 16 - .../have_response_time_distribution.inc | 4 - .../have_response_time_distribution.require | 2 - percona-suite/percona_bug643149.result | 21 - percona-suite/percona_bug643149.test | 49 - ...cona_flush_contiguous_neighbors-master.opt | 1 - .../percona_flush_contiguous_neighbors.result | 21 - .../percona_flush_contiguous_neighbors.test | 36 - .../percona_innodb_buffer_pool_shm-master.opt | 1 - .../percona_innodb_buffer_pool_shm.result | 4 - .../percona_innodb_buffer_pool_shm.test | 2 - .../percona_innodb_deadlock_count.result | 28 - .../percona_innodb_deadlock_count.test | 61 - ...percona_innodb_doublewrite_file-master.opt | 1 - .../percona_innodb_doublewrite_file.result | 4 - .../percona_innodb_doublewrite_file.test | 2 - ...a_innodb_expand_fast_index_creation.result | 64 - ...ona_innodb_expand_fast_index_creation.test | 45 - .../percona_innodb_fake_changes.result | 55 - .../percona_innodb_fake_changes.test | 49 - .../percona_innodb_fake_changes_locks.result | 19 - .../percona_innodb_fake_changes_locks.test | 24 - .../percona_innodb_kill_idle_trx.result | 41 - .../percona_innodb_kill_idle_trx.test | 28 - .../percona_innodb_kill_idle_trx_locks.result | 45 - .../percona_innodb_kill_idle_trx_locks.test | 31 - .../percona_innodb_kill_idle_trx_show.inc | 2 - ...cona_innodb_use_sys_stats_table-master.opt | 1 - .../percona_innodb_use_sys_stats_table.result | 3 - .../percona_innodb_use_sys_stats_table.test | 2 - .../percona_log_connection_error-master.opt | 1 - .../percona_log_connection_error.result | 16 - .../percona_log_connection_error.test | 54 - .../percona_log_warnings_suppress-master.opt | 1 - .../percona_log_warnings_suppress.result | 31 - .../percona_log_warnings_suppress.test | 47 - .../percona_processlist_row_stats.result | 70 - .../percona_processlist_row_stats.test | 79 - .../percona_query_cache_with_comments.inc | 117 -- ...rcona_query_cache_with_comments.inc.backup | 88 -- .../percona_query_cache_with_comments.result | 1058 ------------- .../percona_query_cache_with_comments.test | 5 - ...ercona_query_cache_with_comments_begin.inc | 12 - ...ercona_query_cache_with_comments_clear.inc | 5 - ...ona_query_cache_with_comments_crash.result | 21 - ...rcona_query_cache_with_comments_crash.test | 22 - ...a_query_cache_with_comments_disable.result | 1057 ------------- ...ona_query_cache_with_comments_disable.test | 3 - .../percona_query_cache_with_comments_end.inc | 3 - ...percona_query_cache_with_comments_eval.inc | 7 - ...e_with_comments_prepared_statements.result | 396 ----- ...che_with_comments_prepared_statements.test | 208 --- ...percona_query_cache_with_comments_show.inc | 8 - ...ona_query_response_time-replication.result | 727 --------- ...rcona_query_response_time-replication.test | 28 - .../percona_query_response_time-stored.result | 544 ------- .../percona_query_response_time-stored.test | 36 - .../percona_query_response_time.result | 1307 ----------------- .../percona_query_response_time.test | 20 - .../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.inc | 3 - .../percona_server_variables_debug.result | 382 ----- .../percona_server_variables_debug.test | 2 - .../percona_server_variables_release.result | 377 ----- .../percona_server_variables_release.test | 2 - .../percona_show_slave_status_nolock.result | 69 - .../percona_show_slave_status_nolock.test | 90 -- percona-suite/percona_show_temp_tables.result | 58 - percona-suite/percona_show_temp_tables.test | 65 - ...a_slow_extended-log_slow_filter-master.opt | 1 - ...rcona_slow_extended-log_slow_filter.result | 25 - ...percona_slow_extended-log_slow_filter.test | 32 - ...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 - ..._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 | 1 - ...na_slow_extended-log_slow_verbosity.result | 9 - ...cona_slow_extended-log_slow_verbosity.test | 12 - ...a_slow_extended-long_query_time-master.opt | 1 - ...rcona_slow_extended-long_query_time.result | 24 - ...percona_slow_extended-long_query_time.test | 23 - ...d-microseconds_in_slow_extended-master.opt | 1 - ...ended-microseconds_in_slow_extended.result | 13 - ...xtended-microseconds_in_slow_extended.test | 23 - ...extended-min_examined_row_limit-master.opt | 1 - ...low_extended-min_examined_row_limit.result | 25 - ..._slow_extended-min_examined_row_limit.test | 32 - ...low_extended-slave_innodb_stats-master.opt | 1 - ...slow_extended-slave_innodb_stats-slave.opt | 1 - ...na_slow_extended-slave_innodb_stats.result | 22 - ...cona_slow_extended-slave_innodb_stats.test | 51 - ...-and-use_global_long_query_time-master.opt | 1 - ...s-and-use_global_long_query_time-slave.opt | 1 - ...ents-and-use_global_long_query_time.result | 89 -- ...ements-and-use_global_long_query_time.test | 107 -- ..._slow_extended-slave_statements-master.opt | 1 - ...a_slow_extended-slave_statements-slave.opt | 1 - ...cona_slow_extended-slave_statements.result | 94 -- ...ercona_slow_extended-slave_statements.test | 133 -- ...y_log_microseconds_timestamp-cl-master.opt | 1 - ...query_log_microseconds_timestamp-cl.result | 3 - ...w_query_log_microseconds_timestamp-cl.test | 1 - ...w_query_log_timestamp_always-cl-master.opt | 1 - ...-slow_query_log_timestamp_always-cl.result | 3 - ...ed-slow_query_log_timestamp_always-cl.test | 1 - ...low_extended-use_global_control-master.opt | 1 - ...na_slow_extended-use_global_control.result | 12 - ...cona_slow_extended-use_global_control.test | 12 - ...nded-use_global_long_query_time-master.opt | 1 - ...extended-use_global_long_query_time.result | 46 - ...w_extended-use_global_long_query_time.test | 40 - percona-suite/percona_sql_no_fcache.result | 12 - percona-suite/percona_sql_no_fcache.test | 11 - ...rcona_status_wait_query_cache_mutex.result | 20 - ...percona_status_wait_query_cache_mutex.test | 35 - percona-suite/percona_sync_flush.result | 35 - percona-suite/percona_sync_flush.test | 33 - .../percona_xtradb_admin_command.result | 6 - .../percona_xtradb_admin_command.test | 3 - percona-suite/percona_xtradb_bug317074.result | 5 - percona-suite/percona_xtradb_bug317074.test | 47 - .../query_response_time-replication.inc | 57 - percona-suite/query_response_time-stored.inc | 37 - percona-suite/query_response_time.inc | 43 - percona-suite/userstat_bug602047.result | 15 - percona-suite/userstat_bug602047.test | 11 - read/read0read.c | 6 + row/row0ins.c | 19 +- row/row0merge.c | 2 +- row/row0mysql.c | 57 +- row/row0sel.c | 10 +- srv/srv0srv.c | 62 +- srv/srv0start.c | 31 +- sync/sync0arr.c | 8 +- trx/trx0sys.c | 12 +- trx/trx0trx.c | 19 +- ut/ut0dbg.c | 32 - ut/ut0ut.c | 2 + 179 files changed, 1316 insertions(+), 9523 deletions(-) delete mode 100644 percona-suite/grep.inc delete mode 100644 percona-suite/have_response_time_distribution.inc delete mode 100644 percona-suite/have_response_time_distribution.require delete mode 100644 percona-suite/percona_bug643149.result delete mode 100644 percona-suite/percona_bug643149.test delete mode 100644 percona-suite/percona_flush_contiguous_neighbors-master.opt delete mode 100644 percona-suite/percona_flush_contiguous_neighbors.result delete mode 100644 percona-suite/percona_flush_contiguous_neighbors.test 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_innodb_deadlock_count.result delete mode 100644 percona-suite/percona_innodb_deadlock_count.test delete mode 100644 percona-suite/percona_innodb_doublewrite_file-master.opt delete mode 100644 percona-suite/percona_innodb_doublewrite_file.result delete mode 100644 percona-suite/percona_innodb_doublewrite_file.test delete mode 100644 percona-suite/percona_innodb_expand_fast_index_creation.result delete mode 100644 percona-suite/percona_innodb_expand_fast_index_creation.test delete mode 100644 percona-suite/percona_innodb_fake_changes.result delete mode 100644 percona-suite/percona_innodb_fake_changes.test delete mode 100644 percona-suite/percona_innodb_fake_changes_locks.result delete mode 100644 percona-suite/percona_innodb_fake_changes_locks.test delete mode 100644 percona-suite/percona_innodb_kill_idle_trx.result delete mode 100644 percona-suite/percona_innodb_kill_idle_trx.test delete mode 100644 percona-suite/percona_innodb_kill_idle_trx_locks.result delete mode 100644 percona-suite/percona_innodb_kill_idle_trx_locks.test delete mode 100644 percona-suite/percona_innodb_kill_idle_trx_show.inc delete mode 100644 percona-suite/percona_innodb_use_sys_stats_table-master.opt delete mode 100644 percona-suite/percona_innodb_use_sys_stats_table.result delete mode 100644 percona-suite/percona_innodb_use_sys_stats_table.test delete mode 100644 percona-suite/percona_log_connection_error-master.opt 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_log_warnings_suppress-master.opt delete mode 100644 percona-suite/percona_log_warnings_suppress.result delete mode 100644 percona-suite/percona_log_warnings_suppress.test delete mode 100644 percona-suite/percona_processlist_row_stats.result delete mode 100644 percona-suite/percona_processlist_row_stats.test delete mode 100644 percona-suite/percona_query_cache_with_comments.inc delete mode 100644 percona-suite/percona_query_cache_with_comments.inc.backup delete mode 100644 percona-suite/percona_query_cache_with_comments.result delete mode 100644 percona-suite/percona_query_cache_with_comments.test delete mode 100644 percona-suite/percona_query_cache_with_comments_begin.inc delete mode 100644 percona-suite/percona_query_cache_with_comments_clear.inc delete mode 100644 percona-suite/percona_query_cache_with_comments_crash.result delete mode 100644 percona-suite/percona_query_cache_with_comments_crash.test delete mode 100644 percona-suite/percona_query_cache_with_comments_disable.result delete mode 100644 percona-suite/percona_query_cache_with_comments_disable.test delete mode 100644 percona-suite/percona_query_cache_with_comments_end.inc delete mode 100644 percona-suite/percona_query_cache_with_comments_eval.inc delete mode 100644 percona-suite/percona_query_cache_with_comments_prepared_statements.result delete mode 100644 percona-suite/percona_query_cache_with_comments_prepared_statements.test delete mode 100644 percona-suite/percona_query_cache_with_comments_show.inc 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_server_variables.inc delete mode 100644 percona-suite/percona_server_variables_debug.result delete mode 100644 percona-suite/percona_server_variables_debug.test delete mode 100644 percona-suite/percona_server_variables_release.result delete mode 100644 percona-suite/percona_server_variables_release.test delete mode 100644 percona-suite/percona_show_slave_status_nolock.result delete mode 100644 percona-suite/percona_show_slave_status_nolock.test delete mode 100644 percona-suite/percona_show_temp_tables.result delete mode 100644 percona-suite/percona_show_temp_tables.test delete mode 100644 percona-suite/percona_slow_extended-log_slow_filter-master.opt delete mode 100644 percona-suite/percona_slow_extended-log_slow_filter.result delete mode 100644 percona-suite/percona_slow_extended-log_slow_filter.test delete mode 100644 percona-suite/percona_slow_extended-log_slow_sp_statements-cl-master.opt delete mode 100644 percona-suite/percona_slow_extended-log_slow_sp_statements-cl.result delete mode 100644 percona-suite/percona_slow_extended-log_slow_sp_statements-cl.test delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity-cl-master.opt delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity-cl.result delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity-cl.test delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity-master.opt delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity.result delete mode 100644 percona-suite/percona_slow_extended-log_slow_verbosity.test delete mode 100644 percona-suite/percona_slow_extended-long_query_time-master.opt delete mode 100644 percona-suite/percona_slow_extended-long_query_time.result delete mode 100644 percona-suite/percona_slow_extended-long_query_time.test delete mode 100644 percona-suite/percona_slow_extended-microseconds_in_slow_extended-master.opt delete mode 100644 percona-suite/percona_slow_extended-microseconds_in_slow_extended.result delete mode 100644 percona-suite/percona_slow_extended-microseconds_in_slow_extended.test delete mode 100644 percona-suite/percona_slow_extended-min_examined_row_limit-master.opt delete mode 100644 percona-suite/percona_slow_extended-min_examined_row_limit.result delete mode 100644 percona-suite/percona_slow_extended-min_examined_row_limit.test delete mode 100644 percona-suite/percona_slow_extended-slave_innodb_stats-master.opt delete mode 100644 percona-suite/percona_slow_extended-slave_innodb_stats-slave.opt delete mode 100644 percona-suite/percona_slow_extended-slave_innodb_stats.result delete mode 100644 percona-suite/percona_slow_extended-slave_innodb_stats.test delete mode 100644 percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt delete mode 100644 percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt delete mode 100644 percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.result delete mode 100644 percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.test delete mode 100644 percona-suite/percona_slow_extended-slave_statements-master.opt delete mode 100644 percona-suite/percona_slow_extended-slave_statements-slave.opt delete mode 100644 percona-suite/percona_slow_extended-slave_statements.result delete mode 100644 percona-suite/percona_slow_extended-slave_statements.test delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.result delete mode 100644 percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.test delete mode 100644 percona-suite/percona_slow_extended-use_global_control-master.opt delete mode 100644 percona-suite/percona_slow_extended-use_global_control.result delete mode 100644 percona-suite/percona_slow_extended-use_global_control.test delete mode 100644 percona-suite/percona_slow_extended-use_global_long_query_time-master.opt delete mode 100644 percona-suite/percona_slow_extended-use_global_long_query_time.result delete mode 100644 percona-suite/percona_slow_extended-use_global_long_query_time.test delete mode 100644 percona-suite/percona_sql_no_fcache.result delete mode 100644 percona-suite/percona_sql_no_fcache.test delete mode 100644 percona-suite/percona_status_wait_query_cache_mutex.result delete mode 100644 percona-suite/percona_status_wait_query_cache_mutex.test delete mode 100644 percona-suite/percona_sync_flush.result delete mode 100644 percona-suite/percona_sync_flush.test delete mode 100644 percona-suite/percona_xtradb_admin_command.result delete mode 100644 percona-suite/percona_xtradb_admin_command.test delete mode 100644 percona-suite/percona_xtradb_bug317074.result delete mode 100644 percona-suite/percona_xtradb_bug317074.test delete mode 100644 percona-suite/query_response_time-replication.inc delete mode 100644 percona-suite/query_response_time-stored.inc delete mode 100644 percona-suite/query_response_time.inc delete mode 100644 percona-suite/userstat_bug602047.result delete mode 100644 percona-suite/userstat_bug602047.test diff --git a/btr/btr0cur.c b/btr/btr0cur.c index 488212f087c..1349ac9e474 100644 --- a/btr/btr0cur.c +++ b/btr/btr0cur.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -1349,27 +1349,13 @@ btr_cur_optimistic_insert( Subtract one byte for the encoded heap_no in the modification log. */ ulint free_space_zip = page_zip_empty_size( - cursor->index->n_fields, zip_size) - 1; + cursor->index->n_fields, zip_size); ulint n_uniq = dict_index_get_n_unique_in_tree(index); ut_ad(dict_table_is_comp(index->table)); - /* There should be enough room for two node pointer - records on an empty non-leaf page. This prevents - infinite page splits. */ - - if (UNIV_LIKELY(entry->n_fields >= n_uniq) - && UNIV_UNLIKELY(REC_NODE_PTR_SIZE - + rec_get_converted_size_comp_prefix( - index, entry->fields, n_uniq, - NULL) - /* On a compressed page, there is - a two-byte entry in the dense - page directory for every record. - But there is no record header. */ - - (REC_N_NEW_EXTRA_BYTES - 2) - > free_space_zip / 2)) { - + if (free_space_zip == 0) { +too_big: if (big_rec_vec) { dtuple_convert_back_big_rec( index, entry, big_rec_vec); @@ -1377,6 +1363,27 @@ btr_cur_optimistic_insert( return(DB_TOO_BIG_RECORD); } + + /* Subtract one byte for the encoded heap_no in the + modification log. */ + free_space_zip--; + + /* There should be enough room for two node pointer + records on an empty non-leaf page. This prevents + infinite page splits. */ + + if (entry->n_fields >= n_uniq + && (REC_NODE_PTR_SIZE + + rec_get_converted_size_comp_prefix( + index, entry->fields, n_uniq, NULL) + /* On a compressed page, there is + a two-byte entry in the dense + page directory for every record. + But there is no record header. */ + - (REC_N_NEW_EXTRA_BYTES - 2) + > free_space_zip / 2)) { + goto too_big; + } } LIMIT_OPTIMISTIC_INSERT_DEBUG(page_get_n_recs(page), diff --git a/buf/buf0buf.c b/buf/buf0buf.c index ae4b2fba98d..1084dcdf344 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -581,6 +581,8 @@ UNIV_INTERN ibool buf_page_is_corrupted( /*==================*/ + ibool check_lsn, /*!< in: TRUE if we need to check + and complain about the LSN */ const byte* read_buf, /*!< in: a database page */ ulint zip_size) /*!< in: size of compressed page; 0 for uncompressed pages */ @@ -600,7 +602,7 @@ buf_page_is_corrupted( } #ifndef UNIV_HOTBACKUP - if (recv_lsn_checks_on) { + if (check_lsn && recv_lsn_checks_on) { ib_uint64_t current_lsn; if (log_peek_lsn(¤t_lsn) @@ -1998,7 +2000,7 @@ lookup: buf_read_page(space, zip_size, offset, trx); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 37 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ } @@ -2556,6 +2558,10 @@ loop2: retries = 0; } else if (retries < BUF_PAGE_READ_MAX_RETRIES) { ++retries; + DBUG_EXECUTE_IF( + "innodb_page_corruption_retries", + retries = BUF_PAGE_READ_MAX_RETRIES; + ); } else { fprintf(stderr, "InnoDB: Error: Unable" " to read tablespace %lu page no" @@ -2577,7 +2583,7 @@ loop2: } #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 37 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ goto loop; } @@ -2593,6 +2599,7 @@ got_block: /* The page is being read to buffer pool, but we cannot wait around for the read to complete. */ +null_exit: //buf_pool_mutex_exit(buf_pool); mutex_exit(block_mutex); @@ -2603,7 +2610,6 @@ got_block: srv_pass_corrupt_table <= 1)) { mutex_exit(block_mutex); - return(NULL); } @@ -2622,6 +2628,14 @@ got_block: case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_DIRTY: ut_ad(block_mutex == &buf_pool->zip_mutex); + if (mode == BUF_PEEK_IF_IN_POOL) { + /* This mode is only used for dropping an + adaptive hash index. There cannot be an + adaptive hash index for a compressed-only + page, so do not bother decompressing the page. */ + goto null_exit; + } + bpage = &block->page; /* Protect bpage->buf_fix_count. */ //mutex_enter(&buf_pool->zip_mutex); @@ -3779,7 +3793,7 @@ buf_page_create( memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8); #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG - ut_a(++buf_dbg_counter % 357 || buf_validate()); + ut_a(++buf_dbg_counter % 5771 || buf_validate()); #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */ #ifdef UNIV_IBUF_COUNT_DEBUG ut_a(ibuf_count_get(buf_block_get_space(block), @@ -3933,7 +3947,7 @@ buf_page_io_complete( /* From version 3.23.38 up we store the page checksum to the 4 first bytes of the page end lsn field */ - if (buf_page_is_corrupted(frame, + if (buf_page_is_corrupted(TRUE, frame, buf_page_get_zip_size(bpage))) { corrupt: fprintf(stderr, diff --git a/buf/buf0rea.c b/buf/buf0rea.c index 5edbeadb64e..628107d64dc 100644 --- a/buf/buf0rea.c +++ b/buf/buf0rea.c @@ -220,7 +220,7 @@ not_to_recover: ut_ad(buf_page_in_file(bpage)); - if(sync) { + if (sync) { thd_wait_begin(NULL, THD_WAIT_DISKIO); } diff --git a/dict/dict0crea.c b/dict/dict0crea.c index b67f7fdde1c..31d70ad75a9 100644 --- a/dict/dict0crea.c +++ b/dict/dict0crea.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -42,6 +42,22 @@ Created 1/8/1996 Heikki Tuuri #include "trx0roll.h" #include "usr0sess.h" #include "ut0vec.h" +#include "ha_prototypes.h" + +/************************************************************************* +Checks if a table name contains the string TEMP_TABLE_PATH_PREFIX which +denotes temporary tables in MySQL. */ +static +ibool +row_is_mysql_tmp_table_name( +/*========================*/ + /* out: TRUE if temporary table */ + const char* name) /* in: table name in the form + 'database/tablename' */ +{ + return(strstr(name, TEMP_TABLE_PATH_PREFIX) != NULL); +} + /*****************************************************************//** Based on a table object, this function builds the entry to be inserted @@ -1630,18 +1646,46 @@ dict_create_add_foreign_to_dictionary( { ulint error; ulint i; - - pars_info_t* info = pars_info_create(); + pars_info_t* info; if (foreign->id == NULL) { /* Generate a new constraint id */ ulint namelen = strlen(table->name); char* id = mem_heap_alloc(foreign->heap, namelen + 20); - /* no overflow if number < 1e13 */ - sprintf(id, "%s_ibfk_%lu", table->name, (ulong) (*id_nr)++); + + if (row_is_mysql_tmp_table_name(table->name)) { + sprintf(id, "%s_ibfk_%lu", table->name, + (ulong) (*id_nr)++); + } else { + char table_name[MAX_TABLE_NAME_LEN + 20] = ""; + uint errors = 0; + + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN + 20); + + innobase_convert_to_system_charset( + strchr(table_name, '/') + 1, + strchr(table->name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN + 20); + } + + sprintf(id, "%s_ibfk_%lu", table_name, + (ulong) (*id_nr)++); + + if (innobase_check_identifier_length( + strchr(id,'/') + 1)) { + return(DB_IDENTIFIER_TOO_LONG); + } + } foreign->id = id; } + info = pars_info_create(); + pars_info_add_str_literal(info, "id", foreign->id); pars_info_add_str_literal(info, "for_name", table->name); diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 6e883e5048b..cfe1c8cef07 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -775,8 +775,11 @@ dict_table_get( /* 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); + dict_update_statistics( + table, + TRUE, /* only update stats if not initialized */ + FALSE, + FALSE /* update even if not changed too much */); } return(table); @@ -1119,22 +1122,78 @@ dict_table_rename_in_cache( dict_mem_foreign_table_name_lookup_set(foreign, FALSE); } if (strchr(foreign->id, '/')) { + /* This is a >= 4.0.18 format id */ + ulint db_len; char* old_id; + char old_name_cs_filename[MAX_TABLE_NAME_LEN+20]; + uint errors = 0; - /* This is a >= 4.0.18 format id */ + /* All table names are internally stored in charset + my_charset_filename (except the temp tables and the + partition identifier suffix in partition tables). The + foreign key constraint names are internally stored + in UTF-8 charset. The variable fkid here is used + to store foreign key constraint name in charset + my_charset_filename for comparison further below. */ + char fkid[MAX_TABLE_NAME_LEN+20]; + ibool on_tmp = FALSE; + + /* The old table name in my_charset_filename is stored + in old_name_cs_filename */ + + strncpy(old_name_cs_filename, old_name, + MAX_TABLE_NAME_LEN); + if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) { + + innobase_convert_to_system_charset( + strchr(old_name_cs_filename, '/') + 1, + strchr(old_name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + /* There has been an error to convert + old table into UTF-8. This probably + means that the old table name is + actually in UTF-8. */ + innobase_convert_to_filename_charset( + strchr(old_name_cs_filename, + '/') + 1, + strchr(old_name, '/') + 1, + MAX_TABLE_NAME_LEN); + } else { + /* Old name already in + my_charset_filename */ + strncpy(old_name_cs_filename, old_name, + MAX_TABLE_NAME_LEN); + } + } + + strncpy(fkid, foreign->id, MAX_TABLE_NAME_LEN); + + if (strstr(fkid, TEMP_TABLE_PATH_PREFIX) == NULL) { + innobase_convert_to_filename_charset( + strchr(fkid, '/') + 1, + strchr(foreign->id, '/') + 1, + MAX_TABLE_NAME_LEN+20); + } else { + on_tmp = TRUE; + } old_id = mem_strdup(foreign->id); - if (ut_strlen(foreign->id) > ut_strlen(old_name) + if (ut_strlen(fkid) > ut_strlen(old_name_cs_filename) + ((sizeof dict_ibfk) - 1) - && !memcmp(foreign->id, old_name, - ut_strlen(old_name)) - && !memcmp(foreign->id + ut_strlen(old_name), + && !memcmp(fkid, old_name_cs_filename, + ut_strlen(old_name_cs_filename)) + && !memcmp(fkid + ut_strlen(old_name_cs_filename), dict_ibfk, (sizeof dict_ibfk) - 1)) { /* This is a generated >= 4.0.18 format id */ + char table_name[MAX_TABLE_NAME_LEN] = ""; + uint errors = 0; + if (strlen(table->name) > strlen(old_name)) { foreign->id = mem_heap_alloc( foreign->heap, @@ -1142,11 +1201,36 @@ dict_table_rename_in_cache( + strlen(old_id) + 1); } + /* Convert the table name to UTF-8 */ + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN); + innobase_convert_to_system_charset( + strchr(table_name, '/') + 1, + strchr(table->name, '/') + 1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + /* Table name could not be converted + from charset my_charset_filename to + UTF-8. This means that the table name + is already in UTF-8 (#mysql#50). */ + strncpy(table_name, table->name, + MAX_TABLE_NAME_LEN); + } + /* Replace the prefix 'databasename/tablename' with the new names */ - strcpy(foreign->id, table->name); - strcat(foreign->id, - old_id + ut_strlen(old_name)); + strcpy(foreign->id, table_name); + if (on_tmp) { + strcat(foreign->id, + old_id + ut_strlen(old_name)); + } else { + sprintf(strchr(foreign->id, '/') + 1, + "%s%s", + strchr(table_name, '/') +1, + strstr(old_id, "_ibfk_") ); + } + } else { /* This is a >= 4.0.18 format id where the user gave the id name */ @@ -1529,6 +1613,10 @@ dict_index_too_big_for_tree( /* maximum allowed size of a node pointer record */ ulint page_ptr_max; + DBUG_EXECUTE_IF( + "ib_force_create_table", + return(FALSE);); + comp = dict_table_is_comp(table); zip_size = dict_table_zip_size(table); @@ -1543,7 +1631,10 @@ dict_index_too_big_for_tree( number in the page modification log. The maximum allowed node pointer size is half that. */ page_rec_max = page_zip_empty_size(new_index->n_fields, - zip_size) - 1; + zip_size); + if (page_rec_max) { + page_rec_max--; + } page_ptr_max = page_rec_max / 2; /* On a compressed page, there is a two-byte entry in the dense page directory for every record. But there @@ -4707,7 +4798,12 @@ dict_update_statistics( update/recalc the stats if they have not been initialized yet, otherwise do nothing */ - ibool sync) /*!< in: TRUE if must update SYS_STATS */ + ibool sync, /*!< in: TRUE if must update + SYS_STATS */ + ibool only_calc_if_changed_too_much)/*!< in: only + update/recalc the stats if the table + has been changed too much since the + last stats update/recalc */ { dict_index_t* index; ulint sum_of_index_sizes = 0; @@ -4758,7 +4854,10 @@ dict_update_statistics( dict_table_stats_lock(table, RW_X_LATCH); - if (only_calc_if_missing_stats && table->stat_initialized) { + if ((only_calc_if_missing_stats && table->stat_initialized) + || (only_calc_if_changed_too_much + && !DICT_TABLE_CHANGED_TOO_MUCH(table))) { + dict_table_stats_unlock(table, RW_X_LATCH); return; } @@ -5000,8 +5099,14 @@ dict_table_print_low( ut_ad(mutex_own(&(dict_sys->mutex))); - if (srv_stats_auto_update) - dict_update_statistics(table, FALSE /* update even if initialized */, FALSE); + if (srv_stats_auto_update) { + + dict_update_statistics( + table, + FALSE /* update even if initialized */, + FALSE, + FALSE /* update even if not changed too much */); + } dict_table_stats_lock(table, RW_S_LATCH); diff --git a/dict/dict0load.c b/dict/dict0load.c index d43b6837481..e638b3bff46 100644 --- a/dict/dict0load.c +++ b/dict/dict0load.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, Innobase Oy. 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 @@ -355,8 +355,11 @@ dict_process_sys_tables_rec( /* Update statistics if DICT_TABLE_UPDATE_STATS is set */ - dict_update_statistics(*table, FALSE /* update even if - initialized */, FALSE); + dict_update_statistics( + *table, + FALSE, /* update even if initialized */ + FALSE, + FALSE /* update even if not changed too much */); } return(NULL); diff --git a/dyn/dyn0dyn.c b/dyn/dyn0dyn.c index e1275f040f3..d0f50ad0c32 100644 --- a/dyn/dyn0dyn.c +++ b/dyn/dyn0dyn.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -11,8 +11,8 @@ 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 +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -35,7 +35,7 @@ UNIV_INTERN dyn_block_t* dyn_array_add_block( /*================*/ - dyn_array_t* arr) /*!< in: dyn array */ + dyn_array_t* arr) /*!< in/out: dyn array */ { mem_heap_t* heap; dyn_block_t* block; diff --git a/fil/fil0fil.c b/fil/fil0fil.c index 1c53c02efb4..4fd7250039f 100644 --- a/fil/fil0fil.c +++ b/fil/fil0fil.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -1883,11 +1883,63 @@ fil_write_flushed_lsn_to_data_files( return(DB_SUCCESS); } +/*******************************************************************//** +Checks the consistency of the first data page of a data file +at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ +static __attribute__((warn_unused_result)) +const char* +fil_check_first_page( +/*=================*/ + const page_t* page, /*!< in: data page */ + ibool first_page) /*!< in: TRUE if this is the + first page of the tablespace */ +{ + ulint space_id; + ulint flags; + + if (srv_force_recovery >= SRV_FORCE_IGNORE_CORRUPT) { + return(NULL); + } + + space_id = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_ID + page); + flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); + + if (first_page && !space_id && !flags) { + ulint nonzero_bytes = UNIV_PAGE_SIZE; + const byte* b = page; + + while (!*b && --nonzero_bytes) { + b++; + } + + if (!nonzero_bytes) { + return("space header page consists of zero bytes"); + } + } + + if (buf_page_is_corrupted( + FALSE, page, dict_table_flags_to_zip_size(flags))) { + return("checksum mismatch"); + } + + if (!first_page + || (page_get_space_id(page) == space_id + && page_get_page_no(page) == 0)) { + return(NULL); + } + + return("inconsistent data in space header"); +} + /*******************************************************************//** Reads the flushed lsn, arch no, and tablespace flag fields from a data -file at database startup. */ +file at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ UNIV_INTERN -void +const char* fil_read_first_page( /*================*/ os_file_t data_file, /*!< in: open data file */ @@ -1909,6 +1961,7 @@ fil_read_first_page( byte* buf; page_t* page; ib_uint64_t flushed_lsn; + const char* check_msg; buf = ut_malloc(2 * UNIV_PAGE_SIZE); /* Align the memory for a possible read from a raw device */ @@ -1916,13 +1969,18 @@ fil_read_first_page( os_file_read(data_file, page, 0, 0, UNIV_PAGE_SIZE); - *flags = mach_read_from_4(page + - FSP_HEADER_OFFSET + FSP_SPACE_FLAGS); + *flags = mach_read_from_4(FSP_HEADER_OFFSET + FSP_SPACE_FLAGS + page); flushed_lsn = mach_read_from_8(page + FIL_PAGE_FILE_FLUSH_LSN); + check_msg = fil_check_first_page(page, !one_read_already); + ut_free(buf); + if (check_msg) { + return(check_msg); + } + if (!one_read_already) { *min_flushed_lsn = flushed_lsn; *max_flushed_lsn = flushed_lsn; @@ -1930,7 +1988,7 @@ fil_read_first_page( *min_arch_log_no = arch_log_no; *max_arch_log_no = arch_log_no; #endif /* UNIV_LOG_ARCHIVE */ - return; + return(NULL); } if (*min_flushed_lsn > flushed_lsn) { @@ -1947,6 +2005,8 @@ fil_read_first_page( *max_arch_log_no = arch_log_no; } #endif /* UNIV_LOG_ARCHIVE */ + + return(NULL); } /*================ SINGLE-TABLE TABLESPACES ==========================*/ @@ -3271,6 +3331,7 @@ fil_open_single_table_tablespace( os_file_t file; char* filepath; ibool success; + const char* check_msg; byte* buf2; byte* page; ulint space_id; @@ -3331,6 +3392,8 @@ fil_open_single_table_tablespace( success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); + check_msg = fil_check_first_page(page, TRUE); + /* We have to read the tablespace id and flags from the file. */ space_id = fsp_header_get_space_id(page); @@ -3366,7 +3429,7 @@ fil_open_single_table_tablespace( current_lsn = log_get_lsn(); /* check the header page's consistency */ - if (buf_page_is_corrupted(page, + if (buf_page_is_corrupted(TRUE, page, dict_table_flags_to_zip_size(space_flags))) { fprintf(stderr, "InnoDB: page 0 of %s seems corrupt.\n", filepath); file_is_corrupt = TRUE; @@ -3788,8 +3851,20 @@ skip_write: ut_free(buf2); - if (UNIV_UNLIKELY(space_id != id - || space_flags != (flags & ~(~0 << DICT_TF_BITS)))) { + if (check_msg) { + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: Error: %s in file ", check_msg); + ut_print_filename(stderr, filepath); + fprintf(stderr, " (tablespace id=%lu, flags=%lu)\n" + "InnoDB: Please refer to " REFMAN + "innodb-troubleshooting-datadict.html\n", + (ulong) id, (ulong) flags); + success = FALSE; + goto func_exit; + } + + if (space_id != id + || space_flags != (flags & ~(~0 << DICT_TF_BITS))) { ut_print_timestamp(stderr); fputs(" InnoDB: Error: tablespace id and flags in file ", @@ -4280,10 +4355,21 @@ fil_load_single_table_tablespace( page = ut_align(buf2, UNIV_PAGE_SIZE); if (size >= FIL_IBD_FILE_INITIAL_SIZE * (lint)UNIV_PAGE_SIZE) { + const char* check_msg; + success = os_file_read(file, page, 0, 0, UNIV_PAGE_SIZE); /* We have to read the tablespace id from the file */ + check_msg = fil_check_first_page(page, TRUE); + + if (check_msg) { + fprintf(stderr, + "InnoDB: Error: %s in file %s", + check_msg, filepath); + goto func_exit; + } + space_id = fsp_header_get_space_id(page); flags = fsp_header_get_flags(page); } else { @@ -4861,6 +4947,26 @@ fil_extend_space_to_desired_size( start_page_no = space->size; file_start_page_no = space->size - node->size; +#ifdef HAVE_POSIX_FALLOCATE + if (srv_use_posix_fallocate) { + offset_high = (size_after_extend - file_start_page_no) + * page_size / (4ULL * 1024 * 1024 * 1024); + offset_low = (size_after_extend - file_start_page_no) + * page_size % (4ULL * 1024 * 1024 * 1024); + + mutex_exit(&fil_system->mutex); + success = os_file_set_size(node->name, node->handle, + offset_low, offset_high); + mutex_enter(&fil_system->mutex); + if (success) { + node->size += (size_after_extend - start_page_no); + space->size += (size_after_extend - start_page_no); + os_has_said_disk_full = FALSE; + } + goto complete_io; + } +#endif + /* Extend at most 64 pages at a time */ buf_size = ut_min(64, size_after_extend - start_page_no) * page_size; buf2 = mem_alloc(buf_size + page_size); @@ -4919,6 +5025,10 @@ fil_extend_space_to_desired_size( fil_node_complete_io(node, fil_system, OS_FILE_WRITE); +#ifdef HAVE_POSIX_FALLOCATE +complete_io: +#endif + *actual_size = space->size; #ifndef UNIV_HOTBACKUP diff --git a/fsp/fsp0fsp.c b/fsp/fsp0fsp.c index 24d5183f880..2d145f44bab 100644 --- a/fsp/fsp0fsp.c +++ b/fsp/fsp0fsp.c @@ -2913,15 +2913,15 @@ fsp_reserve_free_pages( ulint space, /*!< in: space id, must be != 0 */ fsp_header_t* space_header, /*!< in: header of that space, x-latched */ - ulint size, /*!< in: size of the tablespace in pages, - must be < FSP_EXTENT_SIZE / 2 */ + ulint size, /*!< in: size of the tablespace in + pages, must be < FSP_EXTENT_SIZE */ mtr_t* mtr) /*!< in: mtr */ { xdes_t* descr; ulint n_used; ut_a(space != 0); - ut_a(size < FSP_EXTENT_SIZE / 2); + ut_a(size < FSP_EXTENT_SIZE); descr = xdes_get_descriptor_with_space_hdr(space_header, space, 0, mtr); @@ -3004,7 +3004,7 @@ fsp_reserve_free_extents( try_again: size = mtr_read_ulint(space_header + FSP_SIZE, MLOG_4BYTES, mtr); - if (size < FSP_EXTENT_SIZE / 2) { + if (size < FSP_EXTENT_SIZE) { /* Use different rules for small single-table tablespaces */ *n_reserved = 0; return(fsp_reserve_free_pages(space, space_header, size, mtr)); @@ -3019,11 +3019,8 @@ try_again: some of them will contain extent descriptor pages, and therefore will not be free extents */ - if (size <= free_limit) { - n_free_up = 0; - } else { - n_free_up = (size - free_limit) / FSP_EXTENT_SIZE; - } + ut_ad(size >= free_limit); + n_free_up = (size - free_limit) / FSP_EXTENT_SIZE; if (n_free_up > 0) { n_free_up--; diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index 569770602d0..d4ad5f106a2 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. @@ -186,6 +186,7 @@ static my_bool innobase_file_format_check = TRUE; static my_bool innobase_log_archive = FALSE; static char* innobase_log_arch_dir = NULL; #endif /* UNIV_LOG_ARCHIVE */ +static my_bool innobase_use_atomic_writes = FALSE; static my_bool innobase_use_doublewrite = TRUE; static my_bool innobase_use_checksums = TRUE; static my_bool innobase_fast_checksum = FALSE; @@ -205,7 +206,6 @@ static uint innobase_buffer_pool_shm_key = 0; static ulong srv_lazy_drop_table = 0; - static char* internal_innobase_data_file_path = NULL; static char* innodb_version_str = (char*) INNODB_VERSION_STR; @@ -866,6 +866,10 @@ static SHOW_VAR innodb_status_variables[]= { (char*) &export_vars.innodb_rows_read, SHOW_LONG}, {"rows_updated", (char*) &export_vars.innodb_rows_updated, SHOW_LONG}, + {"read_views_memory", + (char*) &export_vars.innodb_read_views_memory, SHOW_LONG}, + {"descriptors_memory", + (char*) &export_vars.innodb_descriptors_memory, SHOW_LONG}, {"s_lock_os_waits", (char*) &export_vars.innodb_s_lock_os_waits, SHOW_LONGLONG}, {"s_lock_spin_rounds", @@ -1303,6 +1307,8 @@ convert_error_code_to_mysql( return(HA_ERR_UNDO_REC_TOO_BIG); case DB_OUT_OF_MEMORY: return(HA_ERR_OUT_OF_MEM); + case DB_IDENTIFIER_TOO_LONG: + return(HA_ERR_INTERNAL_ERROR); } } @@ -1383,6 +1389,31 @@ innobase_convert_from_table_id( strconvert(cs, from, &my_charset_filename, to, (uint) len, &errors); } +/********************************************************************** +Check if the length of the identifier exceeds the maximum allowed. +return true when length of identifier is too long. */ +extern "C" +my_bool +innobase_check_identifier_length( +/*=============================*/ + const char* id) /* in: FK identifier to check excluding the + database portion. */ +{ + int well_formed_error = 0; + CHARSET_INFO *cs = system_charset_info; + DBUG_ENTER("innobase_check_identifier_length"); + + uint res = cs->cset->well_formed_len(cs, id, id + strlen(id), + NAME_CHAR_LEN, + &well_formed_error); + + if (well_formed_error || res == NAME_CHAR_LEN) { + my_error(ER_TOO_LONG_IDENT, MYF(0), id); + DBUG_RETURN(true); + } + DBUG_RETURN(false); +} + /******************************************************************//** Converts an identifier to UTF-8. */ extern "C" UNIV_INTERN @@ -3082,6 +3113,39 @@ innobase_change_buffering_inited_ok: srv_kill_idle_transaction = 0; #endif + srv_use_atomic_writes = (ibool) innobase_use_atomic_writes; + if (innobase_use_atomic_writes) { + fprintf(stderr, "InnoDB: using atomic writes.\n"); + + /* Force doublewrite buffer off, atomic writes replace it. */ + if (srv_use_doublewrite_buf) { + fprintf(stderr, + "InnoDB: Switching off doublewrite buffer " + "because of atomic writes.\n"); + innobase_use_doublewrite = FALSE; + srv_use_doublewrite_buf = FALSE; + } + + /* Force O_DIRECT on Unixes (on Windows writes are always + unbuffered)*/ +#ifndef _WIN32 + if(!innobase_file_flush_method || + !strstr(innobase_file_flush_method, "O_DIRECT")) { + innobase_file_flush_method = + srv_file_flush_method_str = (char*)"O_DIRECT"; + fprintf(stderr, + "InnoDB: using O_DIRECT due to atomic " + "writes.\n"); + } +#endif +#ifdef HAVE_POSIX_FALLOCATE + /* Due to a bug in directFS, using atomics needs + posix_fallocate() to extend the file, because pwrite() past the + end of the file won't work */ + srv_use_posix_fallocate = TRUE; +#endif + } + #ifdef HAVE_PSI_INTERFACE /* Register keys with MySQL performance schema */ if (PSI_server) { @@ -4579,7 +4643,6 @@ ha_innobase::open( dict_table_t* ib_table; char norm_name[1000]; THD* thd; - ulint retries = 0; char* is_part = NULL; ibool par_case_name_set = FALSE; char par_case_name[MAX_FULL_NAME_LEN + 1]; @@ -4619,17 +4682,13 @@ ha_innobase::open( upd_buf_size = 0; /* We look for pattern #P# to see if the table is partitioned - MySQL table. The retry logic for partitioned tables is a - workaround for http://bugs.mysql.com/bug.php?id=33349. Look - at support issue https://support.mysql.com/view.php?id=21080 - for more details. */ + MySQL table. */ #ifdef __WIN__ is_part = strstr(norm_name, "#p#"); #else is_part = strstr(norm_name, "#P#"); #endif /* __WIN__ */ -retry: /* Get pointer to a table object in InnoDB dictionary cache */ ib_table = dict_table_get(norm_name, TRUE); @@ -4646,7 +4705,7 @@ retry: share->ib_table = ib_table; if (NULL == ib_table) { - if (is_part && retries < 10) { + if (is_part) { /* MySQL partition engine hard codes the file name separator as "#P#". The text case is fixed even if lower_case_table_names is set to 1 or 2. This is true @@ -4689,11 +4748,7 @@ retry: ib_table = dict_table_get( par_case_name, FALSE); } - if (!ib_table) { - ++retries; - os_thread_sleep(100000); - goto retry; - } else { + if (ib_table) { #ifndef __WIN__ sql_print_warning("Partition table %s opened " "after converting to lower " @@ -4719,9 +4774,8 @@ retry: } if (is_part) { - sql_print_error("Failed to open table %s after " - "%lu attempts.\n", norm_name, - retries); + sql_print_error("Failed to open table %s.\n", + norm_name); } sql_print_error("Cannot find or open table %s from\n" @@ -6475,6 +6529,8 @@ ha_innobase::unlock_row(void) { DBUG_ENTER("ha_innobase::unlock_row"); + ut_ad(prebuilt->trx->state == TRX_ACTIVE); + /* Consistent read does not take any locks, thus there is nothing to unlock. */ @@ -8516,12 +8572,18 @@ innobase_rename_table( DEBUG_SYNC_C("innodb_rename_table_ready"); /* Serialize data dictionary operations with dictionary mutex: - no deadlocks can occur then in these operations */ + no deadlocks can occur then in these operations. Start the + transaction first to avoid a possible deadlock in the server. */ + trx_start_if_not_started(trx); if (lock_and_commit) { row_mysql_lock_data_dictionary(trx); } + /* Flag this transaction as a dictionary operation, so that + the data dictionary will be locked in crash recovery. */ + trx_set_dict_operation(trx, TRX_DICT_OP_INDEX); + error = row_rename_table_for_mysql( norm_from, norm_to, trx, lock_and_commit); @@ -9072,9 +9134,11 @@ ha_innobase::info_low( prebuilt->trx->op_info = "updating table statistics"; - dict_update_statistics(ib_table, - FALSE /* update even if stats - are initialized */, called_from_analyze); + dict_update_statistics( + ib_table, + FALSE, /* update even if initialized */ + called_from_analyze, + FALSE /* update even if not changed too much */); prebuilt->trx->op_info = "returning various info to MySQL"; } @@ -12264,6 +12328,63 @@ innodb_change_buffering_update( *static_cast(save); } +#ifndef DBUG_OFF +static char* srv_buffer_pool_evict; + +/****************************************************************//** +Called on SET GLOBAL innodb_buffer_pool_evict=... +Handles some values specially, to evict pages from the buffer pool. +SET GLOBAL innodb_buffer_pool_evict='uncompressed' +evicts all uncompressed page frames of compressed tablespaces. */ +static +void +innodb_buffer_pool_evict_update( +/*============================*/ + THD* thd, /*!< in: thread handle */ + struct st_mysql_sys_var*var, /*!< in: pointer to system variable */ + void* var_ptr,/*!< out: ignored */ + const void* save) /*!< in: immediate result + from check function */ +{ + if (const char* op = *static_cast(save)) { + if (!strcmp(op, "uncompressed")) { + /* Evict all uncompressed pages of compressed + tables from the buffer pool. Keep the compressed + pages in the buffer pool. */ + + for (ulint i = 0; i < srv_buf_pool_instances; i++) { + buf_pool_t* buf_pool = &buf_pool_ptr[i]; + + //buf_pool_mutex_enter(buf_pool); + mutex_enter(&buf_pool->LRU_list_mutex); + + for (buf_block_t* block = UT_LIST_GET_LAST( + buf_pool->unzip_LRU); + block != NULL; ) { + + buf_block_t* prev_block + = UT_LIST_GET_PREV(unzip_LRU, + block); + ut_ad(buf_block_get_state(block) + == BUF_BLOCK_FILE_PAGE); + ut_ad(block->in_unzip_LRU_list); + ut_ad(block->page.in_LRU_list); + + mutex_enter(&block->mutex); + buf_LRU_free_block(&block->page, + FALSE, FALSE); + mutex_exit(&block->mutex); + block = prev_block; + } + + mutex_exit(&buf_pool->LRU_list_mutex); + //buf_pool_mutex_exit(buf_pool); + } + } + } +} +#endif /* !DBUG_OFF */ + static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff) { innodb_export_status(); @@ -12425,6 +12546,15 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, "Disable with --skip-innodb-doublewrite.", NULL, NULL, TRUE); +static MYSQL_SYSVAR_BOOL(use_atomic_writes, innobase_use_atomic_writes, + PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY, + "Prevent partial page writes, via atomic writes (beta). " + "The option is used to prevent partial writes in case of a crash/poweroff, " + "as faster alternative to doublewrite buffer. " + "Currently this option works only " + "on Linux only with FusionIO device, and directFS filesystem.", + NULL, NULL, FALSE); + static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity, PLUGIN_VAR_RQCMDARG, "Number of IOPs the server can do. Tunes the background IO rate", @@ -12637,6 +12767,13 @@ static MYSQL_SYSVAR_ULONG(autoextend_increment, srv_auto_extend_increment, "Data file autoextend increment in megabytes", NULL, NULL, 8L, 1L, 1000L, 0); +#ifndef DBUG_OFF +static MYSQL_SYSVAR_STR(buffer_pool_evict, srv_buffer_pool_evict, + PLUGIN_VAR_RQCMDARG, + "Evict pages from the InnoDB buffer pool.", + NULL, innodb_buffer_pool_evict_update, ""); +#endif /* !DBUG_OFF */ + static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.", @@ -13055,6 +13192,9 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(log_block_size), MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(autoextend_increment), +#ifndef DBUG_OFF + MYSQL_SYSVAR(buffer_pool_evict), +#endif /* !DBUG_OFF */ MYSQL_SYSVAR(buffer_pool_size), MYSQL_SYSVAR(buffer_pool_populate), MYSQL_SYSVAR(buffer_pool_instances), @@ -13069,6 +13209,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(doublewrite_file), MYSQL_SYSVAR(data_home_dir), MYSQL_SYSVAR(doublewrite), + MYSQL_SYSVAR(use_atomic_writes), MYSQL_SYSVAR(recovery_stats), MYSQL_SYSVAR(fast_shutdown), MYSQL_SYSVAR(file_io_threads), @@ -13352,3 +13493,55 @@ test_innobase_convert_name() } #endif /* UNIV_COMPILE_TEST_FUNCS */ + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +extern "C" +uint +innobase_convert_to_filename_charset( +/*=================================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len) /* in: length of 'to', in bytes */ +{ + uint errors; + uint rlen; + CHARSET_INFO* cs_to = &my_charset_filename; + CHARSET_INFO* cs_from = system_charset_info; + + rlen = strconvert(cs_from, from, cs_to, to, len, &errors); + + if (errors) { + fprintf(stderr, "InnoDB: There was a problem in converting" + "'%s' in charset %s to charset %s", from, cs_from->name, + cs_to->name); + } + + return(rlen); +} + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +extern "C" +uint +innobase_convert_to_system_charset( +/*===============================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len, /* in: length of 'to', in bytes */ + uint* errors) /* out: error return */ +{ + uint rlen; + CHARSET_INFO* cs1 = &my_charset_filename; + CHARSET_INFO* cs2 = system_charset_info; + + rlen = strconvert(cs1, from, cs2, to, len, errors); + + if (*errors) { + fprintf(stderr, "InnoDB: There was a problem in converting" + "'%s' in charset %s to charset %s", from, cs1->name, + cs2->name); + } + + return(rlen); +} diff --git a/handler/i_s.cc b/handler/i_s.cc index 4a1a3df1d5d..38c49656003 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -52,7 +52,7 @@ extern "C" { #include "dict0mem.h" #include "dict0types.h" #include "ha_prototypes.h" /* for innobase_convert_name() */ -#include "srv0srv.h" /* for srv_track_changed_pages */ +#include "srv0srv.h" /* for srv_max_changed_pages */ #include "srv0start.h" /* for srv_was_started */ #include "trx0i_s.h" #include "trx0trx.h" /* for TRX_QUE_STATE_STR_MAX_LEN */ @@ -2314,6 +2314,7 @@ i_s_innodb_buffer_stats_fill_table( buf_pool_info_t* pool_info; DBUG_ENTER("i_s_innodb_buffer_fill_general"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* Only allow the PROCESS privilege holder to access the stats */ if (check_global_access(thd, PROCESS_ACL)) { @@ -2930,6 +2931,7 @@ i_s_innodb_fill_buffer_pool( mem_heap_t* heap; DBUG_ENTER("i_s_innodb_fill_buffer_pool"); + RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); heap = mem_heap_create(10000); @@ -2970,7 +2972,8 @@ i_s_innodb_fill_buffer_pool( i_s_innodb_buffer_page_get_info( &block->page, pool_id, block_id, info_buffer + num_page); - mutex_exit(block_mutex); + if (block_mutex) + mutex_exit(block_mutex); block_id++; num_page++; } @@ -3496,7 +3499,6 @@ i_s_innodb_fill_buffer_lru( mutex_t* block_mutex; DBUG_ENTER("i_s_innodb_fill_buffer_lru"); - RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); /* Obtain buf_pool mutex before allocate info_buffer, since @@ -7472,6 +7474,7 @@ i_s_innodb_changed_pages_fill( ib_uint64_t output_rows_num = 0UL; ib_uint64_t max_lsn = IB_ULONGLONG_MAX; ib_uint64_t min_lsn = 0ULL; + int ret = 0; DBUG_ENTER("i_s_innodb_changed_pages_fill"); @@ -7483,10 +7486,6 @@ i_s_innodb_changed_pages_fill( RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name); - if (!srv_track_changed_pages) { - DBUG_RETURN(0); - } - if (cond) { limit_lsn_range_from_condition(table, cond, &min_lsn, &max_lsn); @@ -7562,8 +7561,13 @@ i_s_innodb_changed_pages_fill( ++output_rows_num; } + if (i.failed) { + my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0)); + ret = 1; + } + log_online_bitmap_iterator_release(&i); - DBUG_RETURN(0); + DBUG_RETURN(ret); } static diff --git a/ibuf/ibuf0ibuf.c b/ibuf/ibuf0ibuf.c index 96c264b32b4..c79740a947d 100644 --- a/ibuf/ibuf0ibuf.c +++ b/ibuf/ibuf0ibuf.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, 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 @@ -4319,7 +4319,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to resort to a pessimistic delete, this function commits mtr and closes the cursor. @return TRUE if mtr was committed and pcur closed in this operation */ -static +static __attribute__((warn_unused_result)) ibool ibuf_delete_rec( /*============*/ @@ -4625,6 +4625,12 @@ ibuf_merge_or_delete_for_page( loop: ibuf_mtr_start(&mtr); + /* Position pcur in the insert buffer at the first entry for this + index page */ + btr_pcur_open_on_user_rec( + ibuf->index, search_tuple, PAGE_CUR_GE, BTR_MODIFY_LEAF, + &pcur, &mtr); + if (block) { ibool success; @@ -4643,12 +4649,6 @@ loop: buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE); } - /* Position pcur in the insert buffer at the first entry for this - index page */ - btr_pcur_open_on_user_rec( - ibuf->index, search_tuple, PAGE_CUR_GE, BTR_MODIFY_LEAF, - &pcur, &mtr); - if (!btr_pcur_is_on_user_rec(&pcur)) { ut_ad(btr_pcur_is_after_last_in_tree(&pcur, &mtr)); @@ -4733,6 +4733,16 @@ loop: == page_no); ut_ad(ibuf_rec_get_space(&mtr, rec) == space); + /* Mark the change buffer record processed, + so that it will not be merged again in case + the server crashes between the following + mtr_commit() and the subsequent mtr_commit() + of deleting the change buffer record. */ + + btr_cur_set_deleted_flag_for_ibuf( + btr_pcur_get_rec(&pcur), NULL, + TRUE, &mtr); + btr_pcur_store_position(&pcur, &mtr); ibuf_btr_pcur_commit_specify_mtr(&pcur, &mtr); @@ -4781,6 +4791,7 @@ loop: /* Deletion was pessimistic and mtr was committed: we start from the beginning again */ + ut_ad(mtr.state == MTR_COMMITTED); goto loop; } else if (btr_pcur_is_after_last_on_page(&pcur)) { ibuf_mtr_commit(&mtr); @@ -4911,6 +4922,7 @@ loop: /* Deletion was pessimistic and mtr was committed: we start from the beginning again */ + ut_ad(mtr.state == MTR_COMMITTED); goto loop; } diff --git a/include/buf0buf.h b/include/buf0buf.h index 991fdb7ca88..5450934d51b 100644 --- a/include/buf0buf.h +++ b/include/buf0buf.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -684,9 +684,12 @@ UNIV_INTERN ibool buf_page_is_corrupted( /*==================*/ + ibool check_lsn, /*!< in: TRUE if we need to check + and complain about the LSN */ const byte* read_buf, /*!< in: a database page */ - ulint zip_size); /*!< in: size of compressed page; + ulint zip_size) /*!< in: size of compressed page; 0 for uncompressed pages */ + __attribute__((warn_unused_result)); #ifndef UNIV_HOTBACKUP /**********************************************************************//** Gets the space id, page offset, and byte offset within page of a diff --git a/include/db0err.h b/include/db0err.h index 95ccef16be0..b27bc954940 100644 --- a/include/db0err.h +++ b/include/db0err.h @@ -114,6 +114,7 @@ enum db_err { DB_UNDO_RECORD_TOO_BIG, /* the undo log record is too big */ DB_TABLE_IN_FK_CHECK, /* table is being used in foreign key check */ + DB_IDENTIFIER_TOO_LONG, /* Identifier name too long */ /* The following are partial failure codes */ DB_FAIL = 1000, diff --git a/include/dict0dict.h b/include/dict0dict.h index 1dd0b3f5082..f175f2c6194 100644 --- a/include/dict0dict.h +++ b/include/dict0dict.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -1124,6 +1124,18 @@ ulint dict_index_calc_min_rec_len( /*========================*/ const dict_index_t* index); /*!< in: index */ + +/** Calculate new statistics if 1 / 16 of table has been modified +since the last time a statistics batch was run. +We calculate statistics at most every 16th round, since we may have +a counter table which is very small and updated very often. +@param t table +@return true if the table has changed too much and stats need to be +recalculated +*/ +#define DICT_TABLE_CHANGED_TOO_MUCH(t) \ + ((ib_int64_t) (t)->stat_modified_counter > 16 + (t)->stat_n_rows / 16) + /*********************************************************************//** Calculates new estimates for table and index statistics. The statistics are used in query optimization. */ @@ -1132,11 +1144,15 @@ void dict_update_statistics( /*===================*/ dict_table_t* table, /*!< in/out: table */ - ibool only_calc_if_missing_stats, /*!< in: only + ibool only_calc_if_missing_stats,/*!< in: only update/recalc the stats if they have not been initialized yet, otherwise do nothing */ - ibool sync); + ibool sync, + ibool only_calc_if_changed_too_much);/*!< in: only + update/recalc the stats if the table + has been changed too much since the + last stats update/recalc */ /*********************************************************************//** */ UNIV_INTERN diff --git a/include/dict0mem.h b/include/dict0mem.h index 630942ae2ac..4e6713d15c8 100644 --- a/include/dict0mem.h +++ b/include/dict0mem.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -127,7 +127,7 @@ This could result in rescursive calls and out of stack error eventually. DICT_FK_MAX_RECURSIVE_LOAD defines the maximum number of recursive loads, when exceeded, the child table will not be loaded. It will be loaded when the foreign constraint check needs to be run. */ -#define DICT_FK_MAX_RECURSIVE_LOAD 255 +#define DICT_FK_MAX_RECURSIVE_LOAD 20 /** Similarly, when tables are chained together with foreign key constraints with on cascading delete/update clause, delete from parent table could @@ -607,7 +607,13 @@ struct dict_table_struct{ /*!< flag: TRUE if the maximum length of a single row exceeds BIG_ROW_SIZE; initialized in dict_table_add_to_cache() */ - /** Statistics for query optimization */ + /** Statistics for query optimization. + The following stat_* members are usually + protected by dict_table_stats_lock(). In + some exceptional cases (performance critical + code paths) we access or modify stat_n_rows + and stat_modified_counter without any + protection. */ /* @{ */ unsigned stat_initialized:1; /*!< TRUE if statistics have been calculated the first time diff --git a/include/dict0types.h b/include/dict0types.h index f0a05a38070..8e3a04f7956 100644 --- a/include/dict0types.h +++ b/include/dict0types.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -58,4 +58,7 @@ enum dict_err_ignore { typedef enum dict_err_ignore dict_err_ignore_t; +#define TEMP_TABLE_PREFIX "#sql" +#define TEMP_TABLE_PATH_PREFIX "/" TEMP_TABLE_PREFIX + #endif diff --git a/include/dyn0dyn.h b/include/dyn0dyn.h index 121a5946ac7..62ed862e82c 100644 --- a/include/dyn0dyn.h +++ b/include/dyn0dyn.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -11,8 +11,8 @@ 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 +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -47,15 +47,17 @@ UNIV_INLINE dyn_array_t* dyn_array_create( /*=============*/ - dyn_array_t* arr); /*!< in: pointer to a memory buffer of + dyn_array_t* arr) /*!< in/out memory buffer of size sizeof(dyn_array_t) */ + __attribute__((nonnull)); /************************************************************//** Frees a dynamic array. */ UNIV_INLINE void dyn_array_free( /*===========*/ - dyn_array_t* arr); /*!< in: dyn array */ + dyn_array_t* arr) /*!< in,own: dyn array */ + __attribute__((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to a buffer in it. After copying the elements, the caller must close the buffer using @@ -66,8 +68,9 @@ byte* dyn_array_open( /*===========*/ dyn_array_t* arr, /*!< in: dynamic array */ - ulint size); /*!< in: size in bytes of the buffer; MUST be + ulint size) /*!< in: size in bytes of the buffer; MUST be smaller than DYN_ARRAY_DATA_SIZE! */ + __attribute__((nonnull, warn_unused_result)); /*********************************************************************//** Closes the buffer returned by dyn_array_open. */ UNIV_INLINE @@ -75,7 +78,8 @@ void dyn_array_close( /*============*/ dyn_array_t* arr, /*!< in: dynamic array */ - byte* ptr); /*!< in: buffer space from ptr up was not used */ + const byte* ptr) /*!< in: end of used space */ + __attribute__((nonnull)); /*********************************************************************//** Makes room on top of a dyn array and returns a pointer to the added element. The caller must copy the element to @@ -85,8 +89,9 @@ UNIV_INLINE void* dyn_array_push( /*===========*/ - dyn_array_t* arr, /*!< in: dynamic array */ - ulint size); /*!< in: size in bytes of the element */ + dyn_array_t* arr, /*!< in/out: dynamic array */ + ulint size) /*!< in: size in bytes of the element */ + __attribute__((nonnull, warn_unused_result)); /************************************************************//** Returns pointer to an element in dyn array. @return pointer to element */ @@ -94,9 +99,10 @@ UNIV_INLINE void* dyn_array_get_element( /*==================*/ - dyn_array_t* arr, /*!< in: dyn array */ - ulint pos); /*!< in: position of element as bytes - from array start */ + const dyn_array_t* arr, /*!< in: dyn array */ + ulint pos) /*!< in: position of element + in bytes from array start */ + __attribute__((nonnull, warn_unused_result)); /************************************************************//** Returns the size of stored data in a dyn array. @return data size in bytes */ @@ -104,30 +110,33 @@ UNIV_INLINE ulint dyn_array_get_data_size( /*====================*/ - dyn_array_t* arr); /*!< in: dyn array */ + const dyn_array_t* arr) /*!< in: dyn array */ + __attribute__((nonnull, warn_unused_result, pure)); /************************************************************//** -Gets the first block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_first_block( -/*======================*/ - dyn_array_t* arr); /*!< in: dyn array */ +Gets the first block in a dyn array. +@param arr dyn array +@return first block */ +#define dyn_array_get_first_block(arr) (arr) /************************************************************//** -Gets the last block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_last_block( -/*=====================*/ - dyn_array_t* arr); /*!< in: dyn array */ +Gets the last block in a dyn array. +@param arr dyn array +@return last block */ +#define dyn_array_get_last_block(arr) \ + ((arr)->heap ? UT_LIST_GET_LAST((arr)->base) : (arr)) /********************************************************************//** Gets the next block in a dyn array. -@return pointer to next, NULL if end of list */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_next_block( -/*=====================*/ - dyn_array_t* arr, /*!< in: dyn array */ - dyn_block_t* block); /*!< in: dyn array block */ +@param arr dyn array +@param block dyn array block +@return pointer to next, NULL if end of list */ +#define dyn_array_get_next_block(arr, block) \ + ((arr)->heap ? UT_LIST_GET_NEXT(list, block) : NULL) +/********************************************************************//** +Gets the previous block in a dyn array. +@param arr dyn array +@param block dyn array block +@return pointer to previous, NULL if end of list */ +#define dyn_array_get_prev_block(arr, block) \ + ((arr)->heap ? UT_LIST_GET_PREV(list, block) : NULL) /********************************************************************//** Gets the number of used bytes in a dyn array block. @return number of bytes used */ @@ -135,7 +144,8 @@ UNIV_INLINE ulint dyn_block_get_used( /*===============*/ - dyn_block_t* block); /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ + __attribute__((nonnull, warn_unused_result, pure)); /********************************************************************//** Gets pointer to the start of data in a dyn array block. @return pointer to data */ @@ -143,16 +153,18 @@ UNIV_INLINE byte* dyn_block_get_data( /*===============*/ - dyn_block_t* block); /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ + __attribute__((nonnull, warn_unused_result, pure)); /********************************************************//** Pushes n bytes to a dyn array. */ UNIV_INLINE void dyn_push_string( /*============*/ - dyn_array_t* arr, /*!< in: dyn array */ + dyn_array_t* arr, /*!< in/out: dyn array */ const byte* str, /*!< in: string to write */ - ulint len); /*!< in: string length */ + ulint len) /*!< in: string length */ + __attribute__((nonnull)); /*#################################################################*/ diff --git a/include/dyn0dyn.ic b/include/dyn0dyn.ic index 110e674abff..177877ed1fd 100644 --- a/include/dyn0dyn.ic +++ b/include/dyn0dyn.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -11,8 +11,8 @@ 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 +this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA *****************************************************************************/ @@ -35,56 +35,8 @@ UNIV_INTERN dyn_block_t* dyn_array_add_block( /*================*/ - dyn_array_t* arr); /*!< in: dyn array */ - - -/************************************************************//** -Gets the first block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_first_block( -/*======================*/ - dyn_array_t* arr) /*!< in: dyn array */ -{ - return(arr); -} - -/************************************************************//** -Gets the last block in a dyn array. */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_last_block( -/*=====================*/ - dyn_array_t* arr) /*!< in: dyn array */ -{ - if (arr->heap == NULL) { - - return(arr); - } - - return(UT_LIST_GET_LAST(arr->base)); -} - -/********************************************************************//** -Gets the next block in a dyn array. -@return pointer to next, NULL if end of list */ -UNIV_INLINE -dyn_block_t* -dyn_array_get_next_block( -/*=====================*/ - dyn_array_t* arr, /*!< in: dyn array */ - dyn_block_t* block) /*!< in: dyn array block */ -{ - ut_ad(arr && block); - - if (arr->heap == NULL) { - ut_ad(arr == block); - - return(NULL); - } - - return(UT_LIST_GET_NEXT(list, block)); -} + dyn_array_t* arr) /*!< in/out: dyn array */ + __attribute__((nonnull, warn_unused_result)); /********************************************************************//** Gets the number of used bytes in a dyn array block. @@ -93,7 +45,7 @@ UNIV_INLINE ulint dyn_block_get_used( /*===============*/ - dyn_block_t* block) /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ { ut_ad(block); @@ -107,11 +59,11 @@ UNIV_INLINE byte* dyn_block_get_data( /*===============*/ - dyn_block_t* block) /*!< in: dyn array block */ + const dyn_block_t* block) /*!< in: dyn array block */ { ut_ad(block); - return(block->data); + return((byte*) block->data); } /*********************************************************************//** @@ -121,7 +73,7 @@ UNIV_INLINE dyn_array_t* dyn_array_create( /*=============*/ - dyn_array_t* arr) /*!< in: pointer to a memory buffer of + dyn_array_t* arr) /*!< in/out: memory buffer of size sizeof(dyn_array_t) */ { ut_ad(arr); @@ -132,10 +84,9 @@ dyn_array_create( arr->heap = NULL; arr->used = 0; -#ifdef UNIV_DEBUG - arr->buf_end = 0; - arr->magic_n = DYN_BLOCK_MAGIC_N; -#endif + ut_d(arr->buf_end = 0); + ut_d(arr->magic_n = DYN_BLOCK_MAGIC_N); + return(arr); } @@ -151,9 +102,7 @@ dyn_array_free( mem_heap_free(arr->heap); } -#ifdef UNIV_DEBUG - arr->magic_n = 0; -#endif + ut_d(arr->magic_n = 0); } /*********************************************************************//** @@ -164,7 +113,7 @@ UNIV_INLINE void* dyn_array_push( /*===========*/ - dyn_array_t* arr, /*!< in: dynamic array */ + dyn_array_t* arr, /*!< in/out: dynamic array */ ulint size) /*!< in: size in bytes of the element */ { dyn_block_t* block; @@ -176,24 +125,23 @@ dyn_array_push( ut_ad(size); block = arr; - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { /* Get the last array block */ block = dyn_array_get_last_block(arr); - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { block = dyn_array_add_block(arr); - used = block->used; } } + used = block->used; + block->used = used + size; ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); - return((block->data) + used); + return(block->data + used); } /*********************************************************************//** @@ -210,7 +158,6 @@ dyn_array_open( smaller than DYN_ARRAY_DATA_SIZE! */ { dyn_block_t* block; - ulint used; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -218,28 +165,23 @@ dyn_array_open( ut_ad(size); block = arr; - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { /* Get the last array block */ block = dyn_array_get_last_block(arr); - used = block->used; - if (used + size > DYN_ARRAY_DATA_SIZE) { + if (block->used + size > DYN_ARRAY_DATA_SIZE) { block = dyn_array_add_block(arr); - used = block->used; ut_a(size <= DYN_ARRAY_DATA_SIZE); } } ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); -#ifdef UNIV_DEBUG ut_ad(arr->buf_end == 0); + ut_d(arr->buf_end = block->used + size); - arr->buf_end = used + size; -#endif - return((block->data) + used); + return(block->data + block->used); } /*********************************************************************//** @@ -248,8 +190,8 @@ UNIV_INLINE void dyn_array_close( /*============*/ - dyn_array_t* arr, /*!< in: dynamic array */ - byte* ptr) /*!< in: buffer space from ptr up was not used */ + dyn_array_t* arr, /*!< in/out: dynamic array */ + const byte* ptr) /*!< in: end of used space */ { dyn_block_t* block; @@ -264,9 +206,7 @@ dyn_array_close( ut_ad(block->used <= DYN_ARRAY_DATA_SIZE); -#ifdef UNIV_DEBUG - arr->buf_end = 0; -#endif + ut_d(arr->buf_end = 0); } /************************************************************//** @@ -276,12 +216,11 @@ UNIV_INLINE void* dyn_array_get_element( /*==================*/ - dyn_array_t* arr, /*!< in: dyn array */ - ulint pos) /*!< in: position of element as bytes - from array start */ + const dyn_array_t* arr, /*!< in: dyn array */ + ulint pos) /*!< in: position of element + in bytes from array start */ { - dyn_block_t* block; - ulint used; + const dyn_block_t* block; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -290,21 +229,23 @@ dyn_array_get_element( block = dyn_array_get_first_block(arr); if (arr->heap != NULL) { - used = dyn_block_get_used(block); + for (;;) { + ulint used = dyn_block_get_used(block); + + if (pos < used) { + break; + } - while (pos >= used) { pos -= used; block = UT_LIST_GET_NEXT(list, block); ut_ad(block); - - used = dyn_block_get_used(block); } } ut_ad(block); ut_ad(dyn_block_get_used(block) >= pos); - return(block->data + pos); + return((byte*) block->data + pos); } /************************************************************//** @@ -314,10 +255,10 @@ UNIV_INLINE ulint dyn_array_get_data_size( /*====================*/ - dyn_array_t* arr) /*!< in: dyn array */ + const dyn_array_t* arr) /*!< in: dyn array */ { - dyn_block_t* block; - ulint sum = 0; + const dyn_block_t* block; + ulint sum = 0; ut_ad(arr); ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N); @@ -344,7 +285,7 @@ UNIV_INLINE void dyn_push_string( /*============*/ - dyn_array_t* arr, /*!< in: dyn array */ + dyn_array_t* arr, /*!< in/out: dyn array */ const byte* str, /*!< in: string to write */ ulint len) /*!< in: string length */ { diff --git a/include/fil0fil.h b/include/fil0fil.h index 2149d0aadca..881623b30cf 100644 --- a/include/fil0fil.h +++ b/include/fil0fil.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -328,10 +328,12 @@ fil_write_flushed_lsn_to_data_files( ulint arch_log_no); /*!< in: latest archived log file number */ /*******************************************************************//** -Reads the flushed lsn and arch no fields from a data file at database -startup. */ +Reads the flushed lsn, arch no, and tablespace flag fields from a data +file at database startup. +@retval NULL on success, or if innodb_force_recovery is set +@return pointer to an error message string */ UNIV_INTERN -void +const char* fil_read_first_page( /*================*/ os_file_t data_file, /*!< in: open data file */ @@ -347,8 +349,9 @@ fil_read_first_page( #endif /* UNIV_LOG_ARCHIVE */ ib_uint64_t* min_flushed_lsn, /*!< out: min of flushed lsn values in data files */ - ib_uint64_t* max_flushed_lsn); /*!< out: max of flushed + ib_uint64_t* max_flushed_lsn) /*!< out: max of flushed lsn values in data files */ + __attribute__((warn_unused_result)); /*******************************************************************//** Increments the count of pending operation, if space is not being deleted. @return TRUE if being deleted, and operation should be skipped */ diff --git a/include/ha_prototypes.h b/include/ha_prototypes.h index 64e7003ea0a..5852f0f0386 100644 --- a/include/ha_prototypes.h +++ b/include/ha_prototypes.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2006, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 2000, 2013, 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 @@ -325,4 +325,35 @@ thd_merge_sort_block_size( void* thd); /*!< in: thread handle (THD*), or NULL to query the global merge_sort_block_size */ +/********************************************************************** +Check if the length of the identifier exceeds the maximum allowed. +The input to this function is an identifier in charset my_charset_filename. +return true when length of identifier is too long. */ +UNIV_INTERN +my_bool +innobase_check_identifier_length( +/*=============================*/ + const char* id); /* in: identifier to check. it must belong + to charset my_charset_filename */ + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +uint +innobase_convert_to_system_charset( +/*===============================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len, /* in: length of 'to', in bytes */ + uint* errors); /* out: error return */ + +/********************************************************************** +Converts an identifier from my_charset_filename to UTF-8 charset. */ +uint +innobase_convert_to_filename_charset( +/*=================================*/ + char* to, /* out: converted identifier */ + const char* from, /* in: identifier to convert */ + ulint len); /* in: length of 'to', in bytes */ + + #endif diff --git a/include/log0log.h b/include/log0log.h index e4c19c41137..b67f362bd98 100644 --- a/include/log0log.h +++ b/include/log0log.h @@ -400,7 +400,9 @@ log_group_read_log_seg( byte* buf, /*!< in: buffer where to read */ log_group_t* group, /*!< in: log group */ ib_uint64_t start_lsn, /*!< in: read area start */ - ib_uint64_t end_lsn); /*!< in: read area end */ + ib_uint64_t end_lsn, /*!< in: read area end */ + ibool release_mutex); /*!< in: whether the log_sys->mutex + should be released before the read */ /******************************************************//** Writes a buffer to a log file group. */ UNIV_INTERN diff --git a/include/log0online.h b/include/log0online.h index 999a317780e..a20eef57d7a 100644 --- a/include/log0online.h +++ b/include/log0online.h @@ -159,6 +159,8 @@ struct log_online_bitmap_file_range_struct { /** Struct for an iterator through all bits of changed pages bitmap blocks */ struct log_bitmap_iterator_struct { + ibool failed; /*!< Has the iteration + stopped prematurely */ log_online_bitmap_file_range_t in_files; /*!< The bitmap files for this iterator */ size_t in_i; /*!< Currently read diff --git a/include/mtr0mtr.h b/include/mtr0mtr.h index c51632e0ed5..031fccd300c 100644 --- a/include/mtr0mtr.h +++ b/include/mtr0mtr.h @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -295,9 +295,10 @@ UNIV_INTERN void mtr_memo_release( /*=============*/ - mtr_t* mtr, /*!< in: mtr */ + mtr_t* mtr, /*!< in/out: mini-transaction */ void* object, /*!< in: object */ - ulint type); /*!< in: object type: MTR_MEMO_S_LOCK, ... */ + ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */ + __attribute__((nonnull)); #ifdef UNIV_DEBUG # ifndef UNIV_HOTBACKUP /**********************************************************//** @@ -309,7 +310,8 @@ mtr_memo_contains( /*==============*/ mtr_t* mtr, /*!< in: mtr */ const void* object, /*!< in: object to search */ - ulint type); /*!< in: type of object */ + ulint type) /*!< in: type of object */ + __attribute__((warn_unused_result, nonnull)); /**********************************************************//** Checks if memo contains the given page. diff --git a/include/os0file.h b/include/os0file.h index a4e13777680..a7b74c83f39 100644 --- a/include/os0file.h +++ b/include/os0file.h @@ -21,7 +21,7 @@ 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 +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ***********************************************************************/ @@ -76,15 +76,19 @@ extern ulint os_n_pending_writes; #endif #ifdef __WIN__ +#define SRV_PATH_SEPARATOR '\\' /** File handle */ # define os_file_t HANDLE +# define os_file_invalid INVALID_HANDLE_VALUE /** Convert a C file descriptor to a native file handle @param fd file descriptor @return native file handle */ # define OS_FILE_FROM_FD(fd) (HANDLE) _get_osfhandle(fd) #else +#define SRV_PATH_SEPARATOR '/' /** File handle */ typedef int os_file_t; +# define os_file_invalid (-1) /** Convert a C file descriptor to a native file handle @param fd file descriptor @return native file handle */ @@ -819,7 +823,6 @@ pfs_os_file_rename_func( ulint src_line);/*!< in: line where the func invoked */ #endif /* UNIV_PFS_IO */ -#ifdef UNIV_HOTBACKUP /***********************************************************************//** Closes a file handle. @return TRUE if success */ @@ -828,7 +831,6 @@ ibool os_file_close_no_error_handling( /*============================*/ os_file_t file); /*!< in, own: handle to a file */ -#endif /* UNIV_HOTBACKUP */ /***********************************************************************//** Gets a file size. @return TRUE if success */ diff --git a/include/page0zip.ic b/include/page0zip.ic index 75cc7a9fcc4..9e9dda90936 100644 --- a/include/page0zip.ic +++ b/include/page0zip.ic @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2009, Innobase Oy. All Rights Reserved. +Copyright (c) 2005, 2013, 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 @@ -188,8 +188,8 @@ page_zip_rec_needs_ext( one record on an empty leaf page. Subtract 1 byte for the encoded heap number. Check also the available space on the uncompressed page. */ - return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2) - >= (page_zip_empty_size(n_fields, zip_size) - 1) + return(rec_size - (REC_N_NEW_EXTRA_BYTES - 2 - 1) + >= page_zip_empty_size(n_fields, zip_size) || rec_size >= page_get_free_space_of_empty(TRUE) / 2); } @@ -229,9 +229,7 @@ ibool page_zip_get_trailer_len( /*=====================*/ const page_zip_des_t* page_zip,/*!< in: compressed page */ - ibool is_clust,/*!< in: TRUE if clustered index */ - ulint* entry_size)/*!< out: size of the uncompressed - portion of a user record */ + ibool is_clust)/*!< in: TRUE if clustered index */ { ulint uncompressed_size; @@ -250,10 +248,6 @@ page_zip_get_trailer_len( ut_ad(!page_zip->n_blobs); } - if (entry_size) { - *entry_size = uncompressed_size; - } - return((page_dir_get_n_heap(page_zip->data) - 2) * uncompressed_size + page_zip->n_blobs * BTR_EXTERN_FIELD_REF_SIZE); @@ -270,11 +264,9 @@ page_zip_max_ins_size( const page_zip_des_t* page_zip,/*!< in: compressed page */ ibool is_clust)/*!< in: TRUE if clustered index */ { - ulint uncompressed_size; ulint trailer_len; - trailer_len = page_zip_get_trailer_len(page_zip, is_clust, - &uncompressed_size); + trailer_len = page_zip_get_trailer_len(page_zip, is_clust); /* When a record is created, a pointer may be added to the dense directory. @@ -283,7 +275,7 @@ page_zip_max_ins_size( Also the BLOB pointers will be allocated from there, but we may as well count them in the length of the record. */ - trailer_len += uncompressed_size; + trailer_len += PAGE_ZIP_DIR_SLOT_SIZE; return((lint) page_zip_get_size(page_zip) - trailer_len - page_zip->m_end @@ -303,13 +295,11 @@ page_zip_available( ulint create) /*!< in: nonzero=add the record to the heap */ { - ulint uncompressed_size; ulint trailer_len; ut_ad(length > REC_N_NEW_EXTRA_BYTES); - trailer_len = page_zip_get_trailer_len(page_zip, is_clust, - &uncompressed_size); + trailer_len = page_zip_get_trailer_len(page_zip, is_clust); /* Subtract the fixed extra bytes and add the maximum space needed for identifying the record (encoded heap_no). */ @@ -323,7 +313,7 @@ page_zip_available( Also the BLOB pointers will be allocated from there, but we may as well count them in the length of the record. */ - trailer_len += uncompressed_size; + trailer_len += PAGE_ZIP_DIR_SLOT_SIZE; } return(UNIV_LIKELY(length diff --git a/include/srv0srv.h b/include/srv0srv.h index c4fb9712b51..d484f535b55 100644 --- a/include/srv0srv.h +++ b/include/srv0srv.h @@ -246,6 +246,11 @@ extern ulong srv_sys_stats_root_page; #endif extern ibool srv_use_doublewrite_buf; +extern ibool srv_use_atomic_writes; +#ifdef HAVE_POSIX_FALLOCATE +extern ibool srv_use_posix_fallocate; +#endif + extern ibool srv_use_checksums; extern ibool srv_fast_checksum; @@ -289,6 +294,9 @@ extern ulint srv_n_rows_updated; extern ulint srv_n_rows_deleted; extern ulint srv_n_rows_read; +extern ulint srv_read_views_memory; +extern ulint srv_descriptors_memory; + extern ibool srv_print_innodb_monitor; extern ibool srv_print_innodb_lock_monitor; extern ibool srv_print_innodb_tablespace_monitor; @@ -893,6 +901,8 @@ struct export_var_struct{ ulint innodb_rows_updated; /*!< srv_n_rows_updated */ ulint innodb_rows_deleted; /*!< srv_n_rows_deleted */ ulint innodb_truncated_status_writes; /*!< srv_truncated_status_writes */ + ulint innodb_read_views_memory; /*!< srv_read_views_memory */ + ulint innodb_descriptors_memory; /*!< srv_descriptors_memory */ ib_int64_t innodb_s_lock_os_waits; ib_int64_t innodb_s_lock_spin_rounds; ib_int64_t innodb_s_lock_spin_waits; diff --git a/include/ut0dbg.h b/include/ut0dbg.h index 07730176d81..4913b357768 100644 --- a/include/ut0dbg.h +++ b/include/ut0dbg.h @@ -55,47 +55,8 @@ ut_dbg_assertion_failed( ulint line) /*!< in: line number of the assertion */ UNIV_COLD __attribute__((nonnull(2))); -#if defined(__WIN__) || defined(__INTEL_COMPILER) -# undef UT_DBG_USE_ABORT -#elif defined(__GNUC__) && (__GNUC__ > 2) -# define UT_DBG_USE_ABORT -#endif - -#ifndef UT_DBG_USE_ABORT -/** A null pointer that will be dereferenced to trigger a memory trap */ -extern ulint* ut_dbg_null_ptr; -#endif - -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads -will stop at the next ut_a() or ut_ad(). */ -extern ibool ut_dbg_stop_threads; - -/*************************************************************//** -Stop a thread after assertion failure. */ -UNIV_INTERN -void -ut_dbg_stop_thread( -/*===============*/ - const char* file, - ulint line); -#endif - -#ifdef UT_DBG_USE_ABORT /** Abort the execution. */ # define UT_DBG_PANIC abort() -/** Stop threads (null operation) */ -# define UT_DBG_STOP do {} while (0) -#else /* UT_DBG_USE_ABORT */ -/** Abort the execution. */ -# define UT_DBG_PANIC \ - if (*(ut_dbg_null_ptr)) ut_dbg_null_ptr = NULL -/** Stop threads in ut_a(). */ -# define UT_DBG_STOP do \ - if (UNIV_UNLIKELY(ut_dbg_stop_threads)) { \ - ut_dbg_stop_thread(__FILE__, (ulint) __LINE__); \ - } while (0) -#endif /* UT_DBG_USE_ABORT */ /** Abort execution if EXPR does not evaluate to nonzero. @param EXPR assertion expression that should hold */ @@ -105,7 +66,6 @@ ut_dbg_stop_thread( __FILE__, (ulint) __LINE__); \ UT_DBG_PANIC; \ } \ - UT_DBG_STOP; \ } while (0) /** Abort execution. */ diff --git a/lock/lock0lock.c b/lock/lock0lock.c index f4c991d4fe9..70df6f1a66a 100644 --- a/lock/lock0lock.c +++ b/lock/lock0lock.c @@ -2005,6 +2005,8 @@ lock_rec_lock_fast( || mode - (LOCK_MODE_MASK & mode) == 0 || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP); + DBUG_EXECUTE_IF("innodb_report_deadlock", return(LOCK_REC_FAIL);); + lock = lock_rec_get_first_on_page(block); trx = thr_get_trx(thr); @@ -2082,6 +2084,8 @@ lock_rec_lock_slow( trx = thr_get_trx(thr); + DBUG_EXECUTE_IF("innodb_report_deadlock", return(DB_DEADLOCK);); + lock = lock_rec_has_expl(mode, block, heap_no, trx); if (lock) { if (lock->type_mode & LOCK_CONV_BY_OTHER) { @@ -4145,6 +4149,7 @@ lock_rec_unlock( ut_ad(trx && rec); ut_ad(block->frame == page_align(rec)); + ut_ad(trx->state == TRX_ACTIVE); heap_no = page_rec_get_heap_no(rec); @@ -5002,6 +5007,7 @@ lock_rec_validate_page( { const lock_t* lock; const rec_t* rec; + dict_index_t* index; ulint nth_lock = 0; ulint nth_bit = 0; ulint i; @@ -5051,6 +5057,7 @@ loop: if (i == 1 || lock_rec_get_nth_bit(lock, i)) { + index = lock->index; rec = page_find_rec_with_heap_no(block->frame, i); ut_a(rec); offsets = rec_get_offsets(rec, lock->index, offsets, @@ -5067,7 +5074,7 @@ loop: check WILL break the latching order and may cause a deadlock of threads. */ - lock_rec_queue_validate(block, rec, lock->index, + lock_rec_queue_validate(block, rec, index, offsets); lock_mutex_enter_kernel(); diff --git a/log/log0log.c b/log/log0log.c index 298234050e8..919fca5527b 100644 --- a/log/log0log.c +++ b/log/log0log.c @@ -2307,7 +2307,8 @@ loop: } /******************************************************//** -Reads a specified log segment to a buffer. */ +Reads a specified log segment to a buffer. Optionally releases the log mutex +before the I/O. */ UNIV_INTERN void log_group_read_log_seg( @@ -2316,7 +2317,9 @@ log_group_read_log_seg( byte* buf, /*!< in: buffer where to read */ log_group_t* group, /*!< in: log group */ ib_uint64_t start_lsn, /*!< in: read area start */ - ib_uint64_t end_lsn) /*!< in: read area end */ + ib_uint64_t end_lsn, /*!< in: read area end */ + ibool release_mutex) /*!< in: whether the log_sys->mutex + should be released before the read */ { ulint len; ulint source_offset; @@ -2346,6 +2349,10 @@ loop: log_sys->n_log_ios++; + if (release_mutex) { + mutex_exit(&(log_sys->mutex)); + } + fil_io(OS_FILE_READ | OS_FILE_LOG, sync, group->space_id, 0, source_offset / UNIV_PAGE_SIZE, source_offset % UNIV_PAGE_SIZE, len, buf, NULL); @@ -2355,6 +2362,9 @@ loop: if (start_lsn != end_lsn) { + if (release_mutex) { + mutex_enter(&(log_sys->mutex)); + } goto loop; } } @@ -2846,7 +2856,7 @@ arch_none: log_group_read_log_seg(LOG_ARCHIVE, log_sys->archive_buf, UT_LIST_GET_FIRST(log_sys->log_groups), - start_lsn, limit_lsn); + start_lsn, limit_lsn, FALSE); mutex_exit(&(log_sys->mutex)); diff --git a/log/log0online.c b/log/log0online.c index be0a9708b8c..6d7cb928d9c 100644 --- a/log/log0online.c +++ b/log/log0online.c @@ -43,8 +43,8 @@ UNIV_INTERN mysql_pfs_key_t log_bmp_sys_mutex_key; /** Log parsing and bitmap output data structure */ struct log_bitmap_struct { - byte read_buf[FOLLOW_SCAN_SIZE]; - /*!< log read buffer */ + byte* read_buf_ptr; /*!< Unaligned log read buffer */ + byte* read_buf; /*!< log read buffer */ byte parse_buf[RECV_PARSING_BUF_SIZE]; /*!< log parse buffer */ byte* parse_buf_end; /*!< parse buffer position where the @@ -53,6 +53,8 @@ struct log_bitmap_struct { parsed, it points to the start, otherwise points immediatelly past the end of the incomplete log record. */ + char bmp_file_home[FN_REFLEN]; + /*!< directory for bitmap files */ log_online_bitmap_file_t out; /*!< The current bitmap file */ ulint out_seq_num; /*!< the bitmap file sequence number */ ib_uint64_t start_lsn; /*!< the LSN of the next unparsed @@ -490,9 +492,8 @@ log_online_make_bitmap_name( ib_uint64_t start_lsn) /*!< in: the start LSN name part */ { ut_snprintf(log_bmp_sys->out.name, FN_REFLEN, bmp_file_name_template, - srv_data_home, bmp_file_name_stem, + log_bmp_sys->bmp_file_home, bmp_file_name_stem, log_bmp_sys->out_seq_num, start_lsn); - } /*********************************************************************//** @@ -509,7 +510,8 @@ log_online_should_overwrite( /* Currently, it's OK to overwrite 0-sized files only */ success = os_file_get_status(path, &file_info); - return success && file_info.size == 0LL; + return success && file_info.type == OS_FILE_TYPE_FILE + && file_info.size == 0LL; } /*********************************************************************//** @@ -525,7 +527,7 @@ log_online_start_bitmap_file(void) /* Check for an old file that should be deleted first */ if (log_online_should_overwrite(log_bmp_sys->out.name)) { - success = os_file_delete(log_bmp_sys->out.name); + success = os_file_delete_if_exists(log_bmp_sys->out.name); } if (UNIV_LIKELY(success)) { @@ -544,7 +546,6 @@ log_online_start_bitmap_file(void) fprintf(stderr, "InnoDB: Error: Cannot create \'%s\'\n", log_bmp_sys->out.name); - log_bmp_sys->out.file = -1; return FALSE; } @@ -563,9 +564,9 @@ log_online_rotate_bitmap_file( ib_uint64_t next_file_start_lsn) /*!out.file != -1) { + if (log_bmp_sys->out.file != os_file_invalid) { os_file_close(log_bmp_sys->out.file); - log_bmp_sys->out.file = -1; + log_bmp_sys->out.file = os_file_invalid; } log_bmp_sys->out_seq_num++; log_online_make_bitmap_name(next_file_start_lsn); @@ -613,6 +614,7 @@ log_online_read_init(void) os_file_dir_t bitmap_dir; os_file_stat_t bitmap_dir_file_info; ib_uint64_t last_file_start_lsn = MIN_TRACKED_LSN; + size_t srv_data_home_len; /* Bitmap data start and end in a bitmap block must be 8-byte aligned. */ @@ -620,20 +622,39 @@ log_online_read_init(void) compile_time_assert(MODIFIED_PAGE_BLOCK_BITMAP_LEN % 8 == 0); log_bmp_sys = ut_malloc(sizeof(*log_bmp_sys)); + log_bmp_sys->read_buf_ptr = ut_malloc(FOLLOW_SCAN_SIZE + + OS_FILE_LOG_BLOCK_SIZE); + log_bmp_sys->read_buf = ut_align(log_bmp_sys->read_buf_ptr, + OS_FILE_LOG_BLOCK_SIZE); mutex_create(log_bmp_sys_mutex_key, &log_bmp_sys->mutex, SYNC_LOG_ONLINE); + /* Initialize bitmap file directory from srv_data_home and add a path + separator if needed. */ + srv_data_home_len = strlen(srv_data_home); + ut_a (srv_data_home_len < FN_REFLEN); + strcpy(log_bmp_sys->bmp_file_home, srv_data_home); + if (srv_data_home_len + && log_bmp_sys->bmp_file_home[srv_data_home_len - 1] + != SRV_PATH_SEPARATOR) { + + ut_a (srv_data_home_len < FN_REFLEN - 1); + log_bmp_sys->bmp_file_home[srv_data_home_len] + = SRV_PATH_SEPARATOR; + log_bmp_sys->bmp_file_home[srv_data_home_len + 1] = '\0'; + } + /* Enumerate existing bitmap files to either open the last one to get the last tracked LSN either to find that there are none and start tracking from scratch. */ log_bmp_sys->out.name[0] = '\0'; log_bmp_sys->out_seq_num = 0; - bitmap_dir = os_file_opendir(srv_data_home, TRUE); + bitmap_dir = os_file_opendir(log_bmp_sys->bmp_file_home, TRUE); ut_a(bitmap_dir); - while (!os_file_readdir_next_file(srv_data_home, bitmap_dir, - &bitmap_dir_file_info)) { + while (!os_file_readdir_next_file(log_bmp_sys->bmp_file_home, + bitmap_dir, &bitmap_dir_file_info)) { ulong file_seq_num; ib_uint64_t file_start_lsn; @@ -648,8 +669,8 @@ log_online_read_init(void) && bitmap_dir_file_info.size > 0) { log_bmp_sys->out_seq_num = file_seq_num; last_file_start_lsn = file_start_lsn; - /* No dir component (srv_data_home) here, because - that's the cwd */ + /* No dir component (log_bmp_sys->bmp_file_home) here, + because that's the cwd */ strncpy(log_bmp_sys->out.name, bitmap_dir_file_info.name, FN_REFLEN - 1); log_bmp_sys->out.name[FN_REFLEN - 1] = '\0'; @@ -659,7 +680,7 @@ log_online_read_init(void) if (os_file_closedir(bitmap_dir)) { os_file_get_last_error(TRUE); fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", - srv_data_home); + log_bmp_sys->bmp_file_home); exit(1); } @@ -762,9 +783,9 @@ log_online_read_shutdown(void) { ib_rbt_node_t *free_list_node = log_bmp_sys->page_free_list; - if (log_bmp_sys->out.file != -1) { + if (log_bmp_sys->out.file != os_file_invalid) { os_file_close(log_bmp_sys->out.file); - log_bmp_sys->out.file = -1; + log_bmp_sys->out.file = os_file_invalid; } rbt_free(log_bmp_sys->modified_pages); @@ -777,6 +798,7 @@ log_online_read_shutdown(void) mutex_free(&log_bmp_sys->mutex); + ut_free(log_bmp_sys->read_buf_ptr); ut_free(log_bmp_sys); } @@ -978,8 +1000,8 @@ log_online_follow_log_seg( mutex_enter(&log_sys->mutex); log_group_read_log_seg(LOG_RECOVER, log_bmp_sys->read_buf, - group, block_start_lsn, block_end_lsn); - mutex_exit(&log_sys->mutex); + group, block_start_lsn, block_end_lsn, TRUE); + /* log_group_read_log_seg will release the log_sys->mutex for us */ while (log_block < log_block_end && log_bmp_sys->next_parse_lsn < log_bmp_sys->end_lsn) { @@ -1256,15 +1278,18 @@ log_online_setup_bitmap_file_range( os_file_dir_t bitmap_dir; os_file_stat_t bitmap_dir_file_info; ulong first_file_seq_num = ULONG_MAX; + ulong last_file_seq_num = 0; ib_uint64_t first_file_start_lsn = IB_ULONGLONG_MAX; + ut_ad(range_end >= range_start); + bitmap_files->count = 0; bitmap_files->files = NULL; /* 1st pass: size the info array */ bitmap_dir = os_file_opendir(srv_data_home, FALSE); - if (!bitmap_dir) { + if (UNIV_UNLIKELY(!bitmap_dir)) { fprintf(stderr, "InnoDB: Error: " "failed to open bitmap directory \'%s\'\n", @@ -1286,12 +1311,17 @@ log_online_setup_bitmap_file_range( continue; } + if (file_seq_num > last_file_seq_num) { + + last_file_seq_num = file_seq_num; + } + if (file_start_lsn >= range_start || file_start_lsn == first_file_start_lsn || first_file_start_lsn > range_start) { /* A file that falls into the range */ - bitmap_files->count++; + if (file_start_lsn < first_file_start_lsn) { first_file_start_lsn = file_start_lsn; @@ -1309,23 +1339,27 @@ log_online_setup_bitmap_file_range( } } - ut_a(first_file_seq_num != ULONG_MAX || bitmap_files->count == 0); + if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) { - if (os_file_closedir(bitmap_dir)) { os_file_get_last_error(TRUE); fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", srv_data_home); return FALSE; } - if (!bitmap_files->count) { + if (first_file_seq_num == ULONG_MAX && last_file_seq_num == 0) { + + bitmap_files->count = 0; return TRUE; } + bitmap_files->count = last_file_seq_num - first_file_seq_num + 1; + /* 2nd pass: get the file names in the file_seq_num order */ bitmap_dir = os_file_opendir(srv_data_home, FALSE); - if (!bitmap_dir) { + if (UNIV_UNLIKELY(!bitmap_dir)) { + fprintf(stderr, "InnoDB: Error: " "failed to open bitmap directory \'%s\'\n", srv_data_home); @@ -1349,11 +1383,25 @@ log_online_setup_bitmap_file_range( &file_start_lsn) || file_start_lsn >= range_end || file_start_lsn < first_file_start_lsn) { + continue; } array_pos = file_seq_num - first_file_seq_num; + if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) { + + fprintf(stderr, + "InnoDB: Error: inconsistent bitmap file " + "directory for a " + "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query" + "\n"); + free(bitmap_files->files); + return FALSE; + } + + if (file_seq_num > bitmap_files->files[array_pos].seq_num) { + bitmap_files->files[array_pos].seq_num = file_seq_num; strncpy(bitmap_files->files[array_pos].name, bitmap_dir_file_info.name, FN_REFLEN); @@ -1364,7 +1412,8 @@ log_online_setup_bitmap_file_range( } } - if (os_file_closedir(bitmap_dir)) { + if (UNIV_UNLIKELY(os_file_closedir(bitmap_dir))) { + os_file_get_last_error(TRUE); fprintf(stderr, "InnoDB: Error: cannot close \'%s\'\n", srv_data_home); @@ -1411,6 +1460,8 @@ log_online_open_bitmap_file_read_only( ulint size_low; ulint size_high; + ut_ad(name[0] != '\0'); + ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%s", srv_data_home, name); bitmap_file->file = os_file_create_simple_no_error_handling(innodb_file_bmp_key, @@ -1418,7 +1469,8 @@ log_online_open_bitmap_file_read_only( OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); - if (!success) { + if (UNIV_UNLIKELY(!success)) { + /* Here and below assume that bitmap file names do not contain apostrophes, thus no need for ut_print_filename(). */ fprintf(stderr, @@ -1461,7 +1513,8 @@ log_online_diagnose_bitmap_eof( || (bitmap_file->offset > bitmap_file->size - MODIFIED_PAGE_BLOCK_SIZE)) { - if (bitmap_file->offset != bitmap_file->size) { + if (UNIV_UNLIKELY(bitmap_file->offset != bitmap_file->size)) { + /* If we are not at EOF and we have less than one page to read, it's junk. This error is not fatal in itself. */ @@ -1472,7 +1525,8 @@ log_online_diagnose_bitmap_eof( bitmap_file->name); } - if (!last_page_in_run) { + if (UNIV_UNLIKELY(!last_page_in_run)) { + /* We are at EOF but the last read page did not finish a run */ /* It's a "Warning" here because it's not a fatal error @@ -1512,18 +1566,29 @@ log_online_bitmap_iterator_init( if (!log_online_setup_bitmap_file_range(&i->in_files, min_lsn, max_lsn)) { + i->failed = TRUE; return FALSE; } - ut_a(i->in_files.count > 0); + i->in_i = 0; + + if (i->in_files.count == 0) { + + /* Empty range */ + i->in.file = os_file_invalid; + i->page = NULL; + i->failed = FALSE; + return TRUE; + } /* Open the 1st bitmap file */ - i->in_i = 0; - if (!log_online_open_bitmap_file_read_only(i->in_files.files[i->in_i]. - name, - &i->in)) { + if (UNIV_UNLIKELY(!log_online_open_bitmap_file_read_only( + i->in_files.files[i->in_i].name, + &i->in))) { + i->in_i = i->in_files.count; free(i->in_files.files); + i->failed = TRUE; return FALSE; } @@ -1534,6 +1599,7 @@ log_online_bitmap_iterator_init( i->first_page_id = 0; i->last_page_in_run = TRUE; i->changed = FALSE; + i->failed = FALSE; return TRUE; } @@ -1548,11 +1614,20 @@ log_online_bitmap_iterator_release( { ut_a(i); - if (i->in_i < i->in_files.count) { + if (i->in.file != os_file_invalid) { + os_file_close(i->in.file); + i->in.file = os_file_invalid; } - ut_free(i->in_files.files); - ut_free(i->page); + if (i->in_files.files) { + + ut_free(i->in_files.files); + } + if (i->page) { + + ut_free(i->page); + } + i->failed = TRUE; } /*********************************************************************//** @@ -1567,10 +1642,16 @@ log_online_bitmap_iterator_next( log_bitmap_iterator_t *i) /*!bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN) + if (UNIV_UNLIKELY(i->in_files.count == 0)) { + + return FALSE; + } + + if (UNIV_LIKELY(i->bit_offset < MODIFIED_PAGE_BLOCK_BITMAP_LEN)) { ++i->bit_offset; i->changed = @@ -1587,29 +1668,56 @@ log_online_bitmap_iterator_next( /* Advance file */ i->in_i++; - os_file_close(i->in.file); - log_online_diagnose_bitmap_eof(&i->in, - i->last_page_in_run); - if (i->in_i == i->in_files.count - || i->in_files.files[i->in_i].seq_num == 0) { + success = os_file_close_no_error_handling(i->in.file); + i->in.file = os_file_invalid; + if (UNIV_UNLIKELY(!success)) { + + os_file_get_last_error(TRUE); + i->failed = TRUE; + return FALSE; + } + + success = log_online_diagnose_bitmap_eof( + &i->in, i->last_page_in_run); + if (UNIV_UNLIKELY(!success)) { + + i->failed = TRUE; + return FALSE; + + } + + if (i->in_i == i->in_files.count) { return FALSE; } - if (!log_online_open_bitmap_file_read_only( + if (UNIV_UNLIKELY(i->in_files.files[i->in_i].seq_num + == 0)) { + + i->failed = TRUE; + return FALSE; + } + + success = log_online_open_bitmap_file_read_only( i->in_files.files[i->in_i].name, - &i->in)) { + &i->in); + if (UNIV_UNLIKELY(!success)) { + + i->failed = TRUE; return FALSE; } } - if (!log_online_read_bitmap_page(&i->in, i->page, - &checksum_ok)) { + success = log_online_read_bitmap_page(&i->in, i->page, + &checksum_ok); + if (UNIV_UNLIKELY(!success)) { + os_file_get_last_error(TRUE); fprintf(stderr, "InnoDB: Warning: failed reading " "changed page bitmap file \'%s\'\n", i->in_files.files[i->in_i].name); + i->failed = TRUE; return FALSE; } } @@ -1666,7 +1774,7 @@ log_online_purge_changed_page_bitmaps( /* If we have to delete the current output file, close it first. */ os_file_close(log_bmp_sys->out.file); - log_bmp_sys->out.file = -1; + log_bmp_sys->out.file = os_file_invalid; } for (i = 0; i < bitmap_files.count; i++) { diff --git a/log/log0recv.c b/log/log0recv.c index b1d1d4c3273..295c067c9ab 100644 --- a/log/log0recv.c +++ b/log/log0recv.c @@ -546,7 +546,8 @@ recv_copy_group( } log_group_read_log_seg(LOG_RECOVER, log_sys->buf, - up_to_date_group, start_lsn, end_lsn); + up_to_date_group, start_lsn, end_lsn, + FALSE); len = (ulint) (end_lsn - start_lsn); @@ -590,7 +591,7 @@ recv_synchronize_groups( ut_a(start_lsn != end_lsn); log_group_read_log_seg(LOG_RECOVER, recv_sys->last_block, - up_to_date_group, start_lsn, end_lsn); + up_to_date_group, start_lsn, end_lsn, FALSE); group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -1709,19 +1710,6 @@ recv_recover_page_func( } #endif /* UNIV_ZIP_DEBUG */ - mutex_enter(&(recv_sys->mutex)); - - if (recv_max_page_lsn < page_lsn) { - recv_max_page_lsn = page_lsn; - } - - recv_addr->state = RECV_PROCESSED; - - ut_a(recv_sys->n_addrs); - recv_sys->n_addrs--; - - mutex_exit(&(recv_sys->mutex)); - #ifndef UNIV_HOTBACKUP if (modification_to_page) { ut_a(block); @@ -1738,6 +1726,20 @@ recv_recover_page_func( mtr.modifications = FALSE; mtr_commit(&mtr); + + mutex_enter(&(recv_sys->mutex)); + + if (recv_max_page_lsn < page_lsn) { + recv_max_page_lsn = page_lsn; + } + + recv_addr->state = RECV_PROCESSED; + + ut_a(recv_sys->n_addrs); + recv_sys->n_addrs--; + + mutex_exit(&(recv_sys->mutex)); + } #ifndef UNIV_HOTBACKUP @@ -2887,7 +2889,7 @@ recv_group_scan_log_recs( end_lsn = start_lsn + RECV_SCAN_SIZE; log_group_read_log_seg(LOG_RECOVER, log_sys->buf, - group, start_lsn, end_lsn); + group, start_lsn, end_lsn, FALSE); finished = recv_scan_log_recs( (buf_pool_get_n_pages() diff --git a/mem/mem0mem.c b/mem/mem0mem.c index 7727760f1cd..797de06c896 100644 --- a/mem/mem0mem.c +++ b/mem/mem0mem.c @@ -353,7 +353,13 @@ mem_heap_create_block( block = (mem_block_t*) buf_block->frame; } - ut_ad(block); + if(!block) { + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Unable to allocate memory of size %lu.\n", + len); + ut_error; + } block->buf_block = buf_block; block->free_block = NULL; #else /* !UNIV_HOTBACKUP */ diff --git a/mtr/mtr0mtr.c b/mtr/mtr0mtr.c index f0cd3fb77de..659eaa4c4dc 100644 --- a/mtr/mtr0mtr.c +++ b/mtr/mtr0mtr.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, 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 @@ -58,72 +58,81 @@ mtr_block_dirtied( /*****************************************************************//** Releases the item in the slot given. */ -static +static __attribute__((nonnull)) void -mtr_memo_slot_release( -/*==================*/ - mtr_t* mtr, /*!< in: mtr */ +mtr_memo_slot_release_func( +/*=======================*/ +#ifdef UNIV_DEBUG + mtr_t* mtr, /*!< in/out: mini-transaction */ +#endif /* UNIV_DEBUG */ mtr_memo_slot_t* slot) /*!< in: memo slot */ { - void* object; - ulint type; - - ut_ad(mtr); - ut_ad(slot); - -#ifndef UNIV_DEBUG - UT_NOT_USED(mtr); -#endif /* UNIV_DEBUG */ - - object = slot->object; - type = slot->type; - - if (UNIV_LIKELY(object != NULL)) { - if (type <= MTR_MEMO_BUF_FIX) { - buf_page_release((buf_block_t*)object, type); - } else if (type == MTR_MEMO_S_LOCK) { - rw_lock_s_unlock((rw_lock_t*)object); -#ifdef UNIV_DEBUG - } else if (type != MTR_MEMO_X_LOCK) { - ut_ad(type == MTR_MEMO_MODIFY); - ut_ad(mtr_memo_contains(mtr, object, - MTR_MEMO_PAGE_X_FIX)); -#endif /* UNIV_DEBUG */ - } else { - rw_lock_x_unlock((rw_lock_t*)object); - } - } - + void* object = slot->object; slot->object = NULL; + + /* slot release is a local operation for the current mtr. + We must not be holding the flush_order mutex while + doing this. */ + ut_ad(!log_flush_order_mutex_own()); + + switch (slot->type) { + case MTR_MEMO_PAGE_S_FIX: + case MTR_MEMO_PAGE_X_FIX: + case MTR_MEMO_BUF_FIX: + buf_page_release((buf_block_t*) object, slot->type); + break; + case MTR_MEMO_S_LOCK: + rw_lock_s_unlock((rw_lock_t*) object); + break; + case MTR_MEMO_X_LOCK: + rw_lock_x_unlock((rw_lock_t*) object); + break; +#ifdef UNIV_DEBUG + default: + ut_ad(slot->type == MTR_MEMO_MODIFY); + ut_ad(mtr_memo_contains(mtr, object, MTR_MEMO_PAGE_X_FIX)); +#endif /* UNIV_DEBUG */ + } } +#ifdef UNIV_DEBUG +# define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(mtr, slot) +#else /* UNIV_DEBUG */ +# define mtr_memo_slot_release(mtr, slot) mtr_memo_slot_release_func(slot) +#endif /* UNIV_DEBUG */ + /**********************************************************//** Releases the mlocks and other objects stored in an mtr memo. They are released in the order opposite to which they were pushed to the memo. */ -static +static __attribute__((nonnull)) void mtr_memo_pop_all( /*=============*/ - mtr_t* mtr) /*!< in: mtr */ + mtr_t* mtr) /*!< in/out: mini-transaction */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; + const dyn_block_t* block; - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_COMMITTING); /* Currently only used in commit */ - memo = &(mtr->memo); - offset = dyn_array_get_data_size(memo); + for (block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = (mtr_memo_slot_t*) dyn_block_get_data(block); + mtr_memo_slot_t* slot + = (mtr_memo_slot_t*) (dyn_block_get_data(block) + + dyn_block_get_used(block)); - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - slot = dyn_array_get_element(memo, offset); + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); - mtr_memo_slot_release(mtr, slot); + while (slot-- != start) { + if (slot->object != NULL) { + mtr_memo_slot_release(mtr, slot); + } + } } } @@ -319,42 +328,36 @@ UNIV_INTERN void mtr_memo_release( /*=============*/ - mtr_t* mtr, /*!< in: mtr */ + mtr_t* mtr, /*!< in/out: mini-transaction */ void* object, /*!< in: object */ ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */ { - mtr_memo_slot_t* slot; - dyn_array_t* memo; - ulint offset; + const dyn_block_t* block; - ut_ad(mtr); ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->state == MTR_ACTIVE); + /* We cannot release a page that has been written to in the + middle of a mini-transaction. */ + ut_ad(!mtr->modifications || type != MTR_MEMO_PAGE_X_FIX); - memo = &(mtr->memo); + for (block = dyn_array_get_last_block(&mtr->memo); + block; + block = dyn_array_get_prev_block(&mtr->memo, block)) { + const mtr_memo_slot_t* start + = (mtr_memo_slot_t*) dyn_block_get_data(block); + mtr_memo_slot_t* slot + = (mtr_memo_slot_t*) (dyn_block_get_data(block) + + dyn_block_get_used(block)); - offset = dyn_array_get_data_size(memo); + ut_ad(!(dyn_block_get_used(block) % sizeof(mtr_memo_slot_t))); - log_flush_order_mutex_enter(); - while (offset > 0) { - offset -= sizeof(mtr_memo_slot_t); - - slot = dyn_array_get_element(memo, offset); - - if (object == slot->object && type == slot->type) { - - /* We cannot release a page that has been written - to in the middle of a mini-transaction. */ - - ut_ad(!(mtr->modifications - && slot->type == MTR_MEMO_PAGE_X_FIX)); - - mtr_memo_slot_release(mtr, slot); - - break; + while (slot-- != start) { + if (object == slot->object && type == slot->type) { + mtr_memo_slot_release(mtr, slot); + return; + } } } - log_flush_order_mutex_exit(); } #endif /* !UNIV_HOTBACKUP */ diff --git a/os/os0file.c b/os/os0file.c index 6378001ea0d..90f0fe83b4d 100644 --- a/os/os0file.c +++ b/os/os0file.c @@ -21,7 +21,7 @@ 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 +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ***********************************************************************/ @@ -62,6 +62,13 @@ Created 10/21/1995 Heikki Tuuri #include #endif +#if defined(UNIV_LINUX) && defined(HAVE_SYS_IOCTL_H) +# include +# ifndef DFS_IOCTL_ATOMIC_WRITE_SET +# define DFS_IOCTL_ATOMIC_WRITE_SET _IOW(0x95, 2, uint) +# endif +#endif + /* This specifies the file permissions InnoDB uses when it creates files in Unix; the value of os_innodb_umask is initialized in ha_innodb.cc to my_umask */ @@ -1366,6 +1373,38 @@ os_file_set_nocache( #endif } +/****************************************************************//** +Tries to enable the atomic write feature, if available, for the specified file +handle. +@return TRUE if success */ +static __attribute__((warn_unused_result)) +ibool +os_file_set_atomic_writes( +/*======================*/ + const char* name /*!< in: name of the file */ + __attribute__((unused)), + os_file_t file /*!< in: handle to the file */ + __attribute__((unused))) + +{ +#ifdef DFS_IOCTL_ATOMIC_WRITE_SET + int atomic_option = 1; + + if (ioctl(file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option)) { + + os_file_handle_error_no_exit(name, "ioctl"); + return(FALSE); + } + + return(TRUE); +#else + fprintf(stderr, "InnoDB: Error: trying to enable atomic writes on " + "non-supported platform! Please restart with " + "innodb_use_atomic_writes disabled.\n"); + return(FALSE); +#endif +} + /****************************************************************//** NOTE! Use the corresponding macro os_file_create(), not directly this function! @@ -1637,6 +1676,14 @@ try_again: } #endif /* USE_FILE_LOCK */ + if (srv_use_atomic_writes && type == OS_DATA_FILE + && os_file_set_atomic_writes(name, file)) { + + *success = FALSE; + close(file); + file = -1; + } + return(file); #endif /* __WIN__ */ } @@ -1846,7 +1893,6 @@ os_file_close_func( #endif } -#ifdef UNIV_HOTBACKUP /***********************************************************************//** Closes a file handle. @return TRUE if success */ @@ -1881,7 +1927,6 @@ os_file_close_no_error_handling( return(TRUE); #endif } -#endif /* UNIV_HOTBACKUP */ /***********************************************************************//** Gets a file size. @@ -1980,6 +2025,22 @@ os_file_set_size( current_size = 0; desired_size = (ib_int64_t)size + (((ib_int64_t)size_high) << 32); +#ifdef HAVE_POSIX_FALLOCATE + if (srv_use_posix_fallocate) { + + if (posix_fallocate(file, current_size, desired_size) == -1) { + + fprintf(stderr, "InnoDB: Error: preallocating file " + "space for file \'%s\' failed. Current size " + "%lld, desired size %lld\n", + name, current_size, desired_size); + os_file_handle_error_no_exit(name, "posix_fallocate"); + return(FALSE); + } + return(TRUE); + } +#endif + /* Write up to 1 megabyte at a time. */ buf_size = ut_min(64, (ulint) (desired_size / UNIV_PAGE_SIZE)) * UNIV_PAGE_SIZE; diff --git a/page/page0zip.c b/page/page0zip.c index 5357479908f..1cf707d0999 100644 --- a/page/page0zip.c +++ b/page/page0zip.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2005, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2005, 2013, 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 @@ -837,11 +837,12 @@ page_zip_compress_node_ptrs( c_stream->next_in = (byte*) rec; c_stream->avail_in = rec_offs_data_size(offsets) - REC_NODE_PTR_SIZE; - ut_ad(c_stream->avail_in); - err = deflate(c_stream, Z_NO_FLUSH); - if (UNIV_UNLIKELY(err != Z_OK)) { - break; + if (c_stream->avail_in) { + err = deflate(c_stream, Z_NO_FLUSH); + if (UNIV_UNLIKELY(err != Z_OK)) { + break; + } } ut_ad(!c_stream->avail_in); @@ -2274,13 +2275,12 @@ zlib_done: if (UNIV_UNLIKELY (page_zip_get_trailer_len(page_zip, - dict_index_is_clust(index), NULL) + dict_index_is_clust(index)) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_node_ptrs:" " %lu + %lu >= %lu, %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, dict_index_is_clust(index), - NULL), + page_zip, dict_index_is_clust(index)), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip), (ulong) dict_index_is_clust(index))); @@ -2431,12 +2431,12 @@ zlib_done: page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } - if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, FALSE, NULL) + if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, FALSE) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_sec: %lu + %lu >= %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, FALSE, NULL), + page_zip, FALSE), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip))); return(FALSE); @@ -2762,12 +2762,12 @@ zlib_done: page_zip->m_nonempty = mod_log_ptr != d_stream->next_in; } - if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, TRUE, NULL) + if (UNIV_UNLIKELY(page_zip_get_trailer_len(page_zip, TRUE) + page_zip->m_end >= page_zip_get_size(page_zip))) { page_zip_fail(("page_zip_decompress_clust: %lu + %lu >= %lu\n", (ulong) page_zip_get_trailer_len( - page_zip, TRUE, NULL), + page_zip, TRUE), (ulong) page_zip->m_end, (ulong) page_zip_get_size(page_zip))); return(FALSE); @@ -4642,8 +4642,7 @@ page_zip_copy_recs( memcpy(page_zip, src_zip, sizeof *page_zip); page_zip->data = data; } - ut_ad(page_zip_get_trailer_len(page_zip, - dict_index_is_clust(index), NULL) + ut_ad(page_zip_get_trailer_len(page_zip, dict_index_is_clust(index)) + page_zip->m_end < page_zip_get_size(page_zip)); if (!page_is_leaf(src) diff --git a/percona-suite/grep.inc b/percona-suite/grep.inc deleted file mode 100644 index c9c823fa695..00000000000 --- a/percona-suite/grep.inc +++ /dev/null @@ -1,16 +0,0 @@ -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/have_response_time_distribution.inc b/percona-suite/have_response_time_distribution.inc deleted file mode 100644 index aa4bf40ce67..00000000000 --- a/percona-suite/have_response_time_distribution.inc +++ /dev/null @@ -1,4 +0,0 @@ --- 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 deleted file mode 100644 index fd7196830ff..00000000000 --- a/percona-suite/have_response_time_distribution.require +++ /dev/null @@ -1,2 +0,0 @@ -Variable_name Value -have_response_time_distribution YES diff --git a/percona-suite/percona_bug643149.result b/percona-suite/percona_bug643149.result deleted file mode 100644 index 1a447a194e7..00000000000 --- a/percona-suite/percona_bug643149.result +++ /dev/null @@ -1,21 +0,0 @@ -SET @old_slow_query_log_file=@@global.slow_query_log_file; -SET GLOBAL slow_query_log=on; -SET LOCAL log_slow_verbosity='profiling'; -SET LOCAL long_query_time=0; -SET GLOBAL slow_query_log_file='MYSQLTEST_VARDIR/percona_bug643149_slow.log';; -SELECT 1; -1 -1 -# 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_Opening_tables: X.X Profile_Opening_tables_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_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 -# 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_end: X.X Profile_end_cpu: X.X Profile_query_end: X.X Profile_query_end_cpu: X.X Profile_closing_tables: X.X Profile_closing_tables_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/percona_bug643149.test b/percona-suite/percona_bug643149.test deleted file mode 100644 index fa31b169a19..00000000000 --- a/percona-suite/percona_bug643149.test +++ /dev/null @@ -1,49 +0,0 @@ -# -# 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. ---source include/have_profiling.inc -let $fixed_bug38124 = 0; - -SET @old_slow_query_log_file=@@global.slow_query_log_file; -SET GLOBAL slow_query_log=on; -SET LOCAL log_slow_verbosity='profiling'; -SET LOCAL long_query_time=0; - -let slogfile=$MYSQLTEST_VARDIR/percona_bug643149_slow.log; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---eval SET GLOBAL slow_query_log_file='$slogfile'; - -SELECT 1; - -perl; - $slogfile= $ENV{'slogfile'}; - - open(FILE, "$slogfile") or - die("Unable to read slow query log file $slogfile: $!\n"); - while() { - next if (!/^#/); - next if (/^# Time:/); - s/[0-9]+/X/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/percona_flush_contiguous_neighbors-master.opt b/percona-suite/percona_flush_contiguous_neighbors-master.opt deleted file mode 100644 index 075af88054f..00000000000 --- a/percona-suite/percona_flush_contiguous_neighbors-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_flush_neighbor_pages=cont diff --git a/percona-suite/percona_flush_contiguous_neighbors.result b/percona-suite/percona_flush_contiguous_neighbors.result deleted file mode 100644 index 8c6b81f0848..00000000000 --- a/percona-suite/percona_flush_contiguous_neighbors.result +++ /dev/null @@ -1,21 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (id INT AUTO_INCREMENT, foo CHAR(255), PRIMARY KEY (id)) ENGINE=InnoDB; -INSERT INTO t1(foo) VALUES ('a'), ('b'); -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -DROP TABLE t1; diff --git a/percona-suite/percona_flush_contiguous_neighbors.test b/percona-suite/percona_flush_contiguous_neighbors.test deleted file mode 100644 index d80d9dc9430..00000000000 --- a/percona-suite/percona_flush_contiguous_neighbors.test +++ /dev/null @@ -1,36 +0,0 @@ -# Test for innodb_flush_neighbor_pages=contiguous. -# The test is very crude: we simply overflow the buffer pool with such a number of -# new/modified pages that some flushing is bound to happen. - ---source include/have_innodb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (id INT AUTO_INCREMENT, foo CHAR(255), PRIMARY KEY (id)) ENGINE=InnoDB; - -INSERT INTO t1(foo) VALUES ('a'), ('b'); -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; -INSERT INTO t1(foo) SELECT foo FROM t1; - -# TODO: cannot record a stable value here. A check of > 0 should be enough, -# but the variable is not accessible through INFORMATION_SCHEMA currently. -# SHOW GLOBAL STATUS LIKE 'Innodb_buffer_pool_pages_flushed'; - -DROP TABLE t1; 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 e5373606099..00000000000 --- a/percona-suite/percona_innodb_buffer_pool_shm.result +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index a50b9e41b51..00000000000 --- a/percona-suite/percona_innodb_buffer_pool_shm.test +++ /dev/null @@ -1,2 +0,0 @@ ---source include/have_innodb.inc -show variables like 'innodb_buffer_pool_shm%'; diff --git a/percona-suite/percona_innodb_deadlock_count.result b/percona-suite/percona_innodb_deadlock_count.result deleted file mode 100644 index 00902e87feb..00000000000 --- a/percona-suite/percona_innodb_deadlock_count.result +++ /dev/null @@ -1,28 +0,0 @@ -# Establish connection con1 (user=root) -# Establish connection con2 (user=root) -# Establish connection con3 (user=root) -# Drop test table -drop table if exists t; -# Create test table -create table t(a INT PRIMARY KEY, b INT) engine=InnoDB; -# Insert two rows to test table -insert into t values(2,1); -insert into t values(1,2); -# Switch to connection con1 -BEGIN; -SELECT b FROM t WHERE a=1 FOR UPDATE; -# Switch to connection con2 -BEGIN; -SELECT b FROM t WHERE a=2 FOR UPDATE; -# Switch to connection con1 -SELECT b FROM t WHERE a=2 FOR UPDATE; -# Switch to connection con2 -SELECT b FROM t WHERE a=1 FOR UPDATE; -# Switch to connection con1 -ROLLBACK; -# Switch to connection con2 -ROLLBACK; -# Switch to connection con3 -Deadlocks: 1 -# Drop test table -drop table t; diff --git a/percona-suite/percona_innodb_deadlock_count.test b/percona-suite/percona_innodb_deadlock_count.test deleted file mode 100644 index 8895eff226e..00000000000 --- a/percona-suite/percona_innodb_deadlock_count.test +++ /dev/null @@ -1,61 +0,0 @@ ---source include/have_innodb.inc ---echo # Establish connection con1 (user=root) -connect (con1,localhost,root,,); ---echo # Establish connection con2 (user=root) -connect (con2,localhost,root,,); ---echo # Establish connection con3 (user=root) -connect (con3,localhost,root,,); ---echo # Drop test table ---disable_warnings -drop table if exists t; ---enable_warnings - ---echo # Create test table -create table t(a INT PRIMARY KEY, b INT) engine=InnoDB; ---echo # Insert two rows to test table -insert into t values(2,1); -insert into t values(1,2); - -#--echo # Save current deadlock count -let $current = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`; - ---disable_result_log - ---echo # Switch to connection con1 -connection con1; -BEGIN; SELECT b FROM t WHERE a=1 FOR UPDATE; - ---echo # Switch to connection con2 -connection con2; -BEGIN; SELECT b FROM t WHERE a=2 FOR UPDATE; - ---echo # Switch to connection con1 -connection con1; -SEND SELECT b FROM t WHERE a=2 FOR UPDATE; - ---echo # Switch to connection con2 -connection con2; -SEND SELECT b FROM t WHERE a=1 FOR UPDATE; - ---echo # Switch to connection con1 -connection con1; ---error 0, ER_LOCK_DEADLOCK -reap; -ROLLBACK; - ---echo # Switch to connection con2 -connection con2; ---error 0, ER_LOCK_DEADLOCK -reap; -ROLLBACK; - ---echo # Switch to connection con3 -connection con3; -let $result = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_deadlocks'`; - ---enable_result_log - -let $diff = `SELECT $result - $current`; -echo Deadlocks: $diff; ---echo # Drop test table -drop table t; diff --git a/percona-suite/percona_innodb_doublewrite_file-master.opt b/percona-suite/percona_innodb_doublewrite_file-master.opt deleted file mode 100644 index 0f4d0c45410..00000000000 --- a/percona-suite/percona_innodb_doublewrite_file-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_doublewrite_file=ib_doublewrite diff --git a/percona-suite/percona_innodb_doublewrite_file.result b/percona-suite/percona_innodb_doublewrite_file.result deleted file mode 100644 index 4d086cc4498..00000000000 --- a/percona-suite/percona_innodb_doublewrite_file.result +++ /dev/null @@ -1,4 +0,0 @@ -show variables like 'innodb_doublewrite%'; -Variable_name Value -innodb_doublewrite ON -innodb_doublewrite_file ib_doublewrite diff --git a/percona-suite/percona_innodb_doublewrite_file.test b/percona-suite/percona_innodb_doublewrite_file.test deleted file mode 100644 index 8068d561190..00000000000 --- a/percona-suite/percona_innodb_doublewrite_file.test +++ /dev/null @@ -1,2 +0,0 @@ ---source include/have_innodb.inc -show variables like 'innodb_doublewrite%'; diff --git a/percona-suite/percona_innodb_expand_fast_index_creation.result b/percona-suite/percona_innodb_expand_fast_index_creation.result deleted file mode 100644 index b8cec3d4398..00000000000 --- a/percona-suite/percona_innodb_expand_fast_index_creation.result +++ /dev/null @@ -1,64 +0,0 @@ -CREATE TABLE t1( -id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, -a CHAR(1) NOT NULL, -b CHAR(36) NOT NULL) ENGINE=InnoDB; -INSERT INTO t1(a,b) VALUES ('a','b'); -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -ALTER TABLE t1 ADD KEY (a); -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b; -id 1 -select_type SIMPLE -table t1 -type ALL -possible_keys a -key NULL -key_len NULL -ref NULL -rows 16 -Extra -id 1 -select_type SIMPLE -table t2 -type ref -possible_keys a -key a -key_len 1 -ref test.t1.a -rows 1 -Extra Using where -ALTER TABLE t1 DROP KEY a; -SET expand_fast_index_creation = 1; -SELECT @@expand_fast_index_creation; -@@expand_fast_index_creation -1 -ALTER TABLE t1 ADD KEY (a); -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b; -id 1 -select_type SIMPLE -table t1 -type ALL -possible_keys a -key NULL -key_len NULL -ref NULL -rows 16 -Extra -id 1 -select_type SIMPLE -table t2 -type ALL -possible_keys a -key NULL -key_len NULL -ref NULL -rows 16 -Extra Using where; Using join buffer -SET expand_fast_index_creation = 0; -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_expand_fast_index_creation.test b/percona-suite/percona_innodb_expand_fast_index_creation.test deleted file mode 100644 index 06e6c719c17..00000000000 --- a/percona-suite/percona_innodb_expand_fast_index_creation.test +++ /dev/null @@ -1,45 +0,0 @@ ---source include/have_innodb.inc - -######################################################################## -# Bug #857590: Fast index creation does not update index statistics -######################################################################## - -CREATE TABLE t1( - id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - a CHAR(1) NOT NULL, - b CHAR(36) NOT NULL) ENGINE=InnoDB; - -INSERT INTO t1(a,b) VALUES ('a','b'); -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; - -# Check that fast index creation is used ---enable_info -ALTER TABLE t1 ADD KEY (a); ---disable_info - -# The default (wrong) plan due to bogus statistics ---vertical_results -EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b; ---horizontal_results - -ALTER TABLE t1 DROP KEY a; - -SET expand_fast_index_creation = 1; -SELECT @@expand_fast_index_creation; - -# Check that stats are updated with the option enabled - ---enable_info -ALTER TABLE t1 ADD KEY (a); ---disable_info - ---vertical_results -EXPLAIN SELECT COUNT(*) FROM t1, t1 t2 WHERE t1.a = t2.a AND t1.b = t2.b; ---horizontal_results - -SET expand_fast_index_creation = 0; - -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_fake_changes.result b/percona-suite/percona_innodb_fake_changes.result deleted file mode 100644 index 7f00c687c54..00000000000 --- a/percona-suite/percona_innodb_fake_changes.result +++ /dev/null @@ -1,55 +0,0 @@ -DROP TABLE IF EXISTS t1; -# Checking variables -SHOW VARIABLES LIKE 'innodb_fake_changes'; -Variable_name Value -innodb_fake_changes OFF -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; -VARIABLE_VALUE -OFF -SET innodb_fake_changes=1; -SHOW VARIABLES LIKE 'innodb_fake_changes'; -Variable_name Value -innodb_fake_changes ON -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; -VARIABLE_VALUE -ON -SET innodb_fake_changes=default; -SHOW VARIABLES LIKE 'innodb_fake_changes'; -Variable_name Value -innodb_fake_changes OFF -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; -VARIABLE_VALUE -OFF -# Explicit COMMIT should fail when innodb_fake_changes is enabled -# DML should be fine -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; -INSERT INTO t1 VALUES (2); -UPDATE t1 SET a=0; -DELETE FROM t1 LIMIT 1; -SELECT * FROM t1; -a -1 -COMMIT; -ERROR HY000: Got error 131 during COMMIT -SET innodb_fake_changes=default; -DROP TABLE t1; -# DDL must result in error -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; -CREATE TABLE t2 (a INT) ENGINE=InnoDB; -ERROR HY000: Can't create table 'test.t2' (errno: 131) -DROP TABLE t1; -ERROR 42S02: Unknown table 't1' -TRUNCATE TABLE t1; -ERROR HY000: Got error 131 during COMMIT -ALTER TABLE t1 ENGINE=MyISAM; -ERROR HY000: Got error 131 during COMMIT -ROLLBACK; -SET innodb_fake_changes=default; -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_fake_changes.test b/percona-suite/percona_innodb_fake_changes.test deleted file mode 100644 index fd231ae096f..00000000000 --- a/percona-suite/percona_innodb_fake_changes.test +++ /dev/null @@ -1,49 +0,0 @@ ---source include/have_innodb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - - ---echo # Checking variables -SHOW VARIABLES LIKE 'innodb_fake_changes'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; -SET innodb_fake_changes=1; -SHOW VARIABLES LIKE 'innodb_fake_changes'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; -SET innodb_fake_changes=default; -SHOW VARIABLES LIKE 'innodb_fake_changes'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='innodb_fake_changes'; - ---echo # Explicit COMMIT should fail when innodb_fake_changes is enabled ---echo # DML should be fine -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; -INSERT INTO t1 VALUES (2); -UPDATE t1 SET a=0; -DELETE FROM t1 LIMIT 1; -SELECT * FROM t1; ---error 1180 -COMMIT; -SET innodb_fake_changes=default; -DROP TABLE t1; - ---echo # DDL must result in error -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; ---error 1005 -CREATE TABLE t2 (a INT) ENGINE=InnoDB; ---error 1051 -DROP TABLE t1; ---error 1180 -TRUNCATE TABLE t1; ---error 1180 -ALTER TABLE t1 ENGINE=MyISAM; -ROLLBACK; -SET innodb_fake_changes=default; -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_fake_changes_locks.result b/percona-suite/percona_innodb_fake_changes_locks.result deleted file mode 100644 index c2b533ca9f3..00000000000 --- a/percona-suite/percona_innodb_fake_changes_locks.result +++ /dev/null @@ -1,19 +0,0 @@ -DROP TABLE IF EXISTS t1; -# Verifying that X_LOCK not acquired -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; -SELECT * FROM t1 FOR UPDATE; -a -1 -SET innodb_lock_wait_timeout=3; -UPDATE t1 SET a=2; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -SELECT * FROM t1 LOCK IN SHARE MODE; -a -1 -ROLLBACK; -SET innodb_fake_changes=default; -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_fake_changes_locks.test b/percona-suite/percona_innodb_fake_changes_locks.test deleted file mode 100644 index e298405cd43..00000000000 --- a/percona-suite/percona_innodb_fake_changes_locks.test +++ /dev/null @@ -1,24 +0,0 @@ ---source include/have_innodb.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - ---echo # Verifying that X_LOCK not acquired -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -INSERT INTO t1 VALUES (1); ---connect (conn1,localhost,root,,) ---connection conn1 -SET autocommit=0; -SET innodb_fake_changes=1; -BEGIN; -SELECT * FROM t1 FOR UPDATE; ---connection default -SET innodb_lock_wait_timeout=3; ---error 1205 -UPDATE t1 SET a=2; -SELECT * FROM t1 LOCK IN SHARE MODE; ---connection conn1 -ROLLBACK; -SET innodb_fake_changes=default; -DROP TABLE t1; diff --git a/percona-suite/percona_innodb_kill_idle_trx.result b/percona-suite/percona_innodb_kill_idle_trx.result deleted file mode 100644 index a05b5a912fe..00000000000 --- a/percona-suite/percona_innodb_kill_idle_trx.result +++ /dev/null @@ -1,41 +0,0 @@ -DROP TABLE IF EXISTS t1; -SET autocommit=0; -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 0 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 0 -SET GLOBAL innodb_kill_idle_transaction=1; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 1 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 1 -BEGIN; -INSERT INTO t1 VALUES (1),(2),(3); -COMMIT; -SELECT * FROM t1; -a -1 -2 -3 -BEGIN; -INSERT INTO t1 VALUES (4),(5),(6); -SELECT * FROM t1; -ERROR HY000: MySQL server has gone away -SELECT * FROM t1; -a -1 -2 -3 -DROP TABLE t1; -SET GLOBAL innodb_kill_idle_transaction=0; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 0 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 0 diff --git a/percona-suite/percona_innodb_kill_idle_trx.test b/percona-suite/percona_innodb_kill_idle_trx.test deleted file mode 100644 index 908f313752e..00000000000 --- a/percona-suite/percona_innodb_kill_idle_trx.test +++ /dev/null @@ -1,28 +0,0 @@ ---source include/have_innodb.inc ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -SET autocommit=0; -CREATE TABLE t1 (a INT) ENGINE=InnoDB; - ---source include/percona_innodb_kill_idle_trx_show.inc -SET GLOBAL innodb_kill_idle_transaction=1; ---source include/percona_innodb_kill_idle_trx_show.inc - -BEGIN; -INSERT INTO t1 VALUES (1),(2),(3); -COMMIT; -SELECT * FROM t1; - -BEGIN; -INSERT INTO t1 VALUES (4),(5),(6); -sleep 3; - ---enable_reconnect ---error 2006 --error CR_SERVER_GONE_ERROR -SELECT * FROM t1; -SELECT * FROM t1; -DROP TABLE t1; -SET GLOBAL innodb_kill_idle_transaction=0; ---source include/percona_innodb_kill_idle_trx_show.inc diff --git a/percona-suite/percona_innodb_kill_idle_trx_locks.result b/percona-suite/percona_innodb_kill_idle_trx_locks.result deleted file mode 100644 index 6bdd2617805..00000000000 --- a/percona-suite/percona_innodb_kill_idle_trx_locks.result +++ /dev/null @@ -1,45 +0,0 @@ -DROP TABLE IF EXISTS t1; -SET autocommit=0; -CREATE TABLE t1 (a INT) ENGINE=InnoDB; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 0 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 0 -SET GLOBAL innodb_kill_idle_transaction=5; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 5 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 5 -BEGIN; -INSERT INTO t1 VALUES (1),(2),(3); -COMMIT; -SELECT * FROM t1; -a -1 -2 -3 -### Locking rows. Lock should be released when idle trx is killed. -BEGIN; -SELECT * FROM t1 FOR UPDATE; -a -1 -2 -3 -UPDATE t1 set a=4; -SELECT * FROM t1; -a -4 -4 -4 -DROP TABLE t1; -SET GLOBAL innodb_kill_idle_transaction=0; -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -Variable_name Value -innodb_kill_idle_transaction 0 -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; -VARIABLE_NAME VARIABLE_VALUE -INNODB_KILL_IDLE_TRANSACTION 0 diff --git a/percona-suite/percona_innodb_kill_idle_trx_locks.test b/percona-suite/percona_innodb_kill_idle_trx_locks.test deleted file mode 100644 index 20e2cc54a84..00000000000 --- a/percona-suite/percona_innodb_kill_idle_trx_locks.test +++ /dev/null @@ -1,31 +0,0 @@ ---source include/have_innodb.inc ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -SET autocommit=0; -CREATE TABLE t1 (a INT) ENGINE=InnoDB; - ---source include/percona_innodb_kill_idle_trx_show.inc -SET GLOBAL innodb_kill_idle_transaction=5; ---source include/percona_innodb_kill_idle_trx_show.inc - -connect (conn1,localhost,root,,); -connection conn1; - -BEGIN; -INSERT INTO t1 VALUES (1),(2),(3); -COMMIT; -SELECT * FROM t1; - ---echo ### Locking rows. Lock should be released when idle trx is killed. -BEGIN; -SELECT * FROM t1 FOR UPDATE; - -connection default; -UPDATE t1 set a=4; - -SELECT * FROM t1; -DROP TABLE t1; -SET GLOBAL innodb_kill_idle_transaction=0; ---source include/percona_innodb_kill_idle_trx_show.inc diff --git a/percona-suite/percona_innodb_kill_idle_trx_show.inc b/percona-suite/percona_innodb_kill_idle_trx_show.inc deleted file mode 100644 index c85c0311c81..00000000000 --- a/percona-suite/percona_innodb_kill_idle_trx_show.inc +++ /dev/null @@ -1,2 +0,0 @@ -SHOW GLOBAL VARIABLES LIKE 'innodb_kill_idle_transaction'; -SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_kill_idle_transaction'; diff --git a/percona-suite/percona_innodb_use_sys_stats_table-master.opt b/percona-suite/percona_innodb_use_sys_stats_table-master.opt deleted file mode 100644 index c6865f5704c..00000000000 --- a/percona-suite/percona_innodb_use_sys_stats_table-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb_use_sys_stats_table diff --git a/percona-suite/percona_innodb_use_sys_stats_table.result b/percona-suite/percona_innodb_use_sys_stats_table.result deleted file mode 100644 index cb64de41901..00000000000 --- a/percona-suite/percona_innodb_use_sys_stats_table.result +++ /dev/null @@ -1,3 +0,0 @@ -show variables like 'innodb_use_sys_stats%'; -Variable_name Value -innodb_use_sys_stats_table ON diff --git a/percona-suite/percona_innodb_use_sys_stats_table.test b/percona-suite/percona_innodb_use_sys_stats_table.test deleted file mode 100644 index 02791137f08..00000000000 --- a/percona-suite/percona_innodb_use_sys_stats_table.test +++ /dev/null @@ -1,2 +0,0 @@ ---source include/have_innodb.inc -show variables like 'innodb_use_sys_stats%'; 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 4658d62af60..00000000000 --- a/percona-suite/percona_log_connection_error-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-error diff --git a/percona-suite/percona_log_connection_error.result b/percona-suite/percona_log_connection_error.result deleted file mode 100644 index 352c9ca2a99..00000000000 --- a/percona-suite/percona_log_connection_error.result +++ /dev/null @@ -1,16 +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; -[log_grep.inc] file: percona.log_connection_error.err pattern: Too many connections -[log_grep.inc] lines: 1 diff --git a/percona-suite/percona_log_connection_error.test b/percona-suite/percona_log_connection_error.test deleted file mode 100644 index 84af364cc96..00000000000 --- a/percona-suite/percona_log_connection_error.test +++ /dev/null @@ -1,54 +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; -} - ---let log_error=$log_error_ ---let log_file=percona.log_connection_error.err ---let log_file_full_path=$log_error ---let grep_pattern= Too many connections ---source include/log_grep.inc - diff --git a/percona-suite/percona_log_warnings_suppress-master.opt b/percona-suite/percona_log_warnings_suppress-master.opt deleted file mode 100644 index 4658d62af60..00000000000 --- a/percona-suite/percona_log_warnings_suppress-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log-error diff --git a/percona-suite/percona_log_warnings_suppress.result b/percona-suite/percona_log_warnings_suppress.result deleted file mode 100644 index 1ee6c46738a..00000000000 --- a/percona-suite/percona_log_warnings_suppress.result +++ /dev/null @@ -1,31 +0,0 @@ -SET @old_log_warnings = @@log_warnings; -SET @old_log_warnings_suppress = @@log_warnings_suppress; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20)); -SET GLOBAL log_warnings_suppress=''; -SET GLOBAL LOG_WARNINGS=0; -SHOW GLOBAL VARIABLES LIKE 'log_warnings_suppress'; -Variable_name Value -log_warnings_suppress -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -SET GLOBAL LOG_WARNINGS=1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -SET GLOBAL log_warnings_suppress='1592'; -SET GLOBAL LOG_WARNINGS=0; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -SET GLOBAL LOG_WARNINGS=1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -DROP TABLE t1; -SET GLOBAL log_warnings = @old_log_warnings; -SET GLOBAL log_warnings_suppress = @old_log_warnings_suppress; -# Count the number of times the "Unsafe" message was printed -# to the error log. -Occurrences: 1 diff --git a/percona-suite/percona_log_warnings_suppress.test b/percona-suite/percona_log_warnings_suppress.test deleted file mode 100644 index 82221013f0b..00000000000 --- a/percona-suite/percona_log_warnings_suppress.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_log_bin.inc --- source include/have_binlog_format_statement.inc - -SET @old_log_warnings = @@log_warnings; -SET @old_log_warnings_suppress = @@log_warnings_suppress; - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings -CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(20)); -SET GLOBAL log_warnings_suppress=''; -SET GLOBAL LOG_WARNINGS=0; -SHOW GLOBAL VARIABLES LIKE 'log_warnings_suppress'; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL LOG_WARNINGS=1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL log_warnings_suppress='1592'; -SET GLOBAL LOG_WARNINGS=0; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -SET GLOBAL LOG_WARNINGS=1; -INSERT INTO t1 VALUES(UUID(), 'suppress_1592'); -DROP TABLE t1; - -SET GLOBAL log_warnings = @old_log_warnings; -SET GLOBAL log_warnings_suppress = @old_log_warnings_suppress; - -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_; - ---echo # Count the number of times the "Unsafe" message was printed ---echo # to the error log. - -perl; - use strict; - my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set"; - open(FILE, "$log_error") or die("Unable to open $log_error: $!\n"); - my $count = () = grep(/suppress_1592/g,); - print "Occurrences: $count\n"; - close(FILE); -EOF diff --git a/percona-suite/percona_processlist_row_stats.result b/percona-suite/percona_processlist_row_stats.result deleted file mode 100644 index 109b6a912d9..00000000000 --- a/percona-suite/percona_processlist_row_stats.result +++ /dev/null @@ -1,70 +0,0 @@ -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; -CREATE TABLE t2 (a INT); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(20); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(20); -SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped'; -CREATE TABLE t1 (a INT); -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; -SELECT a FROM t2 WHERE a > 15; -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; -SHOW PROCESSLIST; -Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read -### root ### test Query ### ### SHOW PROCESSLIST 0 0 2 -### root ### test Query ### ### CREATE TABLE t1 (a INT) 0 0 1 -### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 2 5 6 -SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id; -id info rows_sent rows_examined rows_read -### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1 -### CREATE TABLE t1 (a INT) 0 0 1 -### SELECT a FROM t2 WHERE a > 15 2 5 6 -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; -a -20 -20 -SET DEBUG_SYNC= 'sent_row SIGNAL thread1_ready WAIT_FOR threads_dumped'; -SELECT a FROM t2 WHERE a < 15; -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; -SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped'; -SELECT a FROM t2 WHERE a > 15; -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; -SHOW PROCESSLIST; -Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read -### root ### test Query ### ### SHOW PROCESSLIST 0 0 4 -### root ### test Query ### ### SELECT a FROM t2 WHERE a < 15 1 0 1 -### root ### test Query ### ### SELECT a FROM t2 WHERE a > 15 1 0 3 -SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id; -id info rows_sent rows_examined rows_read -### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1 -### SELECT a FROM t2 WHERE a < 15 1 0 1 -### SELECT a FROM t2 WHERE a > 15 1 0 3 -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; -a -10 -10 -10 -a -20 -20 -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread1_ready WAIT_FOR threads_dumped'; -UPDATE t2 SET a = 15 WHERE a = 20; -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; -UPDATE t2 SET a = 15 WHERE a = 10; -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; -SHOW PROCESSLIST; -Id User Host db Command Time State Info Rows_sent Rows_examined Rows_read -### root ### test Query ### ### SHOW PROCESSLIST 0 0 4 -### root ### test Query ### ### UPDATE t2 SET a = 15 WHERE a = 20 0 5 6 -### root ### test Query ### ### UPDATE t2 SET a = 15 WHERE a = 10 0 5 6 -SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id; -id info rows_sent rows_examined rows_read -### SELECT id, info, rows_sent, rows_examined, rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY id 0 0 1 -### UPDATE t2 SET a = 15 WHERE a = 20 0 5 6 -### UPDATE t2 SET a = 15 WHERE a = 10 0 5 6 -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; -DROP TABLES t1, t2; diff --git a/percona-suite/percona_processlist_row_stats.test b/percona-suite/percona_processlist_row_stats.test deleted file mode 100644 index 17ebfedfa40..00000000000 --- a/percona-suite/percona_processlist_row_stats.test +++ /dev/null @@ -1,79 +0,0 @@ -# Testing of INFORMATION_SCHEMA.PROCESSLIST fields ROWS_SENT, ROWS_EXAMINED, ROWS_READ ---source include/have_debug_sync.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; -DROP TABLE IF EXISTS t2; ---enable_warnings - -CREATE TABLE t2 (a INT); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(20); -INSERT INTO t2 VALUES(10); -INSERT INTO t2 VALUES(20); - ---connect (conn1, localhost, root, ,) ---connect (conn2, localhost, root, ,) - ---connection conn1 -SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped'; -send CREATE TABLE t1 (a INT); ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; - ---connection conn2 -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; -send SELECT a FROM t2 WHERE a > 15; ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; - ---source include/percona_processlist_row_stats_show.inc - ---connection conn1 -reap; ---connection conn2 -reap; - ---connection conn1 -SET DEBUG_SYNC= 'sent_row SIGNAL thread1_ready WAIT_FOR threads_dumped'; -send SELECT a FROM t2 WHERE a < 15; ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; - ---connection conn2 -SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped'; -send SELECT a FROM t2 WHERE a > 15; ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; - ---source include/percona_processlist_row_stats_show.inc - ---connection conn1 -reap; ---connection conn2 -reap; - ---connection conn1 -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread1_ready WAIT_FOR threads_dumped'; -send UPDATE t2 SET a = 15 WHERE a = 20; ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; - ---connection conn2 -SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; -send UPDATE t2 SET a = 15 WHERE a = 10; ---connection default -SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; - ---source include/percona_processlist_row_stats_show.inc - ---connection conn1 -reap; ---connection conn2 -reap; - ---connection default -disconnect conn1; -disconnect conn2; -DROP TABLES t1, t2; diff --git a/percona-suite/percona_query_cache_with_comments.inc b/percona-suite/percona_query_cache_with_comments.inc deleted file mode 100644 index 2619105b322..00000000000 --- a/percona-suite/percona_query_cache_with_comments.inc +++ /dev/null @@ -1,117 +0,0 @@ ---source include/percona_query_cache_with_comments_clear.inc -let $query=/* with comment first */select * from t1; -eval $query; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=/* with comment first and "quote" */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - /* with comment and whitespaces first */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - # with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - -- with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment with "quote" *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* *\/ */; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */ -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select */* a comment \*/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select *# a comment \\ -from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select *-- a comment \\ -from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select "\\\\"" /* not a comment */" from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select "\\\\"" /*! not a comment */" from t1; ---source include/percona_query_cache_with_comments_eval.inc - -# following two queries related to bug #856404. -# There are different queries, but opt_query_cache_strip_comments thinks that they are equal. -let $query=select ' \' ' from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select ' \' /* comment inside quotes with internal backslash quote */' from t1; ---source include/percona_query_cache_with_comments_eval.inc diff --git a/percona-suite/percona_query_cache_with_comments.inc.backup b/percona-suite/percona_query_cache_with_comments.inc.backup deleted file mode 100644 index 4b5b31e9239..00000000000 --- a/percona-suite/percona_query_cache_with_comments.inc.backup +++ /dev/null @@ -1,88 +0,0 @@ ---source include/percona_query_cache_with_comments_clear.inc -let $query=/* with comment first */select * from t1; -eval $query; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=/* with comment first and "quote" */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=# with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=-- with comment first and "quote" -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - /* with comment and whitespaces first */select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - # with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query= - -- with comment and whitespaces first -select * from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $internal=* internal comment with "quote" *; - -let $query=select * /$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/ from t1; ---source include/percona_query_cache_with_comments_eval.inc -let $query=select */$internal/from t1; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 ; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -/* comment in the end */ -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 #comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end; ---source include/percona_query_cache_with_comments_eval.inc - -let $query=select * from t1 -- comment in the end -; ---source include/percona_query_cache_with_comments_eval.inc diff --git a/percona-suite/percona_query_cache_with_comments.result b/percona-suite/percona_query_cache_with_comments.result deleted file mode 100644 index d1a6ded08d7..00000000000 --- a/percona-suite/percona_query_cache_with_comments.result +++ /dev/null @@ -1,1058 +0,0 @@ -set global query_cache_strip_comments=ON; -set GLOBAL query_cache_size=1355776; -drop table if exists t1; -create table t1 (a int not null); -insert into t1 values (1),(2),(3); -flush query cache; -flush query cache; -reset query cache; -flush status; -flush query cache; -flush query cache; -reset query cache; -flush status; -/* with comment first */select * from t1; -a -1 -2 -3 ------------------------------------------------------ -/* with comment first */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -/* with comment first */select * from t1; -a -1 -2 -3 -/* with comment first */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 ------------------------------------------------------ -# with comment first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -# with comment first -select * from t1; -a -1 -2 -3 -# with comment first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 ------------------------------------------------------ --- with comment first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 --- with comment first -select * from t1; -a -1 -2 -3 --- with comment first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 6 ------------------------------------------------------ -/* with comment first and "quote" */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 6 -/* with comment first and "quote" */select * from t1; -a -1 -2 -3 -/* with comment first and "quote" */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 ------------------------------------------------------ -# with comment first and "quote" -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -# with comment first and "quote" -select * from t1; -a -1 -2 -3 -# with comment first and "quote" -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 ------------------------------------------------------ --- with comment first and "quote" -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 --- with comment first and "quote" -select * from t1; -a -1 -2 -3 --- with comment first and "quote" -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 12 ------------------------------------------------------ -/* with comment and whitespaces first */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 12 -/* with comment and whitespaces first */select * from t1; -a -1 -2 -3 -/* with comment and whitespaces first */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 14 ------------------------------------------------------ -# with comment and whitespaces first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 14 -# with comment and whitespaces first -select * from t1; -a -1 -2 -3 -# with comment and whitespaces first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 16 ------------------------------------------------------ --- with comment and whitespaces first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 16 --- with comment and whitespaces first -select * from t1; -a -1 -2 -3 --- with comment and whitespaces first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 18 ------------------------------------------------------ -select * /* internal comment */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 18 -select * /* internal comment */ from t1; -a -1 -2 -3 -select * /* internal comment */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 20 ------------------------------------------------------ -select */* internal comment */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 20 -select */* internal comment */ from t1; -a -1 -2 -3 -select */* internal comment */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 22 ------------------------------------------------------ -select */* internal comment */from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 22 -select */* internal comment */from t1; -a -1 -2 -3 -select */* internal comment */from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 24 ------------------------------------------------------ -select * /* internal comment with "quote" */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 24 -select * /* internal comment with "quote" */ from t1; -a -1 -2 -3 -select * /* internal comment with "quote" */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 26 ------------------------------------------------------ -select */* internal comment with "quote" */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 26 -select */* internal comment with "quote" */ from t1; -a -1 -2 -3 -select */* internal comment with "quote" */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 28 ------------------------------------------------------ -select */* internal comment with "quote" */from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 28 -select */* internal comment with "quote" */from t1; -a -1 -2 -3 -select */* internal comment with "quote" */from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 30 ------------------------------------------------------ -select * from t1 - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 30 -select * from t1 -; -a -1 -2 -3 -select * from t1 -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 32 ------------------------------------------------------ -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 32 -select * from t1 ; -a -1 -2 -3 -select * from t1 ; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 34 ------------------------------------------------------ -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 34 -select * from t1 ; -a -1 -2 -3 -select * from t1 ; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 36 ------------------------------------------------------ -select * from t1 -/* comment in the end */ ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 36 -select * from t1 -/* comment in the end */; -a -1 -2 -3 -select * from t1 -/* comment in the end */; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 38 ------------------------------------------------------ -select * from t1 -/* *\/ */ ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 38 -select * from t1 -/* *\/ */; -a -1 -2 -3 -select * from t1 -/* *\/ */; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 40 ------------------------------------------------------ -select * from t1 -/* comment in the end */ - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 40 -select * from t1 -/* comment in the end */ -; -a -1 -2 -3 -select * from t1 -/* comment in the end */ -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 42 ------------------------------------------------------ -select * from t1 #comment in the end ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 42 -select * from t1 #comment in the end; -a -1 -2 -3 -select * from t1 #comment in the end; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 44 ------------------------------------------------------ -select * from t1 #comment in the end - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 44 -select * from t1 #comment in the end -; -a -1 -2 -3 -select * from t1 #comment in the end -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 46 ------------------------------------------------------ -select * from t1 -- comment in the end ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 46 -select * from t1 -- comment in the end; -a -1 -2 -3 -select * from t1 -- comment in the end; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 48 ------------------------------------------------------ -select * from t1 -- comment in the end - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 48 -select * from t1 -- comment in the end -; -a -1 -2 -3 -select * from t1 -- comment in the end -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 50 ------------------------------------------------------ -select */* a comment \*/from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 50 -select */* a comment \*/from t1; -a -1 -2 -3 -select */* a comment \*/from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 52 ------------------------------------------------------ -select *# a comment \ -from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 52 -select *# a comment \ -from t1; -a -1 -2 -3 -select *# a comment \ -from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 54 ------------------------------------------------------ -select *-- a comment \ -from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 54 -select *-- a comment \ -from t1; -a -1 -2 -3 -select *-- a comment \ -from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 56 ------------------------------------------------------ -select "\\"" /* not a comment */" from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 56 -select "\\"" /* not a comment */" from t1; -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -select "\\"" /* not a comment */" from t1; -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 57 ------------------------------------------------------ -select "\\"" /*! not a comment */" from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 57 -select "\\"" /*! not a comment */" from t1; -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -select "\\"" /*! not a comment */" from t1; -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 58 ------------------------------------------------------ -select ' \' ' from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 58 -select ' \' ' from t1; -' - ' - ' - ' -select ' \' ' from t1; -' - ' - ' - ' -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 59 ------------------------------------------------------ -select ' \' /* comment inside quotes with internal backslash quote */' from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 59 -select ' \' /* comment inside quotes with internal backslash quote */' from t1; -' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ -select ' \' /* comment inside quotes with internal backslash quote */' from t1; -' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 60 -DROP TABLE t1; -SET GLOBAL query_cache_size=default; -set global query_cache_strip_comments=OFF; diff --git a/percona-suite/percona_query_cache_with_comments.test b/percona-suite/percona_query_cache_with_comments.test deleted file mode 100644 index 0b93441f364..00000000000 --- a/percona-suite/percona_query_cache_with_comments.test +++ /dev/null @@ -1,5 +0,0 @@ ---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 --- source include/percona_query_cache_with_comments_end.inc diff --git a/percona-suite/percona_query_cache_with_comments_begin.inc b/percona-suite/percona_query_cache_with_comments_begin.inc deleted file mode 100644 index 38bfce20263..00000000000 --- a/percona-suite/percona_query_cache_with_comments_begin.inc +++ /dev/null @@ -1,12 +0,0 @@ --- source include/have_query_cache.inc - -set GLOBAL query_cache_size=1355776; - ---disable_warnings -drop table if exists t1; ---enable_warnings - -create table t1 (a int not null); -insert into t1 values (1),(2),(3); - ---source include/percona_query_cache_with_comments_clear.inc diff --git a/percona-suite/percona_query_cache_with_comments_clear.inc b/percona-suite/percona_query_cache_with_comments_clear.inc deleted file mode 100644 index 728a19a3c97..00000000000 --- a/percona-suite/percona_query_cache_with_comments_clear.inc +++ /dev/null @@ -1,5 +0,0 @@ -# Reset query cache variables. -flush query cache; # This crashed in some versions -flush query cache; # This crashed in some versions -reset query cache; -flush status; diff --git a/percona-suite/percona_query_cache_with_comments_crash.result b/percona-suite/percona_query_cache_with_comments_crash.result deleted file mode 100644 index 32bd3645ec4..00000000000 --- a/percona-suite/percona_query_cache_with_comments_crash.result +++ /dev/null @@ -1,21 +0,0 @@ -set GLOBAL query_cache_size=1355776; -drop table if exists t1; -create table t1 (a int not null); -insert into t1 values (1),(2),(3); -flush query cache; -flush query cache; -reset query cache; -flush status; -( select * from t1 ); -a -1 -2 -3 -/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */; -/* only comment */; -# only comment -; --- only comment -; -DROP TABLE t1; -SET GLOBAL query_cache_size= default; diff --git a/percona-suite/percona_query_cache_with_comments_crash.test b/percona-suite/percona_query_cache_with_comments_crash.test deleted file mode 100644 index e125c75c3de..00000000000 --- a/percona-suite/percona_query_cache_with_comments_crash.test +++ /dev/null @@ -1,22 +0,0 @@ --- source include/have_query_cache.inc -set GLOBAL query_cache_size=1355776; ---disable_warnings -drop table if exists t1; ---enable_warnings -create table t1 (a int not null); -insert into t1 values (1),(2),(3); -flush query cache; # This crashed in some versions -flush query cache; # This crashed in some versions -reset query cache; -flush status; -( select * from t1 ); -/*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := REPLACE(REPLACE(@@SQL_MODE, 'ANSI_QUOTES', ''), ',,', ','), @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */; -/* only comment */; -let query=# only comment -; -eval $query; -let query=-- only comment -; -eval $query; -DROP TABLE t1; -SET GLOBAL query_cache_size= default; diff --git a/percona-suite/percona_query_cache_with_comments_disable.result b/percona-suite/percona_query_cache_with_comments_disable.result deleted file mode 100644 index 7e793a942c5..00000000000 --- a/percona-suite/percona_query_cache_with_comments_disable.result +++ /dev/null @@ -1,1057 +0,0 @@ -set GLOBAL query_cache_size=1355776; -drop table if exists t1; -create table t1 (a int not null); -insert into t1 values (1),(2),(3); -flush query cache; -flush query cache; -reset query cache; -flush status; -flush query cache; -flush query cache; -reset query cache; -flush status; -/* with comment first */select * from t1; -a -1 -2 -3 ------------------------------------------------------ -/* with comment first */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -/* with comment first */select * from t1; -a -1 -2 -3 -/* with comment first */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 ------------------------------------------------------ -# with comment first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -# with comment first -select * from t1; -a -1 -2 -3 -# with comment first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 ------------------------------------------------------ --- with comment first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 --- with comment first -select * from t1; -a -1 -2 -3 --- with comment first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 ------------------------------------------------------ -/* with comment first and "quote" */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 2 -/* with comment first and "quote" */select * from t1; -a -1 -2 -3 -/* with comment first and "quote" */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 ------------------------------------------------------ -# with comment first and "quote" -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -# with comment first and "quote" -select * from t1; -a -1 -2 -3 -# with comment first and "quote" -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 ------------------------------------------------------ --- with comment first and "quote" -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 --- with comment first and "quote" -select * from t1; -a -1 -2 -3 --- with comment first and "quote" -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 6 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 ------------------------------------------------------ -/* with comment and whitespaces first */select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 6 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 6 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -/* with comment and whitespaces first */select * from t1; -a -1 -2 -3 -/* with comment and whitespaces first */select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 7 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 ------------------------------------------------------ -# with comment and whitespaces first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 7 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 7 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -# with comment and whitespaces first -select * from t1; -a -1 -2 -3 -# with comment and whitespaces first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 8 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 ------------------------------------------------------ --- with comment and whitespaces first -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 8 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 8 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 --- with comment and whitespaces first -select * from t1; -a -1 -2 -3 --- with comment and whitespaces first -select * from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 9 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 ------------------------------------------------------ -select * /* internal comment */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 9 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 9 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -select * /* internal comment */ from t1; -a -1 -2 -3 -select * /* internal comment */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 10 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 ------------------------------------------------------ -select */* internal comment */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 10 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 10 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -select */* internal comment */ from t1; -a -1 -2 -3 -select */* internal comment */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 11 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 11 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 6 ------------------------------------------------------ -select */* internal comment */from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 11 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 11 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 6 -select */* internal comment */from t1; -a -1 -2 -3 -select */* internal comment */from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 12 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 12 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 ------------------------------------------------------ -select * /* internal comment with "quote" */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 12 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 12 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -select * /* internal comment with "quote" */ from t1; -a -1 -2 -3 -select * /* internal comment with "quote" */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 13 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 13 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 ------------------------------------------------------ -select */* internal comment with "quote" */ from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 13 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 13 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -select */* internal comment with "quote" */ from t1; -a -1 -2 -3 -select */* internal comment with "quote" */ from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 14 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 14 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 9 ------------------------------------------------------ -select */* internal comment with "quote" */from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 14 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 14 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 9 -select */* internal comment with "quote" */from t1; -a -1 -2 -3 -select */* internal comment with "quote" */from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 15 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 15 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 ------------------------------------------------------ -select * from t1 - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 15 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 15 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 -select * from t1 -; -a -1 -2 -3 -select * from t1 -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 11 ------------------------------------------------------ -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 11 -select * from t1 ; -a -1 -2 -3 -select * from t1 ; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 13 ------------------------------------------------------ -select * from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 13 -select * from t1 ; -a -1 -2 -3 -select * from t1 ; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 ------------------------------------------------------ -select * from t1 -/* comment in the end */ ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 16 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 16 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 -select * from t1 -/* comment in the end */; -a -1 -2 -3 -select * from t1 -/* comment in the end */; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 17 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 17 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 16 ------------------------------------------------------ -select * from t1 -/* *\/ */ ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 17 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 17 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 16 -select * from t1 -/* *\/ */; -a -1 -2 -3 -select * from t1 -/* *\/ */; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 18 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 18 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 17 ------------------------------------------------------ -select * from t1 -/* comment in the end */ - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 18 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 18 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 17 -select * from t1 -/* comment in the end */ -; -a -1 -2 -3 -select * from t1 -/* comment in the end */ -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 18 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 18 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 19 ------------------------------------------------------ -select * from t1 #comment in the end ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 18 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 18 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 19 -select * from t1 #comment in the end; -a -1 -2 -3 -select * from t1 #comment in the end; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 19 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 19 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 20 ------------------------------------------------------ -select * from t1 #comment in the end - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 19 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 19 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 20 -select * from t1 #comment in the end -; -a -1 -2 -3 -select * from t1 #comment in the end -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 19 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 19 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 22 ------------------------------------------------------ -select * from t1 -- comment in the end ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 19 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 19 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 22 -select * from t1 -- comment in the end; -a -1 -2 -3 -select * from t1 -- comment in the end; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 20 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 20 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 23 ------------------------------------------------------ -select * from t1 -- comment in the end - ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 20 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 20 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 23 -select * from t1 -- comment in the end -; -a -1 -2 -3 -select * from t1 -- comment in the end -; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 20 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 20 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 25 ------------------------------------------------------ -select */* a comment \*/from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 20 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 20 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 25 -select */* a comment \*/from t1; -a -1 -2 -3 -select */* a comment \*/from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 21 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 21 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 26 ------------------------------------------------------ -select *# a comment \ -from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 21 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 21 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 26 -select *# a comment \ -from t1; -a -1 -2 -3 -select *# a comment \ -from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 22 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 22 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 27 ------------------------------------------------------ -select *-- a comment \ -from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 22 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 22 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 27 -select *-- a comment \ -from t1; -a -1 -2 -3 -select *-- a comment \ -from t1; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 23 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 23 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 28 ------------------------------------------------------ -select "\\"" /* not a comment */" from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 23 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 23 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 28 -select "\\"" /* not a comment */" from t1; -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -select "\\"" /* not a comment */" from t1; -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -\" /* not a comment */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 24 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 24 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 29 ------------------------------------------------------ -select "\\"" /*! not a comment */" from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 24 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 24 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 29 -select "\\"" /*! not a comment */" from t1; -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -select "\\"" /*! not a comment */" from t1; -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -\" /*! not a comment */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 25 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 25 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 30 ------------------------------------------------------ -select ' \' ' from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 25 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 25 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 30 -select ' \' ' from t1; -' - ' - ' - ' -select ' \' ' from t1; -' - ' - ' - ' -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 26 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 26 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 31 ------------------------------------------------------ -select ' \' /* comment inside quotes with internal backslash quote */' from t1 ------------------------------------------------------ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 26 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 26 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 31 -select ' \' /* comment inside quotes with internal backslash quote */' from t1; -' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ -select ' \' /* comment inside quotes with internal backslash quote */' from t1; -' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ - ' /* comment inside quotes with internal backslash quote */ -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 27 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 27 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 32 -DROP TABLE t1; -SET GLOBAL query_cache_size=default; -set global query_cache_strip_comments=OFF; diff --git a/percona-suite/percona_query_cache_with_comments_disable.test b/percona-suite/percona_query_cache_with_comments_disable.test deleted file mode 100644 index ad59ac3566c..00000000000 --- a/percona-suite/percona_query_cache_with_comments_disable.test +++ /dev/null @@ -1,3 +0,0 @@ --- source include/percona_query_cache_with_comments_begin.inc --- source include/percona_query_cache_with_comments.inc --- source include/percona_query_cache_with_comments_end.inc diff --git a/percona-suite/percona_query_cache_with_comments_end.inc b/percona-suite/percona_query_cache_with_comments_end.inc deleted file mode 100644 index d5356359d7e..00000000000 --- a/percona-suite/percona_query_cache_with_comments_end.inc +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE t1; -SET GLOBAL query_cache_size=default; -set global query_cache_strip_comments=OFF; diff --git a/percona-suite/percona_query_cache_with_comments_eval.inc b/percona-suite/percona_query_cache_with_comments_eval.inc deleted file mode 100644 index a409786d554..00000000000 --- a/percona-suite/percona_query_cache_with_comments_eval.inc +++ /dev/null @@ -1,7 +0,0 @@ -echo -----------------------------------------------------; -echo $query; -echo -----------------------------------------------------; ---source include/percona_query_cache_with_comments_show.inc -eval $query; -eval $query; ---source include/percona_query_cache_with_comments_show.inc diff --git a/percona-suite/percona_query_cache_with_comments_prepared_statements.result b/percona-suite/percona_query_cache_with_comments_prepared_statements.result deleted file mode 100644 index 9b28b7f0b62..00000000000 --- a/percona-suite/percona_query_cache_with_comments_prepared_statements.result +++ /dev/null @@ -1,396 +0,0 @@ -set GLOBAL query_cache_size=1355776; -flush query cache; -flush query cache; -reset query cache; -flush status; -drop table if exists t1; -create table t1 (a int not null); -insert into t1 values (1),(2),(3); -set global query_cache_strip_comments=ON; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -prepare stmt from '/* with comment */ select * from t1'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 0 -execute stmt; -a -1 -2 -3 -execute stmt; -a -1 -2 -3 -execute stmt; -a -1 -2 -3 -execute stmt; -a -1 -2 -3 -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 5 -prepare stmt from 'select * from t1'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 6 -prepare stmt from 'select * /*internal comment*/from t1'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 7 -prepare stmt from 'select * /*internal comment*/ from t1'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 8 -prepare stmt from 'select * from t1 /* at the end */'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 9 -prepare stmt from 'select * from t1 /* with "quote" */'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 10 -prepare stmt from 'select * from t1 /* with \'quote\' */'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 11 -prepare stmt from 'select * from t1 # 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 12 -prepare stmt from 'select * from t1 # 123 with "quote" -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 13 -prepare stmt from 'select * from t1 # 123 with \'quote\' -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 14 -prepare stmt from 'select * from t1 -# 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 15 -prepare stmt from '#456 -select * from t1 -# 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 16 -prepare stmt from 'select * from t1 -- 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 17 -prepare stmt from 'select * from t1 --- 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 18 -prepare stmt from '-- comment in first -select * from t1 -# 123 -'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 1 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 19 -prepare stmt from '(#456( -select * from t1 -# 123( -)'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 19 -prepare stmt from '/*test*/(-- comment in first( -select * from t1 --- 123 asdasd -/* test */)'; -execute stmt; -a -1 -2 -3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 2 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 2 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 20 -prepare stmt from 'select "test",a from t1'; -execute stmt; -test a -test 1 -test 2 -test 3 -execute stmt; -test a -test 1 -test 2 -test 3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 3 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 3 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 21 -prepare stmt from 'select "test /* internal \'comment\' */",a from t1'; -execute stmt; -test /* internal 'comment' */ a -test /* internal 'comment' */ 1 -test /* internal 'comment' */ 2 -test /* internal 'comment' */ 3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 4 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 4 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 21 -prepare stmt from 'select "test #internal comment" ,a from t1'; -execute stmt; -test #internal comment a -test #internal comment 1 -test #internal comment 2 -test #internal comment 3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 21 -prepare stmt from 'select "test #internal comment" #external comment -,a from t1'; -execute stmt; -test #internal comment a -test #internal comment 1 -test #internal comment 2 -test #internal comment 3 -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 5 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 5 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 22 -DROP TABLE t1; -SET GLOBAL query_cache_size= default; -set global query_cache_strip_comments=OFF; diff --git a/percona-suite/percona_query_cache_with_comments_prepared_statements.test b/percona-suite/percona_query_cache_with_comments_prepared_statements.test deleted file mode 100644 index 78cb7220aff..00000000000 --- a/percona-suite/percona_query_cache_with_comments_prepared_statements.test +++ /dev/null @@ -1,208 +0,0 @@ --- source include/have_query_cache.inc - -set GLOBAL query_cache_size=1355776; - -# Reset query cache variables. -flush query cache; # This crashed in some versions -flush query cache; # This crashed in some versions -reset query cache; -flush status; ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# First simple test -# - -create table t1 (a int not null); -insert into t1 values (1),(2),(3); - -set global query_cache_strip_comments=ON; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from '/* with comment */ select * from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -execute stmt; -execute stmt; -execute stmt; -execute stmt; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * /*internal comment*/from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * /*internal comment*/ from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 /* at the end */'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 /* with "quote" */'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 /* with \'quote\' */'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 # 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 # 123 with "quote" -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 # 123 with \'quote\' -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 -# 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from '#456 -select * from t1 -# 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 -- 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select * from t1 --- 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from '-- comment in first -select * from t1 -# 123 -'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from '(#456( -select * from t1 -# 123( -)'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from '/*test*/(-- comment in first( -select * from t1 --- 123 asdasd -/* test */)'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select "test",a from t1'; -execute stmt; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select "test /* internal \'comment\' */",a from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select "test #internal comment" ,a from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -prepare stmt from 'select "test #internal comment" #external comment -,a from t1'; -execute stmt; - -show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; -show status like "Qcache_hits"; - -DROP TABLE t1; -SET GLOBAL query_cache_size= default; -set global query_cache_strip_comments=OFF; diff --git a/percona-suite/percona_query_cache_with_comments_show.inc b/percona-suite/percona_query_cache_with_comments_show.inc deleted file mode 100644 index 71aa5211cfd..00000000000 --- a/percona-suite/percona_query_cache_with_comments_show.inc +++ /dev/null @@ -1,8 +0,0 @@ -let $show=show status like "Qcache_queries_in_cache"; -eval $show; -let $show=show status like "Qcache_inserts"; -eval $show; -let $show=show status like "Qcache_hits"; -eval $show; - - 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 a6e88be6103..00000000000 --- a/percona-suite/percona_query_response_time-replication.result +++ /dev/null @@ -1,727 +0,0 @@ -SET GLOBAL query_exec_time=0.1; -include/master-slave.inc -[connection master] -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 1 0.100000 - 0.250000 0 0.000000 - 0.500000 30 10.650000 - 1.000000 3 1.500000 - 2.000000 15 19.500000 - 4.000000 12 30.000000 - 8.000000 6 27.599997 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 1 0.100000 - 0.250000 0 0.000000 - 0.500000 30 10.650000 - 1.000000 3 1.500000 - 2.000000 15 19.500000 - 4.000000 12 30.000000 - 8.000000 6 27.599997 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 1 0.100000 - 0.250000 0 0.000000 - 0.500000 30 10.650000 - 1.000000 3 1.500000 - 2.000000 15 19.500000 - 4.000000 12 30.000000 - 8.000000 6 27.599997 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 1 0.100000 - 0.250000 0 0.000000 - 0.500000 30 10.650000 - 1.000000 3 1.500000 - 2.000000 15 19.500000 - 4.000000 12 30.000000 - 8.000000 6 27.599997 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 34 12.250000 - 10.000000 33 77.099997 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 34 12.250000 - 10.000000 33 77.099997 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 1 0.100000 - 1.000000 33 12.150000 - 7.000000 33 77.099997 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 1 0.100000 - 1.000000 33 12.150000 - 7.000000 33 77.099997 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -SHOW QUERY_RESPONSE_TIME; - - 0.000041 1 0.000000 - 0.006410 0 0.000000 - 1.000000 34 12.250000 - 156.000000 33 77.099997 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000041 1 0.000000 - 0.006410 0 0.000000 - 1.000000 34 12.250000 - 156.000000 33 77.099997 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.001000 0 0.000000 - 1.000000 34 12.250000 - 1000.000000 33 77.099997 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.001000 0 0.000000 - 1.000000 34 12.250000 - 1000.000000 33 77.099997 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -CREATE TABLE t(id INT); -SET GLOBAL query_exec_time = 0.1; -include/restart_slave.inc -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time = 0.31; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; -INSERT INTO t VALUES(1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 1 0.000000 - 0.001000 0 0.000000 - 1.000000 34 12.250000 - 1000.000000 33 77.099997 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 1 0.000000 - 0.001000 0 0.000000 - 1.000000 34 12.250000 - 1000.000000 33 77.099997 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP TABLE t; -include/rpl_end.inc -SET GLOBAL query_exec_time=default; -SET GLOBAL query_exec_time=default; 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 1207e5d1c3d..00000000000 --- a/percona-suite/percona_query_response_time-replication.test +++ /dev/null @@ -1,28 +0,0 @@ -SET GLOBAL query_exec_time=0.1; - ---source include/have_response_time_distribution.inc ---source include/have_debug.inc ---source include/have_binlog_format_statement.inc ---source include/master-slave.inc - ---let base=1 ---source include/query_response_time-replication.inc ---let base=2 ---source include/query_response_time-replication.inc ---let base=10 ---source include/query_response_time-replication.inc ---let base=7 ---source include/query_response_time-replication.inc ---let base=156 ---source include/query_response_time-replication.inc ---let base=1000 ---source include/query_response_time-replication.inc ---let base=1001 ---source include/query_response_time-replication.inc - ---source include/rpl_end.inc - -SET GLOBAL query_exec_time=default; - -connection slave; -SET GLOBAL query_exec_time=default; 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 fb458d6e7ab..00000000000 --- a/percona-suite/percona_query_response_time-stored.result +++ /dev/null @@ -1,544 +0,0 @@ -CREATE TABLE t(a INT); -CREATE PROCEDURE test_f(t DECIMAL(3,2)) -BEGIN -SET SESSION query_exec_time=t; -INSERT INTO t VALUES(1); -SET SESSION query_exec_time=0.1; -DELETE FROM t; -END^ -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 44 4.400000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 44 4.400000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 44 4.400000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 44 4.400000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 55 8.450000 - 10.000000 11 25.699999 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 55 8.450000 - 10.000000 11 25.699999 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 44 4.400000 - 1.000000 11 4.050000 - 7.000000 11 25.699999 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 44 4.400000 - 1.000000 11 4.050000 - 7.000000 11 25.699999 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -SHOW QUERY_RESPONSE_TIME; - - 0.000041 45 0.000000 - 0.006410 0 0.000000 - 1.000000 55 8.450000 - 156.000000 11 25.699999 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000041 45 0.000000 - 0.006410 0 0.000000 - 1.000000 55 8.450000 - 156.000000 11 25.699999 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.001000 0 0.000000 - 1.000000 55 8.450000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.001000 0 0.000000 - 1.000000 55 8.450000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 45 0.000000 - 0.001000 0 0.000000 - 1.000000 55 8.450000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 45 0.000000 - 0.001000 0 0.000000 - 1.000000 55 8.450000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; -DROP PROCEDURE test_f; -DROP TABLE t; 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 847ff223b3f..00000000000 --- a/percona-suite/percona_query_response_time-stored.test +++ /dev/null @@ -1,36 +0,0 @@ ---source include/have_response_time_distribution.inc ---source include/have_debug.inc - -CREATE TABLE t(a INT); - -delimiter ^; -CREATE PROCEDURE test_f(t DECIMAL(3,2)) -BEGIN - SET SESSION query_exec_time=t; - INSERT INTO t VALUES(1); - SET SESSION query_exec_time=0.1; - DELETE FROM t; -END^ -delimiter ;^ - ---let base=1 ---source include/query_response_time-stored.inc ---let base=2 ---source include/query_response_time-stored.inc ---let base=10 ---source include/query_response_time-stored.inc ---let base=7 ---source include/query_response_time-stored.inc ---let base=156 ---source include/query_response_time-stored.inc ---let base=1000 ---source include/query_response_time-stored.inc ---let base=1001 ---source include/query_response_time-stored.inc - -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; - -DROP PROCEDURE test_f; - -DROP TABLE t; diff --git a/percona-suite/percona_query_response_time.result b/percona-suite/percona_query_response_time.result deleted file mode 100644 index 1eb90d3cdd4..00000000000 --- a/percona-suite/percona_query_response_time.result +++ /dev/null @@ -1,1307 +0,0 @@ -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1' -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 0 0.000000 - 1.000000 0 0.000000 - 2.000000 0 0.000000 - 4.000000 0 0.000000 - 8.000000 0 0.000000 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 0 0.000000 - 1.000000 0 0.000000 - 2.000000 0 0.000000 - 4.000000 0 0.000000 - 8.000000 0 0.000000 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=2; -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 0 0.000000 - 1.000000 0 0.000000 - 2.000000 0 0.000000 - 4.000000 0 0.000000 - 8.000000 0 0.000000 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 0 0.000000 - 1.000000 0 0.000000 - 2.000000 0 0.000000 - 4.000000 0 0.000000 - 8.000000 0 0.000000 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 2 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.000003 0 0.000000 - 0.000007 0 0.000000 - 0.000015 0 0.000000 - 0.000030 0 0.000000 - 0.000061 0 0.000000 - 0.000122 0 0.000000 - 0.000244 0 0.000000 - 0.000488 0 0.000000 - 0.000976 0 0.000000 - 0.001953 0 0.000000 - 0.003906 0 0.000000 - 0.007812 0 0.000000 - 0.015625 0 0.000000 - 0.031250 0 0.000000 - 0.062500 0 0.000000 - 0.125000 0 0.000000 - 0.250000 0 0.000000 - 0.500000 10 3.550000 - 1.000000 1 0.500000 - 2.000000 5 6.500000 - 4.000000 4 10.000000 - 8.000000 2 9.199999 - 16.000000 0 0.000000 - 32.000000 0 0.000000 - 64.000000 0 0.000000 - 128.000000 0 0.000000 - 256.000000 0 0.000000 - 512.000000 0 0.000000 - 1024.000000 0 0.000000 - 2048.000000 0 0.000000 - 4096.000000 0 0.000000 - 8192.000000 0 0.000000 - 16384.000000 0 0.000000 - 32768.000000 0 0.000000 - 65536.000000 0 0.000000 - 131072.000000 0 0.000000 - 262144.000000 0 0.000000 - 524288.000000 0 0.000000 -1048576.000000 0 0.000000 -2097152.000000 0 0.000000 -4194304.000000 0 0.000000 -8388608.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=10; -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 0 0.000000 - 10.000000 0 0.000000 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 0 0.000000 - 10.000000 0 0.000000 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 10 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 11 4.050000 - 10.000000 11 25.699999 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.000010 0 0.000000 - 0.000100 0 0.000000 - 0.001000 0 0.000000 - 0.010000 0 0.000000 - 0.100000 0 0.000000 - 1.000000 11 4.050000 - 10.000000 11 25.699999 - 100.000000 0 0.000000 - 1000.000000 0 0.000000 - 10000.000000 0 0.000000 - 100000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=7; -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 0 0.000000 - 1.000000 0 0.000000 - 7.000000 0 0.000000 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 0 0.000000 - 1.000000 0 0.000000 - 7.000000 0 0.000000 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 7 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 0 0.000000 - 1.000000 11 4.050000 - 7.000000 11 25.699999 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.000008 0 0.000000 - 0.000059 0 0.000000 - 0.000416 0 0.000000 - 0.002915 0 0.000000 - 0.020408 0 0.000000 - 0.142857 0 0.000000 - 1.000000 11 4.050000 - 7.000000 11 25.699999 - 49.000000 0 0.000000 - 343.000000 0 0.000000 - 2401.000000 0 0.000000 - 16807.000000 0 0.000000 - 117649.000000 0 0.000000 - 823543.000000 0 0.000000 -5764801.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=156; -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000041 0 0.000000 - 0.006410 0 0.000000 - 1.000000 0 0.000000 - 156.000000 0 0.000000 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000041 0 0.000000 - 0.006410 0 0.000000 - 1.000000 0 0.000000 - 156.000000 0 0.000000 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 156 -SHOW QUERY_RESPONSE_TIME; - - 0.000041 24 0.000000 - 0.006410 0 0.000000 - 1.000000 11 4.050000 - 156.000000 11 25.699999 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000041 24 0.000000 - 0.006410 0 0.000000 - 1.000000 11 4.050000 - 156.000000 11 25.699999 - 24336.000000 0 0.000000 -3796416.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1000; -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.001000 0 0.000000 - 1.000000 0 0.000000 - 1000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.001000 0 0.000000 - 1.000000 0 0.000000 - 1000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.001000 0 0.000000 - 1.000000 11 4.050000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.001000 0 0.000000 - 1.000000 11 4.050000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=1001; -Warnings: -Warning 1292 Truncated incorrect query_response_time_range_base value: '1001' -FLUSH QUERY_RESPONSE_TIME; -SHOW QUERY_RESPONSE_TIME; - - 0.000001 0 0.000000 - 0.001000 0 0.000000 - 1.000000 0 0.000000 - 1000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 0 0.000000 - 0.001000 0 0.000000 - 1.000000 0 0.000000 - 1000.000000 0 0.000000 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; -SET SESSION query_exec_time=0.31; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.32; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.33; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.34; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.35; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.36; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.37; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.38; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.39; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.2; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=1.4; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.3; -SELECT 1; -1 -1 -SET SESSION query_exec_time=2.5; -SELECT 1; -1 -1 -SET SESSION query_exec_time=3.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=4.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=5.1; -SELECT 1; -1 -1 -SET SESSION query_exec_time=0.1; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -Variable_name Value -query_response_time_range_base 1000 -SHOW QUERY_RESPONSE_TIME; - - 0.000001 24 0.000000 - 0.001000 0 0.000000 - 1.000000 11 4.050000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -time count total - 0.000001 24 0.000000 - 0.001000 0 0.000000 - 1.000000 11 4.050000 - 1000.000000 11 25.699999 -1000000.000000 0 0.000000 -TOO LONG 0 TOO LONG -SET SESSION query_exec_time=default; -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; diff --git a/percona-suite/percona_query_response_time.test b/percona-suite/percona_query_response_time.test deleted file mode 100644 index d4fb9c61388..00000000000 --- a/percona-suite/percona_query_response_time.test +++ /dev/null @@ -1,20 +0,0 @@ ---source include/have_response_time_distribution.inc ---source include/have_debug.inc - ---let base=1 ---source include/query_response_time.inc ---let base=2 ---source include/query_response_time.inc ---let base=10 ---source include/query_response_time.inc ---let base=7 ---source include/query_response_time.inc ---let base=156 ---source include/query_response_time.inc ---let base=1000 ---source include/query_response_time.inc ---let base=1001 ---source include/query_response_time.inc - -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; 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 d889fd9f98d..00000000000 --- a/percona-suite/percona_query_response_time_sleep.inc +++ /dev/null @@ -1,19 +0,0 @@ -SET SESSION debug="+d,query_exec_time_0.31"; -SET SESSION debug="+d,query_exec_time_0.32"; -SET SESSION debug="+d,query_exec_time_0.33"; -SET SESSION debug="+d,query_exec_time_0.34"; -SET SESSION debug="+d,query_exec_time_0.35"; -SET SESSION debug="+d,query_exec_time_0.36"; -SET SESSION debug="+d,query_exec_time_0.37"; -SET SESSION debug="+d,query_exec_time_0.38"; -SET SESSION debug="+d,query_exec_time_0.39"; -SET SESSION debug="+d,query_exec_time_0.4"; -SET SESSION debug="+d,query_exec_time_1.1"; -SET SESSION debug="+d,query_exec_time_1.2"; -SET SESSION debug="+d,query_exec_time_1.3"; -SET SESSION debug="+d,query_exec_time_1.5"; -SET SESSION debug="+d,query_exec_time_1.4"; -SET SESSION debug="+d,query_exec_time_0.5"; -SET SESSION debug="+d,query_exec_time_2.1"; -SET SESSION debug="+d,query_exec_time_2.3"; -SET SESSION debug="+d,query_exec_time_2.5"; diff --git a/percona-suite/percona_server_variables.inc b/percona-suite/percona_server_variables.inc deleted file mode 100644 index a0a2528e617..00000000000 --- a/percona-suite/percona_server_variables.inc +++ /dev/null @@ -1,3 +0,0 @@ ---source include/have_response_time_distribution.inc ---source include/have_innodb.inc -SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; diff --git a/percona-suite/percona_server_variables_debug.result b/percona-suite/percona_server_variables_debug.result deleted file mode 100644 index ae02a48c8fa..00000000000 --- a/percona-suite/percona_server_variables_debug.result +++ /dev/null @@ -1,382 +0,0 @@ -SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; -Variable_name -AUTOCOMMIT -AUTOMATIC_SP_PRIVILEGES -AUTO_INCREMENT_INCREMENT -AUTO_INCREMENT_OFFSET -BACK_LOG -BASEDIR -BIG_TABLES -BINLOG_CACHE_SIZE -BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES -BINLOG_FORMAT -BINLOG_STMT_CACHE_SIZE -BULK_INSERT_BUFFER_SIZE -CHARACTER_SETS_DIR -CHARACTER_SET_CLIENT -CHARACTER_SET_CONNECTION -CHARACTER_SET_DATABASE -CHARACTER_SET_FILESYSTEM -CHARACTER_SET_RESULTS -CHARACTER_SET_SERVER -CHARACTER_SET_SYSTEM -COLLATION_CONNECTION -COLLATION_DATABASE -COLLATION_SERVER -COMPLETION_TYPE -CONCURRENT_INSERT -CONNECT_TIMEOUT -DATADIR -DATETIME_FORMAT -DATE_FORMAT -DEBUG -DEBUG_SYNC -DEFAULT_STORAGE_ENGINE -DEFAULT_WEEK_FORMAT -DELAYED_INSERT_LIMIT -DELAYED_INSERT_TIMEOUT -DELAYED_QUEUE_SIZE -DELAY_KEY_WRITE -DIV_PRECISION_INCREMENT -ENGINE_CONDITION_PUSHDOWN -ERROR_COUNT -EVENT_SCHEDULER -EXPAND_FAST_INDEX_CREATION -EXPIRE_LOGS_DAYS -EXTERNAL_USER -FAST_INDEX_CREATION -FLUSH -FLUSH_TIME -FOREIGN_KEY_CHECKS -FT_BOOLEAN_SYNTAX -FT_MAX_WORD_LEN -FT_MIN_WORD_LEN -FT_QUERY_EXPANSION_LIMIT -FT_STOPWORD_FILE -GENERAL_LOG -GENERAL_LOG_FILE -GROUP_CONCAT_MAX_LEN -HAVE_COMPRESS -HAVE_CRYPT -HAVE_CSV -HAVE_DYNAMIC_LOADING -HAVE_GEOMETRY -HAVE_INNODB -HAVE_NDBCLUSTER -HAVE_OPENSSL -HAVE_PARTITIONING -HAVE_PROFILING -HAVE_QUERY_CACHE -HAVE_RESPONSE_TIME_DISTRIBUTION -HAVE_RTREE_KEYS -HAVE_SSL -HAVE_SYMLINK -HOSTNAME -IDENTITY -IGNORE_BUILTIN_INNODB -INIT_CONNECT -INIT_FILE -INIT_SLAVE -INNODB_ADAPTIVE_FLUSHING -INNODB_ADAPTIVE_FLUSHING_METHOD -INNODB_ADAPTIVE_HASH_INDEX -INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS -INNODB_ADDITIONAL_MEM_POOL_SIZE -INNODB_AUTOEXTEND_INCREMENT -INNODB_AUTOINC_LOCK_MODE -INNODB_BLOCKING_BUFFER_POOL_RESTORE -INNODB_BUFFER_POOL_INSTANCES -INNODB_BUFFER_POOL_RESTORE_AT_STARTUP -INNODB_BUFFER_POOL_SHM_CHECKSUM -INNODB_BUFFER_POOL_SHM_KEY -INNODB_BUFFER_POOL_SIZE -INNODB_CHANGE_BUFFERING -INNODB_CHANGE_BUFFERING_DEBUG -INNODB_CHECKPOINT_AGE_TARGET -INNODB_CHECKSUMS -INNODB_COMMIT_CONCURRENCY -INNODB_CONCURRENCY_TICKETS -INNODB_CORRUPT_TABLE_ACTION -INNODB_DATA_FILE_PATH -INNODB_DATA_HOME_DIR -INNODB_DICT_SIZE_LIMIT -INNODB_DOUBLEWRITE -INNODB_DOUBLEWRITE_FILE -INNODB_FAKE_CHANGES -INNODB_FAST_CHECKSUM -INNODB_FAST_SHUTDOWN -INNODB_FILE_FORMAT -INNODB_FILE_FORMAT_CHECK -INNODB_FILE_FORMAT_MAX -INNODB_FILE_PER_TABLE -INNODB_FLUSH_CHECKPOINT_DEBUG -INNODB_FLUSH_LOG_AT_TRX_COMMIT -INNODB_FLUSH_METHOD -INNODB_FLUSH_NEIGHBOR_PAGES -INNODB_FORCE_LOAD_CORRUPTED -INNODB_FORCE_RECOVERY -INNODB_IBUF_ACCEL_RATE -INNODB_IBUF_ACTIVE_CONTRACT -INNODB_IBUF_MAX_SIZE -INNODB_IMPORT_TABLE_FROM_XTRABACKUP -INNODB_IO_CAPACITY -INNODB_KILL_IDLE_TRANSACTION -INNODB_LARGE_PREFIX -INNODB_LAZY_DROP_TABLE -INNODB_LOCKS_UNSAFE_FOR_BINLOG -INNODB_LOCK_WAIT_TIMEOUT -INNODB_LOG_BLOCK_SIZE -INNODB_LOG_BUFFER_SIZE -INNODB_LOG_FILES_IN_GROUP -INNODB_LOG_FILE_SIZE -INNODB_LOG_GROUP_HOME_DIR -INNODB_MAX_DIRTY_PAGES_PCT -INNODB_MAX_PURGE_LAG -INNODB_MIRRORED_LOG_GROUPS -INNODB_OLD_BLOCKS_PCT -INNODB_OLD_BLOCKS_TIME -INNODB_OPEN_FILES -INNODB_PAGE_SIZE -INNODB_PURGE_BATCH_SIZE -INNODB_PURGE_THREADS -INNODB_RANDOM_READ_AHEAD -INNODB_READ_AHEAD -INNODB_READ_AHEAD_THRESHOLD -INNODB_READ_IO_THREADS -INNODB_RECOVERY_STATS -INNODB_RECOVERY_UPDATE_RELAY_LOG -INNODB_REPLICATION_DELAY -INNODB_ROLLBACK_ON_TIMEOUT -INNODB_ROLLBACK_SEGMENTS -INNODB_SHOW_LOCKS_HELD -INNODB_SHOW_VERBOSE_LOCKS -INNODB_SPIN_WAIT_DELAY -INNODB_STATS_AUTO_UPDATE -INNODB_STATS_METHOD -INNODB_STATS_ON_METADATA -INNODB_STATS_SAMPLE_PAGES -INNODB_STATS_UPDATE_NEED_LOCK -INNODB_STRICT_MODE -INNODB_SUPPORT_XA -INNODB_SYNC_SPIN_LOOPS -INNODB_TABLE_LOCKS -INNODB_THREAD_CONCURRENCY -INNODB_THREAD_CONCURRENCY_TIMER_BASED -INNODB_THREAD_SLEEP_DELAY -INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT -INNODB_USE_NATIVE_AIO -INNODB_USE_SYS_MALLOC -INNODB_USE_SYS_STATS_TABLE -INNODB_VERSION -INNODB_WRITE_IO_THREADS -INSERT_ID -INTERACTIVE_TIMEOUT -JOIN_BUFFER_SIZE -KEEP_FILES_ON_CREATE -KEY_BUFFER_SIZE -KEY_CACHE_AGE_THRESHOLD -KEY_CACHE_BLOCK_SIZE -KEY_CACHE_DIVISION_LIMIT -LARGE_FILES_SUPPORT -LARGE_PAGES -LARGE_PAGE_SIZE -LAST_INSERT_ID -LC_MESSAGES -LC_MESSAGES_DIR -LC_TIME_NAMES -LICENSE -LOCAL_INFILE -LOCKED_IN_MEMORY -LOCK_WAIT_TIMEOUT -LOG -LOG_BIN -LOG_BIN_TRUST_FUNCTION_CREATORS -LOG_ERROR -LOG_OUTPUT -LOG_QUERIES_NOT_USING_INDEXES -LOG_SLAVE_UPDATES -LOG_SLOW_ADMIN_STATEMENTS -LOG_SLOW_FILTER -LOG_SLOW_QUERIES -LOG_SLOW_RATE_LIMIT -LOG_SLOW_SLAVE_STATEMENTS -LOG_SLOW_SP_STATEMENTS -LOG_SLOW_VERBOSITY -LOG_WARNINGS -LOG_WARNINGS_SUPPRESS -LONG_QUERY_TIME -LOWER_CASE_FILE_SYSTEM -LOWER_CASE_TABLE_NAMES -LOW_PRIORITY_UPDATES -MAX_ALLOWED_PACKET -MAX_BINLOG_CACHE_SIZE -MAX_BINLOG_SIZE -MAX_BINLOG_STMT_CACHE_SIZE -MAX_CONNECTIONS -MAX_CONNECT_ERRORS -MAX_DELAYED_THREADS -MAX_ERROR_COUNT -MAX_HEAP_TABLE_SIZE -MAX_INSERT_DELAYED_THREADS -MAX_JOIN_SIZE -MAX_LENGTH_FOR_SORT_DATA -MAX_LONG_DATA_SIZE -MAX_PREPARED_STMT_COUNT -MAX_RELAY_LOG_SIZE -MAX_SEEKS_FOR_KEY -MAX_SORT_LENGTH -MAX_SP_RECURSION_DEPTH -MAX_TMP_TABLES -MAX_USER_CONNECTIONS -MAX_WRITE_LOCK_COUNT -METADATA_LOCKS_CACHE_SIZE -MIN_EXAMINED_ROW_LIMIT -MULTI_RANGE_COUNT -MYISAM_DATA_POINTER_SIZE -MYISAM_MAX_SORT_FILE_SIZE -MYISAM_MMAP_SIZE -MYISAM_RECOVER_OPTIONS -MYISAM_REPAIR_THREADS -MYISAM_SORT_BUFFER_SIZE -MYISAM_STATS_METHOD -MYISAM_USE_MMAP -NET_BUFFER_LENGTH -NET_READ_TIMEOUT -NET_RETRY_COUNT -NET_WRITE_TIMEOUT -NEW -OLD -OLD_ALTER_TABLE -OLD_PASSWORDS -OPEN_FILES_LIMIT -OPTIMIZER_FIX -OPTIMIZER_PRUNE_LEVEL -OPTIMIZER_SEARCH_DEPTH -OPTIMIZER_SWITCH -PERFORMANCE_SCHEMA -PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE -PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE -PERFORMANCE_SCHEMA_MAX_COND_CLASSES -PERFORMANCE_SCHEMA_MAX_COND_INSTANCES -PERFORMANCE_SCHEMA_MAX_FILE_CLASSES -PERFORMANCE_SCHEMA_MAX_FILE_HANDLES -PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES -PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES -PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES -PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES -PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES -PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES -PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES -PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES -PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES -PID_FILE -PLUGIN_DIR -PORT -PRELOAD_BUFFER_SIZE -PROFILING -PROFILING_HISTORY_SIZE -PROTOCOL_VERSION -PROXY_USER -PSEUDO_THREAD_ID -QUERY_ALLOC_BLOCK_SIZE -QUERY_CACHE_LIMIT -QUERY_CACHE_MIN_RES_UNIT -QUERY_CACHE_SIZE -QUERY_CACHE_STRIP_COMMENTS -QUERY_CACHE_TYPE -QUERY_CACHE_WLOCK_INVALIDATE -QUERY_EXEC_TIME -QUERY_PREALLOC_SIZE -QUERY_RESPONSE_TIME_RANGE_BASE -QUERY_RESPONSE_TIME_STATS -RAND_SEED1 -RAND_SEED2 -RANGE_ALLOC_BLOCK_SIZE -READ_BUFFER_SIZE -READ_ONLY -READ_RND_BUFFER_SIZE -RELAY_LOG -RELAY_LOG_INDEX -RELAY_LOG_INFO_FILE -RELAY_LOG_PURGE -RELAY_LOG_RECOVERY -RELAY_LOG_SPACE_LIMIT -REPORT_HOST -REPORT_PASSWORD -REPORT_PORT -REPORT_USER -RPL_RECOVERY_RANK -SECURE_AUTH -SECURE_FILE_PRIV -SERVER_ID -SKIP_EXTERNAL_LOCKING -SKIP_NAME_RESOLVE -SKIP_NETWORKING -SKIP_SHOW_DATABASE -SLAVE_COMPRESSED_PROTOCOL -SLAVE_EXEC_MODE -SLAVE_LOAD_TMPDIR -SLAVE_NET_TIMEOUT -SLAVE_SKIP_ERRORS -SLAVE_TRANSACTION_RETRIES -SLAVE_TYPE_CONVERSIONS -SLOW_LAUNCH_TIME -SLOW_QUERY_LOG -SLOW_QUERY_LOG_FILE -SLOW_QUERY_LOG_TIMESTAMP_ALWAYS -SLOW_QUERY_LOG_TIMESTAMP_PRECISION -SLOW_QUERY_LOG_USE_GLOBAL_CONTROL -SOCKET -SORT_BUFFER_SIZE -SQL_AUTO_IS_NULL -SQL_BIG_SELECTS -SQL_BIG_TABLES -SQL_BUFFER_RESULT -SQL_LOG_BIN -SQL_LOG_OFF -SQL_LOW_PRIORITY_UPDATES -SQL_MAX_JOIN_SIZE -SQL_MODE -SQL_NOTES -SQL_QUOTE_SHOW_CREATE -SQL_SAFE_UPDATES -SQL_SELECT_LIMIT -SQL_SLAVE_SKIP_COUNTER -SQL_WARNINGS -SSL_CA -SSL_CAPATH -SSL_CERT -SSL_CIPHER -SSL_KEY -STORAGE_ENGINE -SYNC_BINLOG -SYNC_FRM -SYNC_MASTER_INFO -SYNC_RELAY_LOG -SYNC_RELAY_LOG_INFO -SYSTEM_TIME_ZONE -TABLE_DEFINITION_CACHE -TABLE_OPEN_CACHE -THREAD_CACHE_SIZE -THREAD_CONCURRENCY -THREAD_HANDLING -THREAD_STACK -THREAD_STATISTICS -TIMED_MUTEXES -TIMESTAMP -TIME_FORMAT -TIME_ZONE -TMPDIR -TMP_TABLE_SIZE -TRANSACTION_ALLOC_BLOCK_SIZE -TRANSACTION_PREALLOC_SIZE -TX_ISOLATION -UNIQUE_CHECKS -UPDATABLE_VIEWS_WITH_LIMIT -USERSTAT -VERSION -VERSION_COMMENT -VERSION_COMPILE_MACHINE -VERSION_COMPILE_OS -WAIT_TIMEOUT -WARNING_COUNT diff --git a/percona-suite/percona_server_variables_debug.test b/percona-suite/percona_server_variables_debug.test deleted file mode 100644 index 4c675f781f3..00000000000 --- a/percona-suite/percona_server_variables_debug.test +++ /dev/null @@ -1,2 +0,0 @@ ---source include/have_debug.inc ---source include/percona_server_variables.inc diff --git a/percona-suite/percona_server_variables_release.result b/percona-suite/percona_server_variables_release.result deleted file mode 100644 index 29ac402c144..00000000000 --- a/percona-suite/percona_server_variables_release.result +++ /dev/null @@ -1,377 +0,0 @@ -SELECT Variable_name FROM INFORMATION_SCHEMA.SESSION_VARIABLES ORDER BY 1; -Variable_name -AUTOCOMMIT -AUTOMATIC_SP_PRIVILEGES -AUTO_INCREMENT_INCREMENT -AUTO_INCREMENT_OFFSET -BACK_LOG -BASEDIR -BIG_TABLES -BINLOG_CACHE_SIZE -BINLOG_DIRECT_NON_TRANSACTIONAL_UPDATES -BINLOG_FORMAT -BINLOG_STMT_CACHE_SIZE -BULK_INSERT_BUFFER_SIZE -CHARACTER_SETS_DIR -CHARACTER_SET_CLIENT -CHARACTER_SET_CONNECTION -CHARACTER_SET_DATABASE -CHARACTER_SET_FILESYSTEM -CHARACTER_SET_RESULTS -CHARACTER_SET_SERVER -CHARACTER_SET_SYSTEM -COLLATION_CONNECTION -COLLATION_DATABASE -COLLATION_SERVER -COMPLETION_TYPE -CONCURRENT_INSERT -CONNECT_TIMEOUT -DATADIR -DATETIME_FORMAT -DATE_FORMAT -DEFAULT_STORAGE_ENGINE -DEFAULT_WEEK_FORMAT -DELAYED_INSERT_LIMIT -DELAYED_INSERT_TIMEOUT -DELAYED_QUEUE_SIZE -DELAY_KEY_WRITE -DIV_PRECISION_INCREMENT -ENGINE_CONDITION_PUSHDOWN -ERROR_COUNT -EVENT_SCHEDULER -EXPAND_FAST_INDEX_CREATION -EXPIRE_LOGS_DAYS -EXTERNAL_USER -FAST_INDEX_CREATION -FLUSH -FLUSH_TIME -FOREIGN_KEY_CHECKS -FT_BOOLEAN_SYNTAX -FT_MAX_WORD_LEN -FT_MIN_WORD_LEN -FT_QUERY_EXPANSION_LIMIT -FT_STOPWORD_FILE -GENERAL_LOG -GENERAL_LOG_FILE -GROUP_CONCAT_MAX_LEN -HAVE_COMPRESS -HAVE_CRYPT -HAVE_CSV -HAVE_DYNAMIC_LOADING -HAVE_GEOMETRY -HAVE_INNODB -HAVE_NDBCLUSTER -HAVE_OPENSSL -HAVE_PARTITIONING -HAVE_PROFILING -HAVE_QUERY_CACHE -HAVE_RESPONSE_TIME_DISTRIBUTION -HAVE_RTREE_KEYS -HAVE_SSL -HAVE_SYMLINK -HOSTNAME -IDENTITY -IGNORE_BUILTIN_INNODB -INIT_CONNECT -INIT_FILE -INIT_SLAVE -INNODB_ADAPTIVE_FLUSHING -INNODB_ADAPTIVE_FLUSHING_METHOD -INNODB_ADAPTIVE_HASH_INDEX -INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS -INNODB_ADDITIONAL_MEM_POOL_SIZE -INNODB_AUTOEXTEND_INCREMENT -INNODB_AUTOINC_LOCK_MODE -INNODB_BLOCKING_BUFFER_POOL_RESTORE -INNODB_BUFFER_POOL_INSTANCES -INNODB_BUFFER_POOL_RESTORE_AT_STARTUP -INNODB_BUFFER_POOL_SHM_CHECKSUM -INNODB_BUFFER_POOL_SHM_KEY -INNODB_BUFFER_POOL_SIZE -INNODB_CHANGE_BUFFERING -INNODB_CHECKPOINT_AGE_TARGET -INNODB_CHECKSUMS -INNODB_COMMIT_CONCURRENCY -INNODB_CONCURRENCY_TICKETS -INNODB_CORRUPT_TABLE_ACTION -INNODB_DATA_FILE_PATH -INNODB_DATA_HOME_DIR -INNODB_DICT_SIZE_LIMIT -INNODB_DOUBLEWRITE -INNODB_DOUBLEWRITE_FILE -INNODB_FAKE_CHANGES -INNODB_FAST_CHECKSUM -INNODB_FAST_SHUTDOWN -INNODB_FILE_FORMAT -INNODB_FILE_FORMAT_CHECK -INNODB_FILE_FORMAT_MAX -INNODB_FILE_PER_TABLE -INNODB_FLUSH_LOG_AT_TRX_COMMIT -INNODB_FLUSH_METHOD -INNODB_FLUSH_NEIGHBOR_PAGES -INNODB_FORCE_LOAD_CORRUPTED -INNODB_FORCE_RECOVERY -INNODB_IBUF_ACCEL_RATE -INNODB_IBUF_ACTIVE_CONTRACT -INNODB_IBUF_MAX_SIZE -INNODB_IMPORT_TABLE_FROM_XTRABACKUP -INNODB_IO_CAPACITY -INNODB_KILL_IDLE_TRANSACTION -INNODB_LARGE_PREFIX -INNODB_LAZY_DROP_TABLE -INNODB_LOCKS_UNSAFE_FOR_BINLOG -INNODB_LOCK_WAIT_TIMEOUT -INNODB_LOG_BLOCK_SIZE -INNODB_LOG_BUFFER_SIZE -INNODB_LOG_FILES_IN_GROUP -INNODB_LOG_FILE_SIZE -INNODB_LOG_GROUP_HOME_DIR -INNODB_MAX_DIRTY_PAGES_PCT -INNODB_MAX_PURGE_LAG -INNODB_MIRRORED_LOG_GROUPS -INNODB_OLD_BLOCKS_PCT -INNODB_OLD_BLOCKS_TIME -INNODB_OPEN_FILES -INNODB_PAGE_SIZE -INNODB_PURGE_BATCH_SIZE -INNODB_PURGE_THREADS -INNODB_RANDOM_READ_AHEAD -INNODB_READ_AHEAD -INNODB_READ_AHEAD_THRESHOLD -INNODB_READ_IO_THREADS -INNODB_RECOVERY_STATS -INNODB_RECOVERY_UPDATE_RELAY_LOG -INNODB_REPLICATION_DELAY -INNODB_ROLLBACK_ON_TIMEOUT -INNODB_ROLLBACK_SEGMENTS -INNODB_SHOW_LOCKS_HELD -INNODB_SHOW_VERBOSE_LOCKS -INNODB_SPIN_WAIT_DELAY -INNODB_STATS_AUTO_UPDATE -INNODB_STATS_METHOD -INNODB_STATS_ON_METADATA -INNODB_STATS_SAMPLE_PAGES -INNODB_STATS_UPDATE_NEED_LOCK -INNODB_STRICT_MODE -INNODB_SUPPORT_XA -INNODB_SYNC_SPIN_LOOPS -INNODB_TABLE_LOCKS -INNODB_THREAD_CONCURRENCY -INNODB_THREAD_CONCURRENCY_TIMER_BASED -INNODB_THREAD_SLEEP_DELAY -INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT -INNODB_USE_NATIVE_AIO -INNODB_USE_SYS_MALLOC -INNODB_USE_SYS_STATS_TABLE -INNODB_VERSION -INNODB_WRITE_IO_THREADS -INSERT_ID -INTERACTIVE_TIMEOUT -JOIN_BUFFER_SIZE -KEEP_FILES_ON_CREATE -KEY_BUFFER_SIZE -KEY_CACHE_AGE_THRESHOLD -KEY_CACHE_BLOCK_SIZE -KEY_CACHE_DIVISION_LIMIT -LARGE_FILES_SUPPORT -LARGE_PAGES -LARGE_PAGE_SIZE -LAST_INSERT_ID -LC_MESSAGES -LC_MESSAGES_DIR -LC_TIME_NAMES -LICENSE -LOCAL_INFILE -LOCKED_IN_MEMORY -LOCK_WAIT_TIMEOUT -LOG -LOG_BIN -LOG_BIN_TRUST_FUNCTION_CREATORS -LOG_ERROR -LOG_OUTPUT -LOG_QUERIES_NOT_USING_INDEXES -LOG_SLAVE_UPDATES -LOG_SLOW_ADMIN_STATEMENTS -LOG_SLOW_FILTER -LOG_SLOW_QUERIES -LOG_SLOW_RATE_LIMIT -LOG_SLOW_SLAVE_STATEMENTS -LOG_SLOW_SP_STATEMENTS -LOG_SLOW_VERBOSITY -LOG_WARNINGS -LOG_WARNINGS_SUPPRESS -LONG_QUERY_TIME -LOWER_CASE_FILE_SYSTEM -LOWER_CASE_TABLE_NAMES -LOW_PRIORITY_UPDATES -MAX_ALLOWED_PACKET -MAX_BINLOG_CACHE_SIZE -MAX_BINLOG_SIZE -MAX_BINLOG_STMT_CACHE_SIZE -MAX_CONNECTIONS -MAX_CONNECT_ERRORS -MAX_DELAYED_THREADS -MAX_ERROR_COUNT -MAX_HEAP_TABLE_SIZE -MAX_INSERT_DELAYED_THREADS -MAX_JOIN_SIZE -MAX_LENGTH_FOR_SORT_DATA -MAX_LONG_DATA_SIZE -MAX_PREPARED_STMT_COUNT -MAX_RELAY_LOG_SIZE -MAX_SEEKS_FOR_KEY -MAX_SORT_LENGTH -MAX_SP_RECURSION_DEPTH -MAX_TMP_TABLES -MAX_USER_CONNECTIONS -MAX_WRITE_LOCK_COUNT -METADATA_LOCKS_CACHE_SIZE -MIN_EXAMINED_ROW_LIMIT -MULTI_RANGE_COUNT -MYISAM_DATA_POINTER_SIZE -MYISAM_MAX_SORT_FILE_SIZE -MYISAM_MMAP_SIZE -MYISAM_RECOVER_OPTIONS -MYISAM_REPAIR_THREADS -MYISAM_SORT_BUFFER_SIZE -MYISAM_STATS_METHOD -MYISAM_USE_MMAP -NET_BUFFER_LENGTH -NET_READ_TIMEOUT -NET_RETRY_COUNT -NET_WRITE_TIMEOUT -NEW -OLD -OLD_ALTER_TABLE -OLD_PASSWORDS -OPEN_FILES_LIMIT -OPTIMIZER_FIX -OPTIMIZER_PRUNE_LEVEL -OPTIMIZER_SEARCH_DEPTH -OPTIMIZER_SWITCH -PERFORMANCE_SCHEMA -PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_LONG_SIZE -PERFORMANCE_SCHEMA_EVENTS_WAITS_HISTORY_SIZE -PERFORMANCE_SCHEMA_MAX_COND_CLASSES -PERFORMANCE_SCHEMA_MAX_COND_INSTANCES -PERFORMANCE_SCHEMA_MAX_FILE_CLASSES -PERFORMANCE_SCHEMA_MAX_FILE_HANDLES -PERFORMANCE_SCHEMA_MAX_FILE_INSTANCES -PERFORMANCE_SCHEMA_MAX_MUTEX_CLASSES -PERFORMANCE_SCHEMA_MAX_MUTEX_INSTANCES -PERFORMANCE_SCHEMA_MAX_RWLOCK_CLASSES -PERFORMANCE_SCHEMA_MAX_RWLOCK_INSTANCES -PERFORMANCE_SCHEMA_MAX_TABLE_HANDLES -PERFORMANCE_SCHEMA_MAX_TABLE_INSTANCES -PERFORMANCE_SCHEMA_MAX_THREAD_CLASSES -PERFORMANCE_SCHEMA_MAX_THREAD_INSTANCES -PID_FILE -PLUGIN_DIR -PORT -PRELOAD_BUFFER_SIZE -PROFILING -PROFILING_HISTORY_SIZE -PROTOCOL_VERSION -PROXY_USER -PSEUDO_THREAD_ID -QUERY_ALLOC_BLOCK_SIZE -QUERY_CACHE_LIMIT -QUERY_CACHE_MIN_RES_UNIT -QUERY_CACHE_SIZE -QUERY_CACHE_STRIP_COMMENTS -QUERY_CACHE_TYPE -QUERY_CACHE_WLOCK_INVALIDATE -QUERY_PREALLOC_SIZE -QUERY_RESPONSE_TIME_RANGE_BASE -QUERY_RESPONSE_TIME_STATS -RAND_SEED1 -RAND_SEED2 -RANGE_ALLOC_BLOCK_SIZE -READ_BUFFER_SIZE -READ_ONLY -READ_RND_BUFFER_SIZE -RELAY_LOG -RELAY_LOG_INDEX -RELAY_LOG_INFO_FILE -RELAY_LOG_PURGE -RELAY_LOG_RECOVERY -RELAY_LOG_SPACE_LIMIT -REPORT_HOST -REPORT_PASSWORD -REPORT_PORT -REPORT_USER -RPL_RECOVERY_RANK -SECURE_AUTH -SECURE_FILE_PRIV -SERVER_ID -SKIP_EXTERNAL_LOCKING -SKIP_NAME_RESOLVE -SKIP_NETWORKING -SKIP_SHOW_DATABASE -SLAVE_COMPRESSED_PROTOCOL -SLAVE_EXEC_MODE -SLAVE_LOAD_TMPDIR -SLAVE_NET_TIMEOUT -SLAVE_SKIP_ERRORS -SLAVE_TRANSACTION_RETRIES -SLAVE_TYPE_CONVERSIONS -SLOW_LAUNCH_TIME -SLOW_QUERY_LOG -SLOW_QUERY_LOG_FILE -SLOW_QUERY_LOG_TIMESTAMP_ALWAYS -SLOW_QUERY_LOG_TIMESTAMP_PRECISION -SLOW_QUERY_LOG_USE_GLOBAL_CONTROL -SOCKET -SORT_BUFFER_SIZE -SQL_AUTO_IS_NULL -SQL_BIG_SELECTS -SQL_BIG_TABLES -SQL_BUFFER_RESULT -SQL_LOG_BIN -SQL_LOG_OFF -SQL_LOW_PRIORITY_UPDATES -SQL_MAX_JOIN_SIZE -SQL_MODE -SQL_NOTES -SQL_QUOTE_SHOW_CREATE -SQL_SAFE_UPDATES -SQL_SELECT_LIMIT -SQL_SLAVE_SKIP_COUNTER -SQL_WARNINGS -SSL_CA -SSL_CAPATH -SSL_CERT -SSL_CIPHER -SSL_KEY -STORAGE_ENGINE -SYNC_BINLOG -SYNC_FRM -SYNC_MASTER_INFO -SYNC_RELAY_LOG -SYNC_RELAY_LOG_INFO -SYSTEM_TIME_ZONE -TABLE_DEFINITION_CACHE -TABLE_OPEN_CACHE -THREAD_CACHE_SIZE -THREAD_CONCURRENCY -THREAD_HANDLING -THREAD_STACK -THREAD_STATISTICS -TIMED_MUTEXES -TIMESTAMP -TIME_FORMAT -TIME_ZONE -TMPDIR -TMP_TABLE_SIZE -TRANSACTION_ALLOC_BLOCK_SIZE -TRANSACTION_PREALLOC_SIZE -TX_ISOLATION -UNIQUE_CHECKS -UPDATABLE_VIEWS_WITH_LIMIT -USERSTAT -VERSION -VERSION_COMMENT -VERSION_COMPILE_MACHINE -VERSION_COMPILE_OS -WAIT_TIMEOUT -WARNING_COUNT diff --git a/percona-suite/percona_server_variables_release.test b/percona-suite/percona_server_variables_release.test deleted file mode 100644 index f61446aeb02..00000000000 --- a/percona-suite/percona_server_variables_release.test +++ /dev/null @@ -1,2 +0,0 @@ ---source include/have_nodebug.inc ---source include/percona_server_variables.inc diff --git a/percona-suite/percona_show_slave_status_nolock.result b/percona-suite/percona_show_slave_status_nolock.result deleted file mode 100644 index b98e4a93953..00000000000 --- a/percona-suite/percona_show_slave_status_nolock.result +++ /dev/null @@ -1,69 +0,0 @@ -include/master-slave.inc -[connection master] -call mtr.add_suppression("Slave SQL: Request to stop slave SQL Thread received while applying a group that has non-transactional changes"); -include/rpl_connect.inc [creating slave_lock] -include/rpl_connect.inc [creating slave_nolock] -[master] -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -[slave] -SET DEBUG_SYNC='RESET'; -SET GLOBAL DEBUG="+d,after_mysql_insert,after_show_slave_status"; -[master] -INSERT INTO t VALUES(0); -[slave] -check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - both should work fine - -[slave_lock] -SHOW SLAVE STATUS; -SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1'; -SIGNAL after SHOW SLAVE STATUS is 'signal.after_show_slave_status' -[slave] -SET DEBUG_SYNC='now SIGNAL signal.empty'; -[slave_nolock] -SHOW SLAVE STATUS NOLOCK; -SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1'; -# should be 'signal.after_show_slave_status' -SIGNAL after SHOW SLAVE STATUS NOLOCK is 'signal.after_show_slave_status' -[slave] -SET DEBUG_SYNC='now SIGNAL signal.continue'; -[slave] -SET DEBUG_SYNC='now SIGNAL signal.empty'; - -[master] -INSERT INTO t VALUES(1); -[slave] -include/rpl_connect.inc [creating slave_stop] -[slave_stop] -STOP SLAVE; -[slave] -check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - just NOLOCK version should works fine - -[slave_lock] -SHOW SLAVE STATUS; -SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1'; -SIGNAL after SHOW SLAVE STATUS is 'signal.empty' -[slave] -SET DEBUG_SYNC='now SIGNAL signal.empty'; -[slave_nolock] -SHOW SLAVE STATUS NOLOCK; -SET DEBUG_SYNC='now WAIT_FOR signal.after_show_slave_status TIMEOUT 1'; -# should be 'signal.after_show_slave_status' -SIGNAL after SHOW SLAVE STATUS NOLOCK is 'signal.after_show_slave_status' -[slave] -SET DEBUG_SYNC='now SIGNAL signal.continue'; -[slave] -SET DEBUG_SYNC='now SIGNAL signal.empty'; - -[slave_stop] -include/wait_for_slave_to_stop.inc -START SLAVE; -include/wait_for_slave_to_start.inc -[master] -SET DEBUG_SYNC='RESET'; -[slave] -SET GLOBAL DEBUG=''; -SET DEBUG_SYNC='RESET'; -[master] -DROP TABLE t; -include/rpl_end.inc diff --git a/percona-suite/percona_show_slave_status_nolock.test b/percona-suite/percona_show_slave_status_nolock.test deleted file mode 100644 index df595214ff7..00000000000 --- a/percona-suite/percona_show_slave_status_nolock.test +++ /dev/null @@ -1,90 +0,0 @@ ---source include/master-slave.inc ---source include/have_debug_sync.inc ---source include/have_binlog_format_statement.inc - -call mtr.add_suppression("Slave SQL: Request to stop slave SQL Thread received while applying a group that has non-transactional changes"); - ---let $rpl_connection_name=slave_lock ---let $rpl_server_number=2 ---source include/rpl_connect.inc - ---let $rpl_connection_name=slave_nolock ---let $rpl_server_number=2 ---source include/rpl_connect.inc - ---let $show_statement= SHOW PROCESSLIST ---let $field= Info - -connection master; ---echo [master] ---disable_warnings -DROP TABLE IF EXISTS t; ---enable_warnings -CREATE TABLE t(id INT); -sync_slave_with_master; - -connection slave; ---echo [slave] -SET DEBUG_SYNC='RESET'; -SET GLOBAL DEBUG="+d,after_mysql_insert,after_show_slave_status"; - -connection master; ---echo [master] -INSERT INTO t VALUES(0); - -connection slave; ---echo [slave] ---let $condition= 'INSERT INTO t VALUES(0)' ---source include/wait_show_condition.inc - ---echo check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - both should work fine ---source include/percona_show_slave_status_nolock.inc - -connection master; ---echo [master] -INSERT INTO t VALUES(1); - -connection slave; ---echo [slave] ---let $condition= 'INSERT INTO t VALUES(1)' ---source include/wait_show_condition.inc - ---let $rpl_connection_name=slave_stop ---let $rpl_server_number=2 ---source include/rpl_connect.inc - -connection slave_stop; ---echo [slave_stop] -send STOP SLAVE; - -connection slave; ---echo [slave] ---let $condition= 'STOP SLAVE' ---source include/wait_show_condition.inc - ---echo check 'SHOW SLAVE STATUS' and 'SHOW SLAVE STATUS NOLOCK' - just NOLOCK version should works fine ---source include/percona_show_slave_status_nolock.inc - - -connection slave_stop; ---echo [slave_stop] -reap; ---source include/wait_for_slave_to_stop.inc -START SLAVE; ---source include/wait_for_slave_to_start.inc - -connection master; ---echo [master] -SET DEBUG_SYNC='RESET'; - -connection slave; ---echo [slave] -SET GLOBAL DEBUG=''; -SET DEBUG_SYNC='RESET'; - -connection master; ---echo [master] -DROP TABLE t; -sync_slave_with_master; - ---source include/rpl_end.inc diff --git a/percona-suite/percona_show_temp_tables.result b/percona-suite/percona_show_temp_tables.result deleted file mode 100644 index cbcb0331896..00000000000 --- a/percona-suite/percona_show_temp_tables.result +++ /dev/null @@ -1,58 +0,0 @@ -drop table if exists t1,t2,t3; -drop database if exists showtemp; -create database if not exists showtemp; -use test; -create temporary table t1(id int); -create temporary table t2(id int); -create temporary table showtemp.t3(id int); -insert into t1 values(10),(20),(30),(40); -insert into showtemp.t3 values(999); -show temporary tables; -Temp_tables_in_test -t2 -t1 -show temporary tables from test; -Temp_tables_in_test -t2 -t1 -show temporary tables in showtemp; -Temp_tables_in_showtemp -t3 -select table_schema, table_name, engine, table_rows from Information_schema.temporary_tables; -table_schema table_name engine table_rows -showtemp t3 MyISAM 1 -test t2 MyISAM 0 -test t1 MyISAM 4 -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; -table_schema table_name engine table_rows -showtemp t3 MyISAM 1 -test t2 MyISAM 0 -test t1 MyISAM 4 -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='showtemp'; -table_schema table_name engine table_rows -showtemp t3 MyISAM 1 -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='temp'; -table_schema table_name engine table_rows -drop table if exists showtemp.t2; -create temporary table t1(id int); -create temporary table showtemp.t2(id int); -show temporary tables; -Temp_tables_in_test -t1 -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; -table_schema table_name engine table_rows -showtemp t2 MyISAM 0 -test t1 MyISAM 0 -showtemp t3 MyISAM 1 -test t2 MyISAM 0 -test t1 MyISAM 4 -drop table showtemp.t2; -drop table t1; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; -table_schema table_name engine table_rows -showtemp t3 MyISAM 1 -test t2 MyISAM 0 -test t1 MyISAM 4 -drop table t1, t2; -drop table showtemp.t3; -drop database showtemp; diff --git a/percona-suite/percona_show_temp_tables.test b/percona-suite/percona_show_temp_tables.test deleted file mode 100644 index 8837df199c5..00000000000 --- a/percona-suite/percona_show_temp_tables.test +++ /dev/null @@ -1,65 +0,0 @@ -# Uses GRANT commands that usually disabled in embedded server --- source include/not_embedded.inc - -# Save the initial number of concurrent sessions ---source include/count_sessions.inc - -# -# Test of SHOW [GLOBAL] TEMPORARY TABLES [FROM/IN] DB and -# Information_schema.temporary_tables and global_temporary_tables -# - -connect(stcon1,localhost,root,,test); -connect(stcon2,localhost,root,,test); - -connection stcon1; - ---disable_warnings -drop table if exists t1,t2,t3; -drop database if exists showtemp; -create database if not exists showtemp; ---enable_warnings - -use test; -create temporary table t1(id int); -create temporary table t2(id int); -create temporary table showtemp.t3(id int); -insert into t1 values(10),(20),(30),(40); -insert into showtemp.t3 values(999); - -show temporary tables; -# "Session" is not same value always. mysql-test cannot test it always. -#show global temporary tables; -show temporary tables from test; -show temporary tables in showtemp; -select table_schema, table_name, engine, table_rows from Information_schema.temporary_tables; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='showtemp'; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables where table_schema='temp'; - -connection stcon2; - ---disable_warnings -drop table if exists showtemp.t2; ---enable_warnings -create temporary table t1(id int); -create temporary table showtemp.t2(id int); -show temporary tables; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; -drop table showtemp.t2; -drop table t1; - -disconnect stcon2; - -connection stcon1; -select table_schema, table_name, engine, table_rows from Information_schema.global_temporary_tables; - -drop table t1, t2; -drop table showtemp.t3; -drop database showtemp; - -connection default; -disconnect stcon1; - -# Wait till all disconnects are completed ---source include/wait_until_count_sessions.inc diff --git a/percona-suite/percona_slow_extended-log_slow_filter-master.opt b/percona-suite/percona_slow_extended-log_slow_filter-master.opt deleted file mode 100644 index 865dc70ba38..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_filter-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_filter.log --long-query-time=1 --slow_query_log=OFF diff --git a/percona-suite/percona_slow_extended-log_slow_filter.result b/percona-suite/percona_slow_extended-log_slow_filter.result deleted file mode 100644 index 2f22ef5457b..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_filter.result +++ /dev/null @@ -1,25 +0,0 @@ -drop table if exists t; -# Create test table -create table t(id INT PRIMARY KEY) engine=InnoDB; -# Insert two rows to test table -insert into t values(1); -insert into t values(2); -insert into t values(3); -SET GLOBAL SLOW_QUERY_LOG=ON; -SELECT sleep(2); -sleep(2) -0 -set log_slow_filter=full_join; -SELECT sleep(2) union select t2.id from t as t1,t as t2; -sleep(2) -0 -1 -2 -3 -SELECT sleep(2); -sleep(2) -0 -SET GLOBAL SLOW_QUERY_LOG=OFF; -drop table if exists t; -FLUSH LOGS; -2 diff --git a/percona-suite/percona_slow_extended-log_slow_filter.test b/percona-suite/percona_slow_extended-log_slow_filter.test deleted file mode 100644 index 3dbe701098f..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_filter.test +++ /dev/null @@ -1,32 +0,0 @@ -source include/have_innodb.inc; - ---disable_warnings -drop table if exists t; ---enable_warnings - ---echo # Create test table -create table t(id INT PRIMARY KEY) engine=InnoDB; ---echo # Insert two rows to test table -insert into t values(1); -insert into t values(2); -insert into t values(3); - -SET GLOBAL SLOW_QUERY_LOG=ON; - -SELECT sleep(2); - -set log_slow_filter=full_join; - -SELECT sleep(2) union select t2.id from t as t1,t as t2; -SELECT sleep(2); - -SET GLOBAL SLOW_QUERY_LOG=OFF; - ---disable_warnings -drop table if exists t; ---enable_warnings - -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/percona_slow_extended-log_slow_sp_statements-cl-master.opt b/percona-suite/percona_slow_extended-log_slow_sp_statements-cl-master.opt deleted file mode 100644 index 4368453928a..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_sp_statements-cl-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_slow_sp_statements diff --git a/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.result b/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.result deleted file mode 100644 index c5653429327..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.result +++ /dev/null @@ -1,3 +0,0 @@ -show global variables like 'log_slow_sp_statements'; -Variable_name Value -log_slow_sp_statements ON diff --git a/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.test b/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.test deleted file mode 100644 index 47bd960feb5..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_sp_statements-cl.test +++ /dev/null @@ -1 +0,0 @@ -show global variables like 'log_slow_sp_statements'; diff --git a/percona-suite/percona_slow_extended-log_slow_verbosity-cl-master.opt b/percona-suite/percona_slow_extended-log_slow_verbosity-cl-master.opt deleted file mode 100644 index d8809c36981..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity-cl-master.opt +++ /dev/null @@ -1 +0,0 @@ ---log_slow_verbosity="full" diff --git a/percona-suite/percona_slow_extended-log_slow_verbosity-cl.result b/percona-suite/percona_slow_extended-log_slow_verbosity-cl.result deleted file mode 100644 index eb8228efb08..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity-cl.result +++ /dev/null @@ -1,9 +0,0 @@ -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/percona_slow_extended-log_slow_verbosity-cl.test b/percona-suite/percona_slow_extended-log_slow_verbosity-cl.test deleted file mode 100644 index 740c4deaebd..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity-cl.test +++ /dev/null @@ -1,3 +0,0 @@ -show global variables like 'log_slow_verbosity'; -show variables like 'log_slow_verbosity'; -select @@log_slow_verbosity; diff --git a/percona-suite/percona_slow_extended-log_slow_verbosity-master.opt b/percona-suite/percona_slow_extended-log_slow_verbosity-master.opt deleted file mode 100644 index 19ae9c117f0..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-log_slow_verbosity.log --long-query-time=1 diff --git a/percona-suite/percona_slow_extended-log_slow_verbosity.result b/percona-suite/percona_slow_extended-log_slow_verbosity.result deleted file mode 100644 index 1e7db10c8bd..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity.result +++ /dev/null @@ -1,9 +0,0 @@ -SELECT sleep(2); -sleep(2) -0 -set log_slow_verbosity=innodb; -SELECT sleep(2); -sleep(2) -0 -FLUSH LOGS; -1 diff --git a/percona-suite/percona_slow_extended-log_slow_verbosity.test b/percona-suite/percona_slow_extended-log_slow_verbosity.test deleted file mode 100644 index 4fb854d6de6..00000000000 --- a/percona-suite/percona_slow_extended-log_slow_verbosity.test +++ /dev/null @@ -1,12 +0,0 @@ -source include/have_innodb.inc; - -SELECT sleep(2); - -set log_slow_verbosity=innodb; - -SELECT sleep(2); - -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/percona_slow_extended-long_query_time-master.opt b/percona-suite/percona_slow_extended-long_query_time-master.opt deleted file mode 100644 index 62e1e981558..00000000000 --- a/percona-suite/percona_slow_extended-long_query_time-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-long_query_time.log --long-query-time=2 --slow-query-log=OFF diff --git a/percona-suite/percona_slow_extended-long_query_time.result b/percona-suite/percona_slow_extended-long_query_time.result deleted file mode 100644 index f2da4e4d9d6..00000000000 --- a/percona-suite/percona_slow_extended-long_query_time.result +++ /dev/null @@ -1,24 +0,0 @@ -SET GLOBAL SLOW_QUERY_LOG=ON; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set long_query_time=4; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set long_query_time=2; -SET GLOBAL SLOW_QUERY_LOG=OFF; -FLUSH LOGS; -3 diff --git a/percona-suite/percona_slow_extended-long_query_time.test b/percona-suite/percona_slow_extended-long_query_time.test deleted file mode 100644 index 39f0ff95f8b..00000000000 --- a/percona-suite/percona_slow_extended-long_query_time.test +++ /dev/null @@ -1,23 +0,0 @@ -source include/have_innodb.inc; - -SET GLOBAL SLOW_QUERY_LOG=ON; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set long_query_time=4; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set long_query_time=2; - -SET GLOBAL SLOW_QUERY_LOG=OFF; - -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/percona_slow_extended-microseconds_in_slow_extended-master.opt b/percona-suite/percona_slow_extended-microseconds_in_slow_extended-master.opt deleted file mode 100644 index ca486d356f5..00000000000 --- a/percona-suite/percona_slow_extended-microseconds_in_slow_extended-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-microseconds_in_slow_query_log.log --long-query-time=1 --slow_query_log=OFF diff --git a/percona-suite/percona_slow_extended-microseconds_in_slow_extended.result b/percona-suite/percona_slow_extended-microseconds_in_slow_extended.result deleted file mode 100644 index ce27c518efe..00000000000 --- a/percona-suite/percona_slow_extended-microseconds_in_slow_extended.result +++ /dev/null @@ -1,13 +0,0 @@ -SET GLOBAL SLOW_QUERY_LOG=ON; -SELECT sleep(2); -sleep(2) -0 -set global slow_query_log_timestamp_precision='microsecond'; -SELECT sleep(2); -sleep(2) -0 -set global slow_query_log_timestamp_precision='second'; -SET GLOBAL SLOW_QUERY_LOG=OFF; -FLUSH LOGS; -1 -2 diff --git a/percona-suite/percona_slow_extended-microseconds_in_slow_extended.test b/percona-suite/percona_slow_extended-microseconds_in_slow_extended.test deleted file mode 100644 index 839f4389155..00000000000 --- a/percona-suite/percona_slow_extended-microseconds_in_slow_extended.test +++ /dev/null @@ -1,23 +0,0 @@ -source include/have_innodb.inc; - -SET GLOBAL SLOW_QUERY_LOG=ON; - -SELECT sleep(2); - -set global slow_query_log_timestamp_precision='microsecond'; - -SELECT sleep(2); - -set global slow_query_log_timestamp_precision='second'; - -SET GLOBAL SLOW_QUERY_LOG=OFF; - -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 - diff --git a/percona-suite/percona_slow_extended-min_examined_row_limit-master.opt b/percona-suite/percona_slow_extended-min_examined_row_limit-master.opt deleted file mode 100644 index c1cf3ebdb30..00000000000 --- a/percona-suite/percona_slow_extended-min_examined_row_limit-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-min_examined_row_limit.log --long-query-time=1 --slow-query-log=OFF diff --git a/percona-suite/percona_slow_extended-min_examined_row_limit.result b/percona-suite/percona_slow_extended-min_examined_row_limit.result deleted file mode 100644 index 1e8bc0723ac..00000000000 --- a/percona-suite/percona_slow_extended-min_examined_row_limit.result +++ /dev/null @@ -1,25 +0,0 @@ -drop table if exists t; -# Create test table -create table t(id INT PRIMARY KEY) engine=InnoDB; -# Insert two rows to test table -insert into t values(1); -insert into t values(2); -insert into t values(3); -SET GLOBAL SLOW_QUERY_LOG=ON; -SELECT sleep(2); -sleep(2) -0 -set min_examined_row_limit=5; -SELECT sleep(2) union select t2.id from t as t1,t as t2; -sleep(2) -0 -1 -2 -3 -SELECT sleep(2); -sleep(2) -0 -SET GLOBAL SLOW_QUERY_LOG=OFF; -drop table if exists t; -FLUSH LOGS; -2 diff --git a/percona-suite/percona_slow_extended-min_examined_row_limit.test b/percona-suite/percona_slow_extended-min_examined_row_limit.test deleted file mode 100644 index a68250f5c9c..00000000000 --- a/percona-suite/percona_slow_extended-min_examined_row_limit.test +++ /dev/null @@ -1,32 +0,0 @@ -source include/have_innodb.inc; - ---disable_warnings -drop table if exists t; ---enable_warnings - ---echo # Create test table -create table t(id INT PRIMARY KEY) engine=InnoDB; ---echo # Insert two rows to test table -insert into t values(1); -insert into t values(2); -insert into t values(3); - -SET GLOBAL SLOW_QUERY_LOG=ON; - -SELECT sleep(2); - -set min_examined_row_limit=5; - -SELECT sleep(2) union select t2.id from t as t1,t as t2; -SELECT sleep(2); - -SET GLOBAL SLOW_QUERY_LOG=OFF; - ---disable_warnings -drop table if exists t; ---enable_warnings - -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/percona_slow_extended-slave_innodb_stats-master.opt b/percona-suite/percona_slow_extended-slave_innodb_stats-master.opt deleted file mode 100644 index 286a9c4484d..00000000000 --- a/percona-suite/percona_slow_extended-slave_innodb_stats-master.opt +++ /dev/null @@ -1 +0,0 @@ ---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements diff --git a/percona-suite/percona_slow_extended-slave_innodb_stats-slave.opt b/percona-suite/percona_slow_extended-slave_innodb_stats-slave.opt deleted file mode 100644 index 286a9c4484d..00000000000 --- a/percona-suite/percona_slow_extended-slave_innodb_stats-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements diff --git a/percona-suite/percona_slow_extended-slave_innodb_stats.result b/percona-suite/percona_slow_extended-slave_innodb_stats.result deleted file mode 100644 index 51993e767c2..00000000000 --- a/percona-suite/percona_slow_extended-slave_innodb_stats.result +++ /dev/null @@ -1,22 +0,0 @@ -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 -(1,"aaaaabbbbbcccccdddddeeeeefffff"), -(2,"aaaaabbbbbcccccdddddeeeeefffff"), -(3,"aaaaabbbbbcccccdddddeeeeefffff"), -(4,"aaaaabbbbbcccccdddddeeeeefffff"), -(5,"aaaaabbbbbcccccdddddeeeeefffff"); -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; -4 -STOP SLAVE; -include/wait_for_slave_to_stop.inc diff --git a/percona-suite/percona_slow_extended-slave_innodb_stats.test b/percona-suite/percona_slow_extended-slave_innodb_stats.test deleted file mode 100644 index b4860a2b114..00000000000 --- a/percona-suite/percona_slow_extended-slave_innodb_stats.test +++ /dev/null @@ -1,51 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/have_innodb.inc --- source include/master-slave.inc - -connection master; --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB; -INSERT INTO t VALUES -(1,"aaaaabbbbbcccccdddddeeeeefffff"), -(2,"aaaaabbbbbcccccdddddeeeeefffff"), -(3,"aaaaabbbbbcccccdddddeeeeefffff"), -(4,"aaaaabbbbbcccccdddddeeeeefffff"), -(5,"aaaaabbbbbcccccdddddeeeeefffff"); -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; -sync_slave_with_master; - -connection slave; -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF ---shutdown_server 10 ---source include/wait_until_disconnected.inc ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -restart -EOF ---enable_reconnect ---source include/wait_until_connected_again.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -connection master; -INSERT INTO t SELECT t.id,t.data from t; -sync_slave_with_master; - -connection master; -DROP TABLE IF EXISTS t; -sync_slave_with_master; - -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 - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt b/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt deleted file mode 100644 index 49038530c56..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=1 diff --git a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt b/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt deleted file mode 100644 index 648f309f744..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=1 diff --git a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.result b/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.result deleted file mode 100644 index e5f4568dd58..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.result +++ /dev/null @@ -1,89 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -START SLAVE; -include/wait_for_slave_to_start.inc -INSERT INTO t VALUES (1); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (2); -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 -long_query_time 1.000000 -show global variables like 'long_query_time'; -Variable_name Value -long_query_time 1.000000 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control -set global long_query_time=0; -show variables like 'long_query_time'; -Variable_name Value -long_query_time 1.000000 -show global variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control -INSERT INTO t VALUES (4); -show variables like 'long_query_time'; -Variable_name Value -long_query_time 1.000000 -show global variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control -set global slow_query_log_use_global_control='long_query_time'; -show variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control long_query_time -INSERT INTO t VALUES (5); -show variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'long_query_time'; -Variable_name Value -long_query_time 0.000000 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control long_query_time -set global long_query_time=1; -set global slow_query_log_use_global_control=''; -FLUSH LOGS; -# Analyse master slow_query_log -0 -0 -0 -0 -0 -FLUSH LOGS; -# Analyse slave slow_query_log -0 -0 -0 -0 -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/percona_slow_extended-slave_statements-and-use_global_long_query_time.test b/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.test deleted file mode 100644 index 3e578ec6704..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-and-use_global_long_query_time.test +++ /dev/null @@ -1,107 +0,0 @@ --- source include/have_binlog_format_mixed_or_statement.inc --- source include/master-slave.inc - -connection master; --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings -CREATE TABLE t(id INT); - --- disable_warnings -connection slave; -START SLAVE; --- source include/wait_for_slave_to_start.inc --- enable_warnings - -connection master; -INSERT INTO t VALUES (1); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (2); -sync_slave_with_master; -connection slave; - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -connection master; -INSERT INTO t VALUES (3); -sync_slave_with_master; - -connection slave; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'slow_query_log_use_global_control'; -set global long_query_time=0; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'slow_query_log_use_global_control'; - -connection master; -INSERT INTO t VALUES (4); -sync_slave_with_master; - -connection slave; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'slow_query_log_use_global_control'; -set global slow_query_log_use_global_control='long_query_time'; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'slow_query_log_use_global_control'; - -#-- echo # Make insert(5) on master -connection master; -INSERT INTO t VALUES (5); -sync_slave_with_master; -connection slave; -show variables like 'long_query_time'; -show global variables like 'long_query_time'; -show global variables like 'slow_query_log_use_global_control'; -set global long_query_time=1; -set global slow_query_log_use_global_control=''; - -connection master; -FLUSH LOGS; - --- echo # Analyse master slow_query_log -let $i=5; -let $k=1; -while($i) -{ - --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; -while($i) -{ - --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; -} -set global log_slow_slave_statements=OFF; - -connection master; -DROP TABLE t; -sync_slave_with_master; -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/percona_slow_extended-slave_statements-master.opt b/percona-suite/percona_slow_extended-slave_statements-master.opt deleted file mode 100644 index ebf25ddd37d..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_log_slow_slave_statements-master.log --long-query-time=0 diff --git a/percona-suite/percona_slow_extended-slave_statements-slave.opt b/percona-suite/percona_slow_extended-slave_statements-slave.opt deleted file mode 100644 index 96cd9004493..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_log_slow_slave_statements-slave.log --long-query-time=0 diff --git a/percona-suite/percona_slow_extended-slave_statements.result b/percona-suite/percona_slow_extended-slave_statements.result deleted file mode 100644 index 0548dc370b4..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements.result +++ /dev/null @@ -1,94 +0,0 @@ -include/master-slave.inc -[connection master] -DROP TABLE IF EXISTS t; -CREATE TABLE t(id INT); -START SLAVE; -include/wait_for_slave_to_start.inc -INSERT INTO t VALUES (1); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (2); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -STOP SLAVE; -include/wait_for_slave_to_stop.inc -START SLAVE; -include/wait_for_slave_to_start.inc -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (3); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -set global log_slow_slave_statements=OFF; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -INSERT INTO t VALUES (4); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -STOP SLAVE; -include/wait_for_slave_to_stop.inc -START SLAVE; -include/wait_for_slave_to_start.inc -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -INSERT INTO t VALUES (5); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements OFF -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (6); -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -STOP SLAVE; -include/wait_for_slave_to_stop.inc -START SLAVE; -include/wait_for_slave_to_start.inc -show variables like 'log_slow_slave_statements'; -Variable_name Value -log_slow_slave_statements ON -INSERT INTO t VALUES (7); -FLUSH LOGS; -# Analyse master slow_query_log -1 -1 -1 -1 -1 -1 -1 -FLUSH LOGS; -# Analyse slave slow_query_log -0 -0 -1 -0 -0 -0 -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/percona_slow_extended-slave_statements.test b/percona-suite/percona_slow_extended-slave_statements.test deleted file mode 100644 index 681d9c79f80..00000000000 --- a/percona-suite/percona_slow_extended-slave_statements.test +++ /dev/null @@ -1,133 +0,0 @@ --- source include/have_binlog_format_statement.inc --- source include/master-slave.inc - -connection master; --- disable_warnings -DROP TABLE IF EXISTS t; --- enable_warnings - -CREATE TABLE t(id INT); - --- disable_warnings -connection slave; -START SLAVE; --- source include/wait_for_slave_to_start.inc --- enable_warnings - -connection master; -INSERT INTO t VALUES (1); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (2); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (3); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=OFF; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (4); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -connection slave; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (5); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; -set global log_slow_slave_statements=ON; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (6); -sync_slave_with_master; - -connection slave; -show variables like 'log_slow_slave_statements'; - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc -START SLAVE; --- source include/wait_for_slave_to_start.inc - -connection slave; -show variables like 'log_slow_slave_statements'; - -connection master; -INSERT INTO t VALUES (7); -sync_slave_with_master; - -connection master; -FLUSH LOGS; - --- echo # Analyse master slow_query_log -let $i=7; -let $k=1; -while($i) -{ - --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; -while($i) -{ - --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; -} -set global log_slow_slave_statements=OFF; - -connection master; -DROP TABLE t; -sync_slave_with_master; - -STOP SLAVE; --- source include/wait_for_slave_to_stop.inc diff --git a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt b/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt deleted file mode 100644 index c3ebcd95326..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow_query_log_timestamp_precision='microsecond' diff --git a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result b/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result deleted file mode 100644 index 5355922bb45..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.result +++ /dev/null @@ -1,3 +0,0 @@ -show global variables like 'slow_query_log_timestamp_precision'; -Variable_name Value -slow_query_log_timestamp_precision microsecond diff --git a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test b/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test deleted file mode 100644 index 8f6291e9897..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_microseconds_timestamp-cl.test +++ /dev/null @@ -1 +0,0 @@ -show global variables like 'slow_query_log_timestamp_precision'; diff --git a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt b/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt deleted file mode 100644 index 233b50a1f89..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow_query_log_timestamp_always diff --git a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.result b/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.result deleted file mode 100644 index 13684fad10c..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.result +++ /dev/null @@ -1,3 +0,0 @@ -show global variables like 'slow_query_log_timestamp_always'; -Variable_name Value -slow_query_log_timestamp_always ON diff --git a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.test b/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.test deleted file mode 100644 index e73c4202869..00000000000 --- a/percona-suite/percona_slow_extended-slow_query_log_timestamp_always-cl.test +++ /dev/null @@ -1 +0,0 @@ -show global variables like 'slow_query_log_timestamp_always'; diff --git a/percona-suite/percona_slow_extended-use_global_control-master.opt b/percona-suite/percona_slow_extended-use_global_control-master.opt deleted file mode 100644 index bd62c08c475..00000000000 --- a/percona-suite/percona_slow_extended-use_global_control-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slow-query-log-file=percona_slow_query_log-control_global_slow.log --long-query-time=1 diff --git a/percona-suite/percona_slow_extended-use_global_control.result b/percona-suite/percona_slow_extended-use_global_control.result deleted file mode 100644 index 699c95e9671..00000000000 --- a/percona-suite/percona_slow_extended-use_global_control.result +++ /dev/null @@ -1,12 +0,0 @@ -SELECT sleep(2); -sleep(2) -0 -set global log_slow_verbosity=innodb; -set global slow_query_log_use_global_control="log_slow_verbosity,long_query_time"; -SELECT sleep(2); -sleep(2) -0 -set global slow_query_log_use_global_control=''; -set global log_slow_verbosity=''; -FLUSH LOGS; -1 diff --git a/percona-suite/percona_slow_extended-use_global_control.test b/percona-suite/percona_slow_extended-use_global_control.test deleted file mode 100644 index dfd38993ec8..00000000000 --- a/percona-suite/percona_slow_extended-use_global_control.test +++ /dev/null @@ -1,12 +0,0 @@ -source include/have_innodb.inc; -SELECT sleep(2); -set global log_slow_verbosity=innodb; -set global slow_query_log_use_global_control="log_slow_verbosity,long_query_time"; -SELECT sleep(2); -set global slow_query_log_use_global_control=''; -set global log_slow_verbosity=''; - -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/percona_slow_extended-use_global_long_query_time-master.opt b/percona-suite/percona_slow_extended-use_global_long_query_time-master.opt deleted file mode 100644 index 16b6ca5b714..00000000000 --- a/percona-suite/percona_slow_extended-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 --slow_query_log_use_global_control=long_query_time --slow-query-log=OFF diff --git a/percona-suite/percona_slow_extended-use_global_long_query_time.result b/percona-suite/percona_slow_extended-use_global_long_query_time.result deleted file mode 100644 index e89edf0430f..00000000000 --- a/percona-suite/percona_slow_extended-use_global_long_query_time.result +++ /dev/null @@ -1,46 +0,0 @@ -SET GLOBAL SLOW_QUERY_LOG=ON; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set global long_query_time=4; -set global slow_query_log_use_global_control='long_query_time'; -SELECT sleep(1); -sleep(1) -0 -SELECT sleep(3); -sleep(3) -0 -SELECT sleep(5); -sleep(5) -0 -set global long_query_time=2; -set global slow_query_log_use_global_control=''; -SET GLOBAL SLOW_QUERY_LOG=OFF; -FLUSH LOGS; -3 -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control -set global slow_query_log_use_global_control='long_query_time'; -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control long_query_time -set global slow_query_log_use_global_control='log_slow_filter,long_query_time'; -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control log_slow_filter,long_query_time -set global slow_query_log_use_global_control='log_slow_filter'; -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control log_slow_filter -set global slow_query_log_use_global_control=''; -show global variables like 'slow_query_log_use_global_control'; -Variable_name Value -slow_query_log_use_global_control -set global slow_query_log_use_global_control='long_query_time'; diff --git a/percona-suite/percona_slow_extended-use_global_long_query_time.test b/percona-suite/percona_slow_extended-use_global_long_query_time.test deleted file mode 100644 index ef2e9bfa4ef..00000000000 --- a/percona-suite/percona_slow_extended-use_global_long_query_time.test +++ /dev/null @@ -1,40 +0,0 @@ -source include/have_innodb.inc; - -SET GLOBAL SLOW_QUERY_LOG=ON; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set global long_query_time=4; -set global slow_query_log_use_global_control='long_query_time'; - -SELECT sleep(1); -SELECT sleep(3); -SELECT sleep(5); - -set global long_query_time=2; -set global slow_query_log_use_global_control=''; - -SET GLOBAL SLOW_QUERY_LOG=OFF; - -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 'slow_query_log_use_global_control'; - -set global slow_query_log_use_global_control='long_query_time'; -show global variables like 'slow_query_log_use_global_control'; - -set global slow_query_log_use_global_control='log_slow_filter,long_query_time'; -show global variables like 'slow_query_log_use_global_control'; - -set global slow_query_log_use_global_control='log_slow_filter'; -show global variables like 'slow_query_log_use_global_control'; - -set global slow_query_log_use_global_control=''; -show global variables like 'slow_query_log_use_global_control'; - -set global slow_query_log_use_global_control='long_query_time'; 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 1ed8be2196b..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; diff --git a/percona-suite/percona_status_wait_query_cache_mutex.result b/percona-suite/percona_status_wait_query_cache_mutex.result deleted file mode 100644 index c243b8ad02f..00000000000 --- a/percona-suite/percona_status_wait_query_cache_mutex.result +++ /dev/null @@ -1,20 +0,0 @@ -SET GLOBAL query_cache_size=1355776; -flush query cache; -flush query cache; -reset query cache; -flush status; -SET DEBUG_SYNC='after_query_cache_mutex SIGNAL mutex_locked WAIT_FOR unlock_mutex'; -SELECT "mutex_locked_query" as action; -SET DEBUG_SYNC='now WAIT_FOR mutex_locked'; -SET DEBUG_SYNC='before_query_cache_mutex SIGNAL try_lock_mutex'; -SELECT "try_lock_mutex_query" as action; -SET DEBUG_SYNC='now WAIT_FOR try_lock_mutex'; -SELECT SQL_NO_CACHE state FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info='SELECT "try_lock_mutex_query" as action'; -state -Waiting on query cache mutex -SET DEBUG_SYNC='now SIGNAL unlock_mutex'; -action -mutex_locked_query -action -try_lock_mutex_query -SET GLOBAL query_cache_size=0; diff --git a/percona-suite/percona_status_wait_query_cache_mutex.test b/percona-suite/percona_status_wait_query_cache_mutex.test deleted file mode 100644 index b20f088d6ae..00000000000 --- a/percona-suite/percona_status_wait_query_cache_mutex.test +++ /dev/null @@ -1,35 +0,0 @@ ---source include/have_query_cache.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc -SET GLOBAL query_cache_size=1355776; ---source include/percona_query_cache_with_comments_clear.inc ---let try_lock_mutex_query=SELECT "try_lock_mutex_query" as action - ---connect (mutex_locked_conn, localhost, root,,) ---connect (try_mutex_lock_conn, localhost, root,,) - ---connection mutex_locked_conn -SET DEBUG_SYNC='after_query_cache_mutex SIGNAL mutex_locked WAIT_FOR unlock_mutex'; -send SELECT "mutex_locked_query" as action; - ---connection default -SET DEBUG_SYNC='now WAIT_FOR mutex_locked'; - ---connection try_mutex_lock_conn -SET DEBUG_SYNC='before_query_cache_mutex SIGNAL try_lock_mutex'; -send_eval $try_lock_mutex_query; - ---connection default -SET DEBUG_SYNC='now WAIT_FOR try_lock_mutex'; -eval SELECT SQL_NO_CACHE state FROM INFORMATION_SCHEMA.PROCESSLIST WHERE info='$try_lock_mutex_query'; -SET DEBUG_SYNC='now SIGNAL unlock_mutex'; - ---connection mutex_locked_conn -reap; ---connection try_mutex_lock_conn -reap; - ---connection default ---disconnect mutex_locked_conn ---disconnect try_mutex_lock_conn -SET GLOBAL query_cache_size=0; diff --git a/percona-suite/percona_sync_flush.result b/percona-suite/percona_sync_flush.result deleted file mode 100644 index 12335257b32..00000000000 --- a/percona-suite/percona_sync_flush.result +++ /dev/null @@ -1,35 +0,0 @@ -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 (id INT AUTO_INCREMENT, foo CHAR(255), PRIMARY KEY (id)) ENGINE=InnoDB; -SET @@global.innodb_flush_checkpoint_debug=1; -INSERT INTO t1(foo) VALUES ('a'), ('b'); -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -INSERT INTO t1(foo) SELECT foo FROM t1; -UPDATE t1 SET foo='c'; -SET @@global.innodb_flush_checkpoint_debug=0; -UPDATE t1 SET foo='d' WHERE foo='c'; -DROP TABLE t1; diff --git a/percona-suite/percona_sync_flush.test b/percona-suite/percona_sync_flush.test deleted file mode 100644 index 35e8d8f92d2..00000000000 --- a/percona-suite/percona_sync_flush.test +++ /dev/null @@ -1,33 +0,0 @@ -# Test for InnoDB sync state flushing. - ---source include/have_innodb.inc ---source include/have_debug.inc - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -CREATE TABLE t1 (id INT AUTO_INCREMENT, foo CHAR(255), PRIMARY KEY (id)) ENGINE=InnoDB; - -# It is hard to get to InnoDB sync state flushing in MTR with regular workload. Perhaps -# it is possible with many parallel connections, but that would be brittle anyway. -# So, just disable preflushing and checkpointing and issue simple workload. -SET @@global.innodb_flush_checkpoint_debug=1; - -INSERT INTO t1(foo) VALUES ('a'), ('b'); - -let $rep=0; -while ($rep < 14) -{ - INSERT INTO t1(foo) SELECT foo FROM t1; - UPDATE t1 SET foo='c'; - inc $rep; -} - -# By now checkpoint age should be well past sync flush point. Allow -# preflushing/checkpointing again and do some work in order to do the sync flush. -SET @@global.innodb_flush_checkpoint_debug=0; - -UPDATE t1 SET foo='d' WHERE foo='c'; - -DROP TABLE t1; diff --git a/percona-suite/percona_xtradb_admin_command.result b/percona-suite/percona_xtradb_admin_command.result deleted file mode 100644 index 26ba14f2f3b..00000000000 --- a/percona-suite/percona_xtradb_admin_command.result +++ /dev/null @@ -1,6 +0,0 @@ -select * from information_schema.XTRADB_ADMIN_COMMAND; -result_message -No XTRA_* command in the SQL statement. Please add /*!XTRA_xxxx*/ to the SQL. -select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_HELLO*/; -result_message -Hello! diff --git a/percona-suite/percona_xtradb_admin_command.test b/percona-suite/percona_xtradb_admin_command.test deleted file mode 100644 index 5dc3fb2b33a..00000000000 --- a/percona-suite/percona_xtradb_admin_command.test +++ /dev/null @@ -1,3 +0,0 @@ ---source include/have_innodb.inc -select * from information_schema.XTRADB_ADMIN_COMMAND; -select * from information_schema.XTRADB_ADMIN_COMMAND /*!XTRA_HELLO*/; diff --git a/percona-suite/percona_xtradb_bug317074.result b/percona-suite/percona_xtradb_bug317074.result deleted file mode 100644 index 7c1876fb7bf..00000000000 --- a/percona-suite/percona_xtradb_bug317074.result +++ /dev/null @@ -1,5 +0,0 @@ -SET @old_innodb_file_format=@@innodb_file_format; -SET @old_innodb_file_format_max=@@innodb_file_format_max; -SET @old_innodb_file_per_table=@@innodb_file_per_table; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; diff --git a/percona-suite/percona_xtradb_bug317074.test b/percona-suite/percona_xtradb_bug317074.test deleted file mode 100644 index 4c08e99f039..00000000000 --- a/percona-suite/percona_xtradb_bug317074.test +++ /dev/null @@ -1,47 +0,0 @@ --- source include/have_innodb.inc - -SET @old_innodb_file_format=@@innodb_file_format; -SET @old_innodb_file_format_max=@@innodb_file_format_max; -SET @old_innodb_file_per_table=@@innodb_file_per_table; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; - --- disable_query_log --- disable_result_log - -DROP TABLE IF EXISTS `test1`; -CREATE TABLE IF NOT EXISTS `test1` ( - `a` int primary key auto_increment, - `b` int default 0, - `c` char(100) default 'testtest' -) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; - -delimiter |; -CREATE PROCEDURE insert_many(p1 int) -BEGIN -SET @x = 0; -SET @y = 0; -start transaction; -REPEAT - insert into test1 set b=1; - SET @x = @x + 1; - SET @y = @y + 1; - IF @y >= 1000 THEN - commit; - start transaction; - SET @y = 0; - END IF; -UNTIL @x >= p1 END REPEAT; -commit; -END| -delimiter ;| -call insert_many(100000); -DROP PROCEDURE insert_many; - -# The bug is hangup at the following statement -ALTER TABLE test1 ENGINE=MyISAM; - -DROP TABLE test1; -SET GLOBAL innodb_file_format=@old_innodb_file_format; -SET GLOBAL innodb_file_format_max=@old_innodb_file_format_max; -SET GLOBAL innodb_file_per_table=@old_innodb_file_per_table; diff --git a/percona-suite/query_response_time-replication.inc b/percona-suite/query_response_time-replication.inc deleted file mode 100644 index 9bd811a9a1b..00000000000 --- a/percona-suite/query_response_time-replication.inc +++ /dev/null @@ -1,57 +0,0 @@ -connection master; - -CREATE TABLE t(id INT); - -connection slave; -SET GLOBAL query_exec_time = 0.1; ---source include/restart_slave_sql.inc - -connection slave; - -SET SESSION query_exec_time=0.1; - -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; ---eval SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; - -connection master; - -SET SESSION query_exec_time = 0.31; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.32; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.33; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.34; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.35; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.36; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.37; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.38; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.39; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.4; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.1; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.2; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.3; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.5; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 1.4; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 0.5; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.1; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.3; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 2.5; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 3.1; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 4.1; INSERT INTO t VALUES(1); -SET SESSION query_exec_time = 5.1; INSERT INTO t VALUES(1); - -sync_slave_with_master; - -connection slave; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SHOW QUERY_RESPONSE_TIME; -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; - -SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=default; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=default; - -connection master; -DROP TABLE t; - -sync_slave_with_master; diff --git a/percona-suite/query_response_time-stored.inc b/percona-suite/query_response_time-stored.inc deleted file mode 100644 index a1fc8912aab..00000000000 --- a/percona-suite/query_response_time-stored.inc +++ /dev/null @@ -1,37 +0,0 @@ -SET SESSION query_exec_time=0.1; - -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base; -FLUSH QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; - -CALL test_f(0.31); -CALL test_f(0.32); -CALL test_f(0.33); -CALL test_f(0.34); -CALL test_f(0.35); -CALL test_f(0.36); -CALL test_f(0.37); -CALL test_f(0.38); -CALL test_f(0.39); -CALL test_f(0.4); -CALL test_f(1.1); -CALL test_f(1.2); -CALL test_f(1.3); -CALL test_f(1.5); -CALL test_f(1.4); -CALL test_f(0.5); -CALL test_f(2.1); -CALL test_f(2.3); -CALL test_f(2.5); -CALL test_f(3.1); -CALL test_f(4.1); -CALL test_f(5.1); - -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SHOW QUERY_RESPONSE_TIME; -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; - -SET SESSION query_exec_time=default; diff --git a/percona-suite/query_response_time.inc b/percona-suite/query_response_time.inc deleted file mode 100644 index 734d3f5a262..00000000000 --- a/percona-suite/query_response_time.inc +++ /dev/null @@ -1,43 +0,0 @@ -SET SESSION query_exec_time=0.1; - -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; -EVAL SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE=$base; -FLUSH QUERY_RESPONSE_TIME; -# Following two queries check works of FLUSH and -# respecting of "QUERY_RESPONSE_TIME_STATS" variable (see launchpad bug #855312) -SHOW QUERY_RESPONSE_TIME; -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; -SET GLOBAL QUERY_RESPONSE_TIME_STATS=1; - -SET SESSION query_exec_time=0.31; SELECT 1; -SET SESSION query_exec_time=0.32; SELECT 1; -SET SESSION query_exec_time=0.33; SELECT 1; -SET SESSION query_exec_time=0.34; SELECT 1; -SET SESSION query_exec_time=0.35; SELECT 1; -SET SESSION query_exec_time=0.36; SELECT 1; -SET SESSION query_exec_time=0.37; SELECT 1; -SET SESSION query_exec_time=0.38; SELECT 1; -SET SESSION query_exec_time=0.39; SELECT 1; -SET SESSION query_exec_time=0.4; SELECT 1; -SET SESSION query_exec_time=1.1; SELECT 1; -SET SESSION query_exec_time=1.2; SELECT 1; -SET SESSION query_exec_time=1.3; SELECT 1; -SET SESSION query_exec_time=1.5; SELECT 1; -SET SESSION query_exec_time=1.4; SELECT 1; -SET SESSION query_exec_time=0.5; SELECT 1; -SET SESSION query_exec_time=2.1; SELECT 1; -SET SESSION query_exec_time=2.3; SELECT 1; -SET SESSION query_exec_time=2.5; SELECT 1; -SET SESSION query_exec_time=3.1; SELECT 1; -SET SESSION query_exec_time=4.1; SELECT 1; -SET SESSION query_exec_time=5.1; SELECT 1; - -SET SESSION query_exec_time=0.1; - -SET GLOBAL QUERY_RESPONSE_TIME_STATS=0; - -SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE'; -SHOW QUERY_RESPONSE_TIME; -SELECT * FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME; - -SET SESSION query_exec_time=default; diff --git a/percona-suite/userstat_bug602047.result b/percona-suite/userstat_bug602047.result deleted file mode 100644 index 966439b817d..00000000000 --- a/percona-suite/userstat_bug602047.result +++ /dev/null @@ -1,15 +0,0 @@ -DROP TABLE IF EXISTS t1; -SET GLOBAL userstat=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=OFF; -DROP TABLE t1; diff --git a/percona-suite/userstat_bug602047.test b/percona-suite/userstat_bug602047.test deleted file mode 100644 index 436b86457c5..00000000000 --- a/percona-suite/userstat_bug602047.test +++ /dev/null @@ -1,11 +0,0 @@ ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings -SET GLOBAL userstat=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=OFF; -DROP TABLE t1; \ No newline at end of file diff --git a/read/read0read.c b/read/read0read.c index c04dae51ff5..3380d1bb4ba 100644 --- a/read/read0read.c +++ b/read/read0read.c @@ -150,6 +150,7 @@ read_view_create_low( { if (view == NULL) { view = ut_malloc(sizeof(read_view_t)); + srv_read_views_memory += sizeof(read_view_t); view->max_descr = 0; view->descriptors = NULL; } @@ -159,6 +160,8 @@ read_view_create_low( /* avoid frequent re-allocations by extending the array to the desired size + 10% */ + srv_read_views_memory += (n + n / 10 - view->max_descr) * + sizeof(trx_id_t); view->max_descr = n + n / 10; view->descriptors = ut_realloc(view->descriptors, view->max_descr * @@ -370,6 +373,9 @@ read_view_free( { ut_ad(mutex_own(&kernel_mutex)); + srv_read_views_memory -= sizeof(read_view_t) + + view->max_descr * sizeof(trx_id_t); + if (view->descriptors != NULL) { ut_free(view->descriptors); } diff --git a/row/row0ins.c b/row/row0ins.c index 0002f4410d6..ee2938e4865 100644 --- a/row/row0ins.c +++ b/row/row0ins.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -1710,6 +1710,7 @@ row_ins_scan_sec_index_for_duplicate( do { const rec_t* rec = btr_pcur_get_rec(&pcur); const buf_block_t* block = btr_pcur_get_block(&pcur); + ulint lock_type; if (page_rec_is_infimum(rec)) { @@ -1719,6 +1720,16 @@ row_ins_scan_sec_index_for_duplicate( offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap); + /* If the transaction isolation level is no stronger than + READ COMMITTED, then avoid gap locks. */ + if (!page_rec_is_supremum(rec) + && thr_get_trx(thr)->isolation_level + <= TRX_ISO_READ_COMMITTED) { + lock_type = LOCK_REC_NOT_GAP; + } else { + lock_type = LOCK_ORDINARY; + } + if (allow_duplicates) { /* If the SQL-query will update or replace @@ -1727,13 +1738,11 @@ row_ins_scan_sec_index_for_duplicate( INSERT ON DUPLICATE KEY UPDATE). */ err = row_ins_set_exclusive_rec_lock( - LOCK_ORDINARY, block, - rec, index, offsets, thr); + lock_type, block, rec, index, offsets, thr); } else { err = row_ins_set_shared_rec_lock( - LOCK_ORDINARY, block, - rec, index, offsets, thr); + lock_type, block, rec, index, offsets, thr); } switch (err) { diff --git a/row/row0merge.c b/row/row0merge.c index ade708f93e7..2ebb55336be 100644 --- a/row/row0merge.c +++ b/row/row0merge.c @@ -2857,7 +2857,7 @@ row_merge_build_indexes( } if (trx->mysql_thd && thd_expand_fast_index_creation(trx->mysql_thd)) - dict_update_statistics(new_table, FALSE, TRUE); + dict_update_statistics(new_table, FALSE, TRUE, FALSE); func_exit: row_merge_file_destroy_low(tmpfd); diff --git a/row/row0mysql.c b/row/row0mysql.c index 36e2e5ceca3..15505beb705 100644 --- a/row/row0mysql.c +++ b/row/row0mysql.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2013, 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 @@ -54,6 +54,7 @@ Created 9/17/2000 Heikki Tuuri #include "ha_prototypes.h" #include "m_string.h" #include "my_sys.h" +#include "ha_prototypes.h" /** Provide optional 4.x backwards compatibility for 5.0 and above */ UNIV_INTERN ibool row_rollback_on_timeout = FALSE; @@ -965,17 +966,13 @@ row_update_statistics_if_needed( if (!srv_stats_auto_update) return; - /* Calculate new statistics if 1 / 16 of table has been modified - since the last time a statistics batch was run, or if - stat_modified_counter > 2 000 000 000 (to avoid wrap-around). - We calculate statistics at most every 16th round, since we may have - a counter table which is very small and updated very often. */ + if (DICT_TABLE_CHANGED_TOO_MUCH(table)) { - if (counter > 2000000000 - || ((ib_int64_t)counter > 16 + table->stat_n_rows / 16)) { - - dict_update_statistics(table, FALSE /* update even if stats - are initialized */, TRUE); + dict_update_statistics( + table, + FALSE, /* update even if stats are initialized */ + TRUE, + TRUE /* only update if stats changed too much */); } } @@ -3180,8 +3177,11 @@ next_rec: dict_table_autoinc_lock(table); dict_table_autoinc_initialize(table, 1); dict_table_autoinc_unlock(table); - dict_update_statistics(table, FALSE /* update even if stats are - initialized */, TRUE); + dict_update_statistics( + table, + FALSE, /* update even if stats are initialized */ + TRUE, + FALSE /* update even if not changed too much */); trx_commit_for_mysql(trx); @@ -3972,6 +3972,7 @@ row_rename_table_for_mysql( ut_a(old_name != NULL); ut_a(new_name != NULL); + ut_ad(trx->state == TRX_ACTIVE); if (srv_created_new_raw || srv_force_recovery) { fputs("InnoDB: A new raw disk partition was initialized or\n" @@ -3996,7 +3997,6 @@ row_rename_table_for_mysql( } trx->op_info = "renaming table"; - trx_start_if_not_started(trx); old_is_tmp = row_is_mysql_tmp_table_name(old_name); new_is_tmp = row_is_mysql_tmp_table_name(new_name); @@ -4091,12 +4091,29 @@ row_rename_table_for_mysql( goto end; } else if (!new_is_tmp) { /* Rename all constraints. */ + char new_table_name[MAX_TABLE_NAME_LEN] = ""; + uint errors = 0; info = pars_info_create(); pars_info_add_str_literal(info, "new_table_name", new_name); pars_info_add_str_literal(info, "old_table_name", old_name); + strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN); + innobase_convert_to_system_charset( + strchr(new_table_name, '/') + 1, + strchr(new_name, '/') +1, + MAX_TABLE_NAME_LEN, &errors); + + if (errors) { + /* Table name could not be converted from charset + my_charset_filename to UTF-8. This means that the + table name is already in UTF-8 (#mysql#50). */ + strncpy(new_table_name, new_name, MAX_TABLE_NAME_LEN); + } + + pars_info_add_str_literal(info, "new_table_utf8", new_table_name); + err = que_eval_sql( info, "PROCEDURE RENAME_CONSTRAINT_IDS () IS\n" @@ -4108,6 +4125,7 @@ row_rename_table_for_mysql( "old_t_name_len INT;\n" "new_db_name_len INT;\n" "id_len INT;\n" + "offset INT;\n" "found INT;\n" "BEGIN\n" "found := 1;\n" @@ -4116,8 +4134,6 @@ row_rename_table_for_mysql( "new_db_name := SUBSTR(:new_table_name, 0,\n" " new_db_name_len);\n" "old_t_name_len := LENGTH(:old_table_name);\n" - "gen_constr_prefix := CONCAT(:old_table_name,\n" - " '_ibfk_');\n" "WHILE found = 1 LOOP\n" " SELECT ID INTO foreign_id\n" " FROM SYS_FOREIGN\n" @@ -4134,12 +4150,13 @@ row_rename_table_for_mysql( " id_len := LENGTH(foreign_id);\n" " IF (INSTR(foreign_id, '/') > 0) THEN\n" " IF (INSTR(foreign_id,\n" - " gen_constr_prefix) > 0)\n" + " '_ibfk_') > 0)\n" " THEN\n" + " offset := INSTR(foreign_id, '_ibfk_') - 1;\n" " new_foreign_id :=\n" - " CONCAT(:new_table_name,\n" - " SUBSTR(foreign_id, old_t_name_len,\n" - " id_len - old_t_name_len));\n" + " CONCAT(:new_table_utf8,\n" + " SUBSTR(foreign_id, offset,\n" + " id_len - offset));\n" " ELSE\n" " new_foreign_id :=\n" " CONCAT(new_db_name,\n" diff --git a/row/row0sel.c b/row/row0sel.c index f5b2c0fd014..57b2a71dad7 100644 --- a/row/row0sel.c +++ b/row/row0sel.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -57,6 +57,8 @@ Created 12/19/1997 Heikki Tuuri #include "read0read.h" #include "buf0lru.h" #include "ha_prototypes.h" +#include "m_string.h" /* for my_sys.h */ +#include "my_sys.h" /* DEBUG_SYNC_C */ /* Maximum number of rows to prefetch; MySQL interface has another parameter */ #define SEL_MAX_N_PREFETCH 16 @@ -3987,7 +3989,9 @@ wait_table_again: } rec_loop: + DEBUG_SYNC_C("row_search_rec_loop"); if (trx_is_interrupted(trx)) { + btr_pcur_store_position(pcur, &mtr); err = DB_INTERRUPTED; goto normal_return; } @@ -4899,8 +4903,8 @@ row_search_check_if_query_cache_permitted( trx->read_view = read_view_open_now(trx->id, - NULL, TRUE); - + trx->prebuilt_view, TRUE); + trx->prebuilt_view = trx->read_view; trx->global_read_view = trx->read_view; } } diff --git a/srv/srv0srv.c b/srv/srv0srv.c index 9c8abc5dac1..9f0f682e6bb 100644 --- a/srv/srv0srv.c +++ b/srv/srv0srv.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. @@ -317,7 +317,7 @@ UNIV_INTERN ulong srv_rollback_segments = TRX_SYS_N_RSEGS; /* 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; +UNIV_INTERN ulong srv_innodb_stats_method = SRV_STATS_NULLS_EQUAL; /** Time in seconds between automatic buffer pool dumps */ UNIV_INTERN uint srv_auto_lru_dump = 0; @@ -409,6 +409,11 @@ UNIV_INTERN ulong srv_sys_stats_root_page = 0; #endif UNIV_INTERN ibool srv_use_doublewrite_buf = TRUE; +UNIV_INTERN ibool srv_use_atomic_writes = FALSE; +#ifdef HAVE_POSIX_FALLOCATE +UNIV_INTERN ibool srv_use_posix_fallocate = FALSE; +#endif + UNIV_INTERN ibool srv_use_checksums = TRUE; UNIV_INTERN ibool srv_fast_checksum = FALSE; @@ -463,6 +468,9 @@ UNIV_INTERN ulint srv_n_rows_updated CACHE_ALIGNED = 0; UNIV_INTERN ulint srv_n_rows_deleted CACHE_ALIGNED = 0; UNIV_INTERN ulint srv_n_rows_read CACHE_ALIGNED = 0; +UNIV_INTERN ulint srv_read_views_memory CACHE_ALIGNED = 0; +UNIV_INTERN ulint srv_descriptors_memory CACHE_ALIGNED = 0; + UNIV_INTERN ulint srv_n_lock_deadlock_count CACHE_ALIGNED = 0; UNIV_INTERN ulint srv_n_lock_wait_count CACHE_ALIGNED = 0; UNIV_INTERN ulint srv_n_lock_wait_current_count CACHE_ALIGNED = 0; @@ -1918,7 +1926,8 @@ srv_suspend_mysql_thread( finish_time = (ib_int64_t) sec * 1000000 + ms; } - diff_time = (ulint) (finish_time - start_time); + diff_time = (finish_time > start_time) ? + (ulint) (finish_time - start_time) : 0; srv_n_lock_wait_current_count--; srv_n_lock_wait_time = srv_n_lock_wait_time + diff_time; @@ -2129,6 +2138,9 @@ srv_printf_innodb_monitor( "; in additional pool allocated " ULINTPF "\n", ut_total_allocated_memory, mem_pool_get_reserved(mem_comm_pool)); + fprintf(file, + "Total memory allocated by read views " ULINTPF "\n", + srv_read_views_memory); /* Calcurate reserved memories */ if (btr_search_sys && btr_search_sys->hash_index[0]->heap) { btr_search_sys_subtotal = mem_heap_get_size(btr_search_sys->hash_index[0]->heap); @@ -2215,6 +2227,12 @@ srv_printf_innodb_monitor( fprintf(file, "%lu read views open inside InnoDB\n", UT_LIST_GET_LEN(trx_sys->view_list)); + fprintf(file, "%lu transactions active inside InnoDB\n", + UT_LIST_GET_LEN(trx_sys->trx_list)); + + fprintf(file, "%lu out of %lu descriptors used\n", + trx_sys->descr_n_used, trx_sys->descr_n_max); + if (UT_LIST_GET_LEN(trx_sys->view_list)) { read_view_t* view = UT_LIST_GET_LAST(trx_sys->view_list); @@ -2524,21 +2542,35 @@ srv_export_innodb_status(void) export_vars.innodb_rows_updated = srv_n_rows_updated; export_vars.innodb_rows_deleted = srv_n_rows_deleted; export_vars.innodb_truncated_status_writes = srv_truncated_status_writes; + export_vars.innodb_read_views_memory = srv_read_views_memory; + export_vars.innodb_descriptors_memory = srv_descriptors_memory; #ifdef UNIV_DEBUG - if (trx_sys->max_trx_id < purge_sys->done_trx_no) { - export_vars.innodb_purge_trx_id_age = 0; - } else { - export_vars.innodb_purge_trx_id_age = - trx_sys->max_trx_id - purge_sys->done_trx_no; - } + { + trx_id_t done_trx_no; + trx_id_t up_limit_id; - if (!purge_sys->view - || trx_sys->max_trx_id < purge_sys->view->up_limit_id) { - export_vars.innodb_purge_view_trx_id_age = 0; - } else { - export_vars.innodb_purge_view_trx_id_age = - trx_sys->max_trx_id - purge_sys->view->up_limit_id; + rw_lock_s_lock(&purge_sys->latch); + done_trx_no = purge_sys->done_trx_no; + up_limit_id = purge_sys->view + ? purge_sys->view->up_limit_id + : 0; + rw_lock_s_unlock(&purge_sys->latch); + + if (trx_sys->max_trx_id < done_trx_no) { + export_vars.innodb_purge_trx_id_age = 0; + } else { + export_vars.innodb_purge_trx_id_age = + trx_sys->max_trx_id - done_trx_no; + } + + if (!up_limit_id + || trx_sys->max_trx_id < up_limit_id) { + export_vars.innodb_purge_view_trx_id_age = 0; + } else { + export_vars.innodb_purge_view_trx_id_age = + trx_sys->max_trx_id - up_limit_id; + } } #endif /* UNIV_DEBUG */ diff --git a/srv/srv0start.c b/srv/srv0start.c index 550a63a2a0d..ba3d196b932 100644 --- a/srv/srv0start.c +++ b/srv/srv0start.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. @@ -496,12 +496,6 @@ io_handler_thread( } #endif /* !UNIV_HOTBACKUP */ -#ifdef __WIN__ -#define SRV_PATH_SEPARATOR '\\' -#else -#define SRV_PATH_SEPARATOR '/' -#endif - /*********************************************************************//** Normalizes a directory path for Windows: converts slashes to backslashes. */ UNIV_INTERN @@ -823,6 +817,7 @@ open_or_create_data_files( } if (ret == FALSE) { + const char* check_msg; /* We open the data file */ if (one_created) { @@ -920,13 +915,20 @@ open_or_create_data_files( return(DB_ERROR); } skip_size_check: - fil_read_first_page( + check_msg = fil_read_first_page( files[i], one_opened, &flags, #ifdef UNIV_LOG_ARCHIVE min_arch_log_no, max_arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ min_flushed_lsn, max_flushed_lsn); + if (check_msg) { + fprintf(stderr, + "InnoDB: Error: %s in data file %s\n", + check_msg, name); + return(DB_ERROR); + } + if (!one_opened && UNIV_PAGE_SIZE != fsp_flags_get_page_size(flags)) { @@ -1047,6 +1049,9 @@ skip_size_check: } if (ret == FALSE) { + + const char* check_msg; + /* We open the data file */ files[i] = os_file_create(innodb_file_data_key, @@ -1083,12 +1088,20 @@ skip_size_check: (ulong) TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * 9); } - fil_read_first_page( + check_msg = fil_read_first_page( files[i], one_opened, &flags, #ifdef UNIV_LOG_ARCHIVE min_arch_log_no, max_arch_log_no, #endif /* UNIV_LOG_ARCHIVE */ min_flushed_lsn, max_flushed_lsn); + + if (check_msg) { + fprintf(stderr, + "InnoDB: Error: %s in doublewrite " + "buffer file %s\n", check_msg, name); + return(DB_ERROR); + } + one_opened = TRUE; } else { /* We created the data file and now write it full of diff --git a/sync/sync0arr.c b/sync/sync0arr.c index 5f293ad6a55..b5748f1b7d1 100644 --- a/sync/sync0arr.c +++ b/sync/sync0arr.c @@ -602,10 +602,6 @@ sync_array_deadlock_step( new = sync_array_find_thread(arr, thread); if (UNIV_UNLIKELY(new == start)) { - /* Stop running of other threads */ - - ut_dbg_stop_threads = TRUE; - /* Deadlock */ fputs("########################################\n" "DEADLOCK of threads detected!\n", stderr); @@ -943,6 +939,8 @@ sync_array_print_long_waits( # define SYNC_ARRAY_TIMEOUT 240 #endif + sync_array_enter(sync_primary_wait_array); + for (i = 0; i < sync_primary_wait_array->n_cells; i++) { double diff; @@ -977,6 +975,8 @@ sync_array_print_long_waits( } } + sync_array_exit(sync_primary_wait_array); + if (noticed) { fprintf(stderr, "InnoDB: ###### Starts InnoDB Monitor" diff --git a/trx/trx0sys.c b/trx/trx0sys.c index 5f589b70343..6b230a296c0 100644 --- a/trx/trx0sys.c +++ b/trx/trx0sys.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, 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 @@ -140,7 +140,7 @@ UNIV_INTERN mysql_pfs_key_t file_format_max_mutex_key; #ifndef UNIV_HOTBACKUP #ifdef UNIV_DEBUG /* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */ -uint trx_rseg_n_slots_debug = 0; +UNIV_INTERN uint trx_rseg_n_slots_debug = 0; #endif /** This is used to track the maximum file format id known to InnoDB. It's @@ -726,7 +726,8 @@ trx_sys_doublewrite_init_or_restore_pages( /* Check if the page is corrupt */ if (UNIV_UNLIKELY - (buf_page_is_corrupted(read_buf, zip_size))) { + (buf_page_is_corrupted( + TRUE, read_buf, zip_size))) { fprintf(stderr, "InnoDB: Warning: database page" @@ -737,7 +738,8 @@ trx_sys_doublewrite_init_or_restore_pages( " the doublewrite buffer.\n", (ulong) space_id, (ulong) page_no); - if (buf_page_is_corrupted(page, zip_size)) { + if (buf_page_is_corrupted( + TRUE, page, zip_size)) { fprintf(stderr, "InnoDB: Dump of the page:\n"); buf_page_print( @@ -1324,6 +1326,8 @@ trx_sys_init_at_db_start(void) TRX_DESCR_ARRAY_INITIAL_SIZE); trx_sys->descr_n_max = TRX_DESCR_ARRAY_INITIAL_SIZE; trx_sys->descr_n_used = 0; + srv_descriptors_memory = TRX_DESCR_ARRAY_INITIAL_SIZE * + sizeof(trx_id_t); sys_header = trx_sysf_get(&mtr); diff --git a/trx/trx0trx.c b/trx/trx0trx.c index f061bb4c0b6..1224d8f133f 100644 --- a/trx/trx0trx.c +++ b/trx/trx0trx.c @@ -135,6 +135,7 @@ trx_reserve_descriptor( n_max * sizeof(trx_id_t)); trx_sys->descr_n_max = n_max; + srv_descriptors_memory = n_max * sizeof(trx_id_t); } descr = trx_sys->descriptors + n_used - 1; @@ -219,7 +220,7 @@ trx_create( ut_ad(mutex_own(&kernel_mutex)); ut_ad(sess); - trx = mem_alloc(sizeof(trx_t)); + trx = ut_malloc(sizeof(trx_t)); trx->magic_n = TRX_MAGIC_N; @@ -488,7 +489,7 @@ trx_free( trx_release_descriptor(trx); - mem_free(trx); + ut_free(trx); } /********************************************************************//** @@ -546,7 +547,7 @@ trx_free_prepared( ut_ad(trx_sys->descr_n_used <= UT_LIST_GET_LEN(trx_sys->trx_list)); - mem_free(trx); + ut_free(trx); } /********************************************************************//** @@ -1092,6 +1093,18 @@ trx_write_serialisation_history( trx->mysql_master_log_pos, TRX_SYS_COMMIT_MASTER_LOG_INFO, &mtr); + trx_sys_update_mysql_binlog_offset( + sys_header, + trx->mysql_relay_log_file_name, + trx->mysql_relay_log_pos, + TRX_SYS_MYSQL_RELAY_LOG_INFO, &mtr); + + trx_sys_update_mysql_binlog_offset( + sys_header, + trx->mysql_master_log_file_name, + trx->mysql_master_log_pos, + TRX_SYS_MYSQL_MASTER_LOG_INFO, &mtr); + trx->mysql_master_log_file_name = ""; } diff --git a/ut/ut0dbg.c b/ut/ut0dbg.c index 53ed4a53044..a440b72d32a 100644 --- a/ut/ut0dbg.c +++ b/ut/ut0dbg.c @@ -35,16 +35,6 @@ Created 1/30/1994 Heikki Tuuri UNIV_INTERN ulint ut_dbg_zero = 0; #endif -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/** If this is set to TRUE by ut_dbg_assertion_failed(), all threads -will stop at the next ut_a() or ut_ad(). */ -UNIV_INTERN ibool ut_dbg_stop_threads = FALSE; -#endif -#ifndef UT_DBG_USE_ABORT -/** A null pointer that will be dereferenced to trigger a memory trap */ -UNIV_INTERN ulint* ut_dbg_null_ptr = NULL; -#endif - /*************************************************************//** Report a failed assertion. */ UNIV_INTERN @@ -80,30 +70,8 @@ ut_dbg_assertion_failed( "InnoDB: corruption in the InnoDB tablespace. Please refer to\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; -#endif } -#if defined(UNIV_SYNC_DEBUG) || !defined(UT_DBG_USE_ABORT) -/*************************************************************//** -Stop a thread after assertion failure. */ -UNIV_INTERN -void -ut_dbg_stop_thread( -/*===============*/ - const char* file, - ulint line) -{ -#ifndef UNIV_HOTBACKUP - fprintf(stderr, "InnoDB: Thread %lu stopped in file %s line %lu\n", - os_thread_pf(os_thread_get_curr_id()), - innobase_basename(file), line); - os_thread_sleep(1000000000); -#endif /* !UNIV_HOTBACKUP */ -} -#endif - #ifdef UNIV_COMPILE_TEST_FUNCS #include diff --git a/ut/ut0ut.c b/ut/ut0ut.c index 2fe45aad2a7..699af1fcaa1 100644 --- a/ut/ut0ut.c +++ b/ut/ut0ut.c @@ -728,6 +728,8 @@ ut_strerr( return("End of index"); case DB_TABLE_IN_FK_CHECK: return("Table is being used in foreign key check"); + case DB_IDENTIFIER_TOO_LONG: + return("Identifier name is too long"); /* do not add default: in order to produce a warning if new code is added to the enum but not added here */ }