Bug #44842 "Incorrect arguments to mysql_stmt_execute" at status = mysql_stmt_execute(stmt
Submitted: 13 May 2009 9:45 Modified: 27 Apr 2018 12:44
Reporter: Sveta Smirnova Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:6.0 OS:MacOS (10.4)
Assigned to: CPU Architecture:Any

[13 May 2009 9:45] Sveta Smirnova
Description:
Example at page http://dev.mysql.com/doc/refman/6.0/en/c-api-prepared-call-statements.html does not work.

How to repeat:
Compile the example, then run.

I get error "Incorrect arguments to mysql_stmt_execute" at status =
mysql_stmt_execute(stmt); 

Suggested fix:
Please fix the example.
[14 May 2009 0:29] Paul DuBois
The example definitely works because the example in the manual is taken from known working source code. I will attach the source for the program to the bug report. Please try it on your system.
[14 May 2009 0:30] Paul DuBois
Source for example program

Attachment: ps_call.c (, text), 11.66 KiB.

[14 May 2009 6:37] Sveta Smirnova
Yes, on Linux it works while on Mac does not.
[17 May 2009 22:28] Paul DuBois
On Sveta's system tests/mysql_client_test does not work, either. This is no longer a docs issue. There is something about Sveta's system that causes the failure.
[17 May 2009 22:28] Paul DuBois
Unassigning from myself.
[18 May 2009 19:29] Sveta Smirnova
Real cause was absence of libstdc++.dylib

If compile MySQL with just `./configure` and use gcc not from xCode installation (version 4.4 or 4.1.2) I got error described.

Workaround:

./configure LDFLAGS="-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib"
[3 Jul 2009 10:19] Daniel Fischer
I can't reproduce this with the gcc shipped by Apple as part of Xcode.
[3 Jul 2009 19:12] Sveta Smirnova
Bug is not repeatable with the gcc shipped by Apple as part of Xcode, because it is only repeatable if /Developer/SDKs/MacOSX10.4u.sdk/usr/lib not used in compilation by default. See my comment from May, 18: "Real cause was absence of libstdc++.dylib".

Problem is configure does not report this problem, but I believe it should if one of necessary components is missed.
[27 Apr 2018 12:44] Yngve Svendsen
Posted by developer:
 
Obsolete MySQL and OS versions and unsupported build env.