Bug #112890 Invalid function signature for mysql_stmt_bind_named_param()
Submitted: 31 Oct 2023 6:43 Modified: 31 Oct 2023 11:34
Reporter: Sebastien FLAESCH Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / C Documentation Severity:S3 (Non-critical)
Version:8.2.0 OS:Any
Assigned to: CPU Architecture:Any

[31 Oct 2023 6:43] Sebastien FLAESCH
Description:
The syntax diagram of mysql_stmt_bind_named_param() is wrong, it shows 5 parameters with

MYSQL *mysql

as first parameter, while the real function signature has 4 params:

bool STDCALL mysql_stmt_bind_named_param(MYSQL_STMT *stmt, MYSQL_BIND *binds,
                                         unsigned n_params, const char **names);

How to repeat:
Read the doc ;-)

Suggested fix:
Remove "MYSQL *mysql," from the parameter list.
[31 Oct 2023 6:57] Sebastien FLAESCH
By the way, it would be nice to clarify if the "names" parameter of mysql_stmt_bind_named_param() can be NULL.

Looking at the source code libmysql/libmysql.cc, I think it can.
[31 Oct 2023 7:17] MySQL Verification Team
Hello Sebastien FLAESCH,

Thank you for the report and feedback!

Thanks,
Umesh
[31 Oct 2023 10:39] Daniƫl van Eeden
Related: Bug #112895
[31 Oct 2023 11:34] Stefan Hinz
Posted by developer:
 
Fixed. Thanks for reporting!