Test that partitioned table primary key index has trailing partition_id
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR adds a test to ensure that partitioned tables' PK indices have the partition_id
column in the trailing position, to ensure that:
- we keep PK index definitions consistent, and
- that when the
partition_id
value is not passed in a query, the index is still used.
Closes #397036 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Running rspec spec/db/schema_spec.rb
should fail in the current master, due to the fact that p_ci_runner_machine_builds
is currently defined in a way that doesn't match the expected column order. This is being fixed in !114894 (merged). Once that MR goes through, then the pipeline for this MR should be green.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.