summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/handler.cc8
-rw-r--r--storage/innobase/handler/ha_innodb.cc8
-rw-r--r--storage/xtradb/handler/ha_innodb.cc8
-rw-r--r--support-files/my-huge.cnf.sh2
4 files changed, 17 insertions, 9 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;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 474c157fbc7..f0bc262327a 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -9576,6 +9576,7 @@ innodb_show_status(
const long MAX_STATUS_SIZE = 1048576;
ulint trx_list_start = ULINT_UNDEFINED;
ulint trx_list_end = ULINT_UNDEFINED;
+ bool res;
DBUG_ENTER("innodb_show_status");
DBUG_ASSERT(hton == innodb_hton_ptr);
@@ -9639,12 +9640,13 @@ innodb_show_status(
mutex_exit(&srv_monitor_file_mutex);
- stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name),
- STRING_WITH_LEN(""), str, flen);
+ res= stat_print(thd, innobase_hton_name,
+ (uint) strlen(innobase_hton_name),
+ STRING_WITH_LEN(""), str, flen);
my_free(str);
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(res);
}
/************************************************************************//**
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 8aed19aad3e..8b6cc1912c5 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -10475,6 +10475,7 @@ innodb_show_status(
const long MAX_STATUS_SIZE = 1048576;
ulint trx_list_start = ULINT_UNDEFINED;
ulint trx_list_end = ULINT_UNDEFINED;
+ bool res;
DBUG_ENTER("innodb_show_status");
DBUG_ASSERT(hton == innodb_hton_ptr);
@@ -10538,12 +10539,13 @@ innodb_show_status(
mutex_exit(&srv_monitor_file_mutex);
- stat_print(thd, innobase_hton_name, (uint) strlen(innobase_hton_name),
- STRING_WITH_LEN(""), str, flen);
+ res= stat_print(thd, innobase_hton_name,
+ (uint) strlen(innobase_hton_name),
+ STRING_WITH_LEN(""), str, flen);
my_free(str);
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(res);
}
/************************************************************************//**
diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh
index 896b139273b..4e083488285 100644
--- a/support-files/my-huge.cnf.sh
+++ b/support-files/my-huge.cnf.sh
@@ -121,7 +121,7 @@ server-id = 1
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = @localstatedir@
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
-o#innodb_log_group_home_dir = @localstatedir@
+#innodb_log_group_home_dir = @localstatedir@
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M