1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-18 13:54:11 +03:00

Added an exception handler in Tasks around their ioc calls out of paranoia.

This commit is contained in:
Patrick LeBlanc
2019-04-04 15:38:47 -05:00
parent 806bf6365d
commit ac1c5f8aa1
9 changed files with 100 additions and 12 deletions

View File

@@ -42,8 +42,18 @@ bool TruncateTask::run()
#ifdef SM_TRACE
logger->log(LOG_DEBUG,"truncate %s newlength %i.",cmd->filename,cmd->length);
#endif
int err;
int err = ioc->truncate(cmd->filename, cmd->length);
try
{
err = ioc->truncate(cmd->filename, cmd->length);
}
catch (exception &e)
{
logger->log(LOG_DEBUG, "TruncateTask: caught '%s'", e.what());
errno = EIO;
err = -1;
}
if (err)
{
handleError("TruncateTask truncate", errno);