# ANNOTATE\_ROWS\_EVENT

`ANNOTATE_ROWS_EVENT` events accompany row events and describe the query which caused the row event.

You can enable this with [--binlog-annotate-row-events](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md) (default on).

In the binary log, each `ANNOTATE_ROWS` event precedes the corresponding Table map event.

For additional information refer to the [annotate\_rows\_log\_event](/docs/server/clients-and-utilities/logging-tools/mariadb-binlog/annotate_rows_log_event.md) documentation.

{% hint style="info" %}
The master server sends `ANNOTATE_ROWS_EVENT` events only if the replica server connects with the `BINLOG_SEND_ANNOTATE_ROWS_EVENT` flag (value is 2) in the `COM_BINLOG_DUMP` replica registration phase.
{% endhint %}

## Header

* Event Type is 160 (`0xa0`).

## Fields

* [string\<EOF>](/docs/server/reference/clientserver-protocol/protocol-data-types.md#fixed-length-bytes) The SQL statement (not null-terminated).

## Complete Example with CRC32

```
ee b7 15 5a a0 01 00 00  00 36 00 00 00 80 0b 00  ...Z.....6......
00 00 00 69 6e 73 65 72  74 20 69 6e 74 6f 20 74  ...insert into t
65 73 74 2e 74 34 20 76  61 6c 75 65 73 28 31 30  est.t4 values(10
30 29 6d 4c 42 33                                 0)mLB3
```

<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/annotate_rows_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.
