Bug #110519 Wrong Allowed Values range for connection_memory_chunk_size in documentation.
Submitted: 28 Mar 2023 0:31 Modified: 28 Mar 2023 6:48
Reporter: Pranay Motupalli Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.28-8.0.32 OS:Any
Assigned to: CPU Architecture:Any

[28 Mar 2023 0:31] Pranay Motupalli
Description:
Wrong Allowed Values range for connection_memory_chunk_size in documentation.

https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_connection_mem...

From Code:
########

https://github.com/mysql/mysql-server/blob/mysql-8.0.32/sql/sys_vars.cc#L3475

static Sys_var_ulong Sys_connection_memory_chunk_size(
    "connection_memory_chunk_size",
    "Chunk size regulating frequency of updating the global memory counter",
    SESSION_VAR(conn_mem_chunk_size), CMD_LINE(REQUIRED_ARG),
    VALID_RANGE(1, 1024 * 1024 * 512), DEFAULT(8912), BLOCK_SIZE(1),
    NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_session_admin),
    ON_UPDATE(nullptr));

How to repeat:
mysql> select @@version;
+-----------+
| @@version |
+-----------+
| 8.0.28    |
+-----------+
1 row in set (0.00 sec)

mysql> set global  connection_memory_chunk_size=0;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-------------------------------------------------------------+
| Level   | Code | Message                                                     |
+---------+------+-------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect connection_memory_chunk_size value: '0' |
+---------+------+-------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show global variables like 'connection_memory_chunk_size';
+------------------------------+-------+
| Variable_name                | Value |
+------------------------------+-------+
| connection_memory_chunk_size | 1     |
+------------------------------+-------+
1 row in set (0.00 sec)

Suggested fix:
Fix the documentation
[28 Mar 2023 6:48] MySQL Verification Team
Hello Pranay,

Thank you for the report and feedback.

regards,
Umesh
[28 Mar 2023 13:06] Jon Stephens
WL#13458, in which this variable was implemented, states:

     Note: This variable allows to control frequency of 
     updating the global memory counter. **0 means that 
     global memory counter won't be updated.**

Therefore, this is a software bug which has existed since implementation.

Updating category, etc. to align with this.