From fe560da59f655ce10077dead04aac967e94f845d Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Fri, 2 May 2003 22:12:15 +0200 Subject: [PATCH] avoid sigsegv when open_ltable() fails in REPAIR ... USE_FRM --- sql/sql_table.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 94b37e164e7..745d9ea1084 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1049,6 +1049,11 @@ static int prepare_for_repair(THD* thd, TABLE_LIST* table, { DBUG_ENTER("prepare_for_repair"); + if (!table->table) + { + DBUG_RETURN(send_check_errmsg(thd, table, "repair", "table is read-only or does not exists")); + } + if (!(check_opt->sql_flags & TT_USEFRM)) { DBUG_RETURN(0);