Bug #112670 Documentation outdated related ANALYZE TABLE locking
Submitted: 9 Oct 2023 15:47 Modified: 10 Oct 2023 5:03
Reporter: Przemyslaw Malkowski Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0.34 OS:Any
Assigned to: CPU Architecture:Any
Tags: analyze

[9 Oct 2023 15:47] Przemyslaw Malkowski
Description:
In the documentation:
https://dev.mysql.com/doc/refman/8.0/en/analyze-table.html
we can read:

"ANALYZE TABLE removes the table from the table definition cache, which requires a flush lock. If there are long-running statements or transactions still using the table, subsequent statements and transactions must wait for those operations to finish before the flush lock is released. Because ANALYZE TABLE itself typically finishes quickly, it may not be apparent that delayed transactions or statements involving the same table are due to the remaining flush lock."

According to:
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html
and
https://bugs.mysql.com/bug.php?id=87065
this limitation was removed as of version 8.0.24. Hence, the documentation should be updated.

How to repeat:
Test ANALYZE TABLE during long-running query in 8.0.23 vs 8.0.24+.

Suggested fix:
Update the documentation accordingly.
[10 Oct 2023 5:03] MySQL Verification Team
Hello Przemyslaw,

Thank you for the report. 

Thanks,
Umesh