summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 43914a0003d..9ba31a0ff83 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1190,7 +1190,8 @@ mysqld_show_create_get_fields(THD *thd, TABLE_LIST *table_list,
goto exit;
}
else if (lex->table_type == TABLE_TYPE_SEQUENCE &&
- table_list->table->s->table_type != TABLE_TYPE_SEQUENCE)
+ (!table_list->table ||
+ table_list->table->s->table_type != TABLE_TYPE_SEQUENCE))
{
my_error(ER_NOT_SEQUENCE, MYF(0),
table_list->db.str, table_list->table_name.str);