Disable cleanup if mode is read only

Former-commit-id: 8e0119a612c7da87f77c27453144d6666896bdf9
This commit is contained in:
zhiru 2019-07-03 14:27:19 +08:00
parent f00ca24f1b
commit cba93cf25d

View File

@ -1814,7 +1814,9 @@ namespace meta {
MySQLMetaImpl::~MySQLMetaImpl() {
// std::lock_guard<std::recursive_mutex> lock(mysql_mutex);
CleanUp();
if (mode_ != Options::MODE::READ_ONLY) {
CleanUp();
}
}
} // namespace meta