logging of BAD queries

2010-02-09 Thread andy knasinski
I've used the general and slow query log in the past, but I am trying  
to track down some queries from a compiled app that never seem to be  
hitting the DB server.


My guess is that the SQL syntax is bad and never get executed, but I  
don't see any related queries in the general query log. Does the  
general log include invalid SQL?


I've also tried to use the driver logging, but on Windows it  
overwrites with the last SQL command so I cannot get a good capture as  
requests are sent to the DB.


DB is MySQL 5.0.x

Thanks
andy


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: logging of BAD queries

2010-02-09 Thread andy knasinski
Unfortunately, I'm using a commercial application and trying to debug  
as to why some data does and does not get updated properly.


On Feb 9, 2010, at 2:57 PM, mos wrote:



I do something like that in my compiled application. All SQL queries  
are sent to a single procedures and executed there. I trap any  
errors and log the SQL in a table along with the error message. This  
is useful to determine if someone is trying to break into the  
database (sql injection). Having a central procedure to execute all  
queries is paramount in controlling and capturing errors. I can also  
unplug and plug in a different database engine quite easily rather  
than hunting down all direct calls to the database. I also don't  
have to worry about trapping errors throughout the application. It's  
all done at one central point.


I've been doing it this way for 5 years and would never start a  
large application without it.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org