Page MenuHomeIn-Portal Phabricator

INP-1763 - Use first found record in update sql in the "\kApplication::logSlowQuery" method
ClosedPublic

Authored by alex on Apr 23 2019, 10:55 AM.

Details

Test Plan
  • apply the code changes from D359 to make this revision test plan work
  • in IDE:
    1. open /system/debug.php file for editing
    2. uncomment DBG_CAPTURE_STATISTICS and DBG_MAX_SQL_TIME constant declarations
    3. set 0 (instead of current value of 2) as value for DBG_MAX_SQL_TIME constant
    4. comment-out $dbg_options['DEBUG_MODE'] element
    5. save changes
  • in Web Browser
    1. go to Front-End
    2. reload the page
    3. confirm, that no Fatal Error happened
  • in Database browser
    1. open SlowSqlCapture table
    2. confirm, that some records were added in that table
    3. confirm, that some records have 2 or larger value in the Hits column
    4. confirm, for for such records (Hits > 1) values in TimeMin, TimeAvg and TimeMax columns are different
  • rollback all changes made in IDE

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Apr 23 2019, 10:55 AM
alex requested review of this revision.Apr 23 2019, 10:55 AM
alex added a project: Restricted Project.Apr 23 2019, 10:55 AM
alex edited the test plan for this revision. (Show Details)Apr 23 2019, 10:59 AM
erik requested changes to this revision.Apr 25 2019, 7:02 AM

Happens fatal error in the line

$this->queryID->free();

when queryID = true.

Need change code to skip $this->queryID->free(); call when queryID is boolean.

This revision now requires changes to proceed.Apr 25 2019, 7:02 AM
alex requested review of this revision.Apr 25 2019, 7:17 AM
alex edited the test plan for this revision. (Show Details)

I haven't noticed, that even though this fix looks standalone it still results in a Fatal Error until fix from D359 is applied. I've updated test plan to reflect that.

erik accepted this revision.Apr 25 2019, 7:31 AM
This revision is now accepted and ready to land.Apr 25 2019, 7:31 AM
This revision was automatically updated to reflect the committed changes.