当出现死锁时 ibase_execute 就会挂起

发布于 2024-09-25 12:12:23 字数 155 浏览 0 评论 0原文

设置:firebirdsql 2.1.3 win32,php 5.3(与xampp一起安装) 当我尝试更新在桌面应用程序或 IBexpert 中编辑的记录时,出现死锁,ibase_execute 只是挂起,不返回任何值,也不引发异常。 当没有死锁时,一切都会正常进行。 有什么想法如何抓住这个吗?

Setup: firebirdsql 2.1.3 win32, php 5.3 (installed with xampp)
When I try to update a record that's edited in a desktop app or IBexpert, and there is a deadlock, ibase_execute just hangs, does not return any value nor raises an exception.
When there's no deadlock, everything works fine.
Any ideas how to catch this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我的黑色迷你裙 2024-10-02 12:12:23

我发现了问题。

默认情况下,事务是 IBASE_WAIT,因此它会等待,直到不再编辑记录。
您必须使用 IBASE_NOWAIT 选项启动事务才能在死锁情况下立即得到响应。

I found the problem.

By default, the transactions are IBASE_WAIT, so it waits until the record is no longer edited.
You have to start a transaction with the IBASE_NOWAIT option to get an immediate response in a deadlock situation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文