1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

bzr merge -rtag:mariadb-10.0.14 maria/10.0/

This commit is contained in:
Nirbhay Choubey
2014-09-28 20:43:56 -04:00
1725 changed files with 61215 additions and 76409 deletions

View File

@ -174,18 +174,21 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
*/
tmp_write_to_binlog= 0;
mysql_mutex_lock(&LOCK_active_mi);
if (!(mi= (master_info_index->
get_master_info(&connection_name,
Sql_condition::WARN_LEVEL_ERROR))))
if (master_info_index)
{
result= 1;
}
else
{
mysql_mutex_lock(&mi->data_lock);
if (rotate_relay_log(mi))
*write_to_binlog= -1;
mysql_mutex_unlock(&mi->data_lock);
if (!(mi= (master_info_index->
get_master_info(&connection_name,
Sql_condition::WARN_LEVEL_ERROR))))
{
result= 1;
}
else
{
mysql_mutex_lock(&mi->data_lock);
if (rotate_relay_log(mi))
*write_to_binlog= -1;
mysql_mutex_unlock(&mi->data_lock);
}
}
mysql_mutex_unlock(&LOCK_active_mi);
#endif
@ -357,22 +360,24 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
Master_info *mi;
tmp_write_to_binlog= 0;
mysql_mutex_lock(&LOCK_active_mi);
if (!(mi= (master_info_index->
get_master_info(&lex_mi->connection_name,
Sql_condition::WARN_LEVEL_ERROR))))
if (master_info_index)
{
result= 1;
}
else if (reset_slave(thd, mi))
{
/* NOTE: my_error() has been already called by reset_slave(). */
result= 1;
}
else if (mi->connection_name.length && thd->lex->reset_slave_info.all)
{
/* If not default connection and 'all' is used */
master_info_index->remove_master_info(&mi->connection_name);
if (!(mi= (master_info_index->
get_master_info(&lex_mi->connection_name,
Sql_condition::WARN_LEVEL_ERROR))))
{
result= 1;
}
else if (reset_slave(thd, mi))
{
/* NOTE: my_error() has been already called by reset_slave(). */
result= 1;
}
else if (mi->connection_name.length && thd->lex->reset_slave_info.all)
{
/* If not default connection and 'all' is used */
master_info_index->remove_master_info(&mi->connection_name);
}
}
mysql_mutex_unlock(&LOCK_active_mi);
}