WL#11720: InnoDB: Parallel read of index

Affects: Server-8.0   —   Status: Complete

Read the sub trees of an index in parallel only if the request is a non-locking SELECT COUNT(*).

Allow for "physical" read (a.k.a read uncommitted) and logical read using MVCC rules.

Additionally refactor the persistent cursor code.

Current scope is limited to providing sufficient infrastructure for DDL operations to read the data in parallel. Making the second phase of CHECK TABLE parallel is an added bonus for now. This speeds up CHECK TABLE a little.

The parallel SELECT COUNT(*) ...; is required because we would like to test the changes independent of any other external component.

We will not implement any locking by the parallel read threads. That is a bigger project and can be done as follow up work. This is because some assumptions inside InnoDB have to change and we will have to handle lock waits and coordinate the rollback in the reader threads.