I have problems understanding the libmysql.def and libmysqld.def. I know they are interfaces for client and server. A lot of other modules are just calling functions definded in those two. But I can not see where they are actually implemented. For eaxample, mysql_real_connect, it is shown in both libmysql.def and libmysqld.def, but I can not find it in any other places in MYSQL source code. Where is the actual implementation of mysql_real_connect?
I am now assigned a job to design and implesment a caching mechanism on top of MySQL on both client and server. What I need to do is to intercept a query packet and process it on cached data and then send it to server and when data results are back from server, I need to intercept it again and cache it before it is displayed to client. In this project, I need to know how a query is moving along from functions to functions ( or from modules to modules ) and find out where is the possible point to add my code in. I am desperately needing help on source code. Any suggestions on how to understand the source code of MySql is helpful. Another thought is that: is there a way to run MySql in debug mode, such as gdb, that I can advance the program line by line. Please help on this if you have time.