Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098745
D360.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 14, 4:56 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, Aug 15, 4:56 AM (1 h, 22 m)
Engine
blob
Format
Raw Data
Handle
711013
Attached To
D360: INP-1763 - Use first found record in update sql in the "\kApplication::logSlowQuery" method
D360.diff
View Options
Index: branches/5.2.x/core/kernel/application.php
===================================================================
--- branches/5.2.x/core/kernel/application.php
+++ branches/5.2.x/core/kernel/application.php
@@ -1258,6 +1258,7 @@
$this->Conn->doUpdate($data, TABLE_PREFIX . 'StatisticsCapture', 'StatisticsId = ' . $data['StatisticsId']);
}
else {
+ $data = array();
$data['ScriptTimeMin'] = $data['ScriptTimeAvg'] = $data['ScriptTimeMax'] = $script_time;
$data['SqlTimeMin'] = $data['SqlTimeAvg'] = $data['SqlTimeMax'] = $query_statistics['time'];
$data['SqlCountMin'] = $data['SqlCountAvg'] = $data['SqlCountMax'] = $query_statistics['count'];
@@ -1308,6 +1309,7 @@
$data = $this->Conn->Query($sql, null, true);
if ( $data ) {
+ $data = array_shift($data); // Because "Query" method (supports $no_debug) is used instead of "GetRow".
$this->_updateAverageStatistics($data, 'Time', $time);
$template_names = explode(',', $data['TemplateNames']);
@@ -1320,6 +1322,7 @@
$this->Conn->doUpdate($data, TABLE_PREFIX . 'SlowSqlCapture', 'CaptureId = ' . $data['CaptureId']);
}
else {
+ $data = array();
$data['TimeMin'] = $data['TimeAvg'] = $data['TimeMax'] = $time;
$data['SqlQuery'] = $slow_sql;
$data['QueryCrc'] = $query_crc;
Event Timeline
Log In to Comment