Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-395

Dashes and underscores are not interchangeable in options in my.cnf

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.8
    • 3.1.1
    • None
    • None

    Description

      When the server parses my.cnf or other option/configuration files, dashes and underscores are interchangeable in options:

      Dashes (-) and underscores (_) in options are interchangeable.

      https://mariadb.com/kb/en/library/configuring-mariadb-with-option-files/#option-file-syntax

      This is not the case with MariaDB Connector/C:

      Unlike with the server, dashes (-) and underscores (_) in options are not interchangeable for MariaDB Connector/C. Options must be specified exactly as they are defined.

      https://mariadb.com/kb/en/library/configuring-mariadb-connectorc-with-option-files/#option-file-syntax

      I think it would be pretty easy to fix this.

      One potential fix would be to modify the _mariadb_set_conf_option function, so that it makes a copy of the config_option C-string argument and replaces all underscores (_) with dashes (-) before doing the strcmp:

      https://github.com/MariaDB/mariadb-connector-c/blob/1285dc72a043f09d9a51abcfc3a4fbfb5192067e/libmariadb/mariadb_lib.c#L696

      Attachments

        Issue Links

          Activity

            People

              georg Georg Richter
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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