Problem/Motivation

The alogin_user_settings table is missing the primary key which is required for READ COMMITTED transaction isolated level to work correctly.

Steps to reproduce

Check the alogin_schema() function in the alogin.install file, and observe no primary key defined.
This can also be seen by inspecting the database table schema after the module is installed.

Proposed resolution

Add uid as a primary key.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None. The uid field is de-facto already used as a unique row identifier across the code. Also, adding a primary key would have a positive performance impact.

CommentFileSizeAuthor
#2 3513396-2.patch546 bytesabramm

Issue fork alogin-3513396

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

abramm created an issue. See original summary.

abramm’s picture

StatusFileSize
new546 bytes

Patch for applying via composer.json.

abramm’s picture

Assigned: abramm » Unassigned
Status: Active » Needs review
jonathandealmeida’s picture

Hi abramm, I tested patch 3513396-2.patch on Drupal core version 10.4.4 and the uid column of alogin_user_settings table was assigned as primary key, I can confirm that this is working as expected.

  • 904bd2ff committed on 2.1.x
    Issue #3513396: Missing alogin_user_settings table primary key
    
ahmed.raza’s picture

Status: Needs review » Fixed

Patched and available in 2.1.7

Thanks

abramm’s picture

Hi ahmed.raza,
Can you please add an issue credit?
Thanks!

ahmed.raza’s picture

Creditting: abramm at DevBranch, Drupal Ukraine Community for Evolving Web, jonathandealmeida at Zoocha

ahmed.raza’s picture

Status: Fixed » Closed (fixed)