content_image/755122.jpg content_image/755123.jpg content_image/755127.jpg
The example uses the demo_test  table, which was created by the innodb_memcached_config.sql configuration script during the initial setup of the daemon_memcached  plugin. The demo_test  table contains a single example record. 

1. Use the set  command to insert a record with a key of test1 , a flag value of 10 , an expiration value of 0 , a cas value of 1, and a value of t1 . 

telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is ’^]’. set test1 10 0 1 t1 STORED 

2. On the source server, check that the record was inserted into the demo_test  table. Assuming the demo_test  table was not previously modified, there should be two records. The example record with a key of AA , and the record you just inserted, with a key of test1 . The c1  column maps to the key, the c2  column to the value, the c3  column to the flag value, the c4  column to the cas value, and the c5 column to the expiration time. The expiration time was set to 0, since it is unused. 

mysql> SELECT * FROM test.demo_test; 

<img src='content_image/755122.jpg'>

3. Check to verify that the same record was replicated to the replica server. 

mysql> SELECT * FROM test.demo_test; 

<img src='content_image/755123.jpg'>

4. Use the set  command to update the key to a value of new . 

telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is ’^]’. set test1 10 0 2 new STORED 

The update is replicated to the replica server (notice that the cas  value is also updated). 

mysql> SELECT * FROM test.demo_test; 

<img src='content_image/755127.jpg'>

5. Delete the test1  record using a delete  command. 

telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. 

