⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 innodb-deadlock.result

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 RESULT
字号:
drop table if exists t1,t2;create table t1 (id integer, x integer) engine=INNODB;insert into t1 values(0, 0);set autocommit=0;SELECT * from t1 where id = 0 FOR UPDATE;id	x0	0set autocommit=0;update t1 set x=2 where id = 0;update t1 set x=1 where id = 0;select * from t1;id	x0	1commit;commit;select * from t1;id	x0	2commit;drop table t1;create table t1 (id integer, x integer) engine=INNODB;create table t2 (b integer, a integer) engine=INNODB;insert into t1 values(0, 0), (300, 300);insert into t2 values(0, 10), (1, 20), (2, 30);commit;set autocommit=0;select * from t2;b	a0	101	202	30update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE);select * from t2;b	a0	1001	202	30select * from t1;id	x0	0300	300set autocommit=0;update t1 set x=2 where id = 0;update t1 set x=1 where id = 0;select * from t1;id	x0	1300	300commit;commit;select * from t1;id	x0	2300	300commit;drop table t1, t2;create table t1 (id integer, x integer) engine=INNODB;create table t2 (b integer, a integer) engine=INNODB;insert into t1 values(0, 0), (300, 300);insert into t2 values(0, 0), (1, 20), (2, 30);commit;select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE;a	b0	020	130	2300	300select * from t2;b	a0	01	202	30select * from t1;id	x0	0300	300update t2 set a=2 where b = 0;select * from t2;b	a0	21	202	30update t1 set x=2 where id = 0;update t1 set x=1 where id = 0;select * from t1;id	x0	1300	300commit;commit;select * from t1;id	x0	2300	300commit;drop table t1, t2;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -