File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -870,9 +870,19 @@ sub data {
870
870
' _no_security_check' => 1
871
871
);
872
872
873
+ # Add some user information to the SQL so we can pinpoint where some
874
+ # slow running queries originate and help to refine the searches.
875
+ my $sql_user_info
876
+ = ' /* userid: '
877
+ . Bugzilla-> user-> id
878
+ . ' useragent: '
879
+ . Bugzilla-> cgi-> user_agent
880
+ . ' query: '
881
+ . Bugzilla-> cgi-> canonicalize_query() . ' */ ' ;
882
+
873
883
$start_time = [gettimeofday()];
874
884
$sql = $search -> _sql;
875
- my $unsorted_data = $dbh -> selectall_arrayref($sql );
885
+ my $unsorted_data = $dbh -> selectall_arrayref($sql . $sql_user_info ); # Add extra info for logging purposes
876
886
push (@extra_data , {sql => $sql , time => tv_interval($start_time )});
877
887
878
888
# Let's sort the data. We didn't do it in the query itself because
You can’t perform that action at this time.
0 commit comments