summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-05-02 22:12:15 +0200
committerunknown <serg@serg.mylan>2003-05-02 22:12:15 +0200
commit870397892be8a35afdb343c209be91cba117cee6 (patch)
treec66d0bb0a3bdc00fa06b4825185f3f11da5beaa8 /sql/sql_table.cc
parentedde138b30dc970931e16eca78255f18e7101c10 (diff)
downloadmariadb-git-870397892be8a35afdb343c209be91cba117cee6.tar.gz
avoid sigsegv when open_ltable() fails in REPAIR ... USE_FRM
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 5 insertions, 0 deletions
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);