随笔分类 -  mysql / mysql事务和锁语句

摘要:数据库系统使用锁是为了支持对共享资源进行并发访问,提供数据的完整性和一致性。 对于MYISAM引擎,其锁是表锁设计。lock的对象是事务,用来锁定的是数据库中的对象,如表、页、行。并且一般lock的对象仅在事务commit或rollback后进行释放(不同事务隔离级别释放的时间可能不同)。 两种锁, 阅读全文
posted @ 2020-08-25 19:20 wongchaofan 阅读(151) 评论(0) 推荐(0) 编辑
摘要:SET [GLOBAL | SESSION] TRANSACTION transaction_characteristic [, transaction_characteristic] ... transaction_characteristic: { ISOLATION LEVEL level | 阅读全文
posted @ 2020-08-18 06:43 wongchaofan 阅读(499) 评论(0) 推荐(0) 编辑
摘要:LOCK TABLES tbl_name [[AS] alias] lock_type [, tbl_name [[AS] alias] lock_type] ... lock_type: { READ [LOCAL] | [LOW_PRIORITY] WRITE } UNLOCK TABLES M 阅读全文
posted @ 2020-08-18 06:21 wongchaofan 阅读(279) 评论(0) 推荐(0) 编辑
摘要:SAVEPOINT identifier ROLLBACK [WORK] TO [SAVEPOINT] identifier RELEASE SAVEPOINT identifier InnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO 阅读全文
posted @ 2020-08-18 02:24 wongchaofan 阅读(175) 评论(0) 推荐(0) 编辑
摘要:事务控制语句和锁语句也有例外:如果一个隐式提交发生在执行之前,那么其他的在之后也不会发生。 Data definition language (DDL) statements that define or modify database objects. ALTER DATABASE ... UPG 阅读全文
posted @ 2020-08-18 02:20 wongchaofan 阅读(241) 评论(0) 推荐(0) 编辑
摘要:https://dev.mysql.com/doc/refman/5.7/en/commit.html START TRANSACTION [transaction_characteristic [, transaction_characteristic] ...] transaction_char 阅读全文
posted @ 2020-08-18 01:57 wongchaofan 阅读(100) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示