mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
ha_ndbcluster.cc:
Bug #25668 ndb: mysqld may core if cluster disconnected -- pTrans may be NULL, remove not needed usage of handler::ndb_err
This commit is contained in:
parent
88bc918be6
commit
1d6fe0ffaa
1 changed files with 9 additions and 16 deletions
|
@ -6109,23 +6109,7 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,
|
|||
|
||||
DBUG_RETURN(0);
|
||||
retry:
|
||||
if(report_error)
|
||||
{
|
||||
if (file)
|
||||
{
|
||||
reterr= file->ndb_err(pTrans);
|
||||
}
|
||||
else
|
||||
{
|
||||
const NdbError& tmp= error;
|
||||
ERR_PRINT(tmp);
|
||||
reterr= ndb_to_mysql_error(&tmp);
|
||||
}
|
||||
}
|
||||
else
|
||||
reterr= error.code;
|
||||
|
||||
if (pTrans)
|
||||
{
|
||||
ndb->closeTransaction(pTrans);
|
||||
pTrans= NULL;
|
||||
|
@ -6135,6 +6119,15 @@ retry:
|
|||
my_sleep(retry_sleep);
|
||||
continue;
|
||||
}
|
||||
if(report_error)
|
||||
{
|
||||
const NdbError& tmp= error;
|
||||
ERR_PRINT(tmp);
|
||||
reterr= ndb_to_mysql_error(&tmp);
|
||||
}
|
||||
else
|
||||
reterr= error.code;
|
||||
|
||||
break;
|
||||
} while(1);
|
||||
DBUG_PRINT("exit", ("failed, reterr: %u, NdbError %u(%s)", reterr,
|
||||
|
|
Loading…
Add table
Reference in a new issue