The following table(s) do not have a primary key: poll_vote

Created on 26 August 2024, 3 months ago
Updated 12 September 2024, 2 months ago

Problem/Motivation

On poll 1.6 and Drupal 10.3.2 configured with Mysql/Mariadb and Transaction isolation level "REPEATABLE-READ" the following warning is being thrown in the status report:

Transaction isolation level

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: poll_vote. See the setting MySQL transaction isolation level page for more information.

The notice "The following table(s) do not have a primary key: poll_vote..." still appears if the isolation level is set to "READ COMMITTED".

In function poll_schema multiple primary keys ('pid', 'uid', 'hostname') are already defined for the poll_vote table, but it seems these are not recognized as primary key for the isolation level check.

Steps to reproduce

Install poll 1.6 on Drupal 10.3.2 configured with Mysql/Mariadb and Transaction isolation level "REPEATABLE-READ" and visit Status page.

Proposed resolution

Add primary key on poll_vote table.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.6

Component

Code

Created by

🇩🇪Germany alxn

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

Comments & Activities

Production build 0.71.5 2024