Getting MySQL code is not easy, but you have to follow
http://dev.mysql.com/doc/refman/5.1/en/source-installation.html
http://dev.mysql.com/downloads/mirror.php?id=412906
This is an rpm package, so hopefully you are using linux (and have rpm-packagemanager).
Otherwise, you can use the bazaar, but, as I tried, loading was very slow. http://dev.mysql.com/doc/refman/5.1/en/installing-development-tree.html
Do you need an eclipse for this? The source tree is configured and created, and that's all you need. Just edit the code with a good source code editor.
But you asked about the eclipse.
In eclipse, I really think you need a CDT:
http://download.eclipse.org/tools/cdt/releases/juno or indigo or what kind of eclipse you are using.
The next step is to import the source tree, so new Projekt C/C++ and Makefile project with existing code . Select the source tree and import it.
I think from now on you have more knowledge than mine, because I do not use eclipse yet. Either the project is small, then vi is good, or the project is large, then the eclipse is too slow, and I use gvim with a little tweaking (ctags, git-plugins, etc.).
Good luck
EDIT: Could @ ram2013 not have a list http://ftp.nchu.edu.tw/MySQL/tech-resources/articles/mysql-capi-tutorial.html before I started reinventing the wheel? ;-) I think that step by step is much more detailed.