[OpenSIPS-Devel] [ opensips-Patches-2621299 ] Enhance MySQL prepare statment diagnostics
SourceForge.net
noreply at sourceforge.net
Fri Feb 27 22:02:54 CET 2009
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: Closed
>Resolution: Accepted
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 23:02
Message:
ok - following the IRC (#opensips) discussion, the patch was adopted in a
different version.
Thanks Norm for the research.
Regards,
Bogdan
----------------------------------------------------------------------
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
More information about the Devel
mailing list