Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

Naslain Christophe
Hi,

We are upgrading our MySQL server to 5.0 and our bugzilla 2.19.2 does
not support such version of MySQL... so I'm trying to upgrade bugzilla
to 2.22.

I've created a new virtual host to test the migration. Here is the test
config: Linux Fedora Core 4 / MySQL 4.1 / Apache 2.0 / PHP 5.0 / Perl 5.8.6

Step by step:
- run sanitycheck on bugzilla 2.19.2
- dump bugzilla 2.19.2 database
- untar bugzilla-2.22.tar.gz to virtual host
- copy data/ and localconfig file from 2.19.2 to 2.22
- run checksetup.pl on 2.22
- install new required perl packages
- re-run checksetup.pl on 2.22

here is the error message:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[root@pinguinserver bugzilla-2.22]# ./checksetup.pl

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.56
Checking for             CGI (v2.93)   ok: found v3.10
Checking for    Data::Dumper (any)     ok: found v2.121_02
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.38)   ok: found v1.48
Checking for      File::Spec (v0.84)   ok: found v3.01
Checking for      File::Temp (any)     ok: found v0.14
Checking for        Template (v2.08)   ok: found v2.13
Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
Checking for    Mail::Mailer (v1.67)   ok: found v1.67
Checking for    MIME::Base64 (v3.01)   ok: found v3.05
Checking for    MIME::Parser (v5.406)  ok: found v5.420
Checking for        Storable (any)     ok: found v2.13

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v2.16
Checking for     Chart::Base (v1.0)    ok: found v2.3
Checking for       XML::Twig (any)     ok: found v3.23
Checking for       GD::Graph (any)     ok: found v1.43
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
Checking for   Image::Magick (any)      not found

If you want to convert BMP image attachments to PNG to conserve
disk space, you will need to install the ImageMagick application
Available from http://www.imagemagick.org, and the Image::Magick
Perl module by running (as root):

    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for      DBD::mysql (v2.9003) ok: found v2.9007
Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
Checking for        GraphViz (any)     ok: found

Adding new index 'versions_product_id_idx' to the versions table ...
<h1>Software error:</h1>
<pre>DBD::mysql::db do failed: Duplicate entry '16-4.2' for key 1 at
Bugzilla/DB.pm line 479

Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
Bugzilla/DB.pm line 452

Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
./checksetup.pl line 4029
</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>
[Fri Apr 28 10:35:44 2006] checksetup.pl: DBD::mysql::db do failed:
Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
[Fri Apr 28 10:35:44 2006] checksetup.pl:
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
Bugzilla/DB.pm line 452
[Fri Apr 28 10:35:44 2006] checksetup.pl:
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
./checksetup.pl line 4029
[root@pinguinserver bugzilla-2.22]#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is the code of checksetup.pl (from line 4029):

$dbh->bz_add_index('versions', 'versions_product_id_idx',
                    {TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]});

I don't know what is the '16-4.2' value... It's not from the original
versions table, and cannot be a product_id...

Any idea?

best regards,

Christophe
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Re: Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

Michael Bellomo
You can't just copy bugzilla like that between different versions.
Here's what you want to do:

- run sanitycheck on bugzilla 2.19.2 (old server)
- upgrade old server to bugzilla 2.22
- dump bugzilla 2.22 database
- untar bugzilla-2.22.tar.gz to virtual host
- copy data/ and localconfig file from old server to new server (You'll
also want to copy templates if you've modified them)
- run checksetup.pl on 2.22
- install new required perl packages
- re-run checksetup.pl on 2.22

Christophe Naslain wrote:

> Hi,
>
> We are upgrading our MySQL server to 5.0 and our bugzilla 2.19.2 does
> not support such version of MySQL... so I'm trying to upgrade bugzilla
> to 2.22.
>
> I've created a new virtual host to test the migration. Here is the test
> config: Linux Fedora Core 4 / MySQL 4.1 / Apache 2.0 / PHP 5.0 / Perl
> 5.8.6
>
> Step by step:
> - run sanitycheck on bugzilla 2.19.2
> - dump bugzilla 2.19.2 database
> - untar bugzilla-2.22.tar.gz to virtual host
> - copy data/ and localconfig file from 2.19.2 to 2.22
> - run checksetup.pl on 2.22
> - install new required perl packages
> - re-run checksetup.pl on 2.22
>
> here is the error message:
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [root@pinguinserver bugzilla-2.22]# ./checksetup.pl
>
> Checking perl modules ...
> Checking for       AppConfig (v1.52)   ok: found v1.56
> Checking for             CGI (v2.93)   ok: found v3.10
> Checking for    Data::Dumper (any)     ok: found v2.121_02
> Checking for    Date::Format (v2.21)   ok: found v2.22
> Checking for             DBI (v1.38)   ok: found v1.48
> Checking for      File::Spec (v0.84)   ok: found v3.01
> Checking for      File::Temp (any)     ok: found v0.14
> Checking for        Template (v2.08)   ok: found v2.13
> Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
> Checking for    Mail::Mailer (v1.67)   ok: found v1.67
> Checking for    MIME::Base64 (v3.01)   ok: found v3.05
> Checking for    MIME::Parser (v5.406)  ok: found v5.420
> Checking for        Storable (any)     ok: found v2.13
>
> The following Perl modules are optional:
> Checking for              GD (v1.20)   ok: found v2.16
> Checking for     Chart::Base (v1.0)    ok: found v2.3
> Checking for       XML::Twig (any)     ok: found v3.23
> Checking for       GD::Graph (any)     ok: found v1.43
> Checking for GD::Text::Align (any)     ok: found v1.18
> Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
> Checking for   Image::Magick (any)      not found
>
> If you want to convert BMP image attachments to PNG to conserve
> disk space, you will need to install the ImageMagick application
> Available from http://www.imagemagick.org, and the Image::Magick
> Perl module by running (as root):
>
>    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'
>
> Checking user setup ...
> Removing existing compiled templates ...
> Precompiling templates ...
> Checking for      DBD::mysql (v2.9003) ok: found v2.9007
> Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
> Checking for        GraphViz (any)     ok: found
>
> Adding new index 'versions_product_id_idx' to the versions table ...
> <h1>Software error:</h1>
> <pre>DBD::mysql::db do failed: Duplicate entry '16-4.2' for key 1 at
> Bugzilla/DB.pm line 479
>
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
> Bugzilla/DB.pm line 452
>
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
> ./checksetup.pl line 4029
> </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>
> [Fri Apr 28 10:35:44 2006] checksetup.pl: DBD::mysql::db do failed:
> Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
> [Fri Apr 28 10:35:44 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
> Bugzilla/DB.pm line 452
> [Fri Apr 28 10:35:44 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
> ./checksetup.pl line 4029
> [root@pinguinserver bugzilla-2.22]#
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Here is the code of checksetup.pl (from line 4029):
>
> $dbh->bz_add_index('versions', 'versions_product_id_idx',
>                    {TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]});
>
> I don't know what is the '16-4.2' value... It's not from the original
> versions table, and cannot be a product_id...
>
> Any idea?
>
> best regards,
>
> Christophe
> _______________________________________________
> support-bugzilla mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/support-bugzilla
> .
>
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Re: Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

Naslain Christophe
In reply to this post by Naslain Christophe
I have followed the recommandations found in
http://www.bugzilla.org/releases/2.22/release-notes.html (Steps for
Upgrading) and apply point #4: "You can also use a brand-new Bugzilla
directory, as long as you copy over the old data/ directory and the
"localconfig" file to the new installation."

- I run sanity check on the 2.19 database + dump + import on a test database
- I installed a brand new bugzilla 2.22 on the test server
- Then I copy over data/ and localconfig from the 2.19.2 version,
configure and re-run checksetup.pl

This is what is explained in the doc and seems to be equal to your
process except I work on a test server (and if I remember well, this is
also what I did between the 2.16 and 2.19).

Do I have to migrate from an intermediate version (2.20 for example) ?

Here is the complete log of the second checksetup.pl

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[root@pinguinserver bugzilla-2.22]# ./checksetup.pl

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.56
Checking for             CGI (v2.93)   ok: found v3.10
Checking for    Data::Dumper (any)     ok: found v2.121_02
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.38)   ok: found v1.48
Checking for      File::Spec (v0.84)   ok: found v3.01
Checking for      File::Temp (any)     ok: found v0.14
Checking for        Template (v2.08)   ok: found v2.13
Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
Checking for    Mail::Mailer (v1.67)   ok: found v1.67
Checking for    MIME::Base64 (v3.01)   ok: found v3.05
Checking for    MIME::Parser (v5.406)  ok: found v5.420
Checking for        Storable (any)     ok: found v2.13

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v2.16
Checking for     Chart::Base (v1.0)    ok: found v2.3
Checking for       XML::Twig (any)     ok: found v3.23
Checking for       GD::Graph (any)     ok: found v1.43
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
Checking for   Image::Magick (any)      not found

If you want to convert BMP image attachments to PNG to conserve
disk space, you will need to install the ImageMagick application
Available from http://www.imagemagick.org, and the Image::Magick
Perl module by running (as root):

    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'

Checking user setup ...

The following settings in your localconfig file are no longer used:
   @severities, @priorities, @opsys, @platforms
This data is now controlled through the Bugzilla administrative interface.
We recommend you remove these settings from localconfig after checksetup
runs successfully.

This version of Bugzilla contains some variables that you may
want to change and adapt to your local settings. Please edit the
file './localconfig' and rerun checksetup.pl

The following variables are new to localconfig since you last ran
checksetup.pl:   db_driver

[root@pinguinserver bugzilla-2.22]# emacs localconfig &
[1] 17429
You have new mail in /var/spool/mail/root
[root@pinguinserver bugzilla-2.22]#
[root@pinguinserver bugzilla-2.22]#
[root@pinguinserver bugzilla-2.22]# ./checksetup.pl

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.56
Checking for             CGI (v2.93)   ok: found v3.10
Checking for    Data::Dumper (any)     ok: found v2.121_02
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.38)   ok: found v1.48
Checking for      File::Spec (v0.84)   ok: found v3.01
Checking for      File::Temp (any)     ok: found v0.14
Checking for        Template (v2.08)   ok: found v2.13
Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
Checking for    Mail::Mailer (v1.67)   ok: found v1.67
Checking for    MIME::Base64 (v3.01)   ok: found v3.05
Checking for    MIME::Parser (v5.406)  ok: found v5.420
Checking for        Storable (any)     ok: found v2.13

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v2.16
Checking for     Chart::Base (v1.0)    ok: found v2.3
Checking for       XML::Twig (any)     ok: found v3.23
Checking for       GD::Graph (any)     ok: found v1.43
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
Checking for   Image::Magick (any)      not found

If you want to convert BMP image attachments to PNG to conserve
disk space, you will need to install the ImageMagick application
Available from http://www.imagemagick.org, and the Image::Magick
Perl module by running (as root):

    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'

Checking user setup ...
Creating local attachments directory ...
Creating graphs directory...
Creating ./data/attachments/.htaccess...
Creating Bugzilla/.htaccess...
Creating ./template/.htaccess...
The following parameters are no longer used in Bugzilla, and so have been
moved from your parameters file into old-params.txt:
browserbugmessage
Removing existing compiled templates ...
Precompiling templates ...
Checking for      DBD::mysql (v2.9003) ok: found v2.9007
Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
Checking for        GraphViz (any)     ok: found


We are about to rename old indexes.
The estimated time to complete renaming is 13 minutes.
You cannot interrupt this action once it has begun.
If you would like to cancel, press Ctrl-C now... (Waiting 45 seconds...)

Renaming indexes...
Removing index 'creator_2' from the series table...
Renaming index bug_id to attachments_bug_id_idx...
Renaming index creation_ts to attachments_creation_ts_idx...
Renaming index bug_id to bug_group_map_bug_id_idx...
Renaming index group_id to bug_group_map_group_id_idx...
Renaming index priority to bugs_priority_idx...
Renaming index reporter to bugs_reporter_idx...
Renaming index product_id to bugs_product_id_idx...
Renaming index creation_ts to bugs_creation_ts_idx...
Renaming index assigned_to to bugs_assigned_to_idx...
Renaming index qa_contact to bugs_qa_contact_idx...
Renaming index short_desc to bugs_short_desc_idx...
Renaming index votes to bugs_votes_idx...
Renaming index bug_severity to bugs_bug_severity_idx...
Renaming index bug_status to bugs_bug_status_idx...
Renaming index delta_ts to bugs_delta_ts_idx...
Renaming index version to bugs_version_idx...
Renaming index component_id to bugs_component_id_idx...
Renaming index resolution to bugs_resolution_idx...
Renaming index target_milestone to bugs_target_milestone_idx...
Renaming index alias to bugs_alias_idx...
Renaming index op_sys to bugs_op_sys_idx...
Renaming index bug_id to bugs_activity_bug_id_idx...
Renaming index bug_when to bugs_activity_bug_when_idx...
Renaming index fieldid to bugs_activity_fieldid_idx...
Renaming index category_id to category_group_map_category_id_idx...
Renaming index bug_id to cc_bug_id_idx...
Renaming index who to cc_who_idx...
Renaming index name to classifications_name_idx...
Renaming index product_id to components_product_id_idx...
Renaming index name to components_name_idx...
Renaming index blocked to dependencies_blocked_idx...
Renaming index dependson to dependencies_dependson_idx...
Renaming index sortkey to fielddefs_sortkey_idx...
Renaming index name to fielddefs_name_idx...
Renaming index type_id to flagexclusions_type_id_idx...
Renaming index type_id to flaginclusions_type_id_idx...
Renaming index bug_id to flags_bug_id_idx...
Renaming index setter_id to flags_setter_id_idx...
Renaming index requestee_id to flags_requestee_id_idx...
Renaming index product_id to group_control_map_product_id_idx...
Renaming index group_id to group_control_map_group_id_idx...
Renaming index member_id to group_group_map_member_id_idx...
Renaming index name to groups_name_idx...
Renaming index name to keyworddefs_name_idx...
Renaming index keywordid to keywords_keywordid_idx...
Renaming index bug_id to keywords_bug_id_idx...
Renaming index lastused to logincookies_lastused_idx...
Renaming index bug_id to longdescs_bug_id_idx...
Renaming index bug_when to longdescs_bug_when_idx...
Renaming index who to longdescs_who_idx...
Renaming index thetext to longdescs_thetext_idx...
Renaming index product_id to milestones_product_id_idx...
Renaming index userid to namedqueries_userid_idx...
Renaming index name to products_name_idx...
Renaming index login_name to profiles_login_name_idx...
Renaming index userid to profiles_activity_userid_idx...
Renaming index profiles_when to profiles_activity_profiles_when_idx...
Renaming index fieldid to profiles_activity_fieldid_idx...
Renaming index login_name to profiles_svg_login_name_idx...
Renaming index creator to series_creator_idx...
Renaming index name to series_categories_name_idx...
Renaming index series_id to series_data_series_id_idx...
Renaming index userid to tokens_userid_idx...
Renaming index user_id to user_group_map_user_id_idx...
Renaming index bug_id to votes_bug_id_idx...
Renaming index who to votes_who_idx...
Renaming index watcher to watch_watcher_idx...
Renaming index watched to watch_watched_idx...
Renaming index eventid to whine_queries_eventid_idx...
Renaming index run_next to whine_schedules_run_next_idx...
Renaming index eventid to whine_schedules_eventid_idx...
Building Schema object from database...
Adding new table bz_schema ...
Initializing the new Schema storage...
Adding new table attach_data ...
Adding new table bug_severity ...
Adding new table bug_status ...
Adding new table email_setting ...
Adding new table op_sys ...
Adding new table priority ...
Adding new table profile_setting ...
Adding new table rep_platform ...
Adding new table resolution ...
Adding new table setting ...
Adding new table setting_value ...
Updating column delta_ts in table bugs ...
Old: TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'
New: datetime NOT NULL
Converting attach_data maximum size to 100G...
SQL fragment found in the 'fielddefs' table...
Old field name: (to_days(now()) - to_days(bugs.delta_ts))
Fixing saved searches...
Fixing the 'fielddefs' table...
New field name: days_elapsed
Inserting value 'P1' in table priority with sortkey 100...
Inserting value 'P2' in table priority with sortkey 200...
Inserting value 'P3' in table priority with sortkey 300...
Inserting value 'P4' in table priority with sortkey 400...
Inserting value 'P5' in table priority with sortkey 500...
Inserting value 'UNCONFIRMED' in table bug_status with sortkey 100...
Inserting value 'NEW' in table bug_status with sortkey 200...
Inserting value 'ASSIGNED' in table bug_status with sortkey 300...
Inserting value 'REOPENED' in table bug_status with sortkey 400...
Inserting value 'RESOLVED' in table bug_status with sortkey 500...
Inserting value 'VERIFIED' in table bug_status with sortkey 600...
Inserting value 'CLOSED' in table bug_status with sortkey 700...
Inserting value 'All' in table rep_platform with sortkey 100...
Inserting value 'DEC' in table rep_platform with sortkey 200...
Inserting value 'HP' in table rep_platform with sortkey 300...
Inserting value 'Macintosh' in table rep_platform with sortkey 400...
Inserting value 'PC' in table rep_platform with sortkey 500...
Inserting value 'SGI' in table rep_platform with sortkey 600...
Inserting value 'Sun' in table rep_platform with sortkey 700...
Inserting value 'Other' in table rep_platform with sortkey 800...
Inserting value '' in table resolution with sortkey 100...
Inserting value 'FIXED' in table resolution with sortkey 200...
Inserting value 'INVALID' in table resolution with sortkey 300...
Inserting value 'WONTFIX' in table resolution with sortkey 400...
Inserting value 'LATER' in table resolution with sortkey 500...
Inserting value 'REMIND' in table resolution with sortkey 600...
Inserting value 'DUPLICATE' in table resolution with sortkey 700...
Inserting value 'WORKSFORME' in table resolution with sortkey 800...
Inserting value 'MOVED' in table resolution with sortkey 900...
Inserting value 'blocker' in table bug_severity with sortkey 100...
Inserting value 'critical' in table bug_severity with sortkey 200...
Inserting value 'major' in table bug_severity with sortkey 300...
Inserting value 'normal' in table bug_severity with sortkey 400...
Inserting value 'minor' in table bug_severity with sortkey 500...
Inserting value 'trivial' in table bug_severity with sortkey 600...
Inserting value 'enhancement' in table bug_severity with sortkey 700...
Inserting value 'All' in table op_sys with sortkey 100...
Inserting value 'Windows 3.1' in table op_sys with sortkey 200...
Inserting value 'Windows 95' in table op_sys with sortkey 300...
Inserting value 'Windows 98' in table op_sys with sortkey 400...
Inserting value 'Windows ME' in table op_sys with sortkey 500...
Inserting value 'Windows 2000' in table op_sys with sortkey 600...
Inserting value 'Windows 2000 server' in table op_sys with sortkey 700...
Inserting value 'Windows NT' in table op_sys with sortkey 800...
Inserting value 'Windows XP' in table op_sys with sortkey 900...
Inserting value 'Windows XP & 2000' in table op_sys with sortkey 1000...
Inserting value 'Windows XP 64' in table op_sys with sortkey 1100...
Inserting value 'Windows 2003 server' in table op_sys with sortkey 1200...
Inserting value 'Windows Vista' in table op_sys with sortkey 1300...
Inserting value 'Mac System 7' in table op_sys with sortkey 1400...
Inserting value 'Mac System 7.5' in table op_sys with sortkey 1500...
Inserting value 'Mac System 7.6.1' in table op_sys with sortkey 1600...
Inserting value 'Mac System 8.0' in table op_sys with sortkey 1700...
Inserting value 'Mac System 8.5' in table op_sys with sortkey 1800...
Inserting value 'Mac System 8.6' in table op_sys with sortkey 1900...
Inserting value 'Mac System 9.x' in table op_sys with sortkey 2000...
Inserting value 'Mac OS X 10.0' in table op_sys with sortkey 2100...
Inserting value 'Mac OS X 10.1' in table op_sys with sortkey 2200...
Inserting value 'Mac OS X 10.2' in table op_sys with sortkey 2300...
Inserting value 'Linux' in table op_sys with sortkey 2400...
Inserting value 'BSDI' in table op_sys with sortkey 2500...
Inserting value 'FreeBSD' in table op_sys with sortkey 2600...
Inserting value 'NetBSD' in table op_sys with sortkey 2700...
Inserting value 'OpenBSD' in table op_sys with sortkey 2800...
Inserting value 'AIX' in table op_sys with sortkey 2900...
Inserting value 'BeOS' in table op_sys with sortkey 3000...
Inserting value 'HP-UX' in table op_sys with sortkey 3100...
Inserting value 'IRIX' in table op_sys with sortkey 3200...
Inserting value 'Neutrino' in table op_sys with sortkey 3300...
Inserting value 'OpenVMS' in table op_sys with sortkey 3400...
Inserting value 'OS/2' in table op_sys with sortkey 3500...
Inserting value 'OSF/1' in table op_sys with sortkey 3600...
Inserting value 'Solaris' in table op_sys with sortkey 3700...
Inserting value 'SunOS' in table op_sys with sortkey 3800...
Inserting value 'other' in table op_sys with sortkey 3900...
Updating column cryptpassword in table profiles ...
Old: varchar(34)
New: varchar(128)
Adding new column deadline to table bugs ...
Changing column mailto_userid in table whine_schedules to be named mailto...
Adding new column mailto_type to table whine_schedules ...
Adding new column already_wrapped to table longdescs ...
Fixing old, mis-wrapped comments...
Updating column bug_status in table bugs ...
Old: ENUM DEFAULT 'UNCONFIRMED' NOT NULL
New: varchar(64) NOT NULL
Updating column resolution in table bugs ...
Old: ENUM DEFAULT '' NOT NULL
New: varchar(64) DEFAULT '' NOT NULL
Updating column priority in table bugs ...
Old: ENUM DEFAULT 'P1' NOT NULL
New: varchar(64) NOT NULL
Updating column bug_severity in table bugs ...
Old: ENUM DEFAULT 'blocker' NOT NULL
New: varchar(64) NOT NULL
Updating column rep_platform in table bugs ...
Old: ENUM
New: varchar(64) NOT NULL
Updating column op_sys in table bugs ...
Old: ENUM DEFAULT 'All' NOT NULL
New: varchar(64) NOT NULL
Updating column userid in table quips ...
Old: mediumint NOT NULL
New: mediumint
Changing owner to NULL for quips where the owner is unknown...
Adding new column obsolete to table fielddefs ...
Marking qacontact_accessible and assignee_accessible as obsolete fields...
Adding new index 'bugs_activity_who_idx' to the bugs_activity table ...
Updating column lastdiffed in table bugs ...
Old: datetime NOT NULL
New: datetime
Updating column qa_contact in table bugs ...
Old: mediumint NOT NULL
New: mediumint
Updating column initialqacontact in table components ...
Old: mediumint NOT NULL
New: mediumint
Migrating email preferences to new table ...
Deleting unused column emailflags from table profiles ...
Initializing "Dependency Tree Changes" email_setting ...
Updating column public in table series ...
New: tinyint DEFAULT 0 NOT NULL
Updating column isactive in table bug_status ...
New: tinyint DEFAULT 1 NOT NULL
Updating column isactive in table rep_platform ...
New: tinyint DEFAULT 1 NOT NULL
Updating column isactive in table resolution ...
New: tinyint DEFAULT 1 NOT NULL
Updating column isactive in table op_sys ...
New: tinyint DEFAULT 1 NOT NULL
Updating column isactive in table bug_severity ...
New: tinyint DEFAULT 1 NOT NULL
Updating column isactive in table priority ...
New: tinyint DEFAULT 1 NOT NULL
Updating column approved in table quips ...
New: tinyint DEFAULT 1 NOT NULL
Updating column classification_id in table products ...
Old: smallint DEFAULT 1
New: smallint DEFAULT 1 NOT NULL
Adding new index 'flags_type_id_idx' to the flags table ...
Updating column value in table versions ...
Old: tinytext
New: varchar(64) NOT NULL
Adding new index 'versions_product_id_idx' to the versions table ...
<h1>Software error:</h1>
<pre>DBD::mysql::db do failed: Duplicate entry '17-4.0c2p8' for key 1 at
Bugzilla/DB.pm line 479
 
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
Bugzilla/DB.pm line 452
 
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
./checksetup.pl line 4029
</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>
[Fri Apr 28 16:49:23 2006] checksetup.pl: DBD::mysql::db do failed:
Duplicate entry '17-4.0c2p8' for key 1 at Bugzilla/DB.pm line 479
[Fri Apr 28 16:49:23 2006] checksetup.pl:
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
Bugzilla/DB.pm line 452
[Fri Apr 28 16:49:23 2006] checksetup.pl:
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
./checksetup.pl line 4029
[1]+  Done                    emacs localconfig
[root@pinguinserver bugzilla-2.22]#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Michael Bellomo wrote:

> You can't just copy bugzilla like that between different versions.
> Here's what you want to do:
>
> - run sanitycheck on bugzilla 2.19.2 (old server)
> - upgrade old server to bugzilla 2.22
> - dump bugzilla 2.22 database
> - untar bugzilla-2.22.tar.gz to virtual host
> - copy data/ and localconfig file from old server to new server (You'll
> also want to copy templates if you've modified them)
> - run checksetup.pl on 2.22
> - install new required perl packages
> - re-run checksetup.pl on 2.22
>
> Christophe Naslain wrote:
>
>>Hi,
>>
>>We are upgrading our MySQL server to 5.0 and our bugzilla 2.19.2 does
>>not support such version of MySQL... so I'm trying to upgrade bugzilla
>>to 2.22.
>>
>>I've created a new virtual host to test the migration. Here is the test
>>config: Linux Fedora Core 4 / MySQL 4.1 / Apache 2.0 / PHP 5.0 / Perl
>>5.8.6
>>
>>Step by step:
>>- run sanitycheck on bugzilla 2.19.2
>>- dump bugzilla 2.19.2 database
>>- untar bugzilla-2.22.tar.gz to virtual host
>>- copy data/ and localconfig file from 2.19.2 to 2.22
>>- run checksetup.pl on 2.22
>>- install new required perl packages
>>- re-run checksetup.pl on 2.22
>>
>>here is the error message:
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>[root@pinguinserver bugzilla-2.22]# ./checksetup.pl
>>
>>Checking perl modules ...
>>Checking for       AppConfig (v1.52)   ok: found v1.56
>>Checking for             CGI (v2.93)   ok: found v3.10
>>Checking for    Data::Dumper (any)     ok: found v2.121_02
>>Checking for    Date::Format (v2.21)   ok: found v2.22
>>Checking for             DBI (v1.38)   ok: found v1.48
>>Checking for      File::Spec (v0.84)   ok: found v3.01
>>Checking for      File::Temp (any)     ok: found v0.14
>>Checking for        Template (v2.08)   ok: found v2.13
>>Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
>>Checking for    Mail::Mailer (v1.67)   ok: found v1.67
>>Checking for    MIME::Base64 (v3.01)   ok: found v3.05
>>Checking for    MIME::Parser (v5.406)  ok: found v5.420
>>Checking for        Storable (any)     ok: found v2.13
>>
>>The following Perl modules are optional:
>>Checking for              GD (v1.20)   ok: found v2.16
>>Checking for     Chart::Base (v1.0)    ok: found v2.3
>>Checking for       XML::Twig (any)     ok: found v3.23
>>Checking for       GD::Graph (any)     ok: found v1.43
>>Checking for GD::Text::Align (any)     ok: found v1.18
>>Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
>>Checking for   Image::Magick (any)      not found
>>
>>If you want to convert BMP image attachments to PNG to conserve
>>disk space, you will need to install the ImageMagick application
>>Available from http://www.imagemagick.org, and the Image::Magick
>>Perl module by running (as root):
>>
>>   /usr/bin/perl -MCPAN -e 'install "Image::Magick"'
>>
>>Checking user setup ...
>>Removing existing compiled templates ...
>>Precompiling templates ...
>>Checking for      DBD::mysql (v2.9003) ok: found v2.9007
>>Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
>>Checking for        GraphViz (any)     ok: found
>>
>>Adding new index 'versions_product_id_idx' to the versions table ...
>><h1>Software error:</h1>
>><pre>DBD::mysql::db do failed: Duplicate entry '16-4.2' for key 1 at
>>Bugzilla/DB.pm line 479
>>
>>Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>Bugzilla/DB.pm line 452
>>
>>Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>./checksetup.pl line 4029
>></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>
>>[Fri Apr 28 10:35:44 2006] checksetup.pl: DBD::mysql::db do failed:
>>Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
>>[Fri Apr 28 10:35:44 2006] checksetup.pl:
>>Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>Bugzilla/DB.pm line 452
>>[Fri Apr 28 10:35:44 2006] checksetup.pl:
>>Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>./checksetup.pl line 4029
>>[root@pinguinserver bugzilla-2.22]#
>>
>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>Here is the code of checksetup.pl (from line 4029):
>>
>>$dbh->bz_add_index('versions', 'versions_product_id_idx',
>>                   {TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]});
>>
>>I don't know what is the '16-4.2' value... It's not from the original
>>versions table, and cannot be a product_id...
>>
>>Any idea?
>>
>>best regards,
>>
>>Christophe
>>_______________________________________________
>>support-bugzilla mailing list
>>[hidden email]
>>https://lists.mozilla.org/listinfo/support-bugzilla
>>.
>>
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Re: Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

Matthias Buchebner
Hi,
It fails because the checksetup.pl-script tries to insert a duplicate key
into the database. What I would do is:
*read checksetup.pl to identifiy the reason why it tries to do that
*maybe try to remove the record (if you backed up your database, nothing can
happen.
Good luck,
Matthias

"Christophe Naslain" <[hidden email]> wrote in message
news:[hidden email]...

>I have followed the recommandations found in
>http://www.bugzilla.org/releases/2.22/release-notes.html (Steps for
>Upgrading) and apply point #4: "You can also use a brand-new Bugzilla
>directory, as long as you copy over the old data/ directory and the
>"localconfig" file to the new installation."
>
> - I run sanity check on the 2.19 database + dump + import on a test
> database
> - I installed a brand new bugzilla 2.22 on the test server
> - Then I copy over data/ and localconfig from the 2.19.2 version,
> configure and re-run checksetup.pl
>
> This is what is explained in the doc and seems to be equal to your process
> except I work on a test server (and if I remember well, this is also what
> I did between the 2.16 and 2.19).
>
> Do I have to migrate from an intermediate version (2.20 for example) ?
>
> Here is the complete log of the second checksetup.pl
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [root@pinguinserver bugzilla-2.22]# ./checksetup.pl
>
> Checking perl modules ...
> Checking for       AppConfig (v1.52)   ok: found v1.56
> Checking for             CGI (v2.93)   ok: found v3.10
> Checking for    Data::Dumper (any)     ok: found v2.121_02
> Checking for    Date::Format (v2.21)   ok: found v2.22
> Checking for             DBI (v1.38)   ok: found v1.48
> Checking for      File::Spec (v0.84)   ok: found v3.01
> Checking for      File::Temp (any)     ok: found v0.14
> Checking for        Template (v2.08)   ok: found v2.13
> Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
> Checking for    Mail::Mailer (v1.67)   ok: found v1.67
> Checking for    MIME::Base64 (v3.01)   ok: found v3.05
> Checking for    MIME::Parser (v5.406)  ok: found v5.420
> Checking for        Storable (any)     ok: found v2.13
>
> The following Perl modules are optional:
> Checking for              GD (v1.20)   ok: found v2.16
> Checking for     Chart::Base (v1.0)    ok: found v2.3
> Checking for       XML::Twig (any)     ok: found v3.23
> Checking for       GD::Graph (any)     ok: found v1.43
> Checking for GD::Text::Align (any)     ok: found v1.18
> Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
> Checking for   Image::Magick (any)      not found
>
> If you want to convert BMP image attachments to PNG to conserve
> disk space, you will need to install the ImageMagick application
> Available from http://www.imagemagick.org, and the Image::Magick
> Perl module by running (as root):
>
>    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'
>
> Checking user setup ...
>
> The following settings in your localconfig file are no longer used:
>   @severities, @priorities, @opsys, @platforms
> This data is now controlled through the Bugzilla administrative interface.
> We recommend you remove these settings from localconfig after checksetup
> runs successfully.
>
> This version of Bugzilla contains some variables that you may
> want to change and adapt to your local settings. Please edit the
> file './localconfig' and rerun checksetup.pl
>
> The following variables are new to localconfig since you last ran
> checksetup.pl:   db_driver
>
> [root@pinguinserver bugzilla-2.22]# emacs localconfig &
> [1] 17429
> You have new mail in /var/spool/mail/root
> [root@pinguinserver bugzilla-2.22]#
> [root@pinguinserver bugzilla-2.22]#
> [root@pinguinserver bugzilla-2.22]# ./checksetup.pl
>
> Checking perl modules ...
> Checking for       AppConfig (v1.52)   ok: found v1.56
> Checking for             CGI (v2.93)   ok: found v3.10
> Checking for    Data::Dumper (any)     ok: found v2.121_02
> Checking for    Date::Format (v2.21)   ok: found v2.22
> Checking for             DBI (v1.38)   ok: found v1.48
> Checking for      File::Spec (v0.84)   ok: found v3.01
> Checking for      File::Temp (any)     ok: found v0.14
> Checking for        Template (v2.08)   ok: found v2.13
> Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
> Checking for    Mail::Mailer (v1.67)   ok: found v1.67
> Checking for    MIME::Base64 (v3.01)   ok: found v3.05
> Checking for    MIME::Parser (v5.406)  ok: found v5.420
> Checking for        Storable (any)     ok: found v2.13
>
> The following Perl modules are optional:
> Checking for              GD (v1.20)   ok: found v2.16
> Checking for     Chart::Base (v1.0)    ok: found v2.3
> Checking for       XML::Twig (any)     ok: found v3.23
> Checking for       GD::Graph (any)     ok: found v1.43
> Checking for GD::Text::Align (any)     ok: found v1.18
> Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
> Checking for   Image::Magick (any)      not found
>
> If you want to convert BMP image attachments to PNG to conserve
> disk space, you will need to install the ImageMagick application
> Available from http://www.imagemagick.org, and the Image::Magick
> Perl module by running (as root):
>
>    /usr/bin/perl -MCPAN -e 'install "Image::Magick"'
>
> Checking user setup ...
> Creating local attachments directory ...
> Creating graphs directory...
> Creating ./data/attachments/.htaccess...
> Creating Bugzilla/.htaccess...
> Creating ./template/.htaccess...
> The following parameters are no longer used in Bugzilla, and so have been
> moved from your parameters file into old-params.txt:
> browserbugmessage
> Removing existing compiled templates ...
> Precompiling templates ...
> Checking for      DBD::mysql (v2.9003) ok: found v2.9007
> Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
> Checking for        GraphViz (any)     ok: found
>
>
> We are about to rename old indexes.
> The estimated time to complete renaming is 13 minutes.
> You cannot interrupt this action once it has begun.
> If you would like to cancel, press Ctrl-C now... (Waiting 45 seconds...)
>
> Renaming indexes...
> Removing index 'creator_2' from the series table...
> Renaming index bug_id to attachments_bug_id_idx...
> Renaming index creation_ts to attachments_creation_ts_idx...
> Renaming index bug_id to bug_group_map_bug_id_idx...
> Renaming index group_id to bug_group_map_group_id_idx...
> Renaming index priority to bugs_priority_idx...
> Renaming index reporter to bugs_reporter_idx...
> Renaming index product_id to bugs_product_id_idx...
> Renaming index creation_ts to bugs_creation_ts_idx...
> Renaming index assigned_to to bugs_assigned_to_idx...
> Renaming index qa_contact to bugs_qa_contact_idx...
> Renaming index short_desc to bugs_short_desc_idx...
> Renaming index votes to bugs_votes_idx...
> Renaming index bug_severity to bugs_bug_severity_idx...
> Renaming index bug_status to bugs_bug_status_idx...
> Renaming index delta_ts to bugs_delta_ts_idx...
> Renaming index version to bugs_version_idx...
> Renaming index component_id to bugs_component_id_idx...
> Renaming index resolution to bugs_resolution_idx...
> Renaming index target_milestone to bugs_target_milestone_idx...
> Renaming index alias to bugs_alias_idx...
> Renaming index op_sys to bugs_op_sys_idx...
> Renaming index bug_id to bugs_activity_bug_id_idx...
> Renaming index bug_when to bugs_activity_bug_when_idx...
> Renaming index fieldid to bugs_activity_fieldid_idx...
> Renaming index category_id to category_group_map_category_id_idx...
> Renaming index bug_id to cc_bug_id_idx...
> Renaming index who to cc_who_idx...
> Renaming index name to classifications_name_idx...
> Renaming index product_id to components_product_id_idx...
> Renaming index name to components_name_idx...
> Renaming index blocked to dependencies_blocked_idx...
> Renaming index dependson to dependencies_dependson_idx...
> Renaming index sortkey to fielddefs_sortkey_idx...
> Renaming index name to fielddefs_name_idx...
> Renaming index type_id to flagexclusions_type_id_idx...
> Renaming index type_id to flaginclusions_type_id_idx...
> Renaming index bug_id to flags_bug_id_idx...
> Renaming index setter_id to flags_setter_id_idx...
> Renaming index requestee_id to flags_requestee_id_idx...
> Renaming index product_id to group_control_map_product_id_idx...
> Renaming index group_id to group_control_map_group_id_idx...
> Renaming index member_id to group_group_map_member_id_idx...
> Renaming index name to groups_name_idx...
> Renaming index name to keyworddefs_name_idx...
> Renaming index keywordid to keywords_keywordid_idx...
> Renaming index bug_id to keywords_bug_id_idx...
> Renaming index lastused to logincookies_lastused_idx...
> Renaming index bug_id to longdescs_bug_id_idx...
> Renaming index bug_when to longdescs_bug_when_idx...
> Renaming index who to longdescs_who_idx...
> Renaming index thetext to longdescs_thetext_idx...
> Renaming index product_id to milestones_product_id_idx...
> Renaming index userid to namedqueries_userid_idx...
> Renaming index name to products_name_idx...
> Renaming index login_name to profiles_login_name_idx...
> Renaming index userid to profiles_activity_userid_idx...
> Renaming index profiles_when to profiles_activity_profiles_when_idx...
> Renaming index fieldid to profiles_activity_fieldid_idx...
> Renaming index login_name to profiles_svg_login_name_idx...
> Renaming index creator to series_creator_idx...
> Renaming index name to series_categories_name_idx...
> Renaming index series_id to series_data_series_id_idx...
> Renaming index userid to tokens_userid_idx...
> Renaming index user_id to user_group_map_user_id_idx...
> Renaming index bug_id to votes_bug_id_idx...
> Renaming index who to votes_who_idx...
> Renaming index watcher to watch_watcher_idx...
> Renaming index watched to watch_watched_idx...
> Renaming index eventid to whine_queries_eventid_idx...
> Renaming index run_next to whine_schedules_run_next_idx...
> Renaming index eventid to whine_schedules_eventid_idx...
> Building Schema object from database...
> Adding new table bz_schema ...
> Initializing the new Schema storage...
> Adding new table attach_data ...
> Adding new table bug_severity ...
> Adding new table bug_status ...
> Adding new table email_setting ...
> Adding new table op_sys ...
> Adding new table priority ...
> Adding new table profile_setting ...
> Adding new table rep_platform ...
> Adding new table resolution ...
> Adding new table setting ...
> Adding new table setting_value ...
> Updating column delta_ts in table bugs ...
> Old: TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'
> New: datetime NOT NULL
> Converting attach_data maximum size to 100G...
> SQL fragment found in the 'fielddefs' table...
> Old field name: (to_days(now()) - to_days(bugs.delta_ts))
> Fixing saved searches...
> Fixing the 'fielddefs' table...
> New field name: days_elapsed
> Inserting value 'P1' in table priority with sortkey 100...
> Inserting value 'P2' in table priority with sortkey 200...
> Inserting value 'P3' in table priority with sortkey 300...
> Inserting value 'P4' in table priority with sortkey 400...
> Inserting value 'P5' in table priority with sortkey 500...
> Inserting value 'UNCONFIRMED' in table bug_status with sortkey 100...
> Inserting value 'NEW' in table bug_status with sortkey 200...
> Inserting value 'ASSIGNED' in table bug_status with sortkey 300...
> Inserting value 'REOPENED' in table bug_status with sortkey 400...
> Inserting value 'RESOLVED' in table bug_status with sortkey 500...
> Inserting value 'VERIFIED' in table bug_status with sortkey 600...
> Inserting value 'CLOSED' in table bug_status with sortkey 700...
> Inserting value 'All' in table rep_platform with sortkey 100...
> Inserting value 'DEC' in table rep_platform with sortkey 200...
> Inserting value 'HP' in table rep_platform with sortkey 300...
> Inserting value 'Macintosh' in table rep_platform with sortkey 400...
> Inserting value 'PC' in table rep_platform with sortkey 500...
> Inserting value 'SGI' in table rep_platform with sortkey 600...
> Inserting value 'Sun' in table rep_platform with sortkey 700...
> Inserting value 'Other' in table rep_platform with sortkey 800...
> Inserting value '' in table resolution with sortkey 100...
> Inserting value 'FIXED' in table resolution with sortkey 200...
> Inserting value 'INVALID' in table resolution with sortkey 300...
> Inserting value 'WONTFIX' in table resolution with sortkey 400...
> Inserting value 'LATER' in table resolution with sortkey 500...
> Inserting value 'REMIND' in table resolution with sortkey 600...
> Inserting value 'DUPLICATE' in table resolution with sortkey 700...
> Inserting value 'WORKSFORME' in table resolution with sortkey 800...
> Inserting value 'MOVED' in table resolution with sortkey 900...
> Inserting value 'blocker' in table bug_severity with sortkey 100...
> Inserting value 'critical' in table bug_severity with sortkey 200...
> Inserting value 'major' in table bug_severity with sortkey 300...
> Inserting value 'normal' in table bug_severity with sortkey 400...
> Inserting value 'minor' in table bug_severity with sortkey 500...
> Inserting value 'trivial' in table bug_severity with sortkey 600...
> Inserting value 'enhancement' in table bug_severity with sortkey 700...
> Inserting value 'All' in table op_sys with sortkey 100...
> Inserting value 'Windows 3.1' in table op_sys with sortkey 200...
> Inserting value 'Windows 95' in table op_sys with sortkey 300...
> Inserting value 'Windows 98' in table op_sys with sortkey 400...
> Inserting value 'Windows ME' in table op_sys with sortkey 500...
> Inserting value 'Windows 2000' in table op_sys with sortkey 600...
> Inserting value 'Windows 2000 server' in table op_sys with sortkey 700...
> Inserting value 'Windows NT' in table op_sys with sortkey 800...
> Inserting value 'Windows XP' in table op_sys with sortkey 900...
> Inserting value 'Windows XP & 2000' in table op_sys with sortkey 1000...
> Inserting value 'Windows XP 64' in table op_sys with sortkey 1100...
> Inserting value 'Windows 2003 server' in table op_sys with sortkey 1200...
> Inserting value 'Windows Vista' in table op_sys with sortkey 1300...
> Inserting value 'Mac System 7' in table op_sys with sortkey 1400...
> Inserting value 'Mac System 7.5' in table op_sys with sortkey 1500...
> Inserting value 'Mac System 7.6.1' in table op_sys with sortkey 1600...
> Inserting value 'Mac System 8.0' in table op_sys with sortkey 1700...
> Inserting value 'Mac System 8.5' in table op_sys with sortkey 1800...
> Inserting value 'Mac System 8.6' in table op_sys with sortkey 1900...
> Inserting value 'Mac System 9.x' in table op_sys with sortkey 2000...
> Inserting value 'Mac OS X 10.0' in table op_sys with sortkey 2100...
> Inserting value 'Mac OS X 10.1' in table op_sys with sortkey 2200...
> Inserting value 'Mac OS X 10.2' in table op_sys with sortkey 2300...
> Inserting value 'Linux' in table op_sys with sortkey 2400...
> Inserting value 'BSDI' in table op_sys with sortkey 2500...
> Inserting value 'FreeBSD' in table op_sys with sortkey 2600...
> Inserting value 'NetBSD' in table op_sys with sortkey 2700...
> Inserting value 'OpenBSD' in table op_sys with sortkey 2800...
> Inserting value 'AIX' in table op_sys with sortkey 2900...
> Inserting value 'BeOS' in table op_sys with sortkey 3000...
> Inserting value 'HP-UX' in table op_sys with sortkey 3100...
> Inserting value 'IRIX' in table op_sys with sortkey 3200...
> Inserting value 'Neutrino' in table op_sys with sortkey 3300...
> Inserting value 'OpenVMS' in table op_sys with sortkey 3400...
> Inserting value 'OS/2' in table op_sys with sortkey 3500...
> Inserting value 'OSF/1' in table op_sys with sortkey 3600...
> Inserting value 'Solaris' in table op_sys with sortkey 3700...
> Inserting value 'SunOS' in table op_sys with sortkey 3800...
> Inserting value 'other' in table op_sys with sortkey 3900...
> Updating column cryptpassword in table profiles ...
> Old: varchar(34)
> New: varchar(128)
> Adding new column deadline to table bugs ...
> Changing column mailto_userid in table whine_schedules to be named
> mailto...
> Adding new column mailto_type to table whine_schedules ...
> Adding new column already_wrapped to table longdescs ...
> Fixing old, mis-wrapped comments...
> Updating column bug_status in table bugs ...
> Old: ENUM DEFAULT 'UNCONFIRMED' NOT NULL
> New: varchar(64) NOT NULL
> Updating column resolution in table bugs ...
> Old: ENUM DEFAULT '' NOT NULL
> New: varchar(64) DEFAULT '' NOT NULL
> Updating column priority in table bugs ...
> Old: ENUM DEFAULT 'P1' NOT NULL
> New: varchar(64) NOT NULL
> Updating column bug_severity in table bugs ...
> Old: ENUM DEFAULT 'blocker' NOT NULL
> New: varchar(64) NOT NULL
> Updating column rep_platform in table bugs ...
> Old: ENUM
> New: varchar(64) NOT NULL
> Updating column op_sys in table bugs ...
> Old: ENUM DEFAULT 'All' NOT NULL
> New: varchar(64) NOT NULL
> Updating column userid in table quips ...
> Old: mediumint NOT NULL
> New: mediumint
> Changing owner to NULL for quips where the owner is unknown...
> Adding new column obsolete to table fielddefs ...
> Marking qacontact_accessible and assignee_accessible as obsolete fields...
> Adding new index 'bugs_activity_who_idx' to the bugs_activity table ...
> Updating column lastdiffed in table bugs ...
> Old: datetime NOT NULL
> New: datetime
> Updating column qa_contact in table bugs ...
> Old: mediumint NOT NULL
> New: mediumint
> Updating column initialqacontact in table components ...
> Old: mediumint NOT NULL
> New: mediumint
> Migrating email preferences to new table ...
> Deleting unused column emailflags from table profiles ...
> Initializing "Dependency Tree Changes" email_setting ...
> Updating column public in table series ...
> New: tinyint DEFAULT 0 NOT NULL
> Updating column isactive in table bug_status ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column isactive in table rep_platform ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column isactive in table resolution ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column isactive in table op_sys ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column isactive in table bug_severity ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column isactive in table priority ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column approved in table quips ...
> New: tinyint DEFAULT 1 NOT NULL
> Updating column classification_id in table products ...
> Old: smallint DEFAULT 1
> New: smallint DEFAULT 1 NOT NULL
> Adding new index 'flags_type_id_idx' to the flags table ...
> Updating column value in table versions ...
> Old: tinytext
> New: varchar(64) NOT NULL
> Adding new index 'versions_product_id_idx' to the versions table ...
> <h1>Software error:</h1>
> <pre>DBD::mysql::db do failed: Duplicate entry '17-4.0c2p8' for key 1 at
> Bugzilla/DB.pm line 479
>
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> Bugzilla/DB.pm line 452
>
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> ./checksetup.pl line 4029
> </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>
> [Fri Apr 28 16:49:23 2006] checksetup.pl: DBD::mysql::db do failed:
> Duplicate entry '17-4.0c2p8' for key 1 at Bugzilla/DB.pm line 479
> [Fri Apr 28 16:49:23 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> Bugzilla/DB.pm line 452
> [Fri Apr 28 16:49:23 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> ./checksetup.pl line 4029
> [1]+  Done                    emacs localconfig
> [root@pinguinserver bugzilla-2.22]#
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Michael Bellomo wrote:
>> You can't just copy bugzilla like that between different versions. Here's
>> what you want to do:
>>
>> - run sanitycheck on bugzilla 2.19.2 (old server)
>> - upgrade old server to bugzilla 2.22
>> - dump bugzilla 2.22 database
>> - untar bugzilla-2.22.tar.gz to virtual host
>> - copy data/ and localconfig file from old server to new server (You'll
>> also want to copy templates if you've modified them)
>> - run checksetup.pl on 2.22
>> - install new required perl packages
>> - re-run checksetup.pl on 2.22
>>
>> Christophe Naslain wrote:
>>
>>>Hi,
>>>
>>>We are upgrading our MySQL server to 5.0 and our bugzilla 2.19.2 does
>>>not support such version of MySQL... so I'm trying to upgrade bugzilla
>>>to 2.22.
>>>
>>>I've created a new virtual host to test the migration. Here is the test
>>>config: Linux Fedora Core 4 / MySQL 4.1 / Apache 2.0 / PHP 5.0 / Perl
>>>5.8.6
>>>
>>>Step by step:
>>>- run sanitycheck on bugzilla 2.19.2
>>>- dump bugzilla 2.19.2 database
>>>- untar bugzilla-2.22.tar.gz to virtual host
>>>- copy data/ and localconfig file from 2.19.2 to 2.22
>>>- run checksetup.pl on 2.22
>>>- install new required perl packages
>>>- re-run checksetup.pl on 2.22
>>>
>>>here is the error message:
>>>
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>[root@pinguinserver bugzilla-2.22]# ./checksetup.pl
>>>
>>>Checking perl modules ...
>>>Checking for       AppConfig (v1.52)   ok: found v1.56
>>>Checking for             CGI (v2.93)   ok: found v3.10
>>>Checking for    Data::Dumper (any)     ok: found v2.121_02
>>>Checking for    Date::Format (v2.21)   ok: found v2.22
>>>Checking for             DBI (v1.38)   ok: found v1.48
>>>Checking for      File::Spec (v0.84)   ok: found v3.01
>>>Checking for      File::Temp (any)     ok: found v0.14
>>>Checking for        Template (v2.08)   ok: found v2.13
>>>Checking for      Text::Wrap (v2001.0131) ok: found v2001.09292
>>>Checking for    Mail::Mailer (v1.67)   ok: found v1.67
>>>Checking for    MIME::Base64 (v3.01)   ok: found v3.05
>>>Checking for    MIME::Parser (v5.406)  ok: found v5.420
>>>Checking for        Storable (any)     ok: found v2.13
>>>
>>>The following Perl modules are optional:
>>>Checking for              GD (v1.20)   ok: found v2.16
>>>Checking for     Chart::Base (v1.0)    ok: found v2.3
>>>Checking for       XML::Twig (any)     ok: found v3.23
>>>Checking for       GD::Graph (any)     ok: found v1.43
>>>Checking for GD::Text::Align (any)     ok: found v1.18
>>>Checking for     PatchReader (v0.9.4)  ok: found v0.9.5
>>>Checking for   Image::Magick (any)      not found
>>>
>>>If you want to convert BMP image attachments to PNG to conserve
>>>disk space, you will need to install the ImageMagick application
>>>Available from http://www.imagemagick.org, and the Image::Magick
>>>Perl module by running (as root):
>>>
>>>   /usr/bin/perl -MCPAN -e 'install "Image::Magick"'
>>>
>>>Checking user setup ...
>>>Removing existing compiled templates ...
>>>Precompiling templates ...
>>>Checking for      DBD::mysql (v2.9003) ok: found v2.9007
>>>Checking for           MySQL (v4.0.14) ok: found v4.1.16-log
>>>Checking for        GraphViz (any)     ok: found
>>>
>>>Adding new index 'versions_product_id_idx' to the versions table ...
>>><h1>Software error:</h1>
>>><pre>DBD::mysql::db do failed: Duplicate entry '16-4.2' for key 1 at
>>>Bugzilla/DB.pm line 479
>>>
>>>Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>>Bugzilla/DB.pm line 452
>>>
>>>Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>>./checksetup.pl line 4029
>>></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>
>>>[Fri Apr 28 10:35:44 2006] checksetup.pl: DBD::mysql::db do failed:
>>>Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
>>>[Fri Apr 28 10:35:44 2006] checksetup.pl:
>>>Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>>Bugzilla/DB.pm line 452
>>>[Fri Apr 28 10:35:44 2006] checksetup.pl:
>>>Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc18778c)',
>>>'versions', 'versions_product_id_idx', 'HASH(0xc2ffacc)') called at
>>>./checksetup.pl line 4029
>>>[root@pinguinserver bugzilla-2.22]#
>>>
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>Here is the code of checksetup.pl (from line 4029):
>>>
>>>$dbh->bz_add_index('versions', 'versions_product_id_idx',
>>>                   {TYPE => 'UNIQUE', FIELDS => [qw(product_id value)]});
>>>
>>>I don't know what is the '16-4.2' value... It's not from the original
>>>versions table, and cannot be a product_id...
>>>
>>>Any idea?
>>>
>>>best regards,
>>>
>>>Christophe
>>>_______________________________________________
>>>support-bugzilla mailing list
>>>[hidden email]
>>>https://lists.mozilla.org/listinfo/support-bugzilla
>>>.
>>>


_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Checksetup.pl / Migrating to 2.22 / Multiple products with same vesrsion

Naslain Christophe
In reply to this post by Naslain Christophe
Hi there,

I try to migrate from 2.19 to 2.22 and found some problems running
checksetup.pl. First, I thought about a case sensitive problem in
product versions, but it seems to be a global problem when several
products have the same versions:

first error running checksetup.pl:
[...]
[Fri Apr 28 16:49:23 2006] checksetup.pl: DBD::mysql::db do failed:
Duplicate entry '17-4.0c2p8' for key 1 at Bugzilla/DB.pm line 479
[Fri Apr 28 16:49:23 2006] checksetup.pl:
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
Bugzilla/DB.pm line 452
[Fri Apr 28 16:49:23 2006] checksetup.pl:
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
./checksetup.pl line 4029
[...]

I searched the '%c2p8%' into the version table and found two entries:

SELECT * FROM `versions` WHERE `value` LIKE '%c2p8%';
value   product_id
4.0C2p8  17
4.0c2p8  17

I first think it was a version case sensitive problem. I tried to fix
this by removing this cs duplicate version. I found it into versions and
bugs tables:
- I have removed the 4.0C2p8 version from the version table
- I have updated 4.0C2p8 version in bugs table to 4.0c2p8

I re-run checksetup.pl script: I still have an error, but this time
different than the first:

[...]
[Tue May  2 11:38:53 2006] checksetup.pl: DBD::mysql::db do failed:
Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
[Tue May  2 11:38:53 2006] checksetup.pl:
Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc10b9a0)',
'versions', 'versions_product_id_idx', 'HASH(0xc131b1c)') called at
Bugzilla/DB.pm line 452
[Tue May  2 11:38:53 2006] checksetup.pl:
Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc10b9a0)',
'versions', 'versions_product_id_idx', 'HASH(0xc131b1c)') called at
./checksetup.pl line 4029
[...]

I've looked into the version table looking for '%4.2%'. Of course I've
found several products with this version:

SELECT * FROM `versions` WHERE `value` LIKE '4.2';
value   product_id
4.2 16
4.2 16
4.2 30
4.2 19

This time it's not a case sesitive problem. Looks like bugzilla cannot
upgrade to 2.22 with different products with the same version ???
Any idea of the reason why this problem appears? Does anyone
successfully migrate to 2.22 using several products having the same
versions?

I really need support on this. Please help...

Best regards,

Christophe

Note: i also tried to upgrade from 2.19.2 to 2.20.2 and get the same result.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Re: Checksetup.pl / Migrating to 2.22 / Multiple products with same vesrsion

Naslain Christophe
I finally succed in migrating my bugzilla.
Duplicates in version table was the cause of my problems. I found 4
dupes in my bugzilla. I think the reason is when we add versions that
already exists, but with a different case: bugzilla accepts to add both
V4 and v4. Maybe this could be forbidden...

Thanks to all for your help.

Best regards,

Christophe

Christophe Naslain wrote:

> Hi there,
>
> I try to migrate from 2.19 to 2.22 and found some problems running
> checksetup.pl. First, I thought about a case sensitive problem in
> product versions, but it seems to be a global problem when several
> products have the same versions:
>
> first error running checksetup.pl:
> [...]
> [Fri Apr 28 16:49:23 2006] checksetup.pl: DBD::mysql::db do failed:
> Duplicate entry '17-4.0c2p8' for key 1 at Bugzilla/DB.pm line 479
> [Fri Apr 28 16:49:23 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> Bugzilla/DB.pm line 452
> [Fri Apr 28 16:49:23 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xaa6dd78)',
> 'versions', 'versions_product_id_idx', 'HASH(0xaa94034)') called at
> ./checksetup.pl line 4029
> [...]
>
> I searched the '%c2p8%' into the version table and found two entries:
>
> SELECT * FROM `versions` WHERE `value` LIKE '%c2p8%';
> value       product_id
> 4.0C2p8  17
> 4.0c2p8  17
>
> I first think it was a version case sensitive problem. I tried to fix
> this by removing this cs duplicate version. I found it into versions and
> bugs tables:
> - I have removed the 4.0C2p8 version from the version table
> - I have updated 4.0C2p8 version in bugs table to 4.0c2p8
>
> I re-run checksetup.pl script: I still have an error, but this time
> different than the first:
>
> [...]
> [Tue May  2 11:38:53 2006] checksetup.pl: DBD::mysql::db do failed:
> Duplicate entry '16-4.2' for key 1 at Bugzilla/DB.pm line 479
> [Tue May  2 11:38:53 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index_raw('Bugzilla::DB::Mysql=HASH(0xc10b9a0)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc131b1c)') called at
> Bugzilla/DB.pm line 452
> [Tue May  2 11:38:53 2006] checksetup.pl:
> Bugzilla::DB::bz_add_index('Bugzilla::DB::Mysql=HASH(0xc10b9a0)',
> 'versions', 'versions_product_id_idx', 'HASH(0xc131b1c)') called at
> ./checksetup.pl line 4029
> [...]
>
> I've looked into the version table looking for '%4.2%'. Of course I've
> found several products with this version:
>
> SELECT * FROM `versions` WHERE `value` LIKE '4.2';
> value      product_id
> 4.2     16
> 4.2     16
> 4.2     30
> 4.2     19
>
> This time it's not a case sesitive problem. Looks like bugzilla cannot
> upgrade to 2.22 with different products with the same version ???
> Any idea of the reason why this problem appears? Does anyone
> successfully migrate to 2.22 using several products having the same
> versions?
>
> I really need support on this. Please help...
>
> Best regards,
>
> Christophe
>
> Note: i also tried to upgrade from 2.19.2 to 2.20.2 and get the same
> result.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
Reply | Threaded
Open this post in threaded view
|

Re: Checksetup.pl / Building index error - Migrating from 2.19.2 to 2.22

Max Kanat-Alexander
In reply to this post by Naslain Christophe
On Fri, 2006-04-28 at 12:09 +0200, Christophe Naslain wrote:
> <pre>DBD::mysql::db do failed: Duplicate entry '16-4.2' for key 1 at
> Bugzilla/DB.pm line 479

        That means that you have two versions called "4.2" for product_id 16.
You'll need to fix that manually in the DB before checksetup will run
successfully.

        -Max
--
http://www.everythingsolved.com/
Everything Solved: Competent, Friendly Bugzilla and Linux Services

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla