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中,如何为每个组选择前2行 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- SQL 临时表问题 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01