Problem/Motivation

The status report shows the following error.

Transaction isolation level
READ-COMMITTED
For this to work correctly, all tables must have a primary key. The following table(s) do not have a primary key: server_side_ab_testing_assignments. See the setting MySQL transaction isolation level page for more information.

Steps to reproduce

  1. Install the module
  2. Go to the status report page

Proposed resolution

Define primary keys for the assignments table.

Release notes snippet

Defined primary keys for the assignments table to align with transaction isolation level.

CommentFileSizeAuthor
#4 3505193-4.patch1.05 KBlars.stiebenz
#2 3585193-2.patch1.03 KBlars.stiebenz
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

lars.stiebenz created an issue. See original summary.

lars.stiebenz’s picture

StatusFileSize
new1.03 KB

The patch just defines all existing ID fields as primary keys. Alternatively, a new separate serial ID could be used.

lars.stiebenz’s picture

StatusFileSize
new1.05 KB

Using cookie_id as a primary key too, causes the following error during module installation:

The 'cookie_id' field specification does not define 'not null' as TRUE.

As a result, the entire table won't be created.

Therefore I removed cookie_id from the primary_keys

emartos’s picture

Hi Lars,

Thank you so much for this patch. Let me check it in detail to integrate it in the next version.

Best regards,
Eduardo.

emartos’s picture

Assigned: Unassigned » emartos
Status: Active » Needs review