3379 The InnoDB memcached Plugin and Replication INSERT INTO t1 (key,val) VALUES ( some_key , some_value ); SELECT val FROM t1 WHERE key =  some_key ; UPDATE t1 SET val =  new_value  WHERE key =  some_key ; UPDATE t1 SET val = val + x WHERE key =  some_key ; DELETE FROM t1 WHERE key =  some_key ; mysql>  SET SESSSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; mysql>  SELECT * FROM demo_test; +------+------+------+------+-----------+------+------+------+------+------+------+ | cx | cy | c1 | cz | c2 | ca | CB | c3 | cu | c4 | C5 | +------+------+------+------+-----------+------+------+------+------+------+------+ | NULL | NULL | a11 | NULL | 123456789 | NULL | NULL | 10 | NULL | 3 | NULL | +------+------+------+------+-----------+------+------+------+------+------+------+ Because the  daemon_memcached  plugin supports the MySQL binary log, source server through the memcached  interface can be replicated for backup, balancing intensive read workloads, and high availability. All  memcached  commands are supported with binary logging. You do not need to set up the  daemon_memcached  plugin on replica servers. The primary advantage of this configuration is increased write throughput on the source. The speed of the replication mechanism is not affected. The following sections show how to use the binary log capability when using the  daemon_memcached plugin with MySQL replication. It is assumed that you have completed the setup described in Section 15.20.3, “Setting Up the InnoDB memcached Plugin” . •The  InnoDB  table is either IS (intention shared) or IX (intention exclusive) locked for all operations in a transaction. If you increase  daemon_memcached_r_batch_size  and daemon_memcached_w_batch_size  substantially from their default value of  1 , the table is most likely locked between each operation, preventing DDL statements on the table. •When modifying a table using SQL that is also accessed through the  memcached  interface, you can configure  memcached  operations to start a new transaction periodically rather than for every read operation. This behavior is controlled by the  daemon_memcached_r_batch_size  option. If this option is set to a value greater than  1 , changes made to the table using SQL are not immediately visible to memcached  operations. •When querying a table that is also accessed through the  memcached  interface, remember that memcached  operations can be configured to be committed periodically rather than after every write operation. This behavior is controlled by the  daemon_memcached_w_batch_size  option. If this option is set to a value greater than  1 , use  READ UNCOMMITTED  queries to find rows that were just inserted. You can access the underlying  InnoDB  table (which is  test.demo_test  by default) through standard SQL interfaces. However, there are some restrictions: The following  TRUNCATE TABLE  and  DELETE  statements, which remove all rows from the table, correspond to the  flush_all  operation, where  t1  is configured as the table for  memcached  operations, as in the previous example. 15.20.6.6 Performing DML and DDL Statements on the Underlying InnoDB Table In the following SQL examples,  t1  refers to the table used for  memcached  operations, based on the configuration in the  innodb_memcache.containers  table.  key  refers to the column listed under key_columns , and  val  refers to the column listed under  value_columns . 15.20.7 The InnoDB memcached Plugin and Replication TRUNCATE TABLE t1; DELETE FROM t1;