mysql 和 php PDO - 如果连接意外关闭,未提交的事务会发生什么? [英] mysql and php PDO - what happens to an uncommited transaction if connection closes unexpectedly?

查看:67
本文介绍了mysql 和 php PDO - 如果连接意外关闭,未提交的事务会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题 但是这个问题是不同的,因为 DBMS 是不同的.

I'm aware of this question but this question is different since the DBMS is different.

我正在开发一些东西,如果遇到一些错误,整个脚本会终止,有时是在事务中.那么当事务没有提交或回滚时会发生什么?它会对我的机器产生长期影响吗?我曾经读过未关闭的图像资源会对机器造成永久性的长期损坏.

I'm developing something so, if some error is encountered, whole script terminates, sometimes while in a transaction. So what happens when a transaction isn't commited or rolled back? can it have long term effects on my machine? I once read that unclosed image resources do permanent long-term damage to the machine.

推荐答案

你见过这些吗?MySQL 回滚丢失/断开连接的事务 &MySQL Innodb 中的悬空事务

Have you seen these? MySQL rollback on transaction with lost/disconnected connection & Dangling Transactions in MySQL Innodb

听起来他们在超时后被回滚

sounds like they are rolled back after they timeout

这篇关于mysql 和 php PDO - 如果连接意外关闭,未提交的事务会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆