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

Method append_event

phx_percona/percona/sql/binlog.cc:5311–5334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5309
5310
5311bool MYSQL_BIN_LOG::append_event(Log_event* ev, Master_info *mi)
5312{
5313 DBUG_ENTER("MYSQL_BIN_LOG::append");
5314
5315 // check preconditions
5316 DBUG_ASSERT(log_file.type == SEQ_READ_APPEND);
5317 DBUG_ASSERT(is_relay_log);
5318
5319 // acquire locks
5320 mysql_mutex_lock(&LOCK_log);
5321
5322 // write data
5323 bool error = false;
5324 if (ev->write(&log_file) == 0)
5325 {
5326 bytes_written+= ev->data_written;
5327 error= after_append_to_relay_log(mi);
5328 }
5329 else
5330 error= true;
5331
5332 mysql_mutex_unlock(&LOCK_log);
5333 DBUG_RETURN(error);
5334}
5335
5336
5337bool MYSQL_BIN_LOG::append_buffer(const char* buf, uint len, Master_info *mi)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected