#188 replace the std::map with a mysql tree