Bug #117304 Contribution: mysql.h: include plugin_auth_common.h for net_async_status en ...
Submitted: 27 Jan 16:09 Modified: 27 Jan 16:19
Reporter: OCA Admin (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Connection Handling Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[27 Jan 16:09] OCA Admin
Description:
This bug tracks a contribution by Terrence Janas (Github user: tjanas), as described in http://github.com/mysql/mysql-server/pull/590

How to repeat:
See description

Suggested fix:
See contribution code attached
[27 Jan 16:09] OCA Admin
Contribution submitted via Github - mysql.h: include plugin_auth_common.h for net_async_status enum 
(*) Contribution by Terrence Janas (Github tjanas, mysql-server/pull/590): Function declarations in `mysql.h` refer to `enum net_async_status enum` which is defined in `plugin_auth_common.h`

With g++ 9.5.0 under Ubuntu 22.04.1 LTS, the following errors are produced:
```
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_real_connect_nonblocking(
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_send_query_nonblocking(
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_real_query_nonblocking(
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_next_result_nonblocking(MYSQL *mysql);
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_select_db_nonblocking(MYSQL *mysql,
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_free_result_nonblocking(MYSQL_RES *result);
      ^~~~~~~~~~~~~~~~
error: use of enum ‘net_async_status’ without previous declaration
 enum net_async_status STDCALL mysql_fetch_row_nonblocking(MYSQL_RES *res,
      ^~~~~~~~~~~~~~~~
```

This issue was also reported by https://github.com/vincefn/objcryst/issues/48

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_2283277947.txt (text/plain), 640 bytes.

[27 Jan 16:19] MySQL Verification Team
This is now a verified bug.