Skip to content

Commit

Permalink
Fix exception type and error code. (pingcap#6258) (pingcap#6262)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 8, 2022
1 parent 162227d commit 2f61578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbms/src/Storages/Transaction/SchemaBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,14 +656,14 @@ void SchemaBuilder<Getter, NameMapper>::applyRenameTable(DBInfoPtr new_db_info,
auto new_table_info = getter.getTableInfo(new_db_info->id, table_id);
if (new_table_info == nullptr)
{
throw Exception(fmt::format("miss table id in TiKV {}", table_id));
throw TiFlashException(fmt::format("miss table id in TiKV {}", table_id), Errors::DDL::StaleSchema);
}

auto & tmt_context = context.getTMTContext();
auto storage = tmt_context.getStorages().get(table_id);
if (storage == nullptr)
{
throw Exception(fmt::format("miss table id in Flash {}", table_id));
throw TiFlashException(fmt::format("miss table id in TiFlash {}", table_id), Errors::DDL::MissingTable);
}

applyRenameLogicalTable(new_db_info, new_table_info, storage);
Expand Down

0 comments on commit 2f61578

Please sign in to comment.