Open Bug 732019 Opened 12 years ago Updated 11 years ago

entering mixed bug ids and bug alias in search box fails

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
minor

Tracking

()

UNCONFIRMED

People

(Reporter: Ken.Klingman, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Ubuntu/11.10 Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.11

Steps to reproduce:

Entered a list of 79 bug ids plus one bug alias in the search box on the bugzilla home page.  Bugzilla 4.2.  Bug alias was the 22nd entry in the list of bug ids.  Although this list is specific to our instance of bugzilla, it should give an idea of the text that was pasted into the search box:

7050 10187 13898 15853 16253 17578 17590 18709 19224 19810 20698 21143 21848 21856 21910 21911 21928 21932 22025 22121 22649 Galaxy_1.5_Deferred 23156 23426 23618 23960 24651 24964 25017 25250 25253 25298 25524 25554 25943 26020 26242 26253 26589 26639 26641 26656 26707 26734 26949 26950 26969 27001 27194 27476 27479 27483 27485 27489 27496 27508 27639 27645 27651 27653 27655 27656 27779 27787 27934 27946 12839 16203 21387 22277 24753 25100 25787 26079 26260 26495 26568 26701 27441 


Actual results:

Internal Server Error.  

Running mod_perl and the apache error log says, "DBD::mysql::st execute failed: Too many tables; MySQL can only use 61 tables in a join" and then shows the SQL query that was generated.

Note: reducing the search term to 21 bug ids and the one bug alias still produced wacky results, though not an Internal Server Error.


Expected results:

Something a bit more reasonable, like an informative error message saying why the search list was invalid.  Or maybe even returning a list of the bugs including the bug alias.  But not a fail page saying Internal Server Error.
You assume that Bugzilla should recognize Galaxy_1.5_Deferred as being a bug alias. Of course, it will also look for this string in other fields, including comments, generating several table joins. Also, you assume that each number refers to a bug ID, but it could also be any other piece of information elsewhere. The reason of all these table joins is due to bugs_fulltext which is joined once per item in the QuickSearch field. Maybe there is a way to prevent that.

MySQL has a hard limit of 61 table joins, and SQLite has a hard limit of 64 table joins. There is nothing we can do against this.
Assignee: general → query-and-buglist
Severity: normal → minor
Component: Bugzilla-General → Query/Bug List
Yes, perhaps some unwarranted assumptions.

However, IMHO it's never OK for a S/W system to die with an internal error on *any* input.  Input should at least be sanity-checked and rejected if not reasonable.  Not fed to a underlying subsystem which throws an internal error.
(In reply to Ken Klingman from comment #2)
> However, IMHO it's never OK for a S/W system to die with an internal error
> on *any* input.

  Why not?

> Input should at least be sanity-checked and rejected if not
> reasonable.  Not fed to a underlying subsystem which throws an internal
> error.

  In a sort of vague sense that seems reasonable, but I think sometimes it's hard to know what is and isn't valid before we actually try to run the SQL. Search.pm generates some of the most complex generated SQL I've ever seen.
You need to log in before you can comment on or make changes to this bug.