mysqldump导数据库数据不加锁(InnoDB)
来源:互联网 发布:软件测试个人职业规划 编辑:程序博客网 时间:2024/05/22 21:45
转载自:http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_single-transaction
--single-transaction
This option sends a START TRANSACTION
SQL statement to the server before dumping data. It is useful only with transactional tables such as InnoDB
, because then it dumps the consistent state of the database at the time whenBEGIN
was issued without blocking any applications.
When using this option, you should keep in mind that only InnoDB
tables are dumped in a consistent state. For example, any MyISAM
or MEMORY
tables dumped while using this option may still change state.
While a --single-transaction
dump is in process, to ensure a valid dump file (correct table contents and binary log coordinates), no other connection should use the following statements: ALTER TABLE
, CREATE TABLE
,DROP TABLE
, RENAME TABLE
, TRUNCATE TABLE
. A consistent read is not isolated from those statements, so use of them on a table to be dumped can cause the SELECT
that is performed by mysqldump to retrieve the table contents to obtain incorrect contents or fail.
The --single-transaction
option and the --lock-tables
option are mutually exclusive because LOCK TABLES
causes any pending transactions to be committed implicitly.
This option is not supported for MySQL Cluster tables; the results cannot be guaranteed to be consistent due to the fact that the NDBCLUSTER
storage engine supports only the READ_COMMITTED
transaction isolation level. You should always use NDB
backup and restore instead.
To dump large tables, you should combine the --single-transaction
option with --quick
.
- mysqldump导数据库数据不加锁(InnoDB)
- 解决mysqldump导数据的乱码问题
- InnoDB 解锁和加锁(死锁)问题
- INNODB加锁分析处理(二)
- 数据泵导数据
- (五)MySQL InnoDB中各类语句加锁方式
- mysql导数据库
- 一个InnoDB 加锁的案例
- MySQL Dumping and Reloading the InnoDB Buffer Pool(MySQLdump和重载InnoDB缓冲池)
- [MySQL] 使用 mysqldump 線上備份 InnoDB
- 导数据时如何处理重复数据
- 怎么用oracle数据泵导数据
- mysql 导数据库命令
- mysql 导数据库命令
- mysql 导数据库命令
- 导数据
- 导数据
- 导数据
- Android之EditView 阻止软键盘自动弹出
- php使用include制作模板页
- PL/SQL-FOR UPDATE 与 FOR UPDATE OF的区别
- Finder 及其子类的分析
- Nginx + chunkin for windows编译指南
- mysqldump导数据库数据不加锁(InnoDB)
- mysql中char,varchar与text类型的区别和选用
- 2012-07-16
- Dojo 1.8 中令人期待的18件事
- Android 中TextView 添加超链接
- 算法之堆排序
- 快速识别汇编中等价的C语言语句(if, while, for, switch)
- Oracle ORA-1122, ORA-1110, ORA-1207 file is more recent than control file 处理方法
- Nokia 我不关心,QT、C/C++不该消沉