MySQL 8.0 C API Developer Guide

5.2 C API Basic Data Structures

This section describes C API data structures other than those used for prepared statements, the asynchronous interface, or the replication stream interface. For information about those, see Section 6.2, “C API Prepared Statement Data Structures”, Section 7.2, “C API Asynchronous Interface Data Structures”, and Section 10.2, “C API Binary Log Data Structures”.

The MYSQL_FIELD structure contains the members described in the following list. The definitions apply primarily for columns of result sets such as those produced by SELECT statements. MYSQL_FIELD structures are also used to provide metadata for OUT and INOUT parameters returned from stored procedures executed using prepared CALL statements. For such parameters, some of the structure members have a meaning different from the meaning for column values.


To view the MYSQL_FIELD member values for result sets interactively, start the mysql client with the --column-type-info option, then execute some sample queries.