READ COMMITTED requirement check doesn't account for database views

Created on 25 May 2023, over 1 year ago
Updated 25 December 2023, 12 months ago

Problem/Motivation

REPEATABLE-READ
The recommended level for Drupal is "READ COMMITTED". For this to work correctly, all tables must have a primary key. The following table(s) do not have a primary key: {insert long list of native mysql views}. See the setting MySQL transaction isolation level page for more information.
READ-COMMITTED
For this to work correctly, all tables must have a primary key. The following table(s) do not have a primary key: {insert long list of native mysql views}. See the setting MySQL transaction isolation level page for more information.

Anyone that's worked with views will immediately know that this is because in the schema API and some other places, a view shows up largely like a table. I assume this is a pretty useful feature but it can also be frustrating if you don't take it into account in situations like this.

Steps to reproduce

1. Install Drupal
2. run this on your database. CREATE VIEW test AS SELECT * FROM users;
3. Visit the status page and see one of the above warning or errors.

Proposed resolution

This might be tricky. Adjusting findTables to not include views might be too big a change? That said, I don't see an interface for listing or interacting with what type of "table" you're interacting with so only including real tables might make sense.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
MySQL driverΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States neclimdul Houston, TX

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024