Note: There are a few cases of duplicates in user autocompletion which are being worked on.

checksetup.pl fix for bug 212095 breaks with older DBD::mysql

RESOLVED FIXED in Bugzilla 2.16

Status

()

Bugzilla
Installation & Upgrading
P1
major
RESOLVED FIXED
14 years ago
5 years ago

People

(Reporter: Christopher Wong, Assigned: bbaetz)

Tracking

2.16.4
Bugzilla 2.16
Bug Flags:
approval +

Details

(Whiteboard: [fixed in 2.16.5] [does not affect trunk])

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
User-Agent:       Opera/7.21 (X11; Linux i686; U)  [en]
Build Identifier: 

The fix for bug 212095 breaks earlier versions of DBD::mysql. I am using 
perl-DBD-MySQL-1.2216-4.i386.rpm from Red Hat 7.2, and checksetup.pl now fails. 
The checksetup.pl from version 2.16.3 works fine.

/usr/lib/perl5/site_perl/5.6.0/i386-linux/Bundle/DBD/mysql.pm
... has version 2.0416
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Mysql.pm
... has version 1.2216

DBI is version 1.18

Please see the checksetup.pl output below for other version numbers.

Reproducible: Always

Steps to Reproduce:
1.run checksetup.pl

Actual Results:  
Output when running checksetup.pl:

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.55
Checking for       CGI::Carp (any)     ok: found v1.20
Checking for    Data::Dumper (any)     ok: found v2.102
Checking for     Date::Parse (any)     ok: found v2.20
Checking for             DBI (v1.13)   ok: found v1.18
Checking for      DBD::mysql (v1.2209) ok: found v2.0416
Checking for      File::Spec (v0.82)   ok: found v0.82
Checking for      File::Temp (any)     ok: found v0.12
Checking for        Template (v2.07)   ok: found v2.10
Checking for      Text::Wrap (v2001.0131) ok: found v2001.0131
Checking for       CGI::Carp (any)     ok: found v1.20

The following Perl modules are optional:
Checking for              GD (v1.19)   ok: found v1.33
Checking for     Chart::Base (v0.99)   ok: found v0.99
Checking for     XML::Parser (any)     ok: found v2.30

Checking user setup ...
Precompiling templates ...
Checking for    MySQL Server (v3.22.5) ok: found v3.23.58

Content-type: text/html

<H1>Software error:</H1>
<PRE>DBI table_info: invalid number of parameters: handle + 4
Usage: $h-&gt;table_info([ \%attr ]) at ./checksetup.pl line 1613.
</PRE>
<P>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.
(Reporter)

Updated

14 years ago
Version: unspecified → 2.16.4
(Assignee)

Comment 1

14 years ago
Try upgrading DBI to v1.19. If that fails, try the latest release.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 2

14 years ago
I installed perl-DBI-1.21-1.i386.rpm from Red Hat 7.3, and now checksetup.pl 
works fine.
(Assignee)

Comment 3

14 years ago
Did 1.19 not work, or was 1.21 ust hte first version you tried.? If you tried it
because it came with a redhat release, which one?
(Reporter)

Comment 4

14 years ago
I did not find a 1.19 RPM. The 1.21 RPM came from the Red Hat 7.3 release, and 
was the first one I tried. I think the 1.18 RPM came from Red Hat 7.2, which is 
what I am running.
(Assignee)

Comment 5

14 years ago
Someone want to test for the lowest supported version? justdave, myk?
Assignee: zach → bbaetz
Whiteboard: [wanted for 2.16.5]
OK, we need to do one of two things here...

1) up our minimum DBI version to the lowest one supported by the new syntax
2) special-case our table lookup to use the appropriate syntax for the version
that's installed.

The second would probably be preferable unless we can come up with some other
good excuse why we need a newer version of DBI.  The second will be the only
acceptible option on the 2.16 branch.

I'm testing now to determine the minimum version that supports this syntax.
Priority: -- → P1
Whiteboard: [wanted for 2.16.5] → [wanted for 2.16.5] [wanted for 2.17.7]
Target Milestone: --- → Bugzilla 2.16
OK, minimum DBI for the syntax we're using is 1.20.

However....  any DBI < 1.25 will segfault the current 2.16 branch checksetup.pl
on Perl 5.6.0.  DBI 1.20 and up work fine on Perl 5.6.1 and up though.
Trunk (2.17.x) is immune from this, because we already require DBI 1.32.

The segfault in Perl 5.6.0 was a mismatch between DBD::mysql 2.9003 and DBI <
1.25 :)  Obviously the newer versions of DBD::mysql require newer DBIs. :)  If I
downgraded DBD::mysql to a 1.x version, the segfaults went away.
Whiteboard: [wanted for 2.16.5] [wanted for 2.17.7] → [wanted for 2.16.5] [does not affect trunk]
Created attachment 139321 [details] [diff] [review]
Patch for 2.16 branch

If we're using DBI < 1.20 use the old syntax, otherwise use the new syntax.
Attachment #139321 - Flags: review?(bbaetz)
Attachment #139321 - Flags: review?(myk)
(Assignee)

Comment 10

14 years ago
Recompling DBI means that you need to recompile DBD::*

Will that code work if DBI isn't installed? It will on trunk because thats all
in BEGIN, but I'm not sure about branch.

Also did we ever test if its < or <= that we need?
checksetup will bail after the version checks long before that code is reached
if DBI isn't installed.

And yes, I tested.  1.19 errors out, 1.20 works.
Anyone have any additional review comments?  Was hoping to release 2.16.5
tonight, and this would need to be in it.  It's the last one left...
(Assignee)

Comment 13

14 years ago
Comment on attachment 139321 [details] [diff] [review]
Patch for 2.16 branch

Does 'Eww' count as a review comment?

I guess this is OK, assuming testing and all that.
Attachment #139321 - Flags: review?(bbaetz) → review+
Comment on attachment 139321 [details] [diff] [review]
Patch for 2.16 branch

Nit: the global $sth declaration here is obtuse since its only obvious use at
this point in the code is for use in the else{} clause.  I suggest declaring it
within the else{} clause here and then declaring it globally farther down the
script where it actually gets used repeatedly in a global context.

Other than that, it works and looks good.

r=myk
Attachment #139321 - Flags: review?(myk)
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.149.2.20; previous revision: 1.149.2.19
done

I did end up making the change Myk suggested before checking in.  I did test it
with that change, and it still works.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Flags: approval+
Resolution: --- → FIXED
Whiteboard: [wanted for 2.16.5] [does not affect trunk] → [fixed in 2.16.5] [does not affect trunk]
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.