diff options
author | Michael Widenius <monty@askmonty.org> | 2012-08-20 22:54:15 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-08-20 22:54:15 +0300 |
commit | 75e8ce6d7316900e3b9431e9d50889fe00d2928c (patch) | |
tree | 329b91b3158987576db3ab2173b156fd63ed95e9 /sql/handler.cc | |
parent | ee27b50ff8d8a80ca15cb33b4a8a0ed39aad772d (diff) | |
download | mariadb-git-75e8ce6d7316900e3b9431e9d50889fe00d2928c.tar.gz |
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
Diffstat (limited to 'sql/handler.cc')
-rw-r--r-- | sql/handler.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index b5c9716bbbf..9ded738055e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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; } |