You could use gdb to debug the MySQL server like this: set breakpoints in some storage
For example of CREATE operation:
Then you could run "CREATE TABLE t1(id INT) ENGINE=HEAP;", the server will be stopped in
create, and you use "bt" to see the process of creation.
The server will create a new thread for client, and analyse query statement, and then
execute the statement.
In creation process, it will fill lots of structures, like HA_CREATE_INFO, TABLE,
TABLE_SHARE and create frm file.
You can see these in source code.