Page MenuHomePhabricator

923 ORA-00923: FROM keyword not found where expected
Closed, ResolvedPublic

Description

Installing a fresh MediaWiki (git master) to Oracle 11:

923 ORA-00923: FROM keyword not found where expected

Query:

INSERT INTO UPDATELOG SELECT 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql' AS ul_key, null as ul_value UNION SELECT 'image-img_major_mime-patch-img_major_mime-chemical.sql', null UNION SELECT 'oldimage-oi_major_mime-patch-oi_major_mime-chemical.sql', null UNION SELECT 'user_groups-ug_group-patch-ug_group-length-increase-255.sql', null UNION SELECT 'user_former_groups-ufg_group-patch-ufg_group-length-increase-255.sql', null UNION SELECT 'user_properties-up_property-patch-up_property.sql', null

Function: DatabaseOracle::doQuery

Error: 923 ORA-00923: FROM keyword not found where expected

Backtrace:

#0 /u1/MediaWiki/includes/db/DatabaseOracle.php(422): DatabaseOracle->reportQueryError('ORA-00923: FROM...', 923, 'INSERT INTO UPD...', 'DatabaseOracle:...')
#1 /u1/MediaWiki/includes/db/DatabaseOracle.php(1240): DatabaseOracle->doQuery('INSERT INTO UPD...')
#2 /u1/MediaWiki/includes/db/Database.php(3860): DatabaseOracle->sourceStream(Resource id #129, false, false, 'DatabaseBase::s...', false)
#3 /u1/MediaWiki/includes/installer/DatabaseInstaller.php(196): DatabaseBase->sourceFile('/u1/MediaWiki/m...')
#4 /u1/MediaWiki/includes/installer/DatabaseInstaller.php(227): DatabaseInstaller->stepApplySourceFile('getUpdateKeysPa...', 'updates', false)
#5 [internal function]: DatabaseInstaller->insertUpdateKeys(Object(OracleInstaller))
#6 /u1/MediaWiki/includes/installer/Installer.php(1584): call_user_func(Array, Object(OracleInstaller))
#7 /u1/MediaWiki/includes/installer/WebInstallerPage.php(1418): Installer->performInstallation(Array, Array)
#8 /u1/MediaWiki/includes/installer/WebInstaller.php(280): WebInstallerInstall->execute()
#9 /u1/MediaWiki/mw-config/index.php(79): WebInstaller->execute(Array)
#10 /u1/MediaWiki/mw-config/index.php(38): wfInstallerMain()
#11 {main}


Version: 1.24rc
Severity: blocker

Details

Reference
bz71040

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:56 AM
bzimport set Reference to bz71040.

gerritadmin wrote:

Change 161491 had a related patch set uploaded by Brian Wolff:
[UNTESTED] Add Oracle version of update-keys.sql

https://gerrit.wikimedia.org/r/161491

Testing resulted in new error:

A database query error has occurred. This may indicate a bug in the software.

Query:
INSERT IGNORE INTO UPDATELOG (ul_key, ul_value) VALUES( 'filearchive-fa_major_mime-patch-fa_major_mime-chemical.sql', null )
Function: DatabaseOracle::doQuery
Error: 925 ORA-00925: missing INTO keyword
Backtrace:

#0 /u1/MediaWiki/includes/db/DatabaseOracle.php(422): DatabaseOracle->reportQueryError('ORA-00925: miss...', 925, 'INSERT IGNORE I...', 'DatabaseOracle:...')
#1 /u1/MediaWiki/includes/db/DatabaseOracle.php(1240): DatabaseOracle->doQuery('INSERT IGNORE I...')
#2 /u1/MediaWiki/includes/db/Database.php(3890): DatabaseOracle->sourceStream(Resource id #128, false, false, 'DatabaseBase::s...', false)
#3 /u1/MediaWiki/includes/installer/DatabaseInstaller.php(196): DatabaseBase->sourceFile('/u1/MediaWiki/m...')
#4 /u1/MediaWiki/includes/installer/DatabaseInstaller.php(227): DatabaseInstaller->stepApplySourceFile('getUpdateKeysPa...', 'updates', false)
#5 [internal function]: DatabaseInstaller->insertUpdateKeys(Object(OracleInstaller))
#6 /u1/MediaWiki/includes/installer/Installer.php(1584): call_user_func(Array, Object(OracleInstaller))
#7 /u1/MediaWiki/includes/installer/WebInstallerPage.php(1418): Installer->performInstallation(Array, Array)
#8 /u1/MediaWiki/includes/installer/WebInstaller.php(280): WebInstallerInstall->execute()
#9 /u1/MediaWiki/mw-config/index.php(79): WebInstaller->execute(Array)
#10 /u1/MediaWiki/mw-config/index.php(38): wfInstallerMain()
#11 {main}

Second patch applied and test and the installation process completed.

gerritadmin wrote:

Change 161491 merged by jenkins-bot:
Add Oracle version of update-keys.sql

https://gerrit.wikimedia.org/r/161491

gerritadmin wrote:

Change 171558 had a related patch set uploaded by MarkAHershberger:
Add Oracle version of update-keys.sql

https://gerrit.wikimedia.org/r/171558

gerritadmin wrote:

Change 171558 merged by jenkins-bot:
Add Oracle version of update-keys.sql

https://gerrit.wikimedia.org/r/171558

Doesn't UNION SELECT work for Oracle? I think just adding "SELECT .... FROM DUAL" should work there?

(Reading comment #4, I assume the patch fixed the issue.)