MyIsam engine transaction support(MyIsam 引擎事务支持)
问题描述
我正在 innoDB 表中测试事务支持,只是为了好奇我尝试在 MyIsam 表上运行相同的事务,令人惊讶的是它起作用了.我假设在 myIsam 表上的查询一个接一个地执行,而不是在一个原子操作中执行,并且我没有从 START TRANSACTION 和 COMMIT 以及 ROLLBACK 操作中得到任何错误.我很感兴趣,MyIsam 引擎是忽略了这个操作还是执行了一些操作?
I was testing transaction support in innoDB tables, and just for the curriosity I tried to run the same transaction on MyIsam table, and surprisingly it worked. I am assuming that on myIsam table queries are executed one after another not in one atomic operation and I don't get any errors from START TRANSACTION and COMMIT and ROLLBACK operations. I am interested, is MyIsam engine just ignoring this operations or does it perform some actions?
推荐答案
MyISAM 在自动提交模式下有效工作(因为它不是事务引擎),它只是忽略提交/回滚.
MyISAM effectively works in auto-commit mode (as it's not a transactional engine), and it just ignores the commit/rollback.
实际上存储引擎是MySQL架构中的一个不同层,与SQL解析器分离,SQL层通过底层API与存储引擎通信,这就是为什么有一个通用的SQL和引擎,支持不同的子集的特色.您可以在此处
Actually storage engine is a different layer in the MySQL architecture, separated from the SQL parser, the SQL layer communicates to the storage engine with lower-level API, and that's the reason there is a common SQL and engines, supporting different subset of featured. You can see very high-level overview of the architecture here
这篇关于MyIsam 引擎事务支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MyIsam 引擎事务支持


基础教程推荐
- Sql Server 字符串到日期的转换 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01