MySQL 5.7 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. For information about the latter, see Section 6.2, “C API Prepared Statement 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 interactively view the MYSQL_FIELD member values for result sets, invoke the mysql command with the --column-type-info option and execute some sample queries.