summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2008-05-12 12:09:10 +0200
committerunknown <thek@adventure.(none)>2008-05-12 12:09:10 +0200
commit3703bbf6236f0ea9b5181a254f97c88aebc8f54c (patch)
tree42dc393819c3fccbf11f7abfb1835f5a6f381121 /sql/sql_show.cc
parent5908a32eeafa2a0410bd0575d51a423bf73b35f1 (diff)
downloadmariadb-git-3703bbf6236f0ea9b5181a254f97c88aebc8f54c.tar.gz
Bug#35997 Event scheduler seems to let the server crash, if it is embedded.
SHOW commands fail in embedded mode because schema_table array doesn't correspond to enum_schema_tables. This patch implements a dummy implementation of the abstract fill_table function to be used when the event scheduler (or other core feature) isn't part of the build. libmysqld/lib_sql.cc: Fixed type conversion warning. sql/sql_show.cc: Leave entry for EVENTS to keep array consistent but set the fill_table function pointer to a dummy function instead.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 57280f39199..16a0342cb1f 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3898,7 +3898,6 @@ static my_bool iter_schema_engines(THD *thd, plugin_ref plugin,
DBUG_RETURN(0);
}
-
int fill_schema_engines(THD *thd, TABLE_LIST *tables, COND *cond)
{
return plugin_foreach(thd, iter_schema_engines,
@@ -5870,6 +5869,9 @@ bool get_schema_tables_result(JOIN *join,
bool is_subselect= (&lex->unit != lex->current_select->master_unit() &&
lex->current_select->master_unit()->item);
+ /* A value of 0 indicates a dummy implementation */
+ if (table_list->schema_table->fill_table == 0)
+ continue;
/* skip I_S optimizations specific to get_all_tables */
if (thd->lex->describe &&
@@ -6548,6 +6550,9 @@ ST_SCHEMA_TABLE schema_tables[]=
#ifdef HAVE_EVENT_SCHEDULER
{"EVENTS", events_fields_info, create_schema_table,
Events::fill_schema_events, make_old_format, 0, -1, -1, 0, 0},
+#else
+ {"EVENTS", events_fields_info, create_schema_table,
+ 0, make_old_format, 0, -1, -1, 0, 0},
#endif
{"FILES", files_fields_info, create_schema_table,
fill_schema_files, 0, 0, -1, -1, 0, 0},