Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work sql/log.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_class.h: merge
This commit is contained in:
commit
a00b1e3a7d
11
sql/log.cc
11
sql/log.cc
@ -2261,12 +2261,17 @@ shutdown the MySQL server and restart it.", name, errno);
|
|||||||
int MYSQL_BIN_LOG::get_current_log(LOG_INFO* linfo)
|
int MYSQL_BIN_LOG::get_current_log(LOG_INFO* linfo)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&LOCK_log);
|
pthread_mutex_lock(&LOCK_log);
|
||||||
strmake(linfo->log_file_name, log_file_name, sizeof(linfo->log_file_name)-1);
|
int ret = raw_get_current_log(linfo);
|
||||||
linfo->pos = my_b_tell(&log_file);
|
|
||||||
pthread_mutex_unlock(&LOCK_log);
|
pthread_mutex_unlock(&LOCK_log);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MYSQL_LOG::raw_get_current_log(LOG_INFO* linfo)
|
||||||
|
{
|
||||||
|
strmake(linfo->log_file_name, log_file_name, sizeof(linfo->log_file_name)-1);
|
||||||
|
linfo->pos = my_b_tell(&log_file);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Move all data up in a file in an filename index file
|
Move all data up in a file in an filename index file
|
||||||
|
@ -1506,10 +1506,14 @@ bool show_binlogs(THD* thd)
|
|||||||
if (protocol->send_fields(&field_list,
|
if (protocol->send_fields(&field_list,
|
||||||
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
|
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
|
|
||||||
|
pthread_mutex_lock(mysql_bin_log.get_log_lock());
|
||||||
mysql_bin_log.lock_index();
|
mysql_bin_log.lock_index();
|
||||||
index_file=mysql_bin_log.get_index_file();
|
index_file=mysql_bin_log.get_index_file();
|
||||||
|
|
||||||
mysql_bin_log.get_current_log(&cur);
|
mysql_bin_log.raw_get_current_log(&cur); // dont take mutex
|
||||||
|
pthread_mutex_unlock(mysql_bin_log.get_log_lock()); // lockdep, OK
|
||||||
|
|
||||||
cur_dir_len= dirname_length(cur.log_file_name);
|
cur_dir_len= dirname_length(cur.log_file_name);
|
||||||
|
|
||||||
reinit_io_cache(index_file, READ_CACHE, (my_off_t) 0, 0, 0);
|
reinit_io_cache(index_file, READ_CACHE, (my_off_t) 0, 0, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user