MySQL 9.4 C API Developer Guide / ... / C API Basic Interface / C API Basic Function Descriptions / mysql_warning_count()
unsigned intmysql_warning_count(MYSQL *mysql)Returns the number of errors, warnings, and notes generated during execution of the previous SQL statement.