Skip to content

Commit

Permalink
MDEV-32983 cosmetic improvement on path separator near ib_buffer_pool
Browse files Browse the repository at this point in the history
A mix of path separators looks odd.

  InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data/ib_buffer_pool

This was changed in cf552f5

Both forward slashes and backward slashes work on Windows. We do not
use \\?\ names.

So we improve the consistent look of it so it doesn't look like a bug.

Normalize, in this case, the path separator to \ for making the filename.

Reported thanks to Github user @celestinoxp.

Closes: ApacheFriends/xampp-build#33
Reviewed by: Marko Mäkelä and Vladislav Vaintroub
  • Loading branch information
grooverdan committed Jan 22, 2024
1 parent 3a33ae8 commit 0c23f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/innobase/buf/buf0dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static void buf_dump_generate_path(char *path, size_t path_size)
char buf[FN_REFLEN];

mysql_mutex_lock(&LOCK_global_system_variables);
snprintf(buf, sizeof buf, "%s/%s", get_buf_dump_dir(),
snprintf(buf, sizeof buf, "%s" FN_ROOTDIR "%s", get_buf_dump_dir(),
srv_buf_dump_filename);
mysql_mutex_unlock(&LOCK_global_system_variables);

Expand Down Expand Up @@ -214,7 +214,7 @@ static void buf_dump_generate_path(char *path, size_t path_size)
format = "%s%s";
break;
default:
format = "%s/%s";
format = "%s" FN_ROOTDIR "%s";
}

snprintf(path, path_size, format,
Expand Down

0 comments on commit 0c23f84

Please sign in to comment.