Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804019
D360.id971.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
Wed, Feb 26, 9:03 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:03 AM (4 h, 38 m)
Engine
blob
Format
Raw Data
Handle
576735
Attached To
D360: INP-1763 - Use first found record in update sql in the "\kApplication::logSlowQuery" method
D360.id971.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