Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295380

READ COMMITTED requirement check doesn't account for database views

$
0
0

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


Viewing all articles
Browse latest Browse all 295380

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>