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

Several missing tables, while upgrading Moodle 1.9.9 to 2.2.2 (mnet_application,mdl_events_queue_handlers,mdl_user_private_key,mdl_events_queue)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Installation
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Table "mnet_application" does not exist

      fix:
      CREATE TABLE IF NOT EXISTS `mdl_mnet_application` (
      `id` bigint(10) NOT NULL AUTO_INCREMENT,
      `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
      `display_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
      `xmlrpc_server_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
      `sso_land_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
      `sso_jump_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
      PRIMARY KEY (`id`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Information about applications on remote hosts' AUTO_INCREMENT=3 ;

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Hi, Miki.

            You might need to upgrade to a more recent version of Moodle 1.9.x before upgrading to 2.2.

            If you are still having problems, please give us more details.

            • What "mnetted" systems are you using? Mahara?
            • Was that the output of the error? How was it presented? It looks likke it contains instructions on how to instantiate the table.

            If you find success, please report that also.

            Show
            salvetore Michael de Raadt added a comment - Hi, Miki. You might need to upgrade to a more recent version of Moodle 1.9.x before upgrading to 2.2. If you are still having problems, please give us more details. What "mnetted" systems are you using? Mahara? Was that the output of the error? How was it presented? It looks likke it contains instructions on how to instantiate the table. If you find success, please report that also.
            Hide
            mikidream miki Alliel added a comment - - edited

            Hello
            well, I had moodle 1.9.9 and I was during a process to upgrade directly to moodle 2.2 and I just got this error ( it's seems reasonable that I have to upgrade first to recent 1.9.x.),
            the reason I did it like that is because Moodle Server checks list showed me all - OK status (green) so I kept with the progress.
            I didn't have any mnet system that I was using.
            So I was just got this error so I reported it.
            I had another Moodle2.2 fresh DB, so that's How I know to build the sql to the DB.
            Now I'm still in the upgrade process and I get this message too:
            "Error writing to database
            More information about this error
            Debug info: Table 'moodle-new.mdl_events_queue_handlers' doesn't exist
            DELETE FROM mdl_events_queue_handlers
            [array (
            )]"
            Like before this is the solution:
            "
            CREATE TABLE IF NOT EXISTS `mdl_events_queue_handlers` (
            `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
            `queuedeventid` bigint(10) unsigned NOT NULL,
            `handlerid` bigint(10) unsigned NOT NULL,
            `status` bigint(10) DEFAULT NULL,
            `errormessage` mediumtext COLLATE utf8_unicode_ci,
            `timemodified` bigint(10) unsigned NOT NULL,
            PRIMARY KEY (`id`),
            KEY `mdl_evenqueuhand_que_ix` (`queuedeventid`),
            KEY `mdl_evenqueuhand_han_ix` (`handlerid`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This is the list of queued handlers for processing. The even' AUTO_INCREMENT=5 ;
            "
            please keep this mdl online so people can use it. Thanks

            Show
            mikidream miki Alliel added a comment - - edited Hello well, I had moodle 1.9.9 and I was during a process to upgrade directly to moodle 2.2 and I just got this error ( it's seems reasonable that I have to upgrade first to recent 1.9.x.), the reason I did it like that is because Moodle Server checks list showed me all - OK status (green) so I kept with the progress. I didn't have any mnet system that I was using. So I was just got this error so I reported it. I had another Moodle2.2 fresh DB, so that's How I know to build the sql to the DB. Now I'm still in the upgrade process and I get this message too: "Error writing to database More information about this error Debug info: Table 'moodle-new.mdl_events_queue_handlers' doesn't exist DELETE FROM mdl_events_queue_handlers [array ( )]" Like before this is the solution: " CREATE TABLE IF NOT EXISTS `mdl_events_queue_handlers` ( `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT, `queuedeventid` bigint(10) unsigned NOT NULL, `handlerid` bigint(10) unsigned NOT NULL, `status` bigint(10) DEFAULT NULL, `errormessage` mediumtext COLLATE utf8_unicode_ci, `timemodified` bigint(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `mdl_evenqueuhand_que_ix` (`queuedeventid`), KEY `mdl_evenqueuhand_han_ix` (`handlerid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This is the list of queued handlers for processing. The even' AUTO_INCREMENT=5 ; " please keep this mdl online so people can use it. Thanks
            Hide
            nadavkav Nadav Kavalerchik added a comment -

            Also, was missing during the Upgrade process:

            CREATE TABLE IF NOT EXISTS `mdl_user_private_key` (
              `id` bigint(10) NOT NULL AUTO_INCREMENT,
              `script` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
              `value` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
              `userid` bigint(10) NOT NULL,
              `instance` bigint(10) DEFAULT NULL,
              `iprestriction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
              `validuntil` bigint(10) DEFAULT NULL,
              `timecreated` bigint(10) DEFAULT NULL,
              PRIMARY KEY (`id`),
              KEY `mdl_userprivkey_scrval_ix` (`script`,`value`),
              KEY `mdl_userprivkey_use_ix` (`userid`)
            ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='access keys used in cookieless scripts - rss, etc.' AUTO_INCREMENT=6 ;

            Show
            nadavkav Nadav Kavalerchik added a comment - Also, was missing during the Upgrade process: CREATE TABLE IF NOT EXISTS `mdl_user_private_key` ( `id` bigint(10) NOT NULL AUTO_INCREMENT, `script` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `value` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `userid` bigint(10) NOT NULL, `instance` bigint(10) DEFAULT NULL, `iprestriction` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `validuntil` bigint(10) DEFAULT NULL, `timecreated` bigint(10) DEFAULT NULL, PRIMARY KEY (`id`), KEY `mdl_userprivkey_scrval_ix` (`script`,`value`), KEY `mdl_userprivkey_use_ix` (`userid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='access keys used in cookieless scripts - rss, etc.' AUTO_INCREMENT=6 ;
            Hide
            skodak Petr Skoda added a comment -

            Hello, most probably your site suffered serious upgrade problems before you even started upgrade to 2.2. The trouble is we do not know what happened exactly so any automated attempt to fix it might create even more problems. First of all try to find out what happened and why and then try manual db structure reconstruction if possible. Thanks for the report and please keep us informed. Petr

            Show
            skodak Petr Skoda added a comment - Hello, most probably your site suffered serious upgrade problems before you even started upgrade to 2.2. The trouble is we do not know what happened exactly so any automated attempt to fix it might create even more problems. First of all try to find out what happened and why and then try manual db structure reconstruction if possible. Thanks for the report and please keep us informed. Petr
            Hide
            nadavkav Nadav Kavalerchik added a comment -

            Petr, you are correct. Thank you.
            All in all, it was upgraded successfully

            It was reported just to let anyone know what were the solutions for those issues.

            Show
            nadavkav Nadav Kavalerchik added a comment - Petr, you are correct. Thank you. All in all, it was upgraded successfully It was reported just to let anyone know what were the solutions for those issues.
            Hide
            mikidream miki Alliel added a comment -

            another table

            CREATE TABLE IF NOT EXISTS `mdl_events_queue` (
            `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT,
            `eventdata` longtext COLLATE utf8_unicode_ci NOT NULL,
            `stackdump` mediumtext COLLATE utf8_unicode_ci,
            `userid` bigint(10) unsigned DEFAULT NULL,
            `timecreated` bigint(10) unsigned NOT NULL,
            PRIMARY KEY (`id`),
            KEY `mdl_evenqueu_use_ix` (`userid`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This table is for storing queued events. It stores only one ' AUTO_INCREMENT=6 ;

            Show
            mikidream miki Alliel added a comment - another table CREATE TABLE IF NOT EXISTS `mdl_events_queue` ( `id` bigint(10) unsigned NOT NULL AUTO_INCREMENT, `eventdata` longtext COLLATE utf8_unicode_ci NOT NULL, `stackdump` mediumtext COLLATE utf8_unicode_ci, `userid` bigint(10) unsigned DEFAULT NULL, `timecreated` bigint(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `mdl_evenqueu_use_ix` (`userid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='This table is for storing queued events. It stores only one ' AUTO_INCREMENT=6 ;

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: