Bug #119731 mysql 8.4 ut_a is invalid
Submitted: 21 Jan 3:10
Reporter: karry zhang (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:MySQL 8.4 OS:Any
Assigned to: CPU Architecture:Any

[21 Jan 3:10] karry zhang
Description:
I see the following code in storage/innobase/os/os0file.cc

  ut_a(purpose == OS_LOG_FILE || purpose == OS_LOG_FILE_RESIZING ||
       purpose == OS_DATA_FILE || purpose == OS_DBLWR_FILE ||
       purpose == OS_CLONE_DATA_FILE || purpose == OS_CLONE_LOG_FILE ||
       purpose == OS_BUFFERED_FILE || OS_DATA_FILE_FOR_SPACE_ID_READ);

I think the ut_a is invalid, the purpose need to compare if the value is OS_DATA_FILE_FOR_SPACE_ID_READ.

How to repeat:
See the code above.

Suggested fix:
see the description.
[21 Jan 3:13] karry zhang
suggest to fix.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: fix.txt (text/plain), 730 bytes.