Bug #101601 Error msg seems wrong in innodb_alter_undo_tablespace_inactive
Submitted: 13 Nov 2020 11:34 Modified: 17 Feb 2021 10:50
Reporter: Baolin Huang Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[13 Nov 2020 11:34] Baolin Huang
Description:
In innodb_alter_undo_tablespace_inactive function:
```
  auto count = fil_count_deleted(undo_space->num());
  if (count > CONCURRENT_UNDO_TRUNCATE_LIMIT) {
    my_printf_error(ER_DISALLOWED_OPERATION,
                    "Cannot set %s inactive since there would be"
                    " more than 64 old versions of this undo tablespaces"
                    " in cache. Please wait for the next checkpoint.",
                    MYF(0), undo_space->space_name());

    return (HA_ERR_NOT_ALLOWED_COMMAND);
  }
```

We see, CONCURRENT_UNDO_TRUNCATE_LIMIT now is changed from 64 to 50000.
While, the error msg is still '...more than 64 old versions...'

How to repeat:
no

Suggested fix:
fix
[13 Nov 2020 13:43] MySQL Verification Team
Hi Mr. Huang,

Thank you for your bug report.

We have analysed carefully your report. By analysing the source code in trx0purge.h and srv0srv.c, we concluded that you are right. However, this is truly a very minor error.

Verified as reported.
[17 Feb 2021 10:50] Erlend Dahl
Fixed as of the upcoming 8.0.23 release, and here's the proposed changelog
entry from the documentation team:
 
An error message regarding the number of truncate operations on the same
undo tablespace between checkpoints incorrectly indicated a limit of 64.
The limit was raised from 64 to 50,000 in MySQL 8.0.22.
[17 Feb 2021 13:23] MySQL Verification Team
Thank you, Erlend.