Note: There are a few cases of duplicates in user autocompletion which are being worked on. fix for bug 212095 breaks with older DBD::mysql

RESOLVED FIXED in Bugzilla 2.16



Installation & Upgrading
14 years ago
5 years ago


(Reporter: Christopher Wong, Assigned: bbaetz)


Bugzilla 2.16
Bug Flags:
approval +


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


(1 attachment)



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 now fails. 
The from version 2.16.3 works fine.

... has version 2.0416
... has version 1.2216

DBI is version 1.18

Please see the output below for other version numbers.

Reproducible: Always

Steps to Reproduce:

Actual Results:  
Output when running

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 ./ line 1613.
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.


14 years ago
Version: unspecified → 2.16.4

Comment 1

14 years ago
Try upgrading DBI to v1.19. If that fails, try the latest release.
Ever confirmed: true

Comment 2

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

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?

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.

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
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)

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...

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.

Attachment #139321 - Flags: review?(myk)
Checking in;
/cvsroot/mozilla/webtools/bugzilla/,v  <--
new revision:; previous revision:

I did end up making the change Myk suggested before checking in.  I did test it
with that change, and it still works.
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.