Bug #109894 Server diagnostics area error
Submitted: 2 Feb 2023 9:28 Modified: 17 May 2023 16:44
Reporter: Pedro Ferreira Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S6 (Debug Builds)
Version:8.0.32 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: server

[2 Feb 2023 9:28] Pedro Ferreira
Description:
Initialize the server directory with this command:

bin/mysqld --log-error-verbosity=3 --initialize-insecure --basedir=... --datadir=...

Then run it with this command:

bin/mysqld --no-defaults --basedir=$MySQL_build_dir --datadir=... --plugin-dir=... --log-error-verbosity=3 --port=3306 --mysqlx-port=3307 --enforce-gtid-consistency --gtid-mode=ON 

Run these queries on the client:

CREATE TABLE t0(c0 int);
SET SESSION TRANSACTION READ ONLY;
SET GLOBAL BINLOG_CHECKSUM = CRC32;

It will trigger an assertion error at sql_error.cc:374

assert(!is_set());

The same issue also happens by replacing the `SET GLOBAL BINLOG_CHECKSUM = CRC32;` statement with:

FLUSH BINARY LOGS;

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the statements above.
[2 Feb 2023 9:31] Pedro Ferreira
Ignore $MySQL_build_dir and replace it with your base directory.
[2 Feb 2023 10:43] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.
Observed that 8.0.32 debug build is affected.

regards,
Umesh
[17 May 2023 16:44] Jon Stephens
Documented fix as follows in the MySQL  8.1.0 changelog:

    Executing FLUSH BINARY LOG or SET GLOBAL CHECKSUM=CRC32 after
    setting the session transaction access mode to READ ONLY led to
    an unplanned shutdown. Execution of either of these statements
    causes rotation of the binary log; before doing so it is
    necessary to update the mysql.gtid_executed table, but this was
    rejected due to the session transaction mode being READ ONLY.

    We fix this by allowing the binary log rotation to proceed by
    ignoring the READ ONLY access mode as is done when the server is
    running in read-only or super-read-only mode.

Closed.
[27 Oct 2023 18:19] Jean-François Gagné
This is marked as fixed in 8.1, but nothing about 8.0.

Shouldn't this also be fixed in 8.0 before closing (maybe it is, and this is only a closing comment problem) ?