MySQL 5.7 C API Developer Guide

Chapter 5 C API Data Structures

This section describes C API data structures other than those used for prepared statements. For information about the latter, see Chapter 9, 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.