Is it possible to configure MySQL logging so that it only reports queries that have been dropped back?

I have an intermittent error that I am trying to track, and I would like to capture only MySQL queries that do not result in a rollback. I don’t want a complete general query or binary , because there will be millions of records in the haystack.

Something like this solution , besides MySQL, would be perfect.

TIA,
JD

+3
source share
2 answers

MySQL (, , ). PHP. , mysql_query, , → query(), . (, , false), . .

Zend_DB:

class My_DB extends Zend_DB {
    public function insert($data) {
        try {
            parent::insert($data);
        } catch (Exception $e) {
            // put $e->getMessage() to log
        }
    }
}

, , ...

+1

All Articles