[Commits] 56a8acd2e90: fix problem of last /
revision-id: 56a8acd2e90c6b9e5f0554e9335590e0427ed2fd (mariadb-10.3.12-53-g56a8acd2e90) parent(s): 1b6b99be24b1757fc7ee06f5dc4c3af0218aedc8 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2019-02-14 11:06:15 +0100 message: fix problem of last / --- storage/innobase/handler/handler0alter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 41607ec589e..16bd8111e98 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -5034,7 +5034,9 @@ prepare_inplace_alter_table_dict( goto err_exit; } - size_t prefixlen= strlen(mysql_data_home) + 1; + size_t prefixlen= strlen(mysql_data_home); + if (mysql_data_home[prefixlen-1] != FN_LIBCHAR) + prefixlen++; size_t tablen = altered_table->s->path.length - prefixlen; const char* part = ctx->old_table->name.part(); size_t partlen = part ? strlen(part) : 0;
participants (1)
-
Oleksandr Byelkin