mysql source learning from version 5.1