首页 / 数据库 / MySQL / mysql dba系统学习(7)二进制日志之三:相关系统变量
mysql dba系统学习(7)二进制日志之三:相关系统变量2014-06-251,binlog_cache_size和max_binlog_cache_size表示的为每个session的事物分配的缓存一般的当插入或者修改数据的时候,不会立刻写磁盘,一般会缓存起来,缓存的大小有binlog_cache_size 来控制mysql> show variables like"%binlog_cache%";+-----------------------+----------------------+| Variable_name| Value|+-----------------------+----------------------+| binlog_cache_size| 32768|| max_binlog_cache_size |18446744073709547520 |+-----------------------+----------------------+2,binlog_cache_use表示的是当前事物的数量当前没有事物mysql> showstatus like "%binlog_cache_use%";+------------------+-------+| Variable_name| Value |+------------------+-------+| Binlog_cache_use | 0|+------------------+-------+创建事物mysql>show table status like "tt"G;*************************** 1. row***************************Name: ttEngine: MyISAM(这种引擎不支持事物)Version: 10Row_format: FixedRows: 1Avg_row_length: 8Data_length: 8Max_data_length: 2251799813685247Index_length: 1024Data_free: 0Auto_increment: NULLCreate_time: 2013-09-03 11:42:18Update_time: 2013-09-03 15:24:13Check_time: NULLCollation: utf8_general_ciChecksum: NULLCreate_options:Comment:1 row in set (0.00 sec)mysql>drop table tt;Query OK, 0 rows affected (0.01 sec)mysql> create table tt(id int)engine=innodb; 设置成innodb的引擎Query OK, 0 rows affected, 2 warnings (0.02sec)mysql> insert into tt values(1);Query OK, 1 row affected (0.00 sec)