Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
MariaDB gives a misleading error message if you specify an invalid value for a known system variable on the command line.
Take innodb-log-file-size as an example variable:
Known variable, legal value:
$ sql/mariadbd ... --innodb-log-file-size=1000000
|
...
|
2024-02-15 13:05:18 0 [Note] sql/mariadbd: ready for connections.
|
Known variable, invalid values:
$ sql/mariadbd ... --innodb-log-file-size=-123 # <- Not legal because negative
|
...
|
2024-02-15 13:06:25 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=-123'
|
$ sql/mariadbd ... --innodb-log-file-size=999999999999999999999999999 # <- Not legal because it's too large
|
...
|
2024-02-15 13:06:59 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=999999999999999999999999999'
|
Solution
Instead of reporting this as an "unknown variable", it should be reported as an "invalid value."
The code that produces this misleading error message is at https://github.com/MariaDB/server/blob/e71aecfd308d6093fd693044253518a872994394/mysys/my_getopt.c#L389
Attachments
Issue Links
- is duplicated by
-
MDEV-25386 MDEV-22219 Followup: small inconsistency in option handling
-
- Confirmed
-
- relates to
-
MDEV-26923 MariaDB will abort server startup if it finds an invalid parameter, but won't check for other invalid params
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Description |
MariaDB gives a misleading error message if you specify an invalid value for a known system variable on the command line.
Take {{innodb-log-file-size}} as an example variable: h1. Known variable, legal value: {noformat}$ sql/mariadbd ... --innodb-log-file-size=1000000 ... 2024-02-15 13:05:18 0 [Note] sql/mariadbd: ready for connections.{noformat} Known variable, invalid values: {noformat}$ sql/mariadbd ... --innodb-log-file-size=-123 # <- Not legal because negative ... 2024-02-15 13:06:25 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=-123'{noformat} {noformat}$ sql/mariadbd ... --innodb-log-file-size=999999999999999999999999999 # <- Not legal because it's too large ... 2024-02-15 13:06:59 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=999999999999999999999999999'{noformat} Instead of reporting this as an "unknown variable", it should be reported as an "invalid value." The code that produces this misleading error message is at https://github.com/MariaDB/server/blob/e71aecfd308d6093fd693044253518a872994394/mysys/my_getopt.c#L389 |
MariaDB gives a misleading error message if you specify an invalid value for a known system variable on the command line.
Take {{innodb-log-file-size}} as an example variable: h1. Known variable, legal value: {noformat}$ sql/mariadbd ... --innodb-log-file-size=1000000 ... 2024-02-15 13:05:18 0 [Note] sql/mariadbd: ready for connections.{noformat} h1. Known variable, invalid values: {noformat}$ sql/mariadbd ... --innodb-log-file-size=-123 # <- Not legal because negative ... 2024-02-15 13:06:25 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=-123'{noformat} {noformat}$ sql/mariadbd ... --innodb-log-file-size=999999999999999999999999999 # <- Not legal because it's too large ... 2024-02-15 13:06:59 0 [ERROR] sql/mariadbd: unknown variable 'innodb-log-file-size=999999999999999999999999999'{noformat} h1. Solution Instead of reporting this as an "unknown variable", it should be reported as an "invalid value." The code that produces this misleading error message is at https://github.com/MariaDB/server/blob/e71aecfd308d6093fd693044253518a872994394/mysys/my_getopt.c#L389 |
Labels | beginner-friendly |
Link | This issue relates to MDEV-25386 [ MDEV-25386 ] |
Link | This issue relates to MDEV-25386 [ MDEV-25386 ] |
Link | This issue is duplicated by MDEV-25386 [ MDEV-25386 ] |
Assignee | Andrew Hutchings [ JIRAUSER52179 ] |
Fix Version/s | 10.5.25 [ 29626 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.5.25 [ 29626 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Component/s | Server [ 13907 ] | |
Fix Version/s | 10.5.25 [ 29626 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10002 ] | Closed [ 6 ] |
Fix Version/s | 10.6.18 [ 29627 ] | |
Fix Version/s | 10.11.8 [ 29630 ] | |
Fix Version/s | 11.0.6 [ 29628 ] | |
Fix Version/s | 11.1.5 [ 29629 ] | |
Fix Version/s | 11.2.4 [ 29631 ] |