Skip to content

Test that partitioned table primary key index has trailing partition_id

Pedro Pombeiro requested to merge pedropombeiro/397036/add-test into master

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:

  1. we keep PK index definitions consistent, and
  2. 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.

image

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.

Current failed pipeline.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pedro Pombeiro

Merge request reports

Loading