PXC-5277 Merge PS 5.7.44-55, PS 5.7.44-56 and PS 5.7.44-57 - #2337
Merged
Conversation
PKG-555 Packaging tasks for release - PS 5.7.44-54 (post-EOL 6)
https://perconadev.atlassian.net/browse/PS-10054 Bug#37117875 mysql/mysql-server@9d4ead06951 Description: ------------ When the delimiter is set to a non-default symbol and the SQL statement contains an unquoted semicolon (;) within a MySQL-specific comment, the SQL executes successfully in the source database. However, the binlog record becomes incomplete, leading to a syntax error in the replica database. Analysis: ------------ When the delimiter is set to a non-default symbol and an SQL statement contains an unquoted semicolon within a MySQL-specific comment, the client transmits the entire SQL statement, including the MySQL-specific comment, up to the delimiter to the server. During parsing, the server interprets the semicolon as the end of the command while processing the comment, resulting in the execution of a partial statement. The truncated statement is then recorded in the binary log and propagated to the replica, leading to an error. Fix: ------------ When the delimiter is set to a non-default symbol, treat MySQL-specific comments containing unquoted semicolons as syntax errors and return a parser error. The bug can be reprodued using the following steps DELIMITER | CREATE TABLE t (id INT PRIMARY KEY) /*!50100 PARTITION BY RANGE (id) ( PARTITION p0 VALUES LESS THAN (100), PARTITION p1 VALUES LESS THAN (200), PARTITION p2 VALUES LESS THAN (MAXVALUE));*/| DELIMITER ; When the above statments are run on a master in a replication setup, the CREATE TABLE statment strangely succeeds along with an error message in the debug build on the master but when it is replicated on to the slave, the statement failure by syntax error is seen the slave's error log. The 9d4ead0 commit fixes the bug in a way that the table is not created and the error is thrown in the master itself.
https://perconadev.atlassian.net/browse/PS-10054 BUG#37829550 mysql/mysql-server@21a91a2b977 Improve WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS validations.
https://perconadev.atlassian.net/browse/PS-10054 WL#16949 mysql/mysql-server@04c191b4800 Introduced a new --commands option to mysql (default: ON) to disable mysql client side commands in non-interactive mode.
https://perconadev.atlassian.net/browse/PS-10054 BUG#31360522 mysql/mysql-server@c51237cec9f DESCRIPTION: ============ Certain range queries on a table with index prefixed BLOB/TEXT columns could lead to a server exit. ANALYSIS: ========= While opening the table based on its table share, in open_table_from_share(), we create a copy of the key_info from TABLE_SHARE object to TABLE object. If the key is prefixed, we allocate a new Field object, having its field_length set to the prefix key length, and point the table's matching key_part->field to this new Field object. We skip creating the new Field object for prefixed BLOB columns. A secondary key is extended by adding primary key parts to it if the primary key part does not exist in the secondary key or the key part in the secondary key is a prefix of the key field (add_pk_parts_to_sk()). The consequence of skipping the creation of new Field object for prefixed BLOB columns is that the key parts from the secondary key and primary key will be pointing to the same Field object. Later, while performing end-range scan, we check if the key is within range (compare_key_in_buffer()). We change the offsets of all the fields in the key range to make the fields point to the record buffer (move_key_field_offsets()). In case of BLOBs, we end up moving the same field twice in move_key_field_offsets(). This leads to accessing out of bound memory while performing key comparison. FIX: ==== We allow creating new Field object even for BLOB columns in open_table_from_share(). When a table with index prefixed BLOB columns is evicted from Table cache, Field_blob objects are free'd by clearing the Table's mem_root in closefrm(). However, since Field_blob::value is allocated on the heap, a specific cleanup to free the Field_blob objects has been added in closefrm(). Note: ===== This issue is not a regression but rather was exposed in 5.6.36 by the patch for Bug#23481444: OPTIMISER CALL ROW_SEARCH_MVCC() AND READ THE INDEX APPLIED BY UNCOMMITTED ROWS.
…ommit=OFF https://perconadev.atlassian.net/browse/PS-10054 Bug#36784795 mysql/mysql-server@b5ab2959dbd Query rewrite plugin reload rules logic runs in an independent thread created when a request is submitted. This thread runs the reload logic and exits. When the server is in global autocommit OFF mode, the new thread and its session will also run with autocommit OFF mode. At the end of the reload execution, the code does a statement commit and exist. Statement commits does not preserve the changes in autocommit OFF mode. Due to this, after the thread exits, any table data changes done will be lost. Fix: Perform a transaction commit to ensure all changes are preserved before exiting the session/thread.
https://perconadev.atlassian.net/browse/PS-10054 Bug#37765153 mysql/mysql-server@05d25639413 In the deb packaging we run a few install commands that change ownership of files to the root user. This means the build has to run as root, or with fakeroot. This isn't recommended or required (downstream packaging installs these files without changing ownership), and in Ubuntu 25.04 the default config does not allow builds to use root, so it fails. Removed the ownership change from these calls to let the build run rootless.
https://perconadev.atlassian.net/browse/PS-10054 Bug#37572191 mysql/mysql-server@94a29a8a117 Fix already provided with percona/mysql-community-post-eol@82beae8a2ad. Improves the test case.
https://perconadev.atlassian.net/browse/PS-10125 Fix: ---- Problem description and fix is written in the upstream bug commit: mysql/mysql-server@fc4b73f4002 The fix from fc4b73f is adapted to 5.7 without all the const and other un-necessary changes. 1. In row_ins_foreign_fill_virtual(), the update vector used for innobase_get_computed_value() is from the child table instead of parent update vector (node->update) 2. dict_foreign_t paremeter is now un-used, and always passed as NULL 3. update vector doesn't have dict_table_t member in 5.7, so it is explicitly passed to innobase_get_field_from_update_vector() Note that the testcase is written by us (Percona)
https://perconadev.atlassian.net/browse/PS-10054 Raised MYSQL_VERSION_EXTRA to 55 in MYSQL_VERSION file. Raised PERCONA_INNODB_VERSION to 55 in univ.i file.
EOL percona#7 - PS-10054 Backport bug fixes from MySQL 8.0.43
PKG-874 Packaging tasks for release - PS 5.7.44-55 (EOL 7)
PKG-874 Packaging tasks for release - PS 5.7.44-55 (EOL 7)
Description : ============= MTR has the option --big-test to run tests that contain the have_big.inc directive. In this case, MTR will run all ordinary tests and the big tests (which are normally skipped). It would be desirable both for developers and PB2 to have an option where ordinary tests are skipped and only the big tests are run. Fix : ===== Introduced a new MTR option 'only-big-test' which when passed will run only the big tests and the normal tests(non big tests) will be skipped. If both --big-test and --only-big-test options are passed then MTR will disable the '--only-big-test' option. Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com> Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com> RB: 14883
https://perconadev.atlassian.net/browse/PS-10175 Bug#38094070 mysql/mysql-server@67de430da7a In consume_optimizer_hints(): check for end-of-buffer before doing yyPeek(). End-of-buffer simply means that there is no hint to be consumed.
https://perconadev.atlassian.net/browse/PS-10175 Bug#37602657 mysql/mysql-server@f97c71a Description: ------------ In some scenarios (that are described later), secondary indexes on virtual columns can endup with different data compared to the clustered index data. The conditions are 1. Data that is collation equivalent but differ in binary 2. They should also different in length. One such example is the 'ß' vs 'SS' in collation latin1_german2_ci. They are equivalent when you compare using collations, but with binary, they are different in values and also differ by length. SS -> 0x5353 (2bytes), 'ß' -> 0xDF (1 byte) 3. virtual column on such base cols 4. Index on the virtual column How the corruption can happen 1. Create a table with virtual col that is based on a base col with varchar 2. Insert a record (For example, lets use 'SS' in this case) 3. stop purge 4. Delete the record 5. re-insert the record with the equivalent character 'ß'(this is collation equivalent but differ in binary and length) 6. The re-insert is executed as insert-by-modify in secondary indexes 7. Since the re-insert record is not exactly the same in binary, InnoDB does not do unmarking of delete-marked record. We proceed with inserton of a new record. It is created from the update vector (difference between existing record and the record to be inserted is calcuated at row_upd_build_sec_rec_difference_binary()) 8. During the creation of new record from the update vector, we wrongly use a different field_no position (This can either cause a different field to be used or completely skip the new value) 9. new record inserted into secondary index will NOT have the new value ('ß') and have a old value or some random value 10.This causes mismatch between primary and secondary indexes. It can also lead to assertion failures when purge cannot find the record in secondary index. Why this happens ---------------- For virtual columns, update vector is used for two purposes 1. For Clustered index record updates, virtual columns values (old and new) are stored to undo log (Required for mvcc, purge). These are not real record udpates. They use virtual col positions. 2. On secondary indexes on virtual col, when update vector is created from row_upd_build_sec_rec_difference_binary(), it is created based on index field position, not the virtual col position. 3. Later when the new record to be created from update vector, wrong field_no is used from update vector (vcol_pos vs field_no) and this causes the corruption. Fix: ---- On secondary index updates, the update vector is created based on index field positions. If there is a virtual column stored in the update vector, use the field_no instead of the vcol position. Note: ----- We use a different approach from the Upstream commit mysql/mysql-server@f97c71a (8.0 version) Upstream avoids marking the col as virtual in the update vector created for secondary indexes. The virtual colums are stored in secondary index. Also much more debug assertions are possible because of such separation. Additionally, upstream made some changes on-disk structures.
https://perconadev.atlassian.net/browse/PS-10175 Bug#37994397 mysql/mysql-server@2c6e56c3bd4 Description: The buffer pool of size innodb_buffer_pool_size is divided into innodb_buffer_pool_instances instances and each instance is subdivided into chunks of size innodb_buffer_pool_chunk_size. The chunks of each instance is maintained using the buf_pool->n_chunks list which is allocated when initializing the buffer pool instance. The buffer pool size, buffer pool chunk size and number of buffer pool instances is configurable by the user. Issue: When the buffer pool size is very large, it can lead to a large number of chunks required by each buffer pool instance. The allocation of buf_pool->n_chunks list may fail if the operating system is unable to allocate the requested memory. This failure was not checked, as the list of chunks is generally small compared to the buffer pool. Fix: This commit introduces checks to ensure that n_chunks list is allocated successfully else error is returned.
…the server to exit abnormally https://perconadev.atlassian.net/browse/PS-10175 Bug#37792010 mysql/mysql-server@e12a310892d Analysis ======== MySQL 5.7 does not have PERFORMANCE_SCHEMA.DATA_LOCKS table, but it has a similar table INFORMATION_SCHEMA.INNODB_LOCKS. FTS config table columns are not initialized with a proper prtype. So during certain operations( like REPLACE, OPTIMIZE..) if a concurrent query accesses the INFORMATION_SCHEMA.INNODB_LOCKS, it may attempt attempt to format these column values from character_set associated with the column to a system charset. Since the prtype is not set, the source collation_id is 0 and this results in source charset as nullptr. Later the source collation(nullptr) is dereferenced, server crashes. The prtype only affects the data conversion and comparision. Interally FTS column data is not affected by the lack of prtype. Only for INFORMATION_SCHEMA query, the prtype matters. Also, INNODB_LOCKS behaves differently in 5.7. Only the lock objects of transactions that are in the waiting state are displayed(processed). In 8.0, all records objects from running trxs are also displayed. Hence, this bug is not easily reproducible in the 5.7 version. That being said, there is a possiblity(a remote chance) that if two FTS trxs that are operating on the config table (reading and writing to config table), one of them can end up in waiting state. If such waiting state occurs, a concurrent query on INNODB_LOCKS can result in server crash. Fix === The fix ensures the internal FTS config VARCHAR columns are intialized with valid PR type during the internal table creation. This prevents the server exit while concurrently accessing the table when running query to access INFORMATION_SCHEMA.INNODB_LOCKS.
https://perconadev.atlassian.net/browse/PS-10175 Raised MYSQL_VERSION_EXTRA to 56 in MYSQL_VERSION file. Raised PERCONA_INNODB_VERSION to 56 in univ.i file.
https://perconadev.atlassian.net/browse/PS-10175 Supresses ASAN warnings originating from the latest version of python which is causing innodb_stress and rocksdb tests to fail.
EOL percona#8 - PS-10175 Backport bug fixes from MySQL 8.0.44
PKG-1099 Packaging tasks for release - PS 5.7.44-56 (EOL8)
…QUIRES CORE_USES_PID=1 The tests mysqld_core_dump_without_buffer_pool*.test requires that name of core file produced includes pid of mysqld. This is only true if: $ cat /proc/sys/kernel/core_uses_pid 1 Skip test unless this is the case. (cherry picked from commit bd3c29c)
…will inevitably cause crashes https://perconadev.atlassian.net/browse/PS-10391 Bug#38208188 mysql/mysql-server@d338ba09220 Problem: Bulk inserts into temporary tables with GIS indexes will inevitably cause crashes. Cause: When an mtr starts, the default log_mode is MTR_LOG_ALL. For temporary tables, the mtr->log_mode is set to MTR_LOG_NO_REDO, because if redo log recovery logic sees a redo log record for a given space_id, it will try to open the space file and apply it, which is impossible for temporary tables. While inserting an entry in secondary index, we first try with optimistic descent and if it returns with DB_FAIL we opt for pessimistic descent. While optimistic tree descent, we pick BTR_MODIFY_LEAF as the descent-mode. However if there is a need for enlarging the mbr we must set the descent-mode to BTR_MODIFY_TREE. So the ongoing mtr is commited, and a new mtr is started, but this mtr's log_mode is the default MTR_LOG_ALL, causing an assertion. Fix: After the new mtr is started, if the table is temporary, re-set the `log_mode` to `MTR_LOG_NO_REDO`. Test case added. Change-Id: I1a8d92eddb5aba408f4359936ad255d4ef12e67e (cherry picked from commit a9cf8c5)
https://perconadev.atlassian.net/browse/PS-10391 Bug#38573285 mysql/mysql-server@b56c64b Add MAX_TABLES validation in contextualize phase for fail-fast behavior Add table count validation to parser contextualize phase to reject queries with excessive table references early, before expensive resolver work. Problem: Queries with thousands of joins spend significant time in add_table_to_list() and resolver before failing with ER_TOO_MANY_TABLES. Example: 20k-way join parses all 20k tables before error. Solution: Two-layer approach ---------------------------- 1. Parser check (NEW): Count tables during parse contextualize phase - Fails immediately when count > MAX_TABLES 2. Resolver check (EXISTING): Safety net for dynamic expansions - Still needed for view expansion, derived tables, recursive CTEs - Catches cases where syntactic count differs from leaf count Performance: ---------------------------- For 200k joins: Before: Parse + resolve 200k tables → error (expensive) After: Parse 62 tables → immediate error (cheap)
https://perconadev.atlassian.net/browse/PS-10391 Problem: A memory leak was detected by ASAN when a table with a prefix index on BLOB columns is evicted from the table cache. The leak occurs because Field_blob objects allocated on the heap are not properly freed in closefrm(). Analysis: In closefrm(), the logic to clean up Field_blob objects has two loops to iterate over the indexes and their index columns. The outer loop iterates over the keys in `key_info`, and the inner loop iterates over the key parts for each key. However, the loop variable `key_part` was initialized outside the loop iterating over keys. Consequently, for tables with multiple keys, the inner loop processing key parts would not correctly iterate over the key parts of subsequent keys, leading to skipped cleanup and memory leaks. Fix: Move the initialization of `key_part` inside the outer loop to ensure it correctly points to `key_info->key_part` for each key. This ensures that all Field_blob objects associated with the key parts are properly visited and deleted.
…295186 https://perconadev.atlassian.net/browse/PS-10391 Bug#38651156 mysql/mysql-server@269f4ef1e09 Description: Refreshed certificates. Fixes auth_sec.cert_verify MTR test.
https://perconadev.atlassian.net/browse/PS-10391 Raised MYSQL_VERSION_EXTRA to 57 in MYSQL_VERSION file. Raised PERCONA_INNODB_VERSION to 57 in univ.i file.
EOL 9 - PS-10391 - PS 5.7.44-57 (EOL 9)
Percona Server release 5.7.44-57
PS-10993 Backport bug fixes from MySQL 8.0.43, 8.0.44 and 8.0.45
https://perconadev.atlassian.net/browse/PXC-5277 Merge tag 'Percona-Server-5.7.44-57' into PXC-5277 Ninth 5.7 post-EOL release. Conflicts: MYSQL_VERSION packaging/deb-in/CMakeLists.txt packaging/deb-in/rules.in Discarded files: build-ps/percona-server-5.7_builder.sh build-ps/percona-server.spec
https://perconadev.atlassian.net/browse/PXC-5277 Conflicts: MYSQL_VERSION packaging/deb-in/CMakeLists.txt packaging/deb-in/rules.in
https://perconadev.atlassian.net/browse/PXC-5277 Disable permanently failing MTR tests. Cherry-picked from commit: - PXC-4589: Merge PS 5.7.44-53 MTR tests disabled
https://perconadev.atlassian.net/browse/PXC-5277 Observed remote server received transactions(DROP TABLE t2) post RESET MASTER causing binlog divergence or unexpected events in the binlog. Resolution: Added wait to make sure old transactions are recevived before RESET MASTER. Cheery-picked from commit: - PXC-4776: Merge PS 5.7.44-56 Updates failing test case
- Added suites split for parallel MTR execution - Corrected ports allocation for MTR workers.
Updated Galera repo pointer (Valgrind problem fixed)
|
|
VarunNagaraju
marked this pull request as ready for review
July 28, 2026 08:33
VarunNagaraju
requested review from
adivinho,
jaideepkarande and
kamil-holubicki
July 28, 2026 08:33
Contributor
Author
jaideepkarande
approved these changes
Aug 11, 2026
jaideepkarande
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Just minor correction
PXC-5277 Merge PS 5.7.44-55, PS 5.7.44-5 and PS 5.7.44-57
I think it should be:
PXC-5277 Merge PS 5.7.44-55, PS 5.7.44-56 and PS 5.7.44-57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://perconadev.atlassian.net/browse/PXC-5277
Merge tag 'Percona-Server-5.7.44-57' into PXC-5277
Ninth 5.7 post-EOL release.
Conflicts:
MYSQL_VERSION
packaging/deb-in/CMakeLists.txt
packaging/deb-in/rules.in
Has the following additional fixes(cherry-picked)