[MDEV-25386] MDEV-22219 Followup: small inconsistency in option handling Created: 2021-04-12  Updated: 2023-09-19

Status: Confirmed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.6
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-22219 negative values on system variables l... Closed

 Description   

danblack Thank you for the patch on MDEV-22219. The current outcome is now:

10.6.0 f74704c7d963ddcd1109843a5861c6bd76409c8d (Debug)

2021-04-12 11:13:10 0 [ERROR] Incorrect unsigned value: '-1' for innodb-buffer-pool-size
2021-04-12 11:13:10 0 [Warning] option 'innodb-buffer-pool-size': unsigned value 0 adjusted to 5242880
2021-04-12 11:13:10 0 [ERROR] /test/MD120421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld: Error while setting value '-1' to 'innodb-buffer-pool-size'
2021-04-12 11:13:10 0 [ERROR] Parsing options for plugin 'InnoDB' failed.
2021-04-12 11:13:10 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-04-12 11:13:10 0 [ERROR] /test/MD120421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld: unknown variable 'innodb-buffer-pool-size=-1'
2021-04-12 11:13:10 0 [ERROR] Aborting

Note how it seems to set the variable to 0 ("unsigned value 0" as per the warning), and subsequently adjusts it to 5242880. However, the server still aborts due to a unknown variable, whereas if one uses =0 at the command line, only this warning is given (and the server starts fine):

10.6.0 f74704c7d963ddcd1109843a5861c6bd76409c8d (Debug)

2021-04-12 11:15:42 0 [Warning] option 'innodb-buffer-pool-size': unsigned value 0 adjusted to 5242880

Proposed fix (solution 1): do not provide the "unsigned value ... adjusted" warning when negative values are used (and perhaps leave off or improve the text of the "unknown variable" error).

Solution 1:

2021-04-12 11:13:10 0 [ERROR] Incorrect unsigned value: '-1' for innodb-buffer-pool-size
2021-04-12 11:13:10 0 [ERROR] /test/MD120421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld: Error while setting value '-1' to 'innodb-buffer-pool-size'
2021-04-12 11:13:10 0 [ERROR] Parsing options for plugin 'InnoDB' failed.
2021-04-12 11:13:10 0 [ERROR] Aborting  
# Server terminates

Alternatively (solution 2): provide warning, set variable to 0, then to 5242880, then allow startup as per normal. Or, alternatively,

Solution 2:

2021-04-12 11:13:10 0 [Warning] Incorrect unsigned value: '-1' for innodb-buffer-pool-size
2021-04-12 11:13:10 0 [Warning] option 'innodb-buffer-pool-size': unsigned value 0 adjusted to 5242880
# Server starts

It would seem that solution 1 is most in line with the idea of countering negative values passed to options.


Generated at Thu Feb 08 09:37:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.