Skip to content

Commit 323175c

Browse files
author
Tatiana Azundris Nuernberg
committed
Bug#37521401: server not coming up for upgrade from 9.2.0 to 9.3.0
Issue 36890891 ("If SQL in constraint fails, table becomes unopenable / unfixable") added functionality that on server upgrade looks at all tables, and for each one that has constraints, default expressions, partitioning, or virtual columns, we try to open it (to see whether we still can, so we can detect tables that can no longer be opened due to changes in SQL syntax). Opening will however also fail if the storage engine for that table is not available yet. This patch therefore restricts the above feature to InnoDB tables. (backport to 8.0, 8.4) Change-Id: I1d2b881b2b737ed2d83625cddf301230b4266dfb
1 parent 684bca6 commit 323175c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/dd/impl/upgrade/server.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,10 @@ static bool check_table_funs(THD *thd, std::unique_ptr<Schema> &schema,
656656

657657
// Function called on each table to validate it.
658658
auto process_table = [&](std::unique_ptr<dd::Table> &table) {
659+
// Skip non-InnoDB tables as their search engine may not be available yet.
660+
if (my_strcasecmp(system_charset_info, table->engine().c_str(), "InnoDB"))
661+
return false;
662+
659663
// Are SQL functions used in table def (defaults, virtual columns, etc.)?
660664
if (dd::uses_functions(table.get(), schema->name().c_str())) {
661665
Open_table_context ot_ctx(

0 commit comments

Comments
 (0)