Bug #117191 index_load_list is unused
Submitted: 13 Jan 10:35 Modified: 14 Jan 2:41
Reporter: Ke Yu (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.40 OS:Any
Assigned to: CPU Architecture:Any

[13 Jan 10:35] Ke Yu
Description:
index_load_list is defined but unused.
I want to know what index_load_list does, and if it is not used, can we delete it?

How to repeat:
From the code, std::pair<space_id_t, lsn_t> will be emplaced back to
index_load_list. But the contents of index_load_list are never accessed.

storage/innobase/log/log0recv.cc:1650
...
      if (!recv_recovery_on) {
        index_load_list.emplace_back(
            std::pair<space_id_t, lsn_t>(space_id, recv_sys->recovered_lsn));
      }
...

Suggested fix:
Delete the code of index_load_list.
[13 Jan 11:52] MySQL Verification Team
Hello Mr. Yu,

Thank you very much for your bug report.

However, that code is necessary for the MEB. In the code that follows the one that you cited, you will find that some of the values are indeed used.

Not a bug.
[14 Jan 2:41] Ke Yu
Based on 8.0.40, I don't see any code that uses index_load_list, 
except the one I posted above. Can you post code that uses index_load_list?
[14 Jan 11:27] MySQL Verification Team
Hi Mr. Yu,

Just below the code that you reported, some variables used in thad code snipped are used.

We are also checking whether that code is needed for some future extensions.
[14 Jan 12:01] MySQL Verification Team
Hi Mr. Yu,

We have got the official response from our InnoDB team.

That code must remain where it is , since it is essential for the functioning of our Enterprise MySQL version.

Hence, this is not a bug.

However, thank you for your analysis and please, let us know if you find any other unused or erroneous lines in our code.

Thanks again.