# Fake ROTATE\_EVENT

When a slave server connects to a MariaDB master server, the first binlog event sent is Fake `ROTATE_EVENT`. This event is similar to [ROTATE\_EVENT](/docs/server/reference/clientserver-protocol/replication-protocol/rotate_event.md), but it's artificial and its purpose is to tell the replica server which the binlog file name of the master is.

This matters when the replica connects with the GTID option (no filename is given) or when using file and pos with empty file name (usually file='' and pos = 4).

The Event Type is `ROTATE_EVENT` (`0x4`).

{% hint style="info" %}
The fake `ROTATE_EVENT` event is not written in the binlog file. It's created by the master and sent to newly connected replica before [FORMAT\_DESCRIPTION\_EVENT](/docs/server/reference/clientserver-protocol/replication-protocol/format_description_event.md)
{% endhint %}

## Header

* Timestamp set to `0`.
* Event Tye is `ROTATE_EVENT`.
* Next Pos is set to `0`.
* Flags are set to `LOG_ARTIFICIAL_F` (`0x20`).

## Content

The content is the same as [ROTATE\_EVENT](/docs/server/reference/clientserver-protocol/replication-protocol/rotate_event.md).

* pos = the requested pos from slave, usually `4`.
* filename = the master binlog filename.

If it is the first fake rotate event, and the global server variable `@@binlog_checksum` is set to `CRC32`:

* crc32\_checksum (4 Bytes).

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/clientserver-protocol/replication-protocol/fake-rotate_event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
