[CONC-460] Documentation issues with mariadb_get_infov Created: 2020-03-09  Updated: 2020-03-09

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Andrew Hutchings (Inactive) Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: 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.


Generated at Thu Feb 08 03:05:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.