Closed Bug 243538 Opened 20 years ago Closed 20 years ago

2.17.7 not compatible with MySQL 3.23.41, as documented

Categories

(Bugzilla :: Installation & Upgrading, defect)

All
Linux
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 243351

People

(Reporter: carl_gay, Assigned: zach)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

The Bugzilla-Guide.txt that comes with 2.17.7 says that MySQL 3.23.41 or above
must be installed.  MySQL 3.23.41 does not have the CAST function. 
Bugzilla/Search.pm uses the CAST function, so certain searches will fail.
The offending lines from Bugzilla/Search.pm:

         ",casesubstring" => sub {
             $term = "INSTR(CAST($ff AS BINARY), CAST($q AS BINARY))";
         },


Reproducible: Always
Steps to Reproduce:
With the installation described, do a case-sensitive search for comments (or any
other field that allows case-sensitive search) containing 'testing'.
Actual Results:  
Software error:

DBD::mysql::st execute failed: You have an error in your SQL syntax near
'(longdescs_.thetext AS BINARY), CAST('testing' AS BINARY))) AND
((bug_group_map.' at line 1 [for statement ``SELECT bugs.bug_id,
bugs.bug_severity, bugs.priority, bugs.bug_status, bugs.resolution,
bugs.bug_severity, bugs.priority, bugs.rep_platform, map_assigned_to.login_name,
bugs.bug_status, map_products.name, bugs.rank, bugs.short_desc FROM bugs,
profiles AS map_assigned_to, products AS map_products LEFT JOIN bugsassertions
ON (bugs.bug_id = bugsassertions.bug_id) LEFT JOIN assertions on
(bugsassertions.assertion_id = assertions.assertion_id), longdescs longdescs_
LEFT JOIN bug_group_map  ON bug_group_map.bug_id = bugs.bug_id  AND
bug_group_map.group_id NOT IN
(6,3,10,26,11,1,4,20,22,18,13,24,23,9,5,7,12,28,17,14,25,8,19,21,15,27,16,2) 
LEFT JOIN cc ON cc.bug_id = bugs.bug_id AND cc.who = 146 WHERE bugs.assigned_to
= map_assigned_to.userid AND bugs.product_id = map_products.id AND
longdescs_.bug_id = bugs.bug_id AND (bugs.bug_status IN
('NEW','ASSIGNED','REOPENED')) AND (INSTR(CAST(longdescs_.thetext AS BINARY),
CAST('testing' AS BINARY))) AND ((bug_group_map.group_id IS NULL)    OR
(bugs.reporter_accessible = 1 AND bugs.reporter = 146)     OR
(bugs.cclist_accessible = 1 AND cc.who IS NOT NULL)     OR (bugs.assigned_to =
146) OR (bugs.qa_contact = 146) ) GROUP BY bugs.bug_id ORDER BY bugs.bug_status,
bugs.priority, map_assigned_to.login_name, bugs.bug_id '']) at Bugzilla/DB.pm
line 66
	Bugzilla::DB::SendSQL('SELECT bugs.bug_id, bugs.bug_severity, bugs.priority,
bugs.bug_s...') called at /ita/www/dev-bugzilla/buglist.cgi line 984
	main::query_for_bugs('SELECT bugs.bug_id, bugs.bug_severity, bugs.priority,
bugs.bug_s...') called at .../dev-bugzilla/buglist.cgi line 1018



Expected Results:  
a list of bugs

RedHat Linux 7.2, MySQL 3.23.41, bz 2.17.7

We're running a modified version of bugzilla, but the CAST code is in
the original.

I can probably work around this easily by using LOWER instead of CAST.

I set Severity to Major, since it's major IF you have this configuration.
I assume you'll change it if necessary.
D'oh.  LOWER won't work of course, since the user want's a case-sensitive match.
Just removing the CASTs seems to work, but I don't know all the ramifications
of that change.  Presumably they were in there for a good reason.

*** This bug has been marked as a duplicate of 243351 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.