Last modified: 2014-02-10 19:53:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60435, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58435 - Oracle: installer fails to create the main page; external links cause database error
Oracle: installer fails to create the main page; external links cause databas...
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.22.0
All All
: High major (vote)
: 1.22.x release
Assigned To: Nobody - You can work on this!
:
Depends on: 49189
Blocks: oracle
  Show dependency treegraph
 
Reported: 2013-12-13 03:48 UTC by John Mark Vandenberg
Modified: 2014-02-10 19:53 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
umherirrender_de.wp: Backport_to_Stable+


Attachments

Description John Mark Vandenberg 2013-12-13 03:48:11 UTC
The installer can't create the main page on Oracle, as it includes external links, and the external links code calls DatabaseOracle->insert which uses DatabaseOracle->insertOneRow, but inserts into the external links table needs to use the external links sequence 'externallinks_el_id_seq', which is only handled correctly in DatabaseOracle->insertSelect.

Error:

Could not insert main page: A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: https://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script Query: INSERT INTO /*Q*/WD_EXTERNALLINKS (el_from,el_to,el_index) VALUES (:el_from, :el_to, :el_index) Function: DatabaseOracle::insertOneRow Error: 1400 ORA-01400: cannot insert NULL into ("<SCHEMA>"."WD_EXTERNALLINKS"."EL_ID") 

The backtrace:
 
#0 /usr/share/mediawiki/includes/db/DatabaseOracle.php(611): DatabaseOracle->reportQueryError('ORA-01400: cann...', 1400, 'INSERT INTO /*Q...', 'DatabaseOracle:...') 
#1 /usr/share/mediawiki/includes/db/DatabaseOracle.php(493): DatabaseOracle->insertOneRow('externallinks', Array, 'LinksUpdate::in...') 
#2 /usr/share/mediawiki/includes/LinksUpdate.php(308): DatabaseOracle->insert('externallinks', Array, 'LinksUpdate::in...', 'IGNORE') 
#3 /usr/share/mediawiki/includes/LinksUpdate.php(153): LinksUpdate->incrTableUpdate('externallinks', 'el', Array, Array) 
#4 /usr/share/mediawiki/includes/LinksUpdate.php(126): LinksUpdate->doIncrementalUpdate() 
#5 /usr/share/mediawiki/includes/DataUpdate.php(102): LinksUpdate->doUpdate() 
#6 /usr/share/mediawiki/includes/WikiPage.php(2094): DataUpdate::runUpdates(Array) 
#7 /usr/share/mediawiki/includes/WikiPage.php(1926): WikiPage->doEditUpdates(Object(Revision), Object(User), Array) 
#8 /usr/share/mediawiki/includes/installer/Installer.php(1732): WikiPage->doEditContent(Object(WikitextContent), '', 1, false, Object(User)) 
#9 [internal function]: Installer->createMainpage(Object(OracleInstaller)) 
#10 /usr/share/mediawiki/includes/installer/Installer.php(1577): call_user_func(Array, Object(OracleInstaller)) 
#11 /usr/share/mediawiki/includes/installer/WebInstallerPage.php(1246): Installer->performInstallation(Array, Array) 
#12 /usr/share/mediawiki/includes/installer/WebInstaller.php(275): WebInstaller_Install->execute() 
#13 /var/www/html/oracle-wiki/mw-config/index.php(61): WebInstaller->execute(Array) 
#14 /var/www/html/oracle-wiki/mw-config/index.php(29): wfInstallerMain() 
#15 {main}
Comment 1 Nemo 2013-12-30 09:29:19 UTC
Update per https://www.mediawiki.org/w/index.php?title=MediaWiki_1.22/Known_issues&oldid=847749 which seems to be the master list.
Comment 2 Gerrit Notification Bot 2014-01-03 19:37:25 UTC
Change 105243 had a related patch set uploaded by Umherirrender:
Add sequence support for externallinks table

https://gerrit.wikimedia.org/r/105243
Comment 3 Umherirrender 2014-01-03 19:38:35 UTC
Just for reference: I have no oracle to test this, so I assume that this will help on oracle, but cannot confirm. Tested with mysql.
Comment 4 Gerrit Notification Bot 2014-01-07 05:27:26 UTC
Change 105243 merged by jenkins-bot:
Add sequence support for externallinks table

https://gerrit.wikimedia.org/r/105243
Comment 5 Umherirrender 2014-01-07 18:38:47 UTC
successfully merged

Listed as known issue for 1.22, so marking for possible backport
Comment 6 Nemo 2014-01-07 18:49:03 UTC
(In reply to comment #5)
> successfully merged
> 
> Listed as known issue for 1.22, so marking for possible backport

Yes, needs backport. Please cherry-pick.
Comment 7 Umherirrender 2014-01-07 19:00:17 UTC
(In reply to comment #6)

> Yes, needs backport. Please cherry-pick.

I have no git branch installed/pulled, so I cannot cherry-pick myself.
Comment 8 John Mark Vandenberg 2014-01-10 10:36:25 UTC
(In reply to comment #3)
> Just for reference: I have no oracle to test this, so I assume that this will
> help on oracle, but cannot confirm. Tested with mysql.

I've verified it on an Oracle install.
Comment 9 Mark A. Hershberger 2014-01-13 02:58:11 UTC
Straight cherry-pick isn't possible since post-1.22 the directory structure changed.  I'll do something, but I hope to get it reviewed ASAP.
Comment 10 Gerrit Notification Bot 2014-01-13 03:08:13 UTC
Change 107111 had a related patch set uploaded by MarkAHershberger:
Add sequence support for externallinks table

https://gerrit.wikimedia.org/r/107111
Comment 11 Gerrit Notification Bot 2014-01-13 03:13:07 UTC
Change 107111 merged by jenkins-bot:
Add sequence support for externallinks table

https://gerrit.wikimedia.org/r/107111
Comment 12 Greg Grossmeier 2014-01-14 19:30:30 UTC
The change was reverted due to breakage on Wikimedia wikis.

As Reedy said on the change:
This shouldn't have been merged. Wikimedia hasn't finished schema migration for external links id addition (it takes a while)

Causes the following on a few wikis

Tue Jan 14 19:16:26 UTC 2014 mw1054 commonswiki LinksUpdate::incrTableUpdate 10.64.32.29 1054 Unknown column 'el_id' in 'field list' (10.64.32.29)


The bug tracking that schema change is bug 49189. Marking as a blocker for this bug (unless you implement this in a more robust fashion, not sure if it's worth it).
Comment 13 Greg Grossmeier 2014-01-14 19:31:57 UTC
Btw, to see the status of all schema changes, see the tracking bug, bug 49188.
Comment 14 Umherirrender 2014-01-14 19:40:10 UTC
Why not revert on wmf-branch and schedule the addition in the next week, if possible?

When reverted, please set the release to 1.23, because it is now bundled with release 1.22.1 and needs to be in 1.23 to avoid breakage again. Thanks.
Comment 15 Peter Bena 2014-02-07 10:06:50 UTC
there is also this bug in 1.22.2

https://bugzilla.wikimedia.org/show_bug.cgi?id=61016
Comment 16 Umherirrender 2014-02-10 19:53:24 UTC
(In reply to comment #12)
> The change was reverted due to breakage on Wikimedia wikis.

Schema change on Wikimedia wikis completed (bug 49189). Revert no longer needed. Back to FIXED

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links