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

Upgrade from 1.9.6 fails if wiki data for field tomissingpage is larger than 255 characters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Cannot Reproduce
    • 2.0
    • 2.0.2
    • Wiki (2.x)
    • None
    • Moodle Preview 3 running on PostgreSQL
    • PostgreSQL
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • Easy

    Description

      Staging large Moodle 1.9.6 upgrade to 2.0 P3 generates this error when the insert fails :-

      Default exception handler: Error writing to database Debug: ERROR: value too long for type character varying(255)
      INSERT INTO mdl_wiki_links (subwikiid,frompageid,tomissingpage) VALUES($1,$2,$3) RETURNING id
      [array (
      'subwikiid' => '357',
      'frompageid' => '3101',
      'tomissingpage' => ']]=

      {0, 1, 3, 2}

      ;             //encoding pattern of a quadrature encoder:

      {00, 01, 11, 10}

      <br /><br />// From Here is the encoder read interrupt routine for encoders<br /><br />//the Interrupt service routine for Pin Change Interrupt 0.<br />ISR(PCINT0_vect){                     <br /> <br /> encoder0PINB = PINB & 0b00000011;  //select only PINB0,1  -  OTHER PINB and PIND digital pins are used for other applications, so do not want to include them in the comparison<br /> encoder2PINB = PINB & 0b00110000;  //select only PINB4,5<br /> <br /> if (encoder_sequence[[(encoder0+1)&3',
      )]

      • line 381 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 227 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      • line 768 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      • line 821 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      • line 305 of /mod/wiki/locallib.php: call to pgsql_native_moodle_database->insert_record()
      • line 277 of /mod/wiki/locallib.php: call to wiki_refresh_page_links()
      • line 210 of /mod/wiki/db/upgrade.php: call to wiki_refresh_cachedcontent()
      • line 510 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
      • line 294 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1275 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 114 of /admin/cli/upgrade.php: call to upgrade_noncore()

      Upgraded successfully after running this command to increase the field size :-

      alter table mdl_wiki_links alter column tomissingpage type char(1024);

      Attachments

        Issue Links

          Activity

            People

              dongsheng Dongsheng Cai
              tlock Tim Lock
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                21/Feb/11