分类: Mysql/postgreSQL
2012-07-20 09:54:36
点击(此处)折叠或打开
The diagram is very simplified it's a caricature that distorts important things, but remember that we've only discussed seven major directories so far: Docs, BUILD, and the five that you see here.
The flow works like this:
First, the client routines get an SQL statement from a user, allowing edit, performing initial checks, and so on.
Then, via the vio routines, the somewhat-massaged statement goes off to the server.
Next, the sql routines handle the parsing and call what's necessary for each individual part of the statement. Along the way, the sql routines will be calling the low level mysys routines frequently.
Finally, one of the ha (handler) programs in the sql directory will dispatch to an appropriate handler for storage. In this case we've assumed, as before, that the handler is myisam so a myisam-directory program is involved. Specifically, that program is mi_write.c, as we mentioned earlier.
Simple, eh?