# CRC32C

{% hint style="info" %}
`CRC32C` is available from MariaDB [10.8](/docs/release-notes/community-server/old-releases/10.8/what-is-mariadb-108.md).
{% endhint %}

`CRC32C` is used to compute a cyclic redundancy check (CRC) value using the Castagnoli polynomial.

## Syntax

```sql
CRC32C([par,]expr)
```

## Description

MariaDB has always included a native unary function [CRC32()](/docs/server/reference/sql-functions/numeric-functions/crc32.md) that computes the CRC-32 of a string using the ISO 3309 polynomial that used by zlib and many others.

InnoDB and MyRocks use a different polynomial, which was implemented in SSE4.2 instructions that were introduced in the Intel Nehalem microarchitecture. This is commonly called CRC-32C (Castagnoli).

The CRC32C function uses the Castagnoli polynomial.

This allows `SELECT…INTO DUMPFILE` to be used for the creation of files with valid checksums, such as a logically empty InnoDB redo log file`ib_logfile0` corresponding to a particular log sequence number.

The optional parameter allows the checksum to be computed in pieces:\
CRC32C('MariaDB')=CRC32C(CRC32C('Maria'),'DB').

## Examples

```sql
SELECT CRC32C('MariaDB');
+-------------------+
| CRC32C('MariaDB') |
+-------------------+
|         809606978 |
+-------------------+

SELECT CRC32C(CRC32C('Maria'),'DB');
+------------------------------+
| CRC32C(CRC32C('Maria'),'DB') |
+------------------------------+
|                    809606978 |
+------------------------------+
```

<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/sql-functions/numeric-functions/crc32c.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.
