[ opensips-Patches-2621299 ] Enhance MySQL prepare statment diagnostics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ opensips-Patches-2621299 ] Enhance MySQL prepare statment diagnostics

SourceForge.net
Patches item #2621299, was opened at 2009-02-20 23:15
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2621299&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: modules
>Group: trunk
Status: Open
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Norm Brandinger (norm_brandinger)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Enhance MySQL prepare statment diagnostics

Initial Comment:
Enhance the diagnostics produced then the mysql_stmt_prepare() function fails.

For example, the unknown column that caused the failure is now provided.

ERROR:db_mysql:get_new_stmt_ctx: mysql_stmt_prepare() failed: Unknown column 'bad_column' in 'field list'

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2009-02-27 18:13

Message:
Hi Norm,

I think the way you get the error code is not correct. The
mysql_stmt_execute() function does not return the err code, but only an err
indication. To get the err code you need to use mysql_stmt_errno(). See:
     http://dev.mysql.com/doc/refman/5.0/en/mysql-stmt-execute.html

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Norm Brandinger (norm_brandinger)
Date: 2009-02-23 15:27

Message:
Updated the patch to add the enhanced diagnostic output for both prepare
statements located in the dbase.c file.  The original patch only updated
the first prepare statement.
File Added: dbase.c.patch2

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2621299&group_id=232389

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel