I’m actually debugging query cache in MySQL (and Percona Server) because I’m actually encountering many errors in the query cache part.
The source code (sql/sql_cache.cc) is full of DBUG_ASSERT.
In production, the code seems to run smoothly, but when in debug mode, MySQL can’t stop exiting (SIGABRT) at many DBUG_ASSERT because they don’t match …
I wondered how DBUG_ASSERT was used by MySQL core developers :
- is this really a help to debug, and a DBUG_ASSERT must never fail ?
- or was it used to spare some “if () return;” in the source code ?
On example I’m looking at is this revision :
I don’t want to create bug report on MySQL if this is an “attended behavior”, and I was unable to find good documentation on MySQL coding guidelines, or any article on DBUG_ASSERT.
I hope there are some MySQL gurus out there who can help me out.
Thank you !