构造数据
CREATE database deadlock_test;
use deadlock_test;
CREATE TABLE `push_token` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`token` varchar(128) NOT NULL COMMENT 'push token',
`app_id` varchar(128) DEFAULT NULL COMMENT 'appid',
`deleted` tinyint(1) NOT NULL COMMENT '是否已删除 0:否 1:是',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_token_appid` (`token`,`app_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3384 DEFAULT CHARSET=utf8 COMMENT='pushtoken表';
insert into push_token (id, token, app_id, deleted) values(1,"token1",1,0);