Skip to content

MariaDB 10.5.15 / MySQL 8.0.29 break the deadlock test #14174

Open

Description

@WikiRik

Issue Creation Checklist

[X] I have read the contribution guidelines

Issue Description

MariaDB 10.5.15 breaks one test

[MARIADB] Transaction
       deadlock handling
         should release the connection for a deadlocked transaction (2/2):

      AssertionError: expected false to be true
      + expected - actual

      -false
      +true

Additional context

Issue Template Checklist

Is this issue dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): MariaDB 10.5.15
  • I don't know.

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Activity

  1. self-assigned this
    on Feb 25, 2022
  2. WikiRik commented on Feb 25, 2022

    @WikiRik
    MemberAuthor

    Fix for the short term is included in #14171 by pinning the patch version of MariaDB. Renovate will do automatic updates on this so it is not an issue.

  3. WikiRik commented on Mar 10, 2022

    @WikiRik
    MemberAuthor

    @ephys I only updated it for the main branch. This is also the failing test on v6. Renovate does not do automatic updates on v6 so we can either disable the test for now or fix it. But I'm not sure when I can get to fixing it

  4. ephys commented on Mar 10, 2022

    @ephys
    Member

    I made a branch to fix it a little while ago but changed my mind and opted to fix the test instead
    Now that a v6 release is blocked by it I should prioritize it 😅

  5. assigned and unassigned on Mar 10, 2022
  6. github-actions commented on Mar 25, 2022

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  7. added
    P1: important
    type: bug
    and removed on Mar 25, 2022
  8. WikiRik commented on Mar 25, 2022

    @WikiRik
    MemberAuthor

    @ephys would be nice if you could take another look, otherwise I can check it out next week

  9. ephys commented on Apr 1, 2022

    @ephys
    Member

    The test fails because it tries to cause a deadlock but fails.

    Here is the query execution order: (ONE & TWO are the connection IDs of each transaction)

    start: 'awesome' is null
    
    Executing (ONE): START TRANSACTION;
    Executing (ONE): SELECT `id`, `username`, `awesome` FROM `users` AS `user` WHERE `user`.`id` = 1 LOCK IN SHARE MODE;
    Executing (TWO): SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
    Executing (TWO): START TRANSACTION;
    Executing (TWO): SELECT `id`, `username`, `awesome` FROM `users` AS `user` WHERE `user`.`id` = 1;
    Executing (TWO): UPDATE `users` SET `awesome`=? WHERE `id` = ?
    	 -> sets awesome to false
    
    Executing (ONE): UPDATE `users` SET `awesome`=? WHERE `id` = ?
    	-> sets awesome to true
    
    Executing (ONE): COMMIT;
    Executing (TWO): COMMIT;
    
    end: 'awesome' is false
    

    previously this lead to a deadlock instead, and the UPDATE query on transaction TWO would reject. Is that a bug in MariaDB? I would expect this to deadlock too

  10. ephys commented on Apr 3, 2022

    @ephys
    Member

    As a temporary workaround, we could disable this test for mariaDB 10.5.15. I'm starting to think this is an issue in MariaDB itself and it may get resolved in a future update?

  11. WikiRik commented on Apr 3, 2022

    @WikiRik
    MemberAuthor

    Yeah, it might be better to skip this test with an expiring TODO for June 1st so we can take a look again if we want to release a stable build around that time. Can you make PRs for v6 and main for this or shall I do that?

  12. ephys commented on Apr 3, 2022

    @ephys
    Member

    This issue also happens with 10.7.3. It could be intended, or a bug that's present in multiple majors.

    I'm opening a PR to disable this test for the time being

  13. WikiRik commented on Apr 3, 2022

    @WikiRik
    MemberAuthor

    Yeah, it could also be intended but then we look into it later. It's not the test with the highest impact luckily

  14. ephys commented on May 13, 2022

    @ephys
    Member

    The docker image for MySQL 8.0 was updated to 8.0.29, and the same deadlock tests are now failing for MySQL 8 too (at least on the v6 branch)

  15. changed the title [-]MariaDB 10.5.15 breaks a test[/-] [+]MariaDB 10.5.15 / MySQL 8.0.29 breaks the deadlock test[/+] on May 16, 2022
  16. changed the title [-]MariaDB 10.5.15 / MySQL 8.0.29 breaks the deadlock test[/-] [+]MariaDB 10.5.15 / MySQL 8.0.29 break the deadlock test[/+] on May 16, 2022
  17. added theissue type on Mar 9, 2025
  18. removed
    type: bug
    on Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions