| 13 | { |
| 14 | |
| 15 | mysql_pool::mysql_pool(const char* dbaddr, const char* dbname, |
| 16 | const char* dbuser, const char* dbpass, int dblimit /* = 64 */, |
| 17 | unsigned long dbflags /* = 0 */, bool auto_commit /* = true */, |
| 18 | int conn_timeout /* = 60 */, int rw_timeout /* = 60 */, |
| 19 | const char* charset /* = "utf8" */) |
| 20 | : db_pool(dbaddr, dblimit) |
| 21 | { |
| 22 | acl_assert(dbaddr && *dbaddr); |
| 23 | acl_assert(dbname && *dbname); |
| 24 | |
| 25 | conf_ = NEW mysql_conf(dbaddr, dbname); |
| 26 | |
| 27 | if (dbuser && *dbuser) { |
| 28 | conf_->set_dbuser(dbuser); |
| 29 | } |
| 30 | if (dbpass && *dbpass) { |
| 31 | conf_->set_dbpass(dbpass); |
| 32 | } |
| 33 | if (charset && *charset) { |
| 34 | conf_->set_charset(charset); |
| 35 | } |
| 36 | conf_->set_dbflags(dbflags); |
| 37 | conf_->set_dblimit(dblimit); |
| 38 | conf_->set_auto_commit(auto_commit); |
| 39 | conf_->set_conn_timeout(conn_timeout); |
| 40 | conf_->set_rw_timeout(rw_timeout); |
| 41 | } |
| 42 | |
| 43 | mysql_pool::mysql_pool(const mysql_conf& conf) |
| 44 | : db_pool(conf.get_dbkey(), conf.get_dblimit()) |
nothing calls this directly
no test coverage detected