Putting it all together
It was a long and exhausting chapter with lots of code and lots of details. We deserve to see what we have created:
mysql> create table t (a int primary key, b int, c int, d int, e blob, key bcd_key (b,c,d)) engine=tocab;
Query OK, 0 rows affected (0.01 sec)
mysql> insert t values (1,2,3,4,"foo"),(2,3,4,5,"bar"),(3,4,5,6,"abc"),(4,5,6,7,"serg"),(5,6,7,8,"andrew"),(6,7,8,9,"mysql"),(0,4,6,7,"tocab"), (7,5,6,7,"something");
Query OK, 8 rows affected (0.01 sec) Records: 8 Duplicates: 0 Warnings: 0
mysql> insert t values (7,5,6,7,"this will fail");
ERROR 1062 (23000): Duplicate entry '7' for key 'PRIMARY'
Yes, this has worked, the error message is correct.
mysql> select * from t;
+---+------+------+------+-----------+
| a | b | c | d | e |
+---+------+------+------+-----------+
| 0 | 4 | 6 | 7 | tocab |
| 1 | 2 | 3 | 4 | foo |
| 2 | 3 | 4 | 5 | bar |
| 3 | 4 | 5 | 6 | abc |
| 4 | 5 | 6 | 7 | serg |
| 5 | 6 | 7 | 8 | andrew |
| 6 | 7 | 8 | 9 | mysql |
| 7 ...