summaryrefslogtreecommitdiff
path: root/storage/perfschema
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2019-12-161-1/+1
|\
| * Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-091-1/+1
| |\
| | * Lintian complains on spelling errorFaustin Lammler2019-12-021-1/+1
| | | | | | | | | | | | | | | The lintian check complains on spelling error: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
* | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-3/+2
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2019-08-311-3/+2
| |\ \ | | |/
| | * Merge 10.2 into 10.3Marko Mäkelä2019-08-291-3/+2
| | |\
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-08-281-3/+2
| | | |\
| | | | * Fix -Wstringop-truncationMarko Mäkelä2019-08-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | For the Sphinx storage engine, this is a functional change (bug fix): we will ensure that the message buffer is always NUL-terminated.
| | | | * imporve clang buildEugene Kosov2019-06-252-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-138-9/+9
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-19955 make argument of handler::ha_write_row() constEugene Kosov2019-07-058-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-19486 and one more similar bug appeared because handler::write_row() interface welcomes to modify buffer by storage engine. But callers are not ready for that thus bugs are possible in future. handler::write_row(): handler::ha_write_row(): make argument const
* | | | | MDEV-19897 Rename source code variable names from utf8 to utf8mb3Alexander Barkov2019-06-286-19/+19
| | | | |
* | | | | MDEV-17709 Remove handlerton::stateRobert Bindar2019-06-061-1/+0
|/ / / /
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-19171-193/+194
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-05-14171-174/+174
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-05-13171-174/+174
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1163-63/+63
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
| | | * | Update FSF addressVicențiu Ciorbaru2019-05-1150-50/+50
| | | | |
| | | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1158-61/+61
| | | |\ \ | | | | |/
| | | | * Follow-up to changing FSF addressVicențiu Ciorbaru2019-05-1161-61/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some places didn't match the previous rules, making the Floor address wrong. Additional sed rules: sed -i -e 's/Place.*Suite .*, Boston/Street, Fifth Floor, Boston/g' sed -i -e 's/Suite .*, Boston/Fifth Floor, Boston/g'
| | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2015-10-081-2/+41
| | | | |\
| | | | | * Bug#21374104 SETUP_TIMERS INITIALIZATION ASSUMES CYCLE TIMER IS ALWAYS AVAILABLEChristopher Powers2015-07-101-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | For WAIT events, fall back to other timers if CYCLE is not available.
| | | | | * Updated/added copyright header. Added line "use is subject to license terms" Murthy Narkedimilli2014-02-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | to copyright header.
| | | | | * Bug#16814264: FILTER OUT THE PERFORMANCE_SCHEMA RELAY LOG EVENTS FROM RELAY LOGRitheesh Vedire2014-01-312-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance schema tables are local to a server and they should not be allowed to be executed by the slave from the relay log. From 5.6.10, P_S events are not written into the binary log. But prior to that, from mysql 5.5 onwards, P_S events are written to the binary log by master. The following are problematic scenarios: 1. Master 5.5 -> Slave 5.5 ======================== A) RBR: Slave crashes B) SBR: P_S statements are replicated. 2.Master 5.5 -> Slave 5.6 ======================== A) RBR: SQL thd generates error B) SBR : P_S statements are replicated 3. 5.5 binlog executed on a server 5.5 using mysqlbinlog|mysql ================================================================= A) RBR: Server crash (because of BINLOG'... statement) B) SBR: P_S statements are executed 4. 5.5 binlog executed on server 5.6 using mysqlbinlog|mysql ================================================================ A) RBR: SQL error (because of BINLOG'... statement) B) SBR: P_S statements are executed. The generalized behaviour should be: a) Slave SQL thread should certainly ignore P_S events read from the relay log. b) mysqlbinlog|mysql should replay the binlog succesfully.
| | | | | * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| | | | | |
| | | | | * Bug#17928281 'CHECK_PERFORMANCE_SCHEMA()' LEAVES 'CURRENT_THD' REFERRINGMarc Alff2013-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESTRUCTED THD OBJ Prior to fix, function check_performance_schema() could leave behind stale pointers in thread local storage, for the following keys: - THR_THD (used by _current_thd) - THR_MALLOC (used for memory allocation) This is an unsafe practice, which can potentially cause crashes, and that can cause other bugs when code is modified during maintenance. With this fix, thread local storage keys used temporarily within function check_performance_schema() are cleaned up after use.
| | | | | * Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-191-1/+1
| | | | | |
| | | | | * Bug#16414644 ASSERTION FAILED: SIZE == PFS_ALLOCATED_MEMORYMarc Alff2013-02-283-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, the command SHOW ENGINE PERFORMANCE_SCHEMA STATUS could report wrong amount of memory allocated, when the amount of memory used exceeds 4GB. The problem is that size computations are not done using size_t, so that overflows do occur, truncating the results. This fix compute memory sizes properly with size_t. Tested manually. No test script provided, as the script would need to allocate too much memory for the test.
| | | | | * Bug#16060864 SEGMENTATION FAULT IN PERFORMANCE_SCHEMA WITH HISTORY SIZE 0Marc Alff2013-01-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, configuring the server with: - performance_schema_events_waits_history_size=0 - performance_schema_events_waits_history_long_size=0 could cause a crash in the performance schema. These settings to 0 are intended to be valid and supported, and are in fact working properly in mysql 5.6 and up already. This fix backports the code fix and test cases from mysql 5.6 to the mysql 5.5 release.
| | | | | * Bug#13898343 THREAD LOOPS ENDLESSLY IN LF_PINBOX_PUT_PINS WHILE HOLDINGMarc Alff2012-03-281-19/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCK_THREAD_COUNT When using the performance schema file io instrumentation in MySQL 5.5, a thread would loop forever inside lf_pinbox_put_pins, when disconnecting. It would also hold LOCK_thread_count while doing so, effectively killing the server. The root cause of the loop in lf_pinbox_put_pins() is a leak of LF_PINS, when used with the filename_hash LF_HASH table in the performance schema. This fix contains the following changes: 1) Added the missing call to lf_hash_search_unpin(), to prevent the leak. 2) In mysys/lf_alloc-pin.c, there was some extra debugging code (MY_LF_EXTRA_DEBUG) written to detect precisely this kind of issues, but it was never used. Replaced MY_LF_EXTRA_DEBUG with DBUG_OFF, so that leaks similar to this one can be always detected in regular debug builds. 3) Backported the fix for the following bug, from 5.6 to 5.5: Bug#13417446 - 63339: INCORRECT FILE PATH IN PEFORMANCE_SCHEMA ON WINDOWS
| | | | | * Updated/added copyright headersMySQL Build Team2012-02-164-4/+4
| | | | | |
| | | | | * Merging into mysql-5.5.16-release.Mats Kindahl2011-08-151-1/+2
| | | | | |
| | | | | * Bug#12727287: Maintainer mode compilation fails with gcc 4.6Davi Arnaut2011-07-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled by -Wall, that causes GCC to emit a warning whenever a local variable is assigned to, but otherwise unused (aside from its declaration). Since the maintainer mode uses -Wall and -Werror, source code which triggers these warnings will be rejected. That is, these warnings become hard errors. The solution is to fix the code which triggers these specific warnings. In most of the cases, this is a welcome cleanup as code which triggers this warning is probably dead anyway.
| | | | | * Updated/added copyright headersKent Boortz2011-06-3021-21/+34
| | | | | |
| | | | | * Bug#11830755 - UNIT TESTS PFS_INSTR AND PFS_INSTR_CLASS CRASH IN MUTEX CALLS ↵Marc Alff2011-03-086-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ON WINDOWS Before this fix, two performance schema unit tests crashed on windows. The problem was a missing initialization to PFS_atomics, which caused the crash only for platform not compiled with native atomics. This fix adds the missing initialization in the unit tests. No production code was changed, this is a unit test bug only.
| | | | | * Bug #58699 cannot build with gcc dbg on solarisTor Didriksen2010-12-211-1/+1
| | | | | |
| | | | | * Bug#58798 SHOW ENGINE PERFORMANCE_SCHEMA STATUS: incorrect table lettercaseMarc Alff2010-12-071-53/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS used uppercase to name performance schema tables. This is inconsistent since performance schema tables have been renamed to lowercase. Also, an old table 'PROCESSLIST' was still visible, even after this table got renamed to 'threads'. This fix: - correctly uses lowercases in the output, to match the current naming. - replaced 'PROCESSLIST' with 'threads'. Tested the output of SHOW ENGINE PERFORMANCE_SCHEMA STATUS manually. No automated test cases can be written for this, since the output is too platform dependent (sizes).
| | | | | * Bug#53696 Performance schema engine violates the PSEA API by calling my_error()Marc Alff2010-12-016-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a code cleanup. The implementation of a storage engine (subclasses of handler) is not supposed to call my_error() directly inside the engine implementation, but only return error codes, and report errors later at the demand of the sql layer only (if needed), using handler::print_error(). This fix removes misplaced calls to my_error(), and provide an implementation of print_error() instead. Given that the sql layer implementation of create table, ha_create_table(), does not use print_error() but returns ER_CANT_CREATE_TABLE directly, the return code for create table statements using the performance schema has changed to ER_CANT_CREATE_TABLE. Adjusted the test suite accordingly.
| | | | | * local mergeMarc Alff2010-11-213-160/+0
| | | | | |\
| | | | | | * WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-203-160/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced.
| | | | | * | Bug#56760 PFS_lock::allocated_to_free() assert failures on osx10.5-x86-64bitMarc Alff2010-11-167-1/+47
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, an assert could fail in PFS_lock::allocated_to_free(), during shutdown. The assert itself is valid, and detects an anomaly caused by bug 56666. While bug 56666 has no real consequences in production, the failure caused by this new assert in the code is negatively impacting the test suite with automated tests. This fix is a work around only, that relaxes the integrity checks during the server shutdown.
| | | | | * Bug#58003 Segfault on CHECKSUM TABLE ↵Marc Alff2010-11-116-21/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance_schema.EVENTS_WAITS_HISTORY_LONG EXTENDED This fix is a follow up on the fix for similar issue 56761. When sanitizing data read from the events_waits_history_long table, the code needs also to sanitize the schema_name / object_name / file_name pointers, because such pointers could also hold invalid values. Checking the string length alone was required but not sufficient. This fix verifies that: - the table schema and table name used in table io events - the file name used in file io events are valid pointers before dereferencing these pointers.
| | | | | * Bug#57609 performance_schema does not work with lower_case_table_namesMarc Alff2010-11-0311-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, the performance schema tables were defined in UPPERCASE. This was incompatible with the lowercase_table_names option, and caused issues with the install / upgrade process, when changing the lower case table names setting *after* the install or upgrade. With this fix, all performance schema tables are exposed with lowercase names. As a result, the name of the performance schema table is always lowercase, no matter how / if / when the lowercase_table_names setting if changed.
| | | | | * local mergeMarc Alff2010-10-262-0/+7
| | | | | |\
| | | | | | * Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.cDavi Arnaut2010-10-062-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#54678: InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock - Incompatible change: truncate no longer resorts to a row by row delete if the storage engine does not support the truncate method. Consequently, the count of affected rows does not, in any case, reflect the actual number of rows. - Incompatible change: it is no longer possible to truncate a table that participates as a parent in a foreign key constraint, unless it is a self-referencing constraint (both parent and child are in the same table). To work around this incompatible change and still be able to truncate such tables, disable foreign checks with SET foreign_key_checks=0 before truncate. Alternatively, if foreign key checks are necessary, please use a DELETE statement without a WHERE condition. Problem description: The problem was that for storage engines that do not support truncate table via a external drop and recreate, such as InnoDB which implements truncate via a internal drop and recreate, the delete_all_rows method could be invoked with a shared metadata lock, causing problems if the engine needed exclusive access to some internal metadata. This problem originated with the fact that there is no truncate specific handler method, which ended up leading to a abuse of the delete_all_rows method that is primarily used for delete operations without a condition. Solution: The solution is to introduce a truncate handler method that is invoked when the engine does not support truncation via a table drop and recreate. This method is invoked under a exclusive metadata lock, so that there is only a single instance of the table when the method is invoked. Also, the method is not invoked and a error is thrown if the table is a parent in a non-self-referencing foreign key relationship. This was necessary to avoid inconsistency as some integrity checks are bypassed. This is inline with the fact that truncate is primarily a DDL operation that was designed to quickly remove all data from a table.
| | | | | * | Bug#57154 Rename THREADS.ID to THREADS.PROCESSLIST_ID in 5.5Marc Alff2010-10-062-7/+8
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is to align the 5.5 performance_schema.THREADS table definition with the 5.6 performance_schema.THREADS table, to facilitate the 5.5 -> 5.6 migration later. In the table performance_schema.THREADS: - renamed ID to PROCESSLIST_ID, removed not null - changed NAME from varchar(64) to varchar(128) to match the columns definitions from 5.6 Adjusted the test cases accordingly. Note: this fix is for 5.5 only, to null merge into 5.6
| | | | | * Bug#50557 checksum table crashes server when used in performance_schemaMarc Alff2010-09-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CHECKSUM TABLE for performance schema tables could cause uninitialized memory reads. The root cause is a design flaw in the implementation of mysql_checksum_table(), which do not honor null fields. However, fixing this bug in CHECKSUM TABLE is risky, as it can cause the checksum value to change. This fix implements a work around, to systematically reset fields values even for null fields, so that the field memory representation is always initialized with a known value.
| | | | | * Bug#56761 Segfault on CHECKSUM TABLE performance_schema.EVENTS_WAITS_HISTORY ↵Marc Alff2010-09-152-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EXTENDED Before this fix, the server could crash inside a memcpy when reading data from the EVENTS_WAITS_CURRENT / HISTORY / HISTORY_LONG tables. The root cause is that the length used in a memcpy could be corrupted, when another thread writes data in the wait record being read. Reading unsafe data is ok, per design choice, and the code does sanitize the data in general, but did not sanitize the length given to memcpy. The fix is to also sanitize the schema name / object name / file name length when extracting the data to produce a row.
| | | | | * Header files should be self-containedTor Didriksen2010-09-101-1/+1
| | | | | |