Hi Bar,
2 things I'd like to change:
+typedef struct st_mariadb_metadata_string
+{
+ const char *str;
+ size_t length;
+} MARIADB_FIELD_METADATA_STRING;
We already have MYSQL_LEX_STRING for dynamic columns and MARIADB_STRING for replication API.
I think we should just move MARIADB_STRING from mariadb_rpl.h to mysql.h and use it instead.
+
+
+MARIADB_FIELD_METADATA_STRING
+ mariadb_field_metadata_attr(const MYSQL_FIELD *field,
+ enum mariadb_field_metadata_attr_t type);
I think we should have a more general function, so that we don't need to add a new function when
we need to extend MYSQL_FIELD (but it can be used also for retrieving values from other members of MYSQL_FIELD):
enum mariadb_field_info_type {
FIELD_INFO_DATA_TYPE_NAME,
FIELD_INFO_DATA_TYPE_FORMAT
/* Later I can add
FIELD_INFO_CATALOG,
FIELD_INFO_TABLE,
..
*/
}
my_bool STDCALL mariadb_get_field_info(const MYSQL_FIELD *field,
enum mariadb_field_info_type,
void *arg, ..)
We have a similiar function in mariadb_lib.c: mariadb_get_infov():
Also the function needs to be added to the MARIADB_SYMBOLS in libmariadb/CMakeLists.txt
Otherwise it looks ok!
/Georg