1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Added handlerton flag to make storage engines invisable via flag.

mysql-test/r/ps_1general.result:
  Remove binlog from visable engine list.
sql/handler.h:
  Added documentation to HTON's
sql/log.cc:
  binlog now has hidden flag show that it does now show up in show storage engine list.
sql/sql_show.cc:
  Flag removes engines from view in show storage engines
This commit is contained in:
unknown
2005-11-10 08:24:21 -08:00
parent 75fab5146f
commit fca8f01abc
4 changed files with 17 additions and 14 deletions

View File

@ -70,17 +70,20 @@ bool mysqld_show_storage_engines(THD *thd)
handlerton **types;
for (types= sys_table_types; *types; types++)
{
protocol->prepare_for_resend();
protocol->store((*types)->name, system_charset_info);
const char *option_name= show_comp_option_name[(int) (*types)->state];
if (!((*types)->flags & HTON_HIDDEN))
{
protocol->prepare_for_resend();
protocol->store((*types)->name, system_charset_info);
const char *option_name= show_comp_option_name[(int) (*types)->state];
if ((*types)->state == SHOW_OPTION_YES &&
!my_strcasecmp(system_charset_info, default_type_name, (*types)->name))
option_name= "DEFAULT";
protocol->store(option_name, system_charset_info);
protocol->store((*types)->comment, system_charset_info);
if (protocol->write())
DBUG_RETURN(TRUE);
if ((*types)->state == SHOW_OPTION_YES &&
!my_strcasecmp(system_charset_info, default_type_name, (*types)->name))
option_name= "DEFAULT";
protocol->store(option_name, system_charset_info);
protocol->store((*types)->comment, system_charset_info);
if (protocol->write())
DBUG_RETURN(TRUE);
}
}
send_eof(thd);
DBUG_RETURN(FALSE);