Installing and upgrading help

Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier

 
Picture of Michael E
Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
 

I just tried to upgrade our development installation (2.4.3) to the current 2.5 beta. During the upgrade process I get the following error:

Error writing to database
Debug info: ORA-00904: "MOODLELIB"."UNDO_MEGA_HACK": invalid identifier
UPDATE m_context
SET depth = 2,
path = MOODLELIB.UNDO_MEGA_HACK(MOODLELIB.TRICONCAT(:o_param1, id, ' '))
WHERE contextlevel = 30
AND (depth = 0 OR path IS NULL)
[array (
'o_param1' => '/1/',
)]
Error code: dmlwriteexception
Stack trace:

    line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
    line 272 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
    line 1024 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
    line 6229 of /lib/accesslib.php: call to oci_native_moodle_database->execute()
    line 5690 of /lib/accesslib.php: call to context_user::build_paths()
    line 1563 of /lib/upgradelib.php: call to context_helper::build_all_paths()
    line 314 of /admin/index.php: call to upgrade_core()

Is that a bug or am I doing something wrong?

 
Average of ratings: -
Picture of Michael E
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
 

Forgot to mention that the previous one occured in the "system" section of the upgrade.

 

Starting the process again, I receive the following now in the "mod_assign" section of the upgrade:

 


More information about this error
Debug info:
Error code: ddldependencyerror
Stack trace:

    line 725 of /lib/ddl/database_manager.php: ddl_dependency_exception thrown
    line 557 of /lib/ddl/database_manager.php: call to database_manager->check_field_dependencies()
    line 268 of /mod/assign/db/upgrade.php: call to database_manager->drop_field()
    line 664 of /lib/upgradelib.php: call to xmldb_assign_upgrade()
    line 381 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1591 of /lib/upgradelib.php: call to upgrade_plugins()
    line 379 of /admin/index.php: call to upgrade_noncore()

 
Average of ratings: -
Picture of Helen Foster
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersTestersTranslators

Hi Michael,

I've never used Oracle myself, however I asked Moodle HQ developers and Dan P said "its basically this: MDL-38968". Hope it helps!

 
Average of ratings: -
Dan at desk in Moodle HQ, Perth
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
Core developersMoodle Course Creator Certificate holdersMoodle HQPlugin developersTesters

To expand a bit more on this, I ran into this, and the resolution is that you need to run the updated Moodle oracle support packages on your oracle installation. (lib/dml/oci_native_moodle_package.sql)

(We really really really need to improve our documentation/detection of this, I would file one for Petr Škoda, but I don't have much time to do that right now).

 
Average of ratings: Useful (2)
One poor developer...
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
Core developersDocumentation writersMoodle HQParticularly helpful MoodlersPlugin developersTesters

I'd say that it's always recomended to run that sql script before triggering any upgrade, especially for major ones, so it's IMO a good candidate to go to the upgrading instructions. Right now it's missing there.

Also, to release notes, luckly it's there already. Reading release requirements is recommended always. wink

About autodetecting outdated packages, well, surely it could be achieved by maintaining some version in the package and in the php driver and then try matching them. Although I wouldn't do it for all the requests but only for the install/upgrade ones.

Ciao smile

 
Average of ratings: Useful (3)
Picture of Michael E
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
 

Thank you all. This helped me a lot.

Unfortunately, the upgrade still fails. Now I'm stuck here:

 

mod_assign

column "assign_grades->mailed" cannot be modified. Dependency found with index "m_assigrad_mai_ix (mailed)"

More information about this error
Debug info:
Error code: ddldependencyerror
Stack trace:

    line 725 of /lib/ddl/database_manager.php: ddl_dependency_exception thrown
    line 557 of /lib/ddl/database_manager.php: call to database_manager->check_field_dependencies()
    line 268 of /mod/assign/db/upgrade.php: call to database_manager->drop_field()
    line 664 of /lib/upgradelib.php: call to xmldb_assign_upgrade()
    line 381 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1591 of /lib/upgradelib.php: call to upgrade_plugins()
    line 379 of /admin/index.php: call to upgrade_noncore()

 
Average of ratings: -
Me!
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
 

Hi Michael,

The error you have reported is unusual - because the code removes that index before it removes the column, so it should not be happening. I tested the upgrade on Oracle and did not have any issues. If you can retest using the Moodle 2.5rc1 build that would be helpful and if you continue to have errors please report it as a bug in the tracker.

Thanks, Damyon

 

 

 
Average of ratings: -
Picture of Michael E
Re: Upgrade to 2.5 beta failed on Oracle / undo_mega_hack invalid identifier
 

Thank you for testing this. Unfortunately on our install it still keeps failing. It drops the index, but then comes up with the same error again. We tested it several times in the meantime.

I filed a bug report: https://tracker.moodle.org/browse/MDL-39656

 
Average of ratings: -