Analyzing data stored in Memcached
It's time to get our hands dirty by playing with the Memcached interface. An InnoDB table entry should be there in the containers table of the Memcached database to use this table through the Memcached interface. By default, while installing Memcached, a demo_test table is automatically created under the test database and the same table entry is inserted into the containers table. Let's define the new mapping and perform a few operations. I am getting eager to get to the next section!
I have created a student_result table to store students' results data with the following query:
mysql> CREATE TABLE student_result ( student_id INT PRIMARY KEY, student_name VARCHAR(20), maths INT, english INT, history INT, flags INT, cas BIGINT UNSIGNED, expiry INT);
Mapping of the student_result table can be done by inserting an entry into the containers table as follows:
mysql> INSERT INTO innodb_memcache.containers (name, db_schema, db_table, key_columns, value_columns...