We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Table: CREATE TABLE test(no VARCHAR(20) PRIMARY KEY, idx int) Session1 : insert into test(no, idx) values ('5', 14); select sleep(2); insert into test(no, idx) values ('7', 17); Session: update test set idx = 31 where no = 5 ; 这里锁的情形符合案例 5的描述,但是,有些奇怪,我试过,跟Session1 的插入的数据有关,也和Session2的no不用 字符而用 数字有关,极其特殊。。。
The text was updated successfully, but these errors were encountered:
会出现死锁吗?能否提供下 test 表的初始数据?
Sorry, something went wrong.
会出现死锁吗?能否提供下 test 表的初始数据? 没有初始数据,就是用两个线程两个连接,机缘巧合重现了。。。你可以试试,我试过5.7, 8.0不知道为什么。
No branches or pull requests
Table: CREATE TABLE test(no VARCHAR(20) PRIMARY KEY, idx int)
Session1 :
insert into test(no, idx) values ('5', 14);
select sleep(2);
insert into test(no, idx) values ('7', 17);
Session:
update test set idx = 31 where no = 5 ;
这里锁的情形符合案例 5的描述,但是,有些奇怪,我试过,跟Session1 的插入的数据有关,也和Session2的no不用 字符而用 数字有关,极其特殊。。。
The text was updated successfully, but these errors were encountered: