All users were logged out of Bugzilla on October 13th, 2018

Make Cake query debug output prettier



11 years ago
3 years ago


(Reporter: fligtar, Assigned: fligtar)




(1 attachment, 1 obsolete attachment)



11 years ago
Created attachment 324697 [details] [diff] [review]
patch, v1

While reviewing bug 427094's patch, I decided Cake's query output is ugly and needed some additional info, so this patch overwrites the default methods with our own.

It makes the query log much prettier and makes it collapsed by default and also displays the database config that each query was run on.
Attachment #324697 - Flags: review?(morgamic)

Comment 1

11 years ago
Created attachment 324698 [details] [diff] [review]
patch, v2

Meh, part of morgamic's patch was in that one.
Attachment #324697 - Attachment is obsolete: true
Attachment #324698 - Flags: review?(morgamic)
Attachment #324697 - Flags: review?(morgamic)
Comment on attachment 324698 [details] [diff] [review]
patch, v2

+r=morgamic - extra points if you can figure out why cake has a hard limit in query debug view of 200.  For example, if we have 294 queries executed, it'll only list 200 of them below even if the total is > 200.  I know that's not your fault though.
Attachment #324698 - Flags: review?(morgamic) → review+

Comment 3

11 years ago
I seem to remember it starts over with a second list then? So it shows one list with 200, then another with 94. No?

Comment 4

11 years ago

 * Maximum number of items in query log, to prevent query log taking over
 * too much memory on large amounts of queries -- I we've had problems at
 * >6000 queries on one system.
 * @var int Maximum number of queries in the queries log.
 * @access private
	var $_queriesLogMax = 200;

But I'll just remove the if() in my overwrite logQuery() so that it doesn't check that var at all.

Fred - From what I can tell, it creates a list per db config used, so it'll have a list for queries run on master and one for default. We just had no way of knowing which was which.

Comment 5

11 years ago
Checked in, r15385.
Last Resolved: 11 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.