diff options
author | serg@serg.mylan <> | 2003-05-02 22:12:15 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2003-05-02 22:12:15 +0200 |
commit | fe560da59f655ce10077dead04aac967e94f845d (patch) | |
tree | c66d0bb0a3bdc00fa06b4825185f3f11da5beaa8 /sql/sql_table.cc | |
parent | 64b0bfcf00c402d9ec1bcc687023432993a17f39 (diff) | |
download | mariadb-git-fe560da59f655ce10077dead04aac967e94f845d.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.cc | 5 |
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); |