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

Documentation issues with mariadb_get_infov

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The mariadb_get_infov documentation doesn't make it version clear what should be a pointer and what should be a pointer to a pointer.

      https://mariadb.com/kb/en/mariadb_get_infov/

      For example:
      "MARIADB_CONNECTION_SCHEMA: Retrieves the current schema.
      Parameter type: const char*. "

      This you would use:

      const char *db = NULL;
      mariadb_get_infov(maria, MARIADB_CONNECTION_SCHEMA, &db);
      

      This makes it a const char **, but:

      "MARIADB_CONNECTION_MARIADB_CHARSET_INFO: Retrieves character set information for given connection.
      Parameter type: const MY_CHARSET_INFO *. "

      For this you would do:

      MY_CHARSET_INFO charset;
      mariadb_get_infov(maria, MARIADB_CONNECTION_MARIADB_CHARSET_INFO, &charset);
      

      This makes it a MY_CHARSET_INFO*.

      I think for consistency the const char* ones should say const char**.

      In addition one of the examples on that page is missing a brace for void.

      Attachments

        Activity

          People

            georg Georg Richter
            LinuxJedi Andrew Hutchings (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.