Commit 75e8ce6d authored by Michael Widenius's avatar Michael Widenius

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
parent ee27b50f
......@@ -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;
}
......
......@@ -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);
}
/************************************************************************//**
......
......@@ -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);
}
/************************************************************************//**
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment