Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32851

Moodle 1.9 -> 2.2 upgrade Data too long for column 'mainfile' error in mod_resource

    Details

    • Testing Instructions:
      Hide

      1. Create a 1.9 instance.
      2. Create a resource with a ratty filename (the example in the description should work).
      3. Upgrade to 2.2. Verify that the resource is skipped.

      Show
      1. Create a 1.9 instance. 2. Create a resource with a ratty filename (the example in the description should work). 3. Upgrade to 2.2. Verify that the resource is skipped.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:

      Description

      In upgrade from moodle-latest-19 to moodle-latest-22 (2.2.2+ Build: 20120504)

      Debug info: Data too long for column 'mainfile' at row 1
      UPDATE mdl_resource SET tobemigrated = ?,mainfile = ?,filterfiles = ?,legacyfiles = ?,display = ?,displayoptions = ? WHERE id=?
      [array (
      0 => 0,
      1 => '/Mount St. Helens is an active stratovolcano located in Skamania County, Washington, in the Pacific Northwest region of the United States. It is 96 miles (154 km) south of Seattle and 50 miles (80 km) northeast of Portland, Oregon. Mount St. Helens takes i',
      2 => '1',
      3 => 0,
      4 => 6,
      5 => 'a:4:

      {s:12:"printheading";i:0;s:10:"printintro";i:1;s:10:"popupwidth";s:3:"620";s:11:"popupheight";s:3:"450";}

      ',
      6 => '11531',
      )]
      Stack trace:
      line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 999 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1031 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
      line 173 of /mod/resource/db/upgradelib.php: call to mysqli_native_moodle_database->update_record()
      line 181 of /mod/resource/db/upgrade.php: call to resource_20_migrate()
      line 540 of /lib/upgradelib.php: call to xmldb_resource_upgrade()
      line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      line 1437 of /lib/upgradelib.php: call to upgrade_plugins()
      line 269 of /admin/index.php: call to upgrade_noncore()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12