We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void SqlConnPool::Init(const char* host, int port,const char* user,const char* pwd, const char* dbName, int connSize = 10) { assert(connSize > 0); //默认创建10个mysql连接 for (int i = 0; i < connSize; i++) { MYSQL *sql = nullptr; sql = mysql_init(sql); // 这里直接assert(sql)不就行了吗? if (!sql) { LOG_ERROR("MySql init error!"); assert(sql); }
The text was updated successfully, but these errors were encountered:
sql = mysql_real_connect(sql, host,user, pwd,dbName, port, nullptr, 0); //还有这里,sql都是空了,为什么还存到connQue中? if (!sql) { LOG_ERROR("MySql Connect error!"); } connQue_.push(sql);
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: