Closed Bug 212731 Opened 22 years ago Closed 22 years ago

checksetup.pl fails to run when tables already exist in database

Categories

(Bugzilla :: Installation & Upgrading, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 212095

People

(Reporter: martin.evans, Assigned: zach)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 I am new to bugzilla and wanted to change my localconfig after running checksetup.pl once already. It failed every time trying to create a table that already existed in the bugs database. Looking at checksetup.pl (around lines 1630) it is designed to only create the tables that do not exist. Unfortunely, the call to DBI->tables, for me, returns the table names in backticks e.g. `attachments` so the next if grep /^$tabname$/, @tables; does not work. I assume this is a new issue. mysql returns tables in backticks because in this mysql, $dbh->get_info(29) returns a `. I am using: mysql 4.0.13 DBD::mysql 2.9002 DBI 1.37 bugzilla 2.16.3 Perl 5.8.0 Reproducible: Always Steps to Reproduce: 1. Install the exact components listed in the details of this report 2. Run checksetup.pl twice Actual Results: Creating table fielddefs ... DBD::mysql::db do failed: Table 'fielddefs' already exists at ./checksetup.pl line 1636. [Tue Jul 15 08:54:53 2003] checksetup.pl: DBD::mysql::db do failed: Table 'fielddefs' already exists at ./checksetup.pl line 1636. Content-type: text/html <h1>Software error:</h1> <pre>Could not create table 'fielddefs'. Please check your 'mysql' access. </pre> <p> For help, please send mail to this site's webmaster, giving this error message and the time and date of the error. </p> [Tue Jul 15 08:54:53 2003] checksetup.pl: Could not create table 'fielddefs'. Please check your 'mysql' access. Expected Results: This crude patch fixes: 1613c1613 < my @tables = map { $_ =~ s/.*\.//; $_ } $dbh->tables; --- > my @xtables = map { $_ =~ s/.*\.//; $_ } $dbh->tables; 1614a1615 > my @tables = map { $_ =~ s/`(.*)`/$1/; $_} @xtables; 1624a1626,1627 > my $xx = grep /^$tabname$/, @tables; > which when applied and run produces: . . . Checking user setup ... Precompiling templates ... Populating duplicates table... Reminder: Bugzilla now requires version 8.7 or later of sendmail.
Fixed in bug 212095 by not using a deprecated function. *** This bug has been marked as a duplicate of 212095 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 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.