在数据库中检测到发生死锁。insert aaa (a,b,c) select a,b,c from bb where b in(select d from dd) and sendFlag=0 and (sendTime="" or sendTime is null or sendTime< now() ) and id between NAME_CONST('t_minid',NULL) and NAME_CONST('t_maxid',42447) ;
insert into aaa (a,b,c) select a,b,c from bb where b in(select d from dd) and sendFlag=0 and (sendTime="" or sendTime is null or sendTime< now() ) and id between NAME_CONST('t_minid',NULL) and NAME_CONST('t_maxid',42447) ; 这可以考虑下 if(sendTime is null,0,sendTime)>=Now()
insert aaa (a,b,c) select a,b,c from bb,dd where b=d and sendFlag=0 and (sendTime="" or sendTime is null or sendTime< now() ) and id between NAME_CONST('t_minid',NULL) and NAME_CONST('t_maxid',42447)
select a,b,c from bb
where b in(select d from dd)
and sendFlag=0
and (sendTime="" or sendTime is null or sendTime< now() )
and id between NAME_CONST('t_minid',NULL) and NAME_CONST('t_maxid',42447) ;
这可以考虑下 if(sendTime is null,0,sendTime)>=Now()
select a,b,c from bb,dd where b=d
and sendFlag=0 and (sendTime="" or sendTime is null or sendTime< now() ) and id between NAME_CONST('t_minid',NULL)
and NAME_CONST('t_maxid',42447)