Review 14.3 Merged

95551[BUGFIX] Reject indexes over undeclared columns

Stefan Bürk CR +2 V +2 Hard +255 −0 updated 09/02/26, 09:35

Commit message

A table definition that indexes a column it does not declare is
invalid. MySQL and PostgreSQL refuse such an index themselves, which
keeps the damage to a failed statement.

SQLite accepts it. A quoted identifier that matches no column counts
as a string literal there, so the index is created over a constant
expression and ends up covering no column at all. Introspecting the
database is impossible from that point on, which takes down the
schema analysis of the install tool and of the command line alike,
and leaves no way to bring the database back into shape.

Check the columns of every index against the table once all
definitions for that table are merged. Checking a single statement
would not do: extensions add an index to a table owned by another
extension in a statement of their own, which does not repeat the
columns the index covers.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 6

Review log 34

  1. Stefan Bürk uploaded patch set 1 09/02/26, 09:11

  2. core-ci voted on patch set 1 V +1 09/02/26, 09:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107586

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 09/02/26, 09:35

  4. Stefan Bürk merged patch set 2 09/02/26, 09:35