summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/include
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-30498 Rename mysql_upgrade state file to mariadb_upgradeChristian Gonzalez2023-02-071-1/+1
| | | | | | | | | | Renames the upgrade state file, and ensures the old file is properly removed when `mariadb-upgrade` tool is executed. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* MDEV-5215 prerequisite of prerequisite: if DB is not mentioned in connect ↵Oleksandr Byelkin2022-11-011-4/+4
| | | | ignore errors of switching to it
* Merge branch '10.7' into 10.8Oleksandr Byelkin2022-08-082-0/+56
|\
| * Merge branch 'merge-perfschema-5.7' into 10.5Oleksandr Byelkin2022-08-022-0/+56
| |\
| | * mysql-5.7.39Oleksandr Byelkin2022-07-292-0/+56
| | |
| | * 5.7.28Sergei Golubchik2019-12-111-2/+1
| | |
| | * 5.7.13Sergei Golubchik2016-07-2835-88/+2323
| | |
* | | Merge branch '10.7' into 10.8Sergei Golubchik2022-05-111-0/+4
|\ \ \ | |/ /
| * | Merge branch '10.4' into 10.5Sergei Golubchik2022-05-091-0/+4
| |\ \
| | * \ Merge branch '10.3' into 10.4Sergei Golubchik2022-05-081-0/+4
| | |\ \
| | | * | test fixes for FreeBSDSergei Golubchik2022-05-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FreeBSD returns errno 31 (EMLINK, Too many links), not 40 (ELOOP, Too many levels of symbolic links) * (`mysqlbinlog|mysql`) was just crazy, why did it ever work? * socket_ipv6.inc check (that checked whether ipv6 is supported) only worked correctly when ipv6 was supported * perfschema.socket_summary_by_instance was changing global variables and then skip-ing the test (because on missing ipv6)
* | | | | Merge 10.7 into 10.8Daniel Black2022-03-251-2/+1
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-23974 fixup: rpl.rpl_gtid_stop_start failsMarko Mäkelä2022-03-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call mtr.add_suppression() that was added in commit 75b7cd680b8272ac5a0848791757c1d310501574 for MemorySanitizer and Valgrind runs is causing a result difference for the test rpl.rpl_gtid_stop_start. Let us disable the binlog for executing that statement. Also, the test perfschema.statement_program_lost_inst would fail due to the changes to have_innodb.inc in this commit. To compensate for that, we will make more --suite=perfschema tests run without InnoDB, and explicitly enable InnoDB in those tests that depend on a transactional storage engine.
* | | | | MDEV-14425 Improve the redo log for concurrencyMarko Mäkelä2022-01-211-3/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InnoDB redo log used to be formatted in blocks of 512 bytes. The log blocks were encrypted and the checksum was calculated while holding log_sys.mutex, creating a serious scalability bottleneck. We remove the fixed-size redo log block structure altogether and essentially turn every mini-transaction into a log block of its own. This allows encryption and checksum calculations to be performed on local mtr_t::m_log buffers, before acquiring log_sys.mutex. The mutex only protects a memcpy() of the data to the shared log_sys.buf, as well as the padding of the log, in case the to-be-written part of the log would not end in a block boundary of the underlying storage. For now, the "padding" consists of writing a single NUL byte, to allow recovery and mariadb-backup to detect the end of the circular log faster. Like the previous implementation, we will overwrite the last log block over and over again, until it has been completely filled. It would be possible to write only up to the last completed block (if no more recent write was requested), or to write dummy FILE_CHECKPOINT records to fill the incomplete block, by invoking the currently disabled function log_pad(). This would require adjustments to some logic around log checkpoints, page flushing, and shutdown. An upgrade after a crash of any previous version is not supported. Logically empty log files from a previous version will be upgraded. An attempt to start up InnoDB without a valid ib_logfile0 will be refused. Previously, the redo log used to be created automatically if it was missing. Only with with innodb_force_recovery=6, it is possible to start InnoDB in read-only mode even if the log file does not exist. This allows the contents of a possibly corrupted database to be dumped. Because a prepared backup from an earlier version of mariadb-backup will create a 0-sized log file, we will allow an upgrade from such log files, provided that the FIL_PAGE_FILE_FLUSH_LSN in the system tablespace looks valid. The 512-byte log checkpoint blocks at 0x200 and 0x600 will be replaced with 64-byte log checkpoint blocks at 0x1000 and 0x2000. The start of log records will move from 0x800 to 0x3000. This allows us to use 4096-byte aligned blocks for all I/O in a future revision. We extend the MDEV-12353 redo log record format as follows. (1) Empty mini-transactions or extra NUL bytes will not be allowed. (2) The end-of-minitransaction marker (a NUL byte) will be replaced with a 1-bit sequence number, which will be toggled each time when the circular log file wraps back to the beginning. (3) After the sequence bit, a CRC-32C checksum of all data (excluding the sequence bit) will written. (4) If the log is encrypted, 8 bytes will be written before the checksum and included in it. This is part of the initialization vector (IV) of encrypted log data. (5) File names, page numbers, and checkpoint information will not be encrypted. Only the payload bytes of page-level log will be encrypted. The tablespace ID and page number will form part of the IV. (6) For padding, arbitrary-length FILE_CHECKPOINT records may be written, with all-zero payload, and with the normal end marker and checksum. The minimum size is 7 bytes, or 7+8 with innodb_encrypt_log=ON. In mariadb-backup and in Galera snapshot transfer (SST) scripts, we will no longer remove ib_logfile0 or create an empty ib_logfile0. Server startup will require a valid log file. When resizing the log, we will create a logically empty ib_logfile101 at the current LSN and use an atomic rename to replace ib_logfile0 with it. See the test innodb.log_file_size. Because there is no mandatory padding in the log file, we are able to create a dummy log file as of an arbitrary log sequence number. See the test mariabackup.huge_lsn. The parameter innodb_log_write_ahead_size and the INFORMATION_SCHEMA.INNODB_METRICS counter log_padded will be removed. The minimum value of innodb_log_buffer_size will be increased to 2MiB (because log_sys.buf will replace recv_sys.buf) and the increment adjusted to 4096 bytes (the maximum log block size). The following INFORMATION_SCHEMA.INNODB_METRICS counters will be removed: os_log_fsyncs os_log_pending_fsyncs log_pending_log_flushes log_pending_checkpoint_writes The following status variables will be removed: Innodb_os_log_fsyncs (this is included in Innodb_data_fsyncs) Innodb_os_log_pending_fsyncs (this was limited to at most 1 by design) log_sys.get_block_size(): Return the physical block size of the log file. This is only implemented on Linux and Microsoft Windows for now, and for the power-of-2 block sizes between 64 and 4096 bytes (the minimum and maximum size of a checkpoint block). If the block size is anything else, the traditional 512-byte size will be used via normal file system buffering. If the file system buffers can be bypassed, a message like the following will be issued: InnoDB: File system buffers for log disabled (block size=512 bytes) InnoDB: File system buffers for log disabled (block size=4096 bytes) This has been tested on Linux and Microsoft Windows with both sizes. On Linux, only enable O_DIRECT on the log for innodb_flush_method=O_DSYNC. Tests in 3 different environments where the log is stored in a device with a physical block size of 512 bytes are yielding better throughput without O_DIRECT. This could be due to the fact that in the event the last log block is being overwritten (if multiple transactions would become durable at the same time, and each of will write a small number of bytes to the last log block), it should be faster to re-copy data from log_sys.buf or log_sys.flush_buf to the kernel buffer, to be finally written at fdatasync() time. The parameter innodb_flush_method=O_DSYNC will imply O_DIRECT for data files. This option will enable O_DIRECT on the log file on Linux. It may be unsafe to use when the storage device does not support FUA (Force Unit Access) mode. When the server is compiled WITH_PMEM=ON, we will use memory-mapped I/O for the log file if the log resides on a "mount -o dax" device. We will identify PMEM in a start-up message: InnoDB: log sequence number 0 (memory-mapped); transaction id 3 On Linux, we will also invoke mmap() on any ib_logfile0 that resides in /dev/shm, effectively treating the log file as persistent memory. This should speed up "./mtr --mem" and increase the test coverage of PMEM on non-PMEM hardware. It also allows users to estimate how much the performance would be improved by installing persistent memory. On other tmpfs file systems such as /run, we will not use mmap(). mariadb-backup: Eliminated several variables. We will refer directly to recv_sys and log_sys. backup_wait_for_lsn(): Detect non-progress of xtrabackup_copy_logfile(). In this new log format with arbitrary-sized blocks, we can only detect log file overrun indirectly, by observing that the scanned log sequence number is not advancing. xtrabackup_copy_logfile(): On PMEM, do not modify the sequence bit, because we are not allowed to modify the server's log file, and our memory mapping is read-only. trx_flush_log_if_needed_low(): Do not use the callback on pmem. Using neither flush_lock nor write_lock around PMEM writes seems to yield the best performance. The pmem_persist() calls may still be somewhat slower than the pwrite() and fdatasync() based interface (PMEM mounted without -o dax). recv_sys_t::buf: Remove. We will use log_sys.buf for parsing. recv_sys_t::MTR_SIZE_MAX: Replaces RECV_SCAN_SIZE. recv_sys_t::file_checkpoint: Renamed from mlog_checkpoint_lsn. recv_sys_t, log_sys_t: Removed many data members. recv_sys.lsn: Renamed from recv_sys.recovered_lsn. recv_sys.offset: Renamed from recv_sys.recovered_offset. log_sys.buf_size: Replaces srv_log_buffer_size. recv_buf: A smart pointer that wraps log_sys.buf[recv_sys.offset] when the buffer is being allocated from the memory heap. recv_ring: A smart pointer that wraps a circular log_sys.buf[] that is backed by ib_logfile0. The pointer will wrap from recv_sys.len (log_sys.file_size) to log_sys.START_OFFSET. For the record that wraps around, we may copy file name or record payload data to the auxiliary buffer decrypt_buf in order to have a contiguous block of memory. The maximum size of a record is less than innodb_page_size bytes. recv_sys_t::parse(): Take the smart pointer as a template parameter. Do not temporarily add a trailing NUL byte to FILE_ records, because we are not supposed to modify the memory-mapped log file. (It is attached in read-write mode already during recovery.) recv_sys_t::parse_mtr(): Wrapper for recv_sys_t::parse(). recv_sys_t::parse_pmem(): Like parse_mtr(), but if PREMATURE_EOF would be returned on PMEM, use recv_ring to wrap around the buffer to the start. mtr_t::finish_write(), log_close(): Do not enforce log_sys.max_buf_free on PMEM, because it has no meaning on the mmap-based log. log_sys.write_to_buf: Count writes to log_sys.buf. Replaces srv_stats.log_write_requests and export_vars.innodb_log_write_requests. Protected by log_sys.mutex. Updated consistently in log_close(). Previously, mtr_t::commit() conditionally updated the count, which was inconsistent. log_sys.write_to_log: Count swaps of log_sys.buf and log_sys.flush_buf, for writing to log_sys.log (the ib_logfile0). Replaces srv_stats.log_writes and export_vars.innodb_log_writes. Protected by log_sys.mutex. log_sys.waits: Count waits in append_prepare(). Replaces srv_stats.log_waits and export_vars.innodb_log_waits. recv_recover_page(): Do not unnecessarily acquire log_sys.flush_order_mutex. We are inserting the blocks in arbitary order anyway, to be adjusted in recv_sys.apply(true). We will change the definition of flush_lock and write_lock to avoid potential false sharing. Depending on sizeof(log_sys) and CPU_LEVEL1_DCACHE_LINESIZE, the flush_lock and write_lock could share a cache line with each other or with the last data members of log_sys. Thanks to Matthias Leich for providing https://rr-project.org traces for various failures during the development, and to Thirunarayanan Balathandayuthapani for his help in debugging some of the recovery code. And thanks to the developers of the rr debugger for a tool without which extensive changes to InnoDB would be very challenging to get right. Thanks to Vladislav Vaintroub for useful feedback and to him, Axel Schwenke and Krunal Bauskar for testing the performance.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-07-202-4/+54
|\ \ \ \ | |/ / /
| * | | fix perfschema.sizing_* tests to runSergei Golubchik2021-07-163-6/+56
| |/ / | | | | | | | | | | | | still cannot be enabled permanently, but at least they could be run manually, if needed
* | | fix a race condition in the perfschema.transaction_nested_eventsSergei Golubchik2020-03-141-1/+1
| | |
* | | perfschema test formatting. Use --echo #Sergei Golubchik2020-03-147-48/+49
| | |
* | | perfschema compilation, test and misc fixesSergei Golubchik2020-03-108-47/+17
| | |
* | | P_S 5.7.28Sergei Golubchik2020-03-1031-81/+2317
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2019-09-062-6/+7
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Monty2019-09-032-6/+7
| |\ \
| | * | Updated mtr files to support different compiled in optionsMonty2019-09-012-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
* | | | Maintain connection_count atomicallySergey Vojtovich2019-05-212-17/+7
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed LOCK_connection_count. Removed duplicate denied_connections and connection_errors_max_connection increment from create_new_thread(). Another increment done by CONNECT::close_with_error(). Simplified away CONNECT::thread_count_incremented. Now close_with_error() is always called with connection_count incremented. Part of MDEV-19515 - Improve connect speed
* | | Add more execution stages (commit, rollback, etc)Monty2017-11-053-18/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done to get more information about where time is spent. Now we can get proper timing for time spent in commit, rollback, binlog write etc. Following stages was added: - Commit - Commit_implicit - Rollback - Rollback implicit - Binlog write - Init for update - This is used instead of "Init" for insert, update and delete. - Staring cleanup Following stages where changed: - "Unlocking tables" stage reset stage to previous stage at end - "binlog write" stage resets stage to previous stage at end - "end" -> "end of update loop" - "cleaning up" -> "Reset for next command" - Added stage_searching_rows_for_update when searching for rows to be deleted. Other things: - Renamed all stages to start with big letter (before there was no consitency) - Increased performance_schema_max_stage_classes from 150 to 160. - Most of the test changes in performance schema comes from renaming of stages. - Removed duplicate output of variables and inital state in a lot of performance schema tests. This was done to make it easier to change a default value for a performance variable without affecting all tests. - Added start_server_variables.test to check configuration - Removed some duplicate "closing tables" stages - Updated position for "stage_init_update" and "stage_updating" for delete, insert and update to be just before update loop (for more exact timing). - Don't set "Checking permissions" twice in a row. - Remove stage_end stage from creating views (not done for create table either). - Updated default performance history size from 10 to 20 because of new stages - Ensure that ps_enabled is correct (to be used in a later patch)
* | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-304-7/+27
|\ \
| * | cleanup: pfs_upgrade* testsSergei Golubchik2017-03-211-6/+4
| | |
| * | MDEV-12233 main.mysql_upgrade_noengine fails in buildbot on ppc64leSergei Golubchik2017-03-211-0/+1
| | | | | | | | | | | | verify that tests don't leave mysql_upgrade_info in datadir
| * | don't show 'performance_schema_%_classes_lost' variables in testsSergei Golubchik2017-03-101-1/+2
| | | | | | | | | | | | | | | because FLUSH STATUS does not reset them, so their values are affected by previously run tests since the last server restart.
| * | Merge 10.0 into 10.1Marko Mäkelä2017-03-032-0/+20
| |\ \
| | * | MDEV-11221 - main.events_restart failed in bbSergey Vojtovich2017-03-022-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an addition to original fix. Buildbot revealed another sporadic failure in perfschema.threads_mysql test. Tests relies on data stored in performance_schema.threads, while performing waits on information_schema.processlist. These tables are not updated synchronously. Fixed by performing waits on performance_schema.threads instead.
* | | | MDEV-7635: Update tests to adapt to the new default sql_modeNirbhay Choubey2017-02-101-1/+1
| | | |
* | | | MDEV-6720 - enable connection log in mysqltest by defaultSergey Vojtovich2016-03-312-42/+0
|/ / /
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-11-191-0/+4
|\ \ \ | |/ /
| * | MDEV-8692 prefschema test failures on ARM (on Debian build system)Alexander Barkov2015-10-301-0/+4
| | | | | | | | | | | | | | | | | | A few tests assumes that the CYCLE timer is always available, which is not true on some platforms (e.g. ARM). Fixing the tests not to reply on the CYCLE availability.
* | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-044-1/+17
| | | | | | | | | | | | stopped with no-zero size)
* | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-276-15/+5
|\ \ \ | |/ /
| * | Merge branch 'merge-perfschema-5.6' into 10.0Sergei Golubchik2015-06-166-15/+5
| |\ \ | | |/
| | * 5.6.25Sergei Golubchik2015-06-166-15/+5
| | |
* | | Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-014-5/+17
|\ \ \ | |/ /
| * | perfschema 5.6.24Sergei Golubchik2015-05-054-5/+17
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | including the big commit commit 305130361bf72726de220f3d2b2787395e10be61 Author: Marc Alff <marc.alff@oracle.com> Date: Tue Feb 10 11:31:32 2015 +0100 WL#8354 BACKPORT DIGEST IMPROVEMENTS TO MYSQL 5.6 (with the following commits) and related changes in sql/
| | * 5.6.24Sergei Golubchik2015-05-044-5/+17
| | |
* | | MDEV-4262 - P_S discoverySergey Vojtovich2014-08-191-2/+1
|/ / | | | | | | | | | | | | | | | | Discover P_S tables automatically. Most of this patch is code clean-up: - removed tests and code responsible for P_S tables correctness verification - always return error from ha_perfschema::create() - install/upgrade scripts won't create P_S tables anymore
* | perfschema 5.6.17Sergei Golubchik2014-05-075-4/+65
|\ \ | |/
| * 5.6.17Sergei Golubchik2014-05-075-4/+65
| |
* | null-merge from perfschema-5.6 merge treeSergei Golubchik2014-05-073-0/+347
|\ \ | |/ | | | | (only new files and small style changes are accepted)
| * perfschema 5.6.10 initial commit.Sergei Golubchik2014-05-063-0/+347
| | | | | | | | 5.6 files
| * perfschema 5.6.10 initial commit.Sergei Golubchik2014-05-0636-0/+4563
| | | | 10.0 files
* MDEV-4710 Merge Performance Schema test cases from MySQL 5.6.10unknown2013-07-105-33/+66
| | | | | | | | | Merged all perfschema tests, except for the following: perfschema.part_table_io perfschema.binlog_mix perfschema.binlog_row perfschema.binlog_stmt perfschema.statement_digest_consumers perfschema.statement_digest privilege.inc privilege.result
* Merge performance schema test cases from MySQL 5.6.10unknown2013-07-086-10/+85
| | | | | Merged the majority of the PFS test cases. There are still 19 failing test cases that need more attention.