@@ -1483,24 +1483,25 @@ void update_variable_source(const char* opt_name, const char* value)
1483
1483
}
1484
1484
1485
1485
std::map<string, enum_variable_source>::iterator it= default_paths.find (path);
1486
- my_variable_sources source;
1487
1486
if (it != default_paths.end ())
1488
1487
{
1488
+ my_variable_sources source;
1489
+ std::pair<std::map<string, my_variable_sources>::iterator,bool > ret;
1490
+
1489
1491
source.m_config_file_name = path;
1490
1492
source.m_source = it->second ;
1493
+ ret= variables_hash.insert (std::pair<string,
1494
+ my_variable_sources>(var_name, source));
1495
+ /*
1496
+ If value exists replace it with new path. ex: if there exists
1497
+ same variables in my.cnf and mysqld-auto.cnf and specified in
1498
+ command line options, then final entry into this hash will be
1499
+ option name as key and mysqld-auto.cnf file path + PERSISTED
1500
+ as value.
1501
+ */
1502
+ if (ret.second == false )
1503
+ variables_hash[var_name]= source;
1491
1504
}
1492
-
1493
- std::pair<std::map<string, my_variable_sources>::iterator,bool > ret;
1494
- ret= variables_hash.insert (std::pair<string, my_variable_sources>(var_name, source));
1495
- /*
1496
- If value exists replace it with new path. ex: if there exists
1497
- same variables in my.cnf and mysqld-auto.cnf and specified in
1498
- command line options, then final entry into this hash will be
1499
- option name as key and mysqld-auto.cnf file path + PERSISTED
1500
- as value.
1501
- */
1502
- if (ret.second == false )
1503
- variables_hash[var_name]= source;
1504
1505
}
1505
1506
1506
1507
/* *
0 commit comments