Bugs Fixed
Important Change: The implementation of the max_join_size system variable, although documented as a maximum number of rows or disk seeks, did not check the number of rows or disk seeks directly, but instead treated max_join_size as the maximum estimated cost to permit. While cost and row count are correlated, they are not the same, and this could lead to unexpected results when some large queries were allowed to proceed.
In this release, we change how max_join_size is used, so that it now actually limits the maximum number of row accesses in base tables. If the estimate indicates that a greater number of rows must be read from the base tables, an error is raised. This makes the actual behavior better reflect what is documented. (Bug #83885, Bug #25118903)
InnoDB: Undetectable problems after upgrade from 8.0.28, crash and corruption.
Any new row inserted after upgrade will have all columns added with ALGORITHM=INSTANT materialized and have version=0.
In the new implementation, a column added with ALGORITHM=INSTANT will fail if the maximum possible size of a row exceeds the row size limit. So new rows with materialized ALGORITHM=INSTANT columns will always be within row size limit. (Bug #34558510)
InnoDB: No more garbled UTF characters in SHOW ENGINE INNODB STATUS
Thank you Iiwo Panowicz for reporting this bug. (Bug #34486877, Bug #108111)
InnoDB: After a column added with ALGORITHM=INSTANT, an online rebuild DDL no longer crashes.
Thank you Qingda Hu for reporting this bug. (Bug #33788578, Bug #106279)
InnoDB: Several adaptive hash index (AHI) code optimizations and improvements were implemented, addressing various issues including potential race conditions. (Bug #33601434)
Replication: When SOURCE_HEARTBEAT_PERIOD was set to a very small value (such as 1 microsecond) on the server using CHANGE REPLICATION SOURCE TO, and the mysqlbinlog client program was started with --read-from-remote-server and --stop-never=1, it was possible for the binary log dump thread to send an EOF packet to the client before all events had been sent. (Bug #34860923)
Replication: Removed an assert from sql/rpl_group_replication.cc which triggered a false error in testing. (Bug #34619134)
Replication: After MySQL was started with --server-id=0, trying to change the server ID by using SET PERSIST server_id=N (where N is an integer greater than zero) and restarting the server had the following results:
SELECT @@server_id returned N.
Any replication SQL statement such as START REPLICA was rejected with ER_SLAVE_CONFIGURATION.
To fix this problem, we now ensure that such checks use the value of the server variable rather than the value passed to the startup option. (Bug #34412816)
Replication: When replicating compressed binary log events generated by the NDB binary log injector, relay log positions were not updated in the multithreaded applier, thus causing replication to hang. (Bug #33889030)
References: See also: Bug #33784241.
Replication: Issuing STOP REPLICA SQL_THREAD while the SQL thread was handling a transaction caused replication to stop immediately, instead of waiting 60 seconds for the event group to complete before shutting down the SQL thread as expected.
The root cause of this issue was due to the internal variable storing the last event start time not being reset after the SQL thread was restarted.
We fix this by resetting the variable holding the last event start time whenever the SQL thread is started. (Bug #33646899)
Replication: While their wording might imply otherwise, the log messages Setting super_read_only=ON (ER_GRP_RPL_SUPER_READ_ON) and Setting super_read_only=OFF (ER_GRP_RPL_SUPER_READ_OFF) were written only after the operations were attempted, and not beforehand, or while the operations were ongoing. This sometimes led to confusion when setting the variable was rejected, and this was logged prior to the set attempt itself being logged. To keep this from happening, these messages are now logged just prior to attempting the operation. (Bug #108843, Bug #34728079)
Replication: The relay_log_space_limit system variable is a 64-bit value, but its valid maximum was specified internally as that of a 32-bit value. (Bug #106323, Bug #33799840)
Replication: Eliminated an unnecessary update of the gtid_executed table which was performed when rotating the binary logs. (Bug #106116, Bug #33759477)
Group Replication: The WRITE_CONSENSUS_SINGLE_LEADER_CAPABLE column of the MySQL Performance Schema's replication_group_communication_information table reflects the runtime value of a Paxos Single Leader setup in a group, letting users know what the value of group_replication_paxos_single_leader must be on joining members.
A group that was bootstrapped with single-leader enabled but with its protocol version downgraded to one that did not support it reported WRITE_CONSENSUS_SINGLE_LEADER_CAPABLE equal to 0, as expected, but attempting to join an instance to the group using group_replication_paxos_single_leader = 0 was not possible.
To solve this problem, we change the behaviour and make the value of group_replication_paxos_single_leader consistent with the communication version that the group is running. Since this variable was introduced in MySQL 8.0.27, it is not known or used in any previous version, and so we now enforce the following rules:
When a node tries to join a group that is running MySQL 8.0.26 or earlier and we are version 8.0.27 or later, we reject the attempt with an error stating that group_replication_paxos_single_leader must be OFF before joining the group
When we try to use group_replication_set_communication_protocol() to set a version less than 8.0.27 and we are of version 8.0.27 or later, we reject the function call if group_replication_paxos_single_leader is not OFF.
In addition, we also change the value checked to determine whether changing the group leader is allowed after running group_replication_set_communication_protocol(). Previously, this was the runtime value of group_replication_paxos_single_leader, which takes effect only after a group reboot. Instead, when we run group_replication_set_communication_protocol(), we now use the value shown by the replication_group_communication_information table's WRITE_CONSENSUS_SINGLE_LEADER_CAPABLE column, described previously. (Bug #34555045, Bug #34828311)
Full Changelog: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-32.html
Sponsored by: Netzkommune GmbH
Update deprecated configs in my.cnf.sample
Some configs in my.cnf.sample are now deprecated. These should be replaced with their replacement, or removed if there is no replacement.
- Replace deprecated slave-load-tmpdir with replica-load-tmpdir
- Remove deprecated master-info-repository (it was set to the default)
- Remove deprecated relay-log-info-repository (it was set to the default)
- Replace deprecated expire_logs_days with binlog_expire_logs_seconds (multiply 30 days by 24 * 60 * 60)
- Replace deprecated innodb_log_file_size with innodb_redo_log_capacity (preserving the same configured capacity, which was set to 256M * 2 log files)
- Remove deprecated skip-symbolic-links (it is the default)
PR: 266511
Sponsored by: Netzkommune GmbH
Bugs Fixed
Incompatible Change: The service pfs_plugin_table, deprecated since MySQL 8.0.14, is removed in this release.
Plugins or components using this service must be updated to use pfs_plugin_table_v1 and pfs_plugin_column_* instead. (Bug #34361827)
Important Change; Replication: Query log events filtered by the default database whenever --replicate-do-db or --replicate-ignore-db was used included XA START, XA END, XA COMMIT, and XA ROLLBACK (but not XA PREPARE or XA COMMIT ONE_PHASE), regardless of the binary log format.
This can lead to one of the issues listed here:
When XA START or XA END was filtered out, the sequence of XA statements within the first part of the transaction were rendered invalid, which made the replica stop with an error.
When XA START and XA END were preserved while XA COMMIT or XA ROLLBACK was filtered out, then a transaction could remain in the prepared state indefinitely on the replica.
To prevent either of these problems from occurring, we no longer filter XA START, XA END, XA COMMIT, or XA ROLLBACK statements by the default database with --replicate-do-db or --replica-ignore-db. (Bug #106201, Bug #33764808)
InnoDB: After upgrading to a release that supports row versions for columns added or dropped using ALGORITHM-INSTANT, a failure occurred during an instant ADD COLUMN operation on a table with a nullable column and an instantly added column. (Bug #34488482)
InnoDB: Adding a virtual column and dropping a column in the same ALTER TABLE statement raised an invalid debug assertion failure. (Bug #34467592)
InnoDB: The physical position of columns were not set correctly after dropping a column and renaming an existing column to the name of the dropped column. (Bug #34463089)
InnoDB: A Valgrind error detected in mtr_t::start() was corrected. (Bug #34327575)
InnoDB: A DDL operation on a corrupted partitioned table raised an assertion failure. (Bug #34293555)
InnoDB: An index block latch order violation during histogram sampling blocked concurrent inserts and could cause a deadlock failure. (Bug #34282448, Bug #34174927, Bug #107299)
InnoDB: An ALTER TABLE operation executed while a data load operation was in progress raised an assertion failure. (Bug #34267618)
InnoDB: InnoDB memory leaks during MySQL server initialization, identified by Address Sanitizer (ASAN) builds, were fixed. (Bug #34156050)
InnoDB: During recovery, a tablespace object associated with encrypted undo tablespace pages that were fetched from disk did not contain the encryption keys required to decrypt the pages, resulting in a failure. (Bug #34148143)
InnoDB: In debug builds, a descending b-tree scan raised a debug assertion failure. (Bug #34144951)
InnoDB: The innodb_redo_log_consumer_advance() function failed to handle an invalid argument. (Bug #34052884)
InnoDB: A column added using ALGORITHM=INSTANT was visible in read views created before the DDL operation that added the column. (Bug #33937504)
InnoDB: A failure occurred while upgrading a MySQL instance with a MySQL 5.6 data directory containing user-created table with a particular table ID. Assignment of that table ID resulted in assignment of conflicting data dictionary table IDs while upgrading from MySQL 5.7 to MySQL 8.0.
Thanks to Rahul Malik for the contribution. (Bug #33919635)
InnoDB: A buffer block containing intrinsic temporary table page was relocated during page traversal, causing an assertion failure. (Bug #33715694)
InnoDB: Dropping a table with a discarded tablespace caused an assertion failure. (Bug #33232978)
InnoDB: Page I/O reads not completed before shutdown reached the flush phase caused an assertion failure in cases where pages had change buffer merges to be completed after the I/O read. (Bug #33192496)
InnoDB: An index latch order violation in dict_table_x_lock_indexes() caused an assertion failure. (Bug #32912868)
InnoDB: A TRUNCATE TABLE operation failed to free an acquired mutex in specific cases. (Bug #107858, Bug #34380370)
InnoDB: In debug builds, importing a tablespace without a .cfg file for table with an instantly added or dropped column raised an assertion failure. (Bug #107517, Bug #34307874)
InnoDB: A potential memory leak in the trx_undo_prev_version_build() function was corrected.
Thanks to Alex Xing for the contribution. (Bug #106952, Bug #34051207)
InnoDB: A debug assertion failure occurred while redoing a space deletion during recovery. (Bug #103482, Bug #32819101)
InnoDB: An InnoDB startup message that specified the number of object pools was removed to avoid confusion with the number of buffer pool instances. (Bug #80248, Bug #22653060)
See full Changelog here: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-31.html
Sponsored by: Netzkommune GmbH
PR: 265468
Bugs Fixed:
- InnoDB: A TRUNCATE TABLE operation failed to remove data dictionary entries for columns that were dropped using ALGORITHM=INSTANT.
- InnoDB: An incorrect nullable column calculation on tables with instantly added columns caused data to be interpreted incorrectly
- InnoDB: The read_2_bytes() function in the InnoDB sources, which reads bytes from the log buffer, returned a null pointer.
- Replication: The COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE column in the Performance Schema table replication_group_member_stats could persistently show transactions related to view change events (View_change_log_event) that had already been applied. These events are queued in the Group Replication applier channel but applied in the Group Replication recovery channel, causing a race condition that could result in the counter decrement being lost. The increment of the count now takes place at a more suitable point, and the counter for COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE is also now set to zero when the applier is not busy.
- Debug MySQL binaries can now be built using -0g and -fno-inline.
See full Changelog here: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-30.html
Sponsored by: Netzkommune GmbH
Commit b7f05445c0 has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.
There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.
The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.
Approved by: portmgr (tcberner)
Bugs Fixed
InnoDB: A failure occurred when attempting to purge undo records for a table with an instantly added column. (Bug #33924532)
InnoDB: High-priority transactions were not permitted to stop waiting when interrupted or to timeout while waiting for a lock, preventing deadlocks from being resolved. In cases where the blocking transaction is also high-priority, high-priority transactions are now permitted to stop waiting when interrupted or timeout when exceeding the lock wait timeout period. If a blocking transaction is not high-priority, high-priority transactions wait for the blocking transaction to release its locks. (Bug #33856332)
InnoDB: The AIO synchronization queue used on Windows was removed. The synchronous file I/O read-write function (SyncFileIO::execute) was revised to handle files opened for both normal and overlapped I/O, as it does on Linux. (Bug #33840645)
InnoDB: Table version metadata was not reset after truncating all partitions of a table with an instantly added column. (Bug #33822729)
InnoDB: The srv_error_monitor_thread() function, which prints warnings about semaphore waits, failed to handle a long semaphore wait as expected. To address this issue, a blocking call was moved to a more appropriate location. Related monitor thread code was simplified and improved, and missing shutdown signals were added for several server threads.
Enabling and disabling of the standard monitor by InnoDB is now performed independently of the user-settable innodb_status_output variable. This change addresses an issue in which the monitor was enabled by InnoDB in a particular scenario but not set back to its previous value. Thanks to Yuhui Wang for the contribution. (Bug #33789526, Bug #93878)
InnoDB: Valgrind testing identified an off-by-one error in rec_convert_dtuple_to_rec_old() in the InnoDB sources. (Bug #33784672)
InnoDB: The UNIV_DEBUG variant of the mem_heap_alloc() function in the InnoDB sources was modified to improve Valgrind error detection. (Bug #33783709)
InnoDB: A fast shutdown did not wait for all active I/O operations to finish before closing all files. (Bug #33768584)
InnoDB: A Clang warning reported an incorrectly placed @return command. (Bug #33734011)
InnoDB: Values of the new record locks array (m_prebuilt->new_rec_locks[]) were not properly synchronized when switching between partitions, causing an assertion failure due to locks being freed or not freed as expected. (Bug #33724166)
InnoDB: A race condition in the function that updates the double write buffer when a write request is completed caused a long semaphore wait error. (Bug #33712370)
InnoDB: A function wrongly assumed that changing a record in an indexed column always requires creating a new record in the secondary index, resulting in an lock-related assertion failure. To address this and other similar cases, the lock_rec_convert_impl_to_expl() function that converts an implicit record lock to an explicit record lock is now used only when an implicit record lock is actually held. (Bug #33657235)
InnoDB: A number of Doxygen issues in the InnoDB sources were addressed. (Bug #33603036)
InnoDB: A missing null pointer check for an index instance caused a failure. (Bug #33600109)
Full (and long) relnotes: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html
Sponsored by: Netzkommune GmbH
- Replace getauxval with the FreeBSD variant (elf_aux_info)
- ifdef some gcc'ism and pass the correct cflags for clang
Approved by: portmgr (build fix blanket)
PR: 261660
There have been lots of missing CONFLICTS_INSTALL entries, either
because conflicting ports were added without updating existing ports,
due to name changes of generated packages, due to mis-understanding
the format and semantics of the conflicts entries, or just due to
typoes in package names.
This patch is the result of a comparison of all files contained in
the official packages with each other. This comparison was based on
packages built with default options and may therefore have missed
further conflicts with optionally installed files.
Where possible, version numbers in conflicts entries have been
generalized, some times taking advantage of the fact that a port
cannot conflict with itself (due to logic in bsd.port.mk that
supresses the pattern match result in that case).
A few ports that set the conflicts variables depending on complex
conditions (e.g. port options), have been left unmodified, despite
probably containing outdated package names.
These changes should only affect the installation of locally built
ports, not the package building with poudriere. They should give an
early indication of the install conflict in cases where currently
the pkg command aborts an installation when it detects that an
existing file would be overwritten,
Approved by: portmgr (implicit)
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket)
Include sys/types.h to make u_int32_t available:
/usr/include/netinet/ip6.h:77:4: error: 'u_int32_t' does not name a type; did you mean 'uint32_t'?
MFH: 2020Q4 (fix build blanket)