Closed
Bug 432605
Opened 17 years ago
Closed 17 years ago
[Oracle] bzdbcopy.pl no longer seems to work in 3.1.4
Categories
(Bugzilla :: Database, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: h.seitz, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080203 SUSE/2.0.0.12-0.1 Firefox/2.0.0.12
Build Identifier:
I've installed the development version 3.1.4 of Bugzilla in a virtual machine
running Novell openSUSE 10.3 with Oracle 9 client installed. Server runs Oracle
10g. I'm using Perl 5.8.8, DBI 1.602, DBD::Oracle 1.20, DBD-mysql 4.006.
I have two databases:
- A mySQL database which was originally used by version 2.22 of Bugzilla. This database is upgraded to 3.1.4 by using checksetup.pl. A web browser can access the installation afterwards.
- An Oracle database where checksetup.pl has created an empty 3.1.4. A web browser can access this (empty) installation, too.
Now I tried to copy the mySQL database into the Oracle database by using bzdbcopy.pl. The connect to both databases seems to work, but it later fails:
-------------------------------------
Connecting to the 'bugs' source database on Mysql...
Connecting to the 'OLGAENTW' target database on Oracle...
Dropping foreign key: attachments.submitter_id -> profiles.userid...
Dropping foreign key: bugs_activity.who -> profiles.userid...
Dropping foreign key: bugs_fulltext.bug_id -> bugs.bug_id...
Dropping foreign key: cc.who -> profiles.userid...
Dropping foreign key: component_cc.user_id -> profiles.userid...
Dropping foreign key: components.initialowner -> profiles.userid...
Dropping foreign key: components.initialqacontact -> profiles.userid...
Dropping foreign key: email_setting.user_id -> profiles.userid...
Dropping foreign key: logincookies.userid -> profiles.userid...
Dropping foreign key: namedqueries.userid -> profiles.userid...
Dropping foreign key: namedqueries_link_in_footer.namedquery_id -> namedqueries.id...
Dropping foreign key: namedqueries_link_in_footer.user_id -> profiles.userid...
Dropping foreign key: profile_setting.user_id -> profiles.userid...
Dropping foreign key: profiles_activity.userid -> profiles.userid...
Dropping foreign key: profiles_activity.who -> profiles.userid...
Dropping foreign key: profiles_activity.fieldid -> fielddefs.id...
Dropping foreign key: tokens.userid -> profiles.userid...
Dropping foreign key: votes.who -> profiles.userid...
Dropping foreign key: watch.watcher -> profiles.userid...
Dropping foreign key: watch.watched -> profiles.userid...
Dropping foreign key: whine_events.owner_userid -> profiles.userid...
Dropping foreign key: whine_queries.eventid -> whine_events.id...
Dropping foreign key: whine_schedules.eventid -> whine_events.id...
Committing changes to the target database...
Adding foreign key: attachments.submitter_id -> profiles.userid...
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER fk_116d2585f464a742d613_UC AFTER UPDATE ON attachments REFERENCING NE' at line 1 [for Statement "CREATE OR REPLACE TRIGGER fk_116d2585f464a742d613_UC AFTER UPDATE ON attachments REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW BEGIN UPDATE profiles SET userid = :NEW.submitter_id WHERE userid = :OLD.submitter_id; END fk_116d2585f464a742d613_UC;"] at Bugzilla/DB/Schema/Oracle.pm line 155
Bugzilla::DB::Schema::Oracle::get_fk_ddl('Bugzilla::DB::Schema::Oracle=HASH(0x8faf498)', 'attachments', 'submitter_id', 'HASH(0x8f9c59c)') called at Bugzilla/DB/Schema.pm line 1553
Bugzilla::DB::Schema::get_add_fk_sql('Bugzilla::DB::Schema::Oracle=HASH(0x8faf498)', 'attachments', 'submitter_id', 'HASH(0x8f9c59c)') called at Bugzilla/DB.pm line 493
Bugzilla::DB::bz_add_fk('Bugzilla::DB::Oracle=HASH(0x8dd4314)', 'attachments', 'submitter_id', 'HASH(0x8f9c59c)') called at Bugzilla/DB.pm line 428
Bugzilla::DB::bz_setup_foreign_keys('Bugzilla::DB::Oracle=HASH(0x8dd4314)') called at ./contrib/bzdbcopy.pl line 211
----------------------------------------------
Copying databases from mySQL to Oracle worked for me with the 3.1.3 version of Bugzilla.
Reproducible: Always
Comment 1•17 years ago
|
||
That looks like you told Bugzilla that MySQL was Oracle (things are backwards)--you're getting an error from MySQL inside of Bugzilla's Oracle code.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•17 years ago
|
||
Hm, sorry for the late reply. Just checked it again and I think I know how I ran into the error above. The copy script is configured correct. The console output proves that:
"Connecting to the 'bugs' source database on Mysql..."
"Connecting to the 'OLGAENTW' target database on Oracle..."
The copy script does indeed work, if the localconfig file contains Oracle as a configured database. That apparently was the reason why it didn't work the first time I tried it. I created the empty database on Oracle and then upgraded the mySQL from the same Bugzilla installation by just altering the localconfig and rerunning checksetup.pl ... The localconfig file was still pointing to mySQL when I started the (already prepared) copy script. Apparently somewhere in the code the localconfig is parsed for database info instead of using the configured source and target databases in the copy script.
I've just checked the PDF documentation and the copy script comments at the end of the file again but I could not find any hints regarding the relevance of the localconfig for the copying of databases.
You need to log in
before you can comment on or make changes to this bug.
Description
•