| 89 | } |
| 90 | |
| 91 | connect_pool* mysql_manager::create_pool(const char* key, size_t, size_t) |
| 92 | { |
| 93 | std::map<string, mysql_conf*>::iterator it = dbs_.find(key); |
| 94 | if (it == dbs_.end()) { |
| 95 | logger_error("db key: %s not exists", key); |
| 96 | return NULL; |
| 97 | } |
| 98 | |
| 99 | mysql_conf* conf = it->second; |
| 100 | mysql_pool* dbpool = NEW mysql_pool(*conf); |
| 101 | |
| 102 | if (idle_ttl_ > 0) { |
| 103 | dbpool->set_idle_ttl(idle_ttl_); |
| 104 | } |
| 105 | |
| 106 | return dbpool; |
| 107 | } |
| 108 | |
| 109 | } // namespace acl |
| 110 |
nothing calls this directly
no test coverage detected