Moodle 2.0 Upgrade Error - /lib/ddl/database_manager.php: ddl_exception thrown

Moodle 2.0 Upgrade Error - /lib/ddl/database_manager.php: ddl_exception thrown

by Ken Robinson -
Number of replies: 2
I'm trying to upgrade a Moodle instance from 1.9.4 to version 2.0 and continue to receive a baffling ddl error. Any help would be great, here are the details.
Should I log this in the tracker?

Server Specs:

  • Moodle 1.9.4
  • PHP: 5.29
  • Mysql: 5.0.89
  • Linux Kernel: 2.6.18-128.7.1.el5
  • Apache: 2.2.12

I'm upgrading an instance of Moodle 1.9.4. The server checks page indicates all minimum requirements are met,

There are some issues noted in the plugins check page:
Problems listed with the Activity Module include:
?
journal Non-standard (Missing from disk)
? lams Non-standard (Missing from disk)
? pagemenu Non-standard (Missing from disk)

Problems listed with the Blocks include:
?
page_module Non-standard (Missing from disk)

There are no upgrades for the moodle pages 1.9 yet.

After continuing, I recieve an unrecoverable error as follows:


Unknown DDL library error

More information about this error

Debug info: Index grade_letters->contextid-lowerboundary does not exist. Delete skipped
Stack trace:
  • line 908 of /lib/ddl/database_manager.php: ddl_exception thrown
  • line 104 of /lib/db/upgrade.php: call to database_manager->drop_index()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()

Attachment ddlError.JPG
Average of ratings: -
In reply to Ken Robinson

Re: Moodle 2.0 Upgrade Error - /lib/ddl/database_manager.php: ddl_exception thrown

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Ken,

that problem has been addressed as MDL-22366 and is already fixed in HEAD. It was about one missing condition before trying to drop the index from DB.

Thanks for the report and ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Moodle 2.0 Upgrade Error - /lib/ddl/database_manager.php: ddl_exception thrown

by Ken Robinson -
Thanks Eloy. You solved that problem. Yea!!!

Now, there is an additional issue that comes up on the very next screen. Courses seem to be upgraded properly then boom, failures start loading up. I've copied the text of the items on the screen. Let me know if I should add this to the tracker

Thanks

Ken

System

Increasing size of user idnumber field, this may take a while...

Migrated course files - course 14/14.

0 sec

100%
Setting up default repository plugins
Enum for stats_daily->stattype does not exist. Delete skipped
  • line 719 of /lib/ddl/database_manager.php: call to debugging()
  • line 1609 of /lib/db/upgrade.php: call to database_manager->drop_enum_from_field()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()
Enum for stats_weekly->stattype does not exist. Delete skipped
  • line 719 of /lib/ddl/database_manager.php: call to debugging()
  • line 1616 of /lib/db/upgrade.php: call to database_manager->drop_enum_from_field()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()
Enum for stats_monthly->stattype does not exist. Delete skipped
  • line 719 of /lib/ddl/database_manager.php: call to debugging()
  • line 1623 of /lib/db/upgrade.php: call to database_manager->drop_enum_from_field()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()
Enum for post->publishstate does not exist. Delete skipped
  • line 719 of /lib/ddl/database_manager.php: call to debugging()
  • line 1630 of /lib/db/upgrade.php: call to database_manager->drop_enum_from_field()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()
Fixing mnet records, this may take a while...
This upgrade introduces two new navigation blocks that will replace these blocks: Administration, Courses, Activities and Participants. If you had set any special permissions on those blocks you should check to make sure everything is behaving as you want it.
Debug info: Data truncated for column 'portno' at row 1
ALTER TABLE mdl_mnet_host MODIFY COLUMN portno MEDIUMINT(5) unsigned NOT NULL DEFAULT 0 after transport
Stack trace:
  • line 384 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 493 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 86 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 73 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
  • line 634 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 646 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
  • line 2939 of /lib/db/upgrade.php: call to database_manager->change_field_precision()
  • line 1233 of /lib/upgradelib.php: call to xmldb_main_upgrade()
  • line 256 of /admin/index.php: call to upgrade_core()