Skip to content

Commit 5d3a333

Browse files
author
zhengshuxin
committed
fixed one bug for reopen mysql db in lib_acl
1 parent e7c3bb2 commit 5d3a333

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib_acl/src/db/mysql/acl_dbpool_mysql.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ int sane_mysql_reopen(ACL_DB_HANDLE *handle)
218218
MYSQL *myconn_saved = mysql_handle->connection;
219219
ACL_DB_INFO *db_info = &mysql_handle->handle.parent->db_info;
220220

221+
__close_mysql_handle(mysql_handle);
222+
221223
if (__open_mysql_handle((ACL_DB_POOL_MYSQL*) handle->parent,
222224
mysql_handle, db_info) == NULL)
223225
{
@@ -226,7 +228,6 @@ int sane_mysql_reopen(ACL_DB_HANDLE *handle)
226228
mysql_handle->connection = myconn_saved;
227229
return (-1);
228230
}
229-
__close_mysql_handle(mysql_handle);
230231
return (0);
231232
}
232233

0 commit comments

Comments
 (0)