mysql select column default value if is null SELECT `w`.`city` AS `city`, `w`.`city_en` AS `city_en`, `w`.`date_y` AS `date_y`, `w`.`week` AS `week`, `w`.`cityid` AS `cityid`, `w`.`temp1` AS `temp1`, `w`.`temp2` AS `temp2`, `w`.`temp3` AS `temp3`, `w…
问题说明: 最近遇到一个问题,多个WORKER同时向MYSQL数据库请求任务,如何实现互斥?例如: SELECT * FROM student WHERE id > 10 LIMIT 100; UPDATE student SET status = 1 WHERE id > 10 LIMIT 100; 当有多个WORKER执行上面两条语句,那么很可能都执行同样的数据,造成线上问题,比如WORDER1执行SELECT之后,还没有执行UPDATE之前,WORDER2也执行了SELECT语句,造成问…