mysql\_info(3) MariaDB Connector/C mysql\_info(3)

## [Name](#Name)

mysql\_info - provides information about the last executed statement

## [Synopsis](#Synopsis)

```
#include <mysql.h>
const char * mysql_info(MYSQL * mysql);
    
```

## [Description](#Description)

The mysql\_info() function returns a string providing information about the last statement executed.

## [Parameter](#Parameter)

•

mysql - a connection identifier, which was previously allocated by [**mysql\_init(3)**](/man/os/mariadb-13.1/mysql_init.3) and connected by [**mysql\_real\_connect(3)**](/man/os/mariadb-13.1/mysql_real_connect.3).

## [Notes](#Notes)

Statements which do not fall into one of the preceding formats are not supported (e.g. SELECT). In these situations mysql\_info() will return an empty string.

## [Return value](#Return_value)

Zero terminated information string. The information depends on statement type:

Query type Example result string INSERT INTO...SELECT... Records: 100 Duplicates: 0 Warnings: 0 INSERT INTO...VALUES (...),(...),(...) Records: 3 Duplicates: 0 Warnings: 0 LOAD DATA INFILE Records: 1 Deleted: 0 Skipped: 0 Warnings: 0 ALTER TABLE ... Records: 3 Duplicates: 0 Warnings: 0 UPDATE ... Rows matched: 40 Changed: 40 Warnings: 0

## [See also](#See_also)

•

[**mysql\_affected\_rows(3)**](/man/os/mariadb-13.1/mysql_affected_rows.3)

•

[**mysql\_warning\_count(3)**](/man/os/mariadb-13.1/mysql_warning_count.3)

Version 3.4

---

Document: mysql_info(3) from mariadb-13.1 13.1.1-r2 (Chainguard OS)
