Skip to content

Commit 56a8acd

Browse files
committed
fix problem of last /
1 parent 1b6b99b commit 56a8acd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage/innobase/handler/handler0alter.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5034,7 +5034,9 @@ prepare_inplace_alter_table_dict(
50345034
goto err_exit;
50355035
}
50365036

5037-
size_t prefixlen= strlen(mysql_data_home) + 1;
5037+
size_t prefixlen= strlen(mysql_data_home);
5038+
if (mysql_data_home[prefixlen-1] != FN_LIBCHAR)
5039+
prefixlen++;
50385040
size_t tablen = altered_table->s->path.length - prefixlen;
50395041
const char* part = ctx->old_table->name.part();
50405042
size_t partlen = part ? strlen(part) : 0;

0 commit comments

Comments
 (0)