Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
Q2/2026 Server Development, Q3/2026 Server Maintenance
Description
Worker threads will need their own handler (i.e. ha_innobase, ha_maria, etc) objects.
This is because each worker should have its own "cursor" (i.e. current position in the scan) and table->record[0] (the current record). The objects should share the same read view of the database.
Should TABLE object itself be shared?
Should TABLE_LIST object be shared? (probably not as it's a parse tree-level entity)
table->field[0...n] should not be shared, as those have pointers to table->record[0] which
should not be shared.
How to create additional handler objects
Option 1: open table normally
Open tables "normally" by calling open_table() (or what is the function to get TABLE object
from open table cache). We will get new TABLE and handler objects.
Option 2: handler::clone
Use handler->clone() to get another handler.
It is not clear if/how we would get another TABLE object.