From 41bd9dfe618023386afef10e34e97704a10efb51 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 1 Apr 2010 15:39:56 +0400 Subject: [PATCH] Applying InnoDB snapshot Detailed revision comments: r6608 | marko | 2010-02-09 11:02:37 +0200 (Tue, 09 Feb 2010) | 1 line branches/zip: ha_innobase::add_index(): Check for !innodb_table. --- storage/innodb_plugin/handler/handler0alter.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/innodb_plugin/handler/handler0alter.cc b/storage/innodb_plugin/handler/handler0alter.cc index 47999ae37f8..fbbcfd6149b 100644 --- a/storage/innodb_plugin/handler/handler0alter.cc +++ b/storage/innodb_plugin/handler/handler0alter.cc @@ -656,6 +656,11 @@ ha_innobase::add_index( innodb_table = indexed_table = dict_table_get(prebuilt->table->name, FALSE); + if (UNIV_UNLIKELY(!innodb_table)) { + error = HA_ERR_NO_SUCH_TABLE; + goto err_exit; + } + /* Check if the index name is reserved. */ if (innobase_index_name_is_reserved(trx, key_info, num_of_keys)) { error = -1;