1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Ensure we don't assert with debug binaries if SHOW INNODB STATUS returns with an error.

sql/handler.cc:
  SHOW INNODB STATUS sometimes returns 0 even if it has generated an error.
  This code is here to catch it until InnoDB some day is fixed.
storage/innobase/handler/ha_innodb.cc:
  Catch at least one of the possible errors from SHOW INNODB STATUS to provide a correct return code.
storage/xtradb/handler/ha_innodb.cc:
  Catch at least one of the possible errors from SHOW INNODB STATUS to provide a correct return code.
support-files/my-huge.cnf.sh:
  Fixed typo
This commit is contained in:
Michael Widenius
2012-08-20 22:54:15 +03:00
parent ee27b50ff8
commit 75e8ce6d73
4 changed files with 17 additions and 9 deletions

View File

@@ -4800,10 +4800,14 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
db_type->show_status(db_type, thd, stat_print, stat) ? 1 : 0;
}
if (!result)
/*
We also check thd->is_error() as Innodb may return 0 even if
there was an error.
*/
if (!result && !thd->is_error())
my_eof(thd);
else if (!thd->is_error())
my_error(ER_GET_ERRNO, MYF(0), 0);
my_error(ER_GET_ERRNO, MYF(0), errno);
return result;
}