游标FOR循环是空集为什么会死循环?

最近写了一个存储过程,用游标循环,代码如下:
for v_record_oth in(select formulaid, cast(FormulaDef as varchar2(4000)) refcomcont from formula_t_formuladef where modelid =v_modelid and FormulaType = '0' and FormulaID <> v_FormulaID and instr(upper(cast(FormulaDef as varchar2(4000))), upper(v_forcomcol),1,1)>0) loop
           ……
           ……
end loop;
SQL条件不满足,没有检索任何结果,但是就在这里死循环,不知道为什么.
数据库版本:Oracle9i Enterprise Edition Release 9.2.0.7.0

[ 本帖最后由 gavinhuang 于 2008-10-24 13:02 编辑 ]
我也来说两句 查看全部回复

最新回复

  • dingjun123 (2008-10-24 16:33:19)

    如果in后面是空的不可能死循环的,直接就不循环了,你的过程是不是其他地方发生死循环了啊?检查一下!
  • gavinhuang (2008-10-24 18:33:58)

    没有,就是这里的问题,调试的时候发现的,前不久还正常,这次换服务器后重新安装的数据库,以为是补丁没有有打,结果打了还这样。