I tried the start transaction on a MyISAM table, and it replied "Query OK, 0 rows affected (0.00 sec)".
我在MyISAM表上尝试了启动事务,它回答“查询正常,0行受影响(0.00秒)”。
But I'm not sure if the same thing will happen on all versions of MySQL.
但我不确定在所有版本的MySQL上是否会发生同样的事情。
Is there any spec about the behavior in non-transaction mode of those queries which involve being in transaction ?
是否有关于涉及交易的那些查询的非事务模式中的行为的规范?
1 个解决方案
#1
3
No, no error or warnng will be raised. WHen you start a transaction, you do it for all transactional engines available, not for any specific table.
不,不会引起任何错误或警告。当您启动事务时,您可以为所有可用的事务引擎执行此操作,而不是针对任何特定的表。
You can run queries on tables using both transactional and non-transactional engines within a transaction, but of course only changes performed on tableswith transactional engines will need to be commit/rollback.
您可以使用事务中的事务和非事务引擎对表运行查询,但当然只有对具有事务引擎的表执行的更改才需要提交/回滚。
Queries performed on tables with non-transactional engines will just have an immediate effect as usual.
对具有非事务性引擎的表执行的查询将像往常一样立即生效。
#1
3
No, no error or warnng will be raised. WHen you start a transaction, you do it for all transactional engines available, not for any specific table.
不,不会引起任何错误或警告。当您启动事务时,您可以为所有可用的事务引擎执行此操作,而不是针对任何特定的表。
You can run queries on tables using both transactional and non-transactional engines within a transaction, but of course only changes performed on tableswith transactional engines will need to be commit/rollback.
您可以使用事务中的事务和非事务引擎对表运行查询,但当然只有对具有事务引擎的表执行的更改才需要提交/回滚。
Queries performed on tables with non-transactional engines will just have an immediate effect as usual.
对具有非事务性引擎的表执行的查询将像往常一样立即生效。