InnoDB memcached Plugin Internals •Most  memcached  operations are mapped to DML statements (analogous to insert, delete, update). Since there is no actual SQL statement being processed by the MySQL server, all  memcached commands (except for  flush_all ) use Row-Based Replication (RBR) logging, which is independent of any server  binlog_format  setting. •The  memcached flush_all  command is mapped to the  TRUNCATE TABLE  command in MySQL 5.7 and earlier. Since DDL commands can only use statement-based logging, the  flush_all  command is replicated by sending a  TRUNCATE TABLE  statement. In MySQL 8.0 and later,  flush_all  is mapped to  DELETE  but is still replicated by sending a  TRUNCATE TABLE  statement. •The concept of transactions has not typically been part of  memcached  applications. For performance considerations,  daemon_memcached_r_batch_size  and  daemon_memcached_w_batch_size  are used to control the batch size for read and write transactions. These settings do not affect replication. Each SQL operation on the underlying  InnoDB  table is replicated after successful completion. •The default value of  daemon_memcached_w_batch_size  is  1 , which means that each memcached  write operation is committed immediately. This default setting incurs a certain amount of performance overhead to avoid inconsistencies in the data that is visible on the source and replica servers. The replicated records are always available immediately on the replica server. If you set daemon_memcached_w_batch_size  to a value greater than  1 , records inserted or updated through memcached  are not immediately visible on the source server; to view the records on the source server before they are committed, issue  SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED . 3383 memcached Command DML or DDL Operations get a read/fetch command set a search followed by an  INSERT  or  UPDATE (depending on whether or not a key exists) add a search followed by an  INSERT  or  UPDATE replace a search followed by an  UPDATE append a search followed by an  UPDATE  (appends data to the result before  UPDATE ) prepend a search followed by an  UPDATE  (prepends data to the result before  UPDATE ) incr a search followed by an  UPDATE decr a search followed by an  UPDATE delete a search followed by a  DELETE Table 15.27 memcached Commands and Associated DML or DDL Operations memcached  commands are implemented through the  InnoDB memcached  API. The following table outlines how  memcached  commands are mapped to DML or DDL operations. The  InnoDB memcached  engine accesses  InnoDB  through  InnoDB  APIs, most of which are directly adopted from embedded  InnoDB .  InnoDB  API functions are passed to the  InnoDB memcached  engine as callback functions.  InnoDB  API functions access the  InnoDB  tables directly, and are mostly DML operations with the exception of  TRUNCATE TABLE . Transactions: 15.20.8 InnoDB memcached Plugin Internals InnoDB API for the InnoDB memcached Plugin