Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25386

MDEV-22219 Followup: small inconsistency in option handling

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6
    • 10.6
    • Server
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.