Transaction isolation level warning

Created on 20 November 2024, 8 months ago

Problem/Motivation

/admin/reports

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

πŸ› Bug report
Status

Active

Version

3.1

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @JSchref
  • πŸ‡ΊπŸ‡ΈUnited States druliner

    cd core/modules/contrib/views_url_alias
    wget #2
    patch -p1 < views_url_alias-add-pri...8676-2.patch
    drush updb
    All better! Thanks jschref!

  • πŸ‡©πŸ‡ͺGermany sachbearbeiter

    Hi, can you please make a new release including this patch? Thanks!

  • πŸ‡ΊπŸ‡¦Ukraine ruslan piskarov Kyiv, Ukraine

    ruslan piskarov β†’ made their first commit to this issue’s fork.

  • πŸ‡ΊπŸ‡¦Ukraine ruslan piskarov Kyiv, Ukraine

    The patch 32 can be applied to Version 3.1.0, but in DEV it was fixed in another way.
    You can have a look Database Indexes was never created because incorrect key in hook_schema πŸ› Database Indexes was never created because incorrect key in hook_schema Fixed .
    Leaving this task for reference. Decided do not close this task for now.

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    I also got an error related to the primary keys issue, sovled by clearing cache. When adding a content type I got

    Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'views_url_alias.PRIMARY': INSERT INTO "views_url_alias"

    Which I think is fixed by having good primary keys

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    So I tried out the dev version but get an error with the Databaseupdate @ruslan_piskarov

    Module Update ID Type Description
    ----------------- ----------- --------------- ------------------------------------------------------------------------------------------
    views_url_alias 10301 hook_update_n 10301 - Implements hook_update_N(). Install indexes, add new column, add primary key.
    views_url_alias 10302 hook_update_n 10302 - Implements hook_update_N(). Reinstall the schema, rebuild views_url_alias table.
    ----------------- ----------- --------------- ------------------------------------------------------------------------------------------

    // Do you wish to run the specified pending updates?: yes.

    > [notice] Update started: views_url_alias_update_10301
    > [error] views_url_alias_get_path_entity_type(): Return value must be of type ?Drupal\Core\Entity\ContentEntityInterface, Drupal\webform\Entity\Webform returned
    > [error] Update failed: views_url_alias_update_10301
    [error] Update aborted by: views_url_alias_update_10301
    [error] Finished performing updates.

    Failed to run drush updb -y: exit status 1

  • Pipeline finished with Success
    6 days ago
    #542327
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    merge request !31 - Allowed me to run the Dev branch database update successfully.

    ----------------- ----------- --------------- ------------------------------------------------------------------------------------------
    Module Update ID Type Description
    ----------------- ----------- --------------- ------------------------------------------------------------------------------------------
    views_url_alias 10301 hook_update_n 10301 - Implements hook_update_N(). Install indexes, add new column, add primary key.
    views_url_alias 10302 hook_update_n 10302 - Implements hook_update_N(). Reinstall the schema, rebuild views_url_alias table.
    ----------------- ----------- --------------- ------------------------------------------------------------------------------------------

    // Do you wish to run the specified pending updates?: yes.

    > [notice] Update started: views_url_alias_update_10301
    > [notice] Update completed: views_url_alias_update_10301
    > [notice] Update started: views_url_alias_update_10302
    > [notice] Update completed: views_url_alias_update_10302
    [success] Finished performing updates.

  • πŸ‡¬πŸ‡§United Kingdom rachel_norfolk UK

    just adding [duplicate] to title so I don’t keep looking in here for things to do...

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    @rachel_norfolk Is this a duplicate of 3433027? Because that one says fixed, but when I tested the 3.x-dev I still got an error during the database updates and the primary keys on the tables could not be fixed due to that error. That's why I created MR31

  • πŸ‡¬πŸ‡§United Kingdom rachel_norfolk UK

    @nicholass - I was going on the message in comment #6. There’s certainly a belief that the issue is fixed in @dev, but in a different way.

Production build 0.71.5 2024