[SOLVED] MySQL Error Log wanted
Posted: Mon Jun 02, 2008 9:43 pm
[glow=red,2,300][Now SOLVED, see below][/glow]
For testing, I would like an SQL error log on the server, so that when an SQL query fails, I can see the error message and the query that caused it. Basically, I would feel more confident if I knew that there were no SQL errors going undetected behind the scenes in CMSMS or its Modules.
It seems MySQL cannot be configured to keep such an error log: it expects client-side code to do that. The MySQL server log records only catastrophic server messages: not SQL query errors.
Three ideas:-
1) Override the PHP error handler, to log SQL errors to disk.
2) Change how ADODB Lite is initialized by CMSMS, using ADODB's error handling functions to log SQL errors to disk.
3) Patch the MySQL source code, to make the server log include SQL errors.
Can anyone help with this?
Thanks for any ideas!
- Martin.
For testing, I would like an SQL error log on the server, so that when an SQL query fails, I can see the error message and the query that caused it. Basically, I would feel more confident if I knew that there were no SQL errors going undetected behind the scenes in CMSMS or its Modules.
It seems MySQL cannot be configured to keep such an error log: it expects client-side code to do that. The MySQL server log records only catastrophic server messages: not SQL query errors.
Three ideas:-
1) Override the PHP error handler, to log SQL errors to disk.
2) Change how ADODB Lite is initialized by CMSMS, using ADODB's error handling functions to log SQL errors to disk.
3) Patch the MySQL source code, to make the server log include SQL errors.
Can anyone help with this?
Thanks for any ideas!
- Martin.