Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MERGE INTO fails with an error "Timeout trying to lock table" #2834

Closed
mrigger opened this issue Aug 19, 2020 · 0 comments · Fixed by #3885
Closed

MERGE INTO fails with an error "Timeout trying to lock table" #2834

mrigger opened this issue Aug 19, 2020 · 0 comments · Fixed by #3885

Comments

@mrigger
Copy link

mrigger commented Aug 19, 2020

Consider the following statements:

CREATE TABLE T0(c0 BOOL, PRIMARY KEY(c0));
MERGE INTO T0(C0) VALUES (TRUE);
MERGE INTO T0(C0) VALUES (2); -- Timeout trying to lock table {0};

Unexpectedly, the second MERGE INTO results in the following error:

Caused by: org.h2.message.DbException: Concurrent update in table "T0": another transaction has updated or deleted the same row [90131-201]
    at org.h2.message.DbException.get(DbException.java:200)
    at org.h2.message.DbException.get(DbException.java:176)
    at org.h2.command.dml.Merge.merge(Merge.java:224)
    at org.h2.command.dml.Merge.update(Merge.java:110)
    at org.h2.command.dml.DataChangeStatement.update(DataChangeStatement.java:45)
    at org.h2.command.CommandContainer.update(CommandContainer.java:173)
    at org.h2.command.Command.executeUpdate(Command.java:250)

I found this based on commit 073bbb8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant