The GetErrorXml and GetErrorsXml stored procedures created by the MySql.sql
script contain errors:
1) Both procedures return all errors in the db instead of the particular
error (or errors in the case of GetErrorsXml) asked for, because the input
variables use the same names as the database fields (ErrorId and
Application).
2) GetErrorsXml returns an incorrect number of records for the requested
page size.
The attached patch fixes both of these problems for me, but I'm not an
expert in MySql so the SQL could need to be tweaked.
The patch also changes the ErrorId field from binary(16) to char(36), and
it contains appropriate changes in MySqlErrorLog.cs. I submitted a patch a
few weeks ago to fix an inconsistency between the ErrorLog class and the
sql script for the ErrorId field type, and at that time the easiest fix was
to use binary(16). After attempting to debug these errors with the stored
procedures and encountering the difficulty of executing sql queries with
binary fields/values in the where clauses, I think it's best to use
char(36) for the ErrorId field type.
Original issue reported on code.google.com by paul.wid...@gmail.com on 27 Feb 2010 at 9:07
Original issue reported on code.google.com by
paul.wid...@gmail.com
on 27 Feb 2010 at 9:07Attachments: