Last Comment Bug 804505 - [Oracle] Oracle crashes when typing "word1 word2" in QuickSearch with "ORA-29907: found duplicate labels in primary invocations"
: [Oracle] Oracle crashes when typing "word1 word2" in QuickSearch with "ORA-29...
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Database (show other bugs)
: 4.2.1
: All All
: -- normal (vote)
: Bugzilla 4.2
Assigned To: Frédéric Buclin
: default-qa
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 01:03 PDT by f.v.scognamiglio
Modified: 2012-11-15 05:31 PST (History)
2 users (show)
LpSolit: approval+
LpSolit: approval4.4+
LpSolit: blocking4.4+
LpSolit: approval4.2+
LpSolit: blocking4.2.4+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch for trunk, v1 (1.98 KB, patch)
2012-10-25 08:54 PDT, Frédéric Buclin
no flags Details | Diff | Review
patch for trunk, v1.1 (2.02 KB, patch)
2012-10-25 10:07 PDT, Frédéric Buclin
dkl: review+
Details | Diff | Review
patch for 4.x, v1 (2.33 KB, patch)
2012-10-25 11:17 PDT, Frédéric Buclin
dkl: review+
Details | Diff | Review

Description f.v.scognamiglio 2012-10-23 01:03:29 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce:

Entered "word1 word2" (without quotes) into quicksearch field


Actual results:

DBD::Oracle::db prepare failed: ORA-29907: found duplicate labels in primary invocations (DBD ERROR: error possibly near <*> indicator at char 2407 in 'SELECT bugs.bug_id  bug_id, bugs.bug_severity  bug_severity, bugs.priority  priority, bugs.bug_status  bug_status, bugs.resolution  resolution, map_product.name  product, map_component.name  component, map_assigned_to.login_name  assigned_to, bugs.short_desc  short_desc, bugs.delta_ts  changeddate
  FROM bugs
LEFT JOIN bug_group_map  security_map ON bugs.bug_id = security_map.bug_id AND NOT ( security_map.group_id IN (1,10,11,14,13,12,9,4,8,5,6,7,3,2,15,16,17) )
LEFT JOIN cc  security_cc ON bugs.bug_id = security_cc.bug_id AND security_cc.who = 23
INNER JOIN products  map_product ON bugs.product_id = map_product.id
INNER JOIN components  map_component ON bugs.component_id = map_component.id
INNER JOIN profiles  map_assigned_to ON bugs.assigned_to = map_assigned_to.userid
INNER JOIN bug_status  map_bug_status ON bugs.bug_status = map_bug_status.value
INNER JOIN priority  map_priority ON bugs.priority = map_priority.value
LEFT JOIN bugs_fulltext  bugs_fulltext_6 ON bugs.bug_id = bugs_fulltext_6.bug_id
LEFT JOIN bugs_fulltext  bugs_fulltext_12 ON bugs.bug_id = bugs_fulltext_12.bug_id
  WHERE  rownum <=500 AND  bugs.creation_ts IS NOT NULL
   AND (security_map.group_id IS NULL
        OR (bugs.reporter_accessible = 1 AND bugs.reporter = 23)
        OR (bugs.cclist_accessible = 1 AND security_cc.who IS NOT NULL)
        OR bugs.assigned_to = 23
)
   AND  bugs.bug_status IN ('UNCONFIRMED','CONFIRMED','PRESO_IN_CARICO')  AND ( ( ( bugs.product_id IN (SELECT products.id FROM products WHERE INSTR(LOWER(products.name), LOWER('ciao')) > 0) OR bugs.component_id IN (SELECT components.id FROM components WHERE INSTR(LOWER(components.name), LOWER('ciao')) > 0) OR INSTR(LOWER(COALESCE(bugs.alias, '__BZ_EMPTY_STR__')), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.short_desc), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.status_whiteboard), LOWER( ... value
LEFT JOIN bugs_fulltext  bugs_fulltext_6 ON bugs.bug_id = bugs_fulltext_6.bug_id
LEFT JOIN bugs_fulltext  bugs_fulltext_12 ON bugs.bug_id = bugs_fulltext_12.bug_id
  WHERE  rownum <=500 AND  bugs.creation_ts IS NOT NULL
   AND (security_map.group_id IS NULL
        OR (bugs.reporter_accessible = 1 AND bugs.reporter = 23)
        OR (bugs.cclist_accessible = 1 AND security_cc.who IS NOT NULL)
        OR bugs.assigned_to = 23
)
   AND  bugs.bug_status IN ('UNCONFIRMED','CONFIRMED','PRESO_IN_CARICO')  AND ( ( ( bugs.product_id IN (SELECT products.id FROM products WHERE INSTR(LOWER(products.name), LOWER('ciao')) > 0) OR bugs.component_id IN (SELECT components.id FROM components WHERE INSTR(LOWER(components.name), LOWER('ciao')) > 0) OR INSTR(LOWER(COALESCE(bugs.alias, '__BZ_EMPTY_STR__')), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.short_desc), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.status_whiteboard), LOWER('ciao')) > 0 OR CONTAINS(bugs_fulltext_6.comments_noprivate,'"ciao"',1) > 0 OR CONTAINS(bugs_fulltext_6.short_desc,'"ciao"',2) > 0 ) ) AND ( ( bugs.product_id IN (SELECT products.id FROM products WHERE INSTR(LOWER(products.name), LOWER('ciao')) > 0) OR bugs.component_id IN (SELECT components.id FROM components WHERE INSTR(LOWER(components.name), LOWER('ciao')) > 0) OR INSTR(LOWER(COALESCE(bugs.alias, '__BZ_EMPTY_STR__')), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.short_desc), LOWER('ciao')) > 0 OR INSTR(LOWER(bugs.status_whiteboard), LOWER('ciao')) > 0 OR CONTAINS(bugs_fulltext_12.comments_noprivate,'"ciao"',1) > 0 OR CONTAINS(bugs_fulltext_12.short_desc,'"ciao"',2) > 0 ) ) )
GROUP BY bugs.bug_id, bugs.bug_severity,bugs.priority,bugs.bug_status,bugs.resolution,map_product.name,map_component.name,map_assigned_to.login_name,bugs.short_desc,bugs.delta_ts,map_bug_status.sortkey,map_bug_status.value,map_priority.sortkey,map_priority.value
ORDER BY map_bug_status.sortkey, map_bug_status.value, map_priority.sortkey, map_priority.value, assigned_to, bug_id
/* LIMIT 500 */
"] at Bugzilla/DB/Oracle.pm line 491
	Bugzilla::DB::Oracle::prepare(undef, 'SELECT bugs.bug_id  bug_id, bugs.bug_severity  bug_severity, ...') called at /sw/instance/apache-2.2.22/htdocs/bugzilla/buglist.cgi line 828


Expected results:

I saw that there is a similar case for the version 4.0.2 resolved with an upgrade to later versions. But in this case, what can I do?
Comment 1 Frédéric Buclin 2012-10-25 06:01:31 PDT
Confirmed on 4.5.
Comment 2 Frédéric Buclin 2012-10-25 08:54:40 PDT
Created attachment 675145 [details] [diff] [review]
patch for trunk, v1

As Bugzilla 5.0 requires Perl 5.10.1, I can use the "state" feature.
Comment 3 Frédéric Buclin 2012-10-25 10:07:22 PDT
Created attachment 675181 [details] [diff] [review]
patch for trunk, v1.1

I forgot to remove $label from the list of arguments in my previous patch.
Comment 4 Frédéric Buclin 2012-10-25 11:17:40 PDT
Created attachment 675212 [details] [diff] [review]
patch for 4.x, v1

Instead of "state", I use "our" for branches.
Comment 5 David Lawrence [:dkl] 2012-11-02 12:52:14 PDT
Comment on attachment 675181 [details] [diff] [review]
patch for trunk, v1.1

Review of attachment 675181 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine and corrects the issue for me. r=dkl
Comment 6 David Lawrence [:dkl] 2012-11-02 13:16:05 PDT
Comment on attachment 675212 [details] [diff] [review]
patch for 4.x, v1

Review of attachment 675212 [details] [diff] [review]:
-----------------------------------------------------------------

Also looks good and fixes the issue on 4.4. r=dkl
Comment 7 Frédéric Buclin 2012-11-02 16:19:11 PDT
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Bug.pm
modified Bugzilla/Search.pm
modified Bugzilla/DB/Oracle.pm
Committed revision 8456.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified Bugzilla/Bug.pm
modified Bugzilla/Search.pm
modified Bugzilla/DB/Oracle.pm
Committed revision 8442.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified Bugzilla/Bug.pm
modified Bugzilla/Search.pm
modified Bugzilla/DB/Oracle.pm
Committed revision 8162.
Comment 8 f.v.scognamiglio 2012-11-15 05:31:53 PST
ok. the problem has been resolved! thank's!

Note You need to log in before you can comment on or make changes to this bug.