From c42a608d6f35f2509b8d37afe853cfb18fd4305b Mon Sep 17 00:00:00 2001 From: "gluh@eagle.intranet.mysql.r18.ru" <> Date: Tue, 14 Feb 2006 12:52:38 +0400 Subject: [PATCH] Bug#16591 Partitions: crash using information_schema.partitions Bug#16695 Reading I_S.PARTITIONS with pre-5.1.6 partitioned tables crashes server issue a warning in case of error during table opening --- sql/sql_show.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 387e5e4fcfb..9ce6b72b318 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3583,23 +3583,23 @@ static int get_schema_partitions_record(THD *thd, struct st_table_list *tables, String tmp_str; TIME time; TABLE *show_table= tables->table; - handler *file= show_table->file; + handler *file; #ifdef WITH_PARTITION_STORAGE_ENGINE - partition_info *part_info= show_table->part_info; + partition_info *part_info; #endif DBUG_ENTER("get_schema_partitions_record"); if (res) { -#ifdef WITH_PARTITION_STORAGE_ENGINE - if (part_info) + if (!tables->view) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, thd->net.last_errno, thd->net.last_error); -#endif thd->clear_error(); DBUG_RETURN(0); } + file= show_table->file; #ifdef WITH_PARTITION_STORAGE_ENGINE + part_info= show_table->part_info; if (part_info) { partition_element *part_elem;