Commit 81d7adb1 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-27075 mysql_upgrade_service.exe - using uninitialized memory 'defaults_file'

Remove section that was trying to rename default-character-set to character-set-server

This seems to be an old workaround for some upgrade warning, which did not
work for some time already, because the ini filename was not initialized.
parent ed0a224b
......@@ -317,9 +317,6 @@ void initiate_mysqld_shutdown()
*/
static void change_service_config()
{
char defaults_file[MAX_PATH];
char default_character_set[64];
char buf[MAX_PATH];
char commandline[3*MAX_PATH + 19];
int i;
......@@ -382,22 +379,6 @@ static void change_service_config()
*/
WritePrivateProfileString("mysqld", "basedir",NULL, props.inifile);
/*
Replace default-character-set with character-set-server, to avoid
"default-character-set is deprecated and will be replaced ..."
message.
*/
default_character_set[0]= 0;
GetPrivateProfileString("mysqld", "default-character-set", NULL,
default_character_set, sizeof(default_character_set), defaults_file);
if (default_character_set[0])
{
WritePrivateProfileString("mysqld", "default-character-set", NULL,
defaults_file);
WritePrivateProfileString("mysqld", "character-set-server",
default_character_set, defaults_file);
}
sprintf(defaults_file_param,"--defaults-file=%s", props.inifile);
sprintf_s(commandline, "\"%s\" \"%s\" \"%s\"", mysqld_path,
defaults_file_param, opt_service);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment