Skip to content

Conversation

@heiglandreas
Copy link
Contributor

This PR enables us to search for bugs that have been commented using
a certain email-address.

It addresses #69576

THis commit enables us to search for bugs that have been commented using
a certain email-address
}

if ($commented_by != '') {
$query .= 'LEFT JOIN bugdb_comments c ON bugdb.id = c.bug';
Copy link
Member

@johannes johannes Jul 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there is a space missing.

$query .= 'LEFT JOIN bugdb_votes v ON bugdb.id = v.bug';
$query .= 'LEFT JOIN bugdb_comments c ON bugdb.id = c.bug';

leads to

... bugdb.id = v.bugLEFT JOIN ...

without space. (I haven't checked larger context)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a copy of the SQL in line 67. Either that one doesn't work as well or the space at the end of the SQL-parts eliminates that issue.. 😉

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being a copy is not a reason the line is correct. Looking at a bit more context: The $query in earlier lines ends with a newline as whitespace, later additions always add a preceding space. Thus all other concatenations have some whitespace in between, this specific case won't.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're right and I copied exactly the one line not adding a whitespace… 🤦‍♂️

Thanks for spotting!

As @johannes spotted the query didn't add a whitespace so that it might
get added right to the preceding one without ans whitespace.
@johannes
Copy link
Member

johannes commented Jul 24, 2017 via email

@heiglandreas
Copy link
Contributor Author

And there's no index on the email-field in the comment-table…

Perhaps I should add an SQL-Patch with that? But that will leave the comment-table locked while the index is created… Not sure how long that will take…

Or shall I add that as a separate PR? And anyway: How are patches added?

@php-pulls php-pulls merged commit e0bb393 into php:master Jul 24, 2017
@php-pulls
Copy link

Comment on behalf of johannes at php.net:

I pushed it, let's see what breaks. I also added a simple MySQL status page to the admin section so we can estimate some effects. Should be live in an hour or so.

@johannes
Copy link
Member

So it is live, searching for all comments ever made by rasmus the request takes 3545 ms for 4157 comments, for all of mine (2681) it takes 2409ms. I ran a few other searches without these options and think it is acceptable for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants