如何在触发器中更新同一个表中的其它记录?比如下面这个,将更新指定的infoType为 'building' 记录时,
同时更新与这些记录关联的类型为 room 的记录, 来同步 estateIdDROP TRIGGER IF EXISTS `picture_xref_before_update_tr`;
delimiter //
CREATE TRIGGER `picture_xref_before_update_tr` BEFORE UPDATE ON `picture_xref`
  FOR EACH ROW
BEGIN
  set @infoType=new.infoType;
  if @infoType='building' then
update picture_xref set estateId=new.estateId where infoType='room' and infoId=new.id;
end if;
END; //
delimiter ;
上面写法会报错 'Can't update table 'picture_xref' in stored function/trigger ........我知道这样是因不能在这里写update, 会造成死循环, 所以我该如何改才能实现需要的功能?