MCPcopy Create free account
hub / github.com/Tencent/phxsql / set_max_size

Method set_max_size

phx_percona/percona/sql/binlog.cc:6358–6373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6356
6357
6358void MYSQL_BIN_LOG::set_max_size(ulong max_size_arg)
6359{
6360 /*
6361 We need to take locks, otherwise this may happen:
6362 new_file() is called, calls open(old_max_size), then before open() starts,
6363 set_max_size() sets max_size to max_size_arg, then open() starts and
6364 uses the old_max_size argument, so max_size_arg has been overwritten and
6365 it's like if the SET command was never run.
6366 */
6367 DBUG_ENTER("MYSQL_BIN_LOG::set_max_size");
6368 mysql_mutex_lock(&LOCK_log);
6369 if (is_open())
6370 max_size= max_size_arg;
6371 mysql_mutex_unlock(&LOCK_log);
6372 DBUG_VOID_RETURN;
6373}
6374
6375
6376void MYSQL_BIN_LOG::signal_update()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected