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

场景11无法复现 #21

Open
MistRay opened this issue May 14, 2020 · 1 comment
Open

场景11无法复现 #21

MistRay opened this issue May 14, 2020 · 1 comment

Comments

@MistRay
Copy link

MistRay commented May 14, 2020

场景11无法复现
MySQL版本5.7.18

@humanbeingxx
Copy link

可以复现 5.7.35

@Test
@Transactional
public void testUpdateDeadlock() throws InterruptedException {
    for (int i = 0; i < 10; i++) {
        int id = i + 1;
        new Thread(() -> {
            int updated = jdbcTemplate.update("update tt set id = " + id + " where fileid = 1");
            System.out.println(updated);
        }).start();
    }
    Thread.sleep(1000);
}

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

No branches or pull requests

2 participants