Bug #107089 Expression value for HASH partitioning
Submitted: 22 Apr 2022 2:27 Modified: 25 Apr 2022 17:05
Reporter: Makoto Oda Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[22 Apr 2022 2:27] Makoto Oda
Description:
In the partitioning types page, it is written as follows.
<https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html>

```
For HASH partitioning, the user-supplied expression must evaluate to an integer value greater than 0.
```

However, when I posted a question about the reason of earlier statement, an respondent Akina confirmed that the evaluated value does not have to be positive integer.

<https://stackoverflow.com/questions/71934558/why-expression-in-the-mysql-hash-partitioning...>

<https://dbfiddle.uk/?rdbms=mysql_8.0&rdbms2=mysql_5.6&fiddle=ce597ff79fd791967c42bd957c208...>

Is the above statement correct? If so, I cannot understand the behavior which Akina and I tested.

How to repeat:
Try an example which Akina created.

<https://dbfiddle.uk/?rdbms=mysql_8.0&rdbms2=mysql_5.6&fiddle=ce597ff79fd791967c42bd957c208...>

Suggested fix:
The statement needs to be fixed as follows:

```
For HASH partitioning, the user-supplied expression must evaluate to an integer value.
```
[22 Apr 2022 4:52] Владислав Сокол
Not "must evaluate to an integer value" but "must evaluate to an integer datatype value". The value can be BIGINT (both signed and unsigned). See. for example, https://dbfiddle.uk/?rdbms=mysql_8.0&rdbms2=mysql_5.6&fiddle=f408475a439603e959722c0107388...
[22 Apr 2022 6:57] MySQL Verification Team
Hello Makoto Oda,

Thank you for the report and feedback.

regards,
Umesh
[25 Apr 2022 17:05] Jon Stephens
Fixed in mysqldoc rev 72990.

The updates should appear in the online documentation soon.

Thanks!