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!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.