error when upgrading

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

error when upgrading

Ross, Christine
I have done upgrades before and imported the database and run checksetup.pl without problems.  I am upgrading from 4.2.1 to 4.4.12 on unix with a mysql database.    I install the software, import the database, import the existing data and localconfig file.    When I run checksetup.pl it fails on

Setting up foreign keys...
DBD::mysql::db do failed: Can't create table 'bugzilla.#sql-98e_8' (errno: 121) [for Statement "ALTER TABLE attach_data ADD
     CONSTRAINT fk_attach_data_id_attachments_attach_id FOREIGN KEY (id)
     REFERENCES attachments(attach_id)
      ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
        Bugzilla::DB::bz_add_fks(Bugzilla::DB::Mysql=HASH(0xf5f700), "attach_data", HASH(0x29a33a4), HASH(0x4dc0408)) called at Bugzilla/DB.pm line 542
        Bugzilla::DB::bz_setup_foreign_keys(Bugzilla::DB::Mysql=HASH(0xf5f700)) called at Bugzilla/Install/DB.pm line 722
        Bugzilla::Install::DB::update_table_definitions(HASH(0x5927bc)) called at ./checksetup.pl line 170


I want to import the old database but can't get further.

I have searched and searched, without success.

Help would be appreciated.

Christine

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

Gervase Markham
On 27/10/17 21:30, Ross, Christine wrote:
> I have done upgrades before and imported the database and run
> checksetup.pl without problems.  I am upgrading from 4.2.1 to 4.4.12
> on unix with a mysql database.    I install the software, import the
> database, import the existing data and localconfig file.

What do you mean by "import" in each of these cases? Bugzilla is
designed to be upgraded in-place. Are you creating a new instance of
Bugzilla cloned from the old one and upgrading that?

Is your Bugzilla customized in any way?

Does your MySQL user have sufficient permissions to alter the database?

> When I
> run checksetup.pl it fails on
>
> Setting up foreign keys... DBD::mysql::db do failed: Can't create
> table 'bugzilla.#sql-98e_8' (errno: 121)

I don't know why a foreign key constraint creation would be failing
because we check for existence before creating them...

Gerv


 [for Statement "ALTER TABLE

> attach_data ADD CONSTRAINT fk_attach_data_id_attachments_attach_id
> FOREIGN KEY (id) REFERENCES attachments(attach_id) ON UPDATE CASCADE
> ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
> Bugzilla::DB::bz_add_fks(Bugzilla::DB::Mysql=HASH(0xf5f700),
> "attach_data", HASH(0x29a33a4), HASH(0x4dc0408)) called at
> Bugzilla/DB.pm line 542
> Bugzilla::DB::bz_setup_foreign_keys(Bugzilla::DB::Mysql=HASH(0xf5f700))
> called at Bugzilla/Install/DB.pm line 722
> Bugzilla::Install::DB::update_table_definitions(HASH(0x5927bc))
> called at ./checksetup.pl line 170
>
>
> I want to import the old database but can't get further.
>
> I have searched and searched, without success.
>
> Help would be appreciated.
>
> Christine
>
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

christine.s.ross
I installed bugzilla on a new server and imported the database and data directory.  When I run checksetup.pl and importing the data, I get this error.  

WARNING: There were invalid values in attach_data.id that have been
deleted: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 73, 74,
...

BD::mysql::db do failed: Can't create table 'bugzilla.#sql-322d_6' (errno: 121) [for Statement "ALTER TABLE attach_data ADD
     CONSTRAINT fk_attach_data_id_attachments_attach_id FOREIGN KEY (id)
     REFERENCES attachments(attach_id)
      ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
        Bugzilla::DB::bz_add_fks('Bugzilla::DB::Mysql=HASH(0x677e5f8)', 'attach_data', 'HASH(0x6051378)', 'HASH(0x9ae0240)') called at Bugzilla/DB.pm line 542
        Bugzilla::DB::bz_setup_foreign_keys('Bugzilla::DB::Mysql=HASH(0x677e5f8)') called at Bugzilla/Install/DB.pm line 722
        Bugzilla::Install::DB::update_table_definitions('HASH(0x2914d20)') called at ./checksetup.pl line 170

Any ideas?

On Tuesday, October 31, 2017 at 6:16:46 AM UTC-4, Gervase Markham wrote:

> On 27/10/17 21:30, Ross, Christine wrote:
> > I have done upgrades before and imported the database and run
> > checksetup.pl without problems.  I am upgrading from 4.2.1 to 4.4.12
> > on unix with a mysql database.    I install the software, import the
> > database, import the existing data and localconfig file.
>
> What do you mean by "import" in each of these cases? Bugzilla is
> designed to be upgraded in-place. Are you creating a new instance of
> Bugzilla cloned from the old one and upgrading that?
>
> Is your Bugzilla customized in any way?
>
> Does your MySQL user have sufficient permissions to alter the database?
>
> > When I
> > run checksetup.pl it fails on
> >
> > Setting up foreign keys... DBD::mysql::db do failed: Can't create
> > table 'bugzilla.#sql-98e_8' (errno: 121)
>
> I don't know why a foreign key constraint creation would be failing
> because we check for existence before creating them...
>
> Gerv
>
>
>  [for Statement "ALTER TABLE
> > attach_data ADD CONSTRAINT fk_attach_data_id_attachments_attach_id
> > FOREIGN KEY (id) REFERENCES attachments(attach_id) ON UPDATE CASCADE
> > ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
> > Bugzilla::DB::bz_add_fks(Bugzilla::DB::Mysql=HASH(0xf5f700),
> > "attach_data", HASH(0x29a33a4), HASH(0x4dc0408)) called at
> > Bugzilla/DB.pm line 542
> > Bugzilla::DB::bz_setup_foreign_keys(Bugzilla::DB::Mysql=HASH(0xf5f700))
> > called at Bugzilla/Install/DB.pm line 722
> > Bugzilla::Install::DB::update_table_definitions(HASH(0x5927bc))
> > called at ./checksetup.pl line 170
> >
> >
> > I want to import the old database but can't get further.
> >
> > I have searched and searched, without success.
> >
> > Help would be appreciated.
> >
> > Christine
> >

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

christine.s.ross
Hi.  Yes the database is empty before importing.  The old version is 4.2.1 and the new is 4.4.12.  Already tried the sanity check.  

On Tuesday, December 5, 2017 at 3:28:07 PM UTC-5, Thorsten Schöning wrote:

> Guten Tag [hidden email],
> am Dienstag, 5. Dezember 2017 um 20:52 schrieben Sie:
>
> > I installed bugzilla on a new server and imported the database and
> > data directory.  When I run checksetup.pl and importing the data, I get this error.
>
> Which versions of Bugzilla are you using, new and old?
>
> > WARNING: There were invalid values in attach_data.id that have been
> > deleted: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 73, 74,
> > ...
>
> Try running sanity check in the old installation.
>
> > BD::mysql::db do failed: Can't create table 'bugzilla.#sql-322d_6'
> > (errno: 121) [for Statement "ALTER TABLE attach_data ADD
> >      CONSTRAINT fk_attach_data_id_attachments_attach_id FOREIGN KEY (id)
> >      REFERENCES attachments(attach_id)
> >       ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
>
> Are you sure that the new database has been empty before importing
> your dump and running checksetup.pl? If you ran checksetup.pl multiple
> times in the same database already, drop it and start with a fresh new
> database.
>
> Error 121 most likely means that a foreign key with that name is
> already available or that it can't be created because of wrong data.
> So you need to have a closer look at your database.
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: [hidden email]
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

christine.s.ross
On Tuesday, December 5, 2017 at 3:36:07 PM UTC-5, [hidden email] wrote:

> Hi.  Yes the database is empty before importing.  The old version is 4.2.1 and the new is 4.4.12.  Already tried the sanity check.  
>
> On Tuesday, December 5, 2017 at 3:28:07 PM UTC-5, Thorsten Schöning wrote:
> > Guten Tag [hidden email],
> > am Dienstag, 5. Dezember 2017 um 20:52 schrieben Sie:
> >
> > > I installed bugzilla on a new server and imported the database and
> > > data directory.  When I run checksetup.pl and importing the data, I get this error.
> >
> > Which versions of Bugzilla are you using, new and old?
> >
> > > WARNING: There were invalid values in attach_data.id that have been
> > > deleted: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 73, 74,
> > > ...
> >
> > Try running sanity check in the old installation.
> >
> > > BD::mysql::db do failed: Can't create table 'bugzilla.#sql-322d_6'
> > > (errno: 121) [for Statement "ALTER TABLE attach_data ADD
> > >      CONSTRAINT fk_attach_data_id_attachments_attach_id FOREIGN KEY (id)
> > >      REFERENCES attachments(attach_id)
> > >       ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
> >
> > Are you sure that the new database has been empty before importing
> > your dump and running checksetup.pl? If you ran checksetup.pl multiple
> > times in the same database already, drop it and start with a fresh new
> > database.
> >
> > Error 121 most likely means that a foreign key with that name is
> > already available or that it can't be created because of wrong data.
> > So you need to have a closer look at your database.
> >
> > Mit freundlichen Grüßen,
> >
> > Thorsten Schöning
> >
> > --
> > Thorsten Schöning       E-Mail: [hidden email]
> > AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
> >
> > Telefon...........05151-  9468- 55
> > Fax...............05151-  9468- 88
> > Mobil..............0178-8 9468- 04
> >
> > AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> > AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

I also tried turning off foreign keys check in bugzilla-4.4.12/Bugzilla/DB.pm but that didn't help.

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

christine.s.ross
On Tuesday, December 5, 2017 at 3:37:40 PM UTC-5, [hidden email] wrote:

> On Tuesday, December 5, 2017 at 3:36:07 PM UTC-5, [hidden email] wrote:
> > Hi.  Yes the database is empty before importing.  The old version is 4.2.1 and the new is 4.4.12.  Already tried the sanity check.  
> >
> > On Tuesday, December 5, 2017 at 3:28:07 PM UTC-5, Thorsten Schöning wrote:
> > > Guten Tag [hidden email],
> > > am Dienstag, 5. Dezember 2017 um 20:52 schrieben Sie:
> > >
> > > > I installed bugzilla on a new server and imported the database and
> > > > data directory.  When I run checksetup.pl and importing the data, I get this error.
> > >
> > > Which versions of Bugzilla are you using, new and old?
> > >
> > > > WARNING: There were invalid values in attach_data.id that have been
> > > > deleted: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 73, 74,
> > > > ...
> > >
> > > Try running sanity check in the old installation.
> > >
> > > > BD::mysql::db do failed: Can't create table 'bugzilla.#sql-322d_6'
> > > > (errno: 121) [for Statement "ALTER TABLE attach_data ADD
> > > >      CONSTRAINT fk_attach_data_id_attachments_attach_id FOREIGN KEY (id)
> > > >      REFERENCES attachments(attach_id)
> > > >       ON UPDATE CASCADE ON DELETE CASCADE"] at Bugzilla/DB.pm line 638.
> > >
> > > Are you sure that the new database has been empty before importing
> > > your dump and running checksetup.pl? If you ran checksetup.pl multiple
> > > times in the same database already, drop it and start with a fresh new
> > > database.
> > >
> > > Error 121 most likely means that a foreign key with that name is
> > > already available or that it can't be created because of wrong data.
> > > So you need to have a closer look at your database.
> > >
> > > Mit freundlichen Grüßen,
> > >
> > > Thorsten Schöning
> > >
> > > --
> > > Thorsten Schöning       E-Mail: [hidden email]
> > > AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
> > >
> > > Telefon...........05151-  9468- 55
> > > Fax...............05151-  9468- 88
> > > Mobil..............0178-8 9468- 04
> > >
> > > AM-SoFT GmbH IT/var/www/html/bugzilla-4.4.12/Bugzilla/Install/DB.pm-Systeme, Brandenburger Str. 7c, 31789 Hameln
> > > AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
> I also tried turning off foreign keys check in
bugzilla-4.4.12/Bugzilla/DB.pm but that didn't help.

Correction, I turned off foreign key check in  

/var/www/html/bugzilla-4.4.12/Bugzilla/Install/DB.pm line 153 but that didn't help.

 12/05/2017 - CSR add the following  $dbh->do('SET foreign_key_checks = 0');
sub update_table_definitions {
    my $old_params = shift;
    my $dbh = Bugzilla->dbh;
$dbh->do('SET foreign_key_checks = 0');
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: error when upgrading

christine.s.ross
In reply to this post by christine.s.ross
On Wednesday, December 6, 2017 at 3:25:18 AM UTC-5, Thorsten Schöning wrote:

> Guten Tag [hidden email],
> am Dienstag, 5. Dezember 2017 um 21:36 schrieben Sie:
>
> > The old version is 4.2.1 and the new is 4.4.12.
>
> Any special reason you don't try the latest stable version 5.0.3? It
> may contain relevant fixes.
>
> > Already tried the sanity check.
>
> So what's the result, no problems, everything fixed, something else?
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail: [hidden email]
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

Hello.

No, I can't get past the foreign keys error when running checksetup.pl.  Even after editing the install/DB.pm file not to check (suggested in a post).  Does v5.0.3 address failing foreign keys checks please?  I would love to get this installed.  Thanks for your responses though.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.