diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index fd9a5720e3d..d16e00f4e52 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -5373,7 +5373,7 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb, retry: if(report_error) { - if (file) + if (file && pTrans) { reterr= file->ndb_err(pTrans); }