Moodle
  1. Moodle
  2. MDL-21632

Deleting of value from non-existent mnet_rpc2host table still exists in 1.9

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      26574

      Description

      The reference to rpc2host has been removed from 2.0 but not 1.9 (MDL-16305).

      I am going to remove the delete_records call as I can't see a reason for it?
      git grep rpc2host
      mnet/peer.php: $obj = delete_records('mnet_rpc2host', 'host_id', $this->id);

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP Notice: Table 'moodle.mnet_rpc2host' doesn't exist<br /><br />DELETE FROM mnet_rpc2host WHERE host_id = '13'<ul style="text-align: left"><li>line 1377 of lib/dmllib.php: call to debugging()</li><li>line 124 of mnet/peer.php: call to delete_records()</li><li>line 47 of admin/mnet/delete.php: call to mnet_peer->delete()</li></ul> in /var/www/lib/weblib.php on line 6989, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP Stack trace:, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 1.

          {main}

          () /var/www/admin/mnet/delete.php:0, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 2. mnet_peer->delete() /var/www/admin/mnet/delete.php:47, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 3. delete_records() /var/www/mnet/peer.php:124, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 4. debugging() /var/www/lib/dmllib.php:1377, referer: http://moodle.dev/admin/mnet/delete.php
          [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 5. trigger_error() /var/www/lib/weblib.php:6989, referer: http://moodle.dev/admin/mnet/delete.php

          Show
          Dan Poltawski added a comment - [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP Notice: Table 'moodle.mnet_rpc2host' doesn't exist<br /><br />DELETE FROM mnet_rpc2host WHERE host_id = '13'<ul style="text-align: left"><li>line 1377 of lib/dmllib.php: call to debugging()</li><li>line 124 of mnet/peer.php: call to delete_records()</li><li>line 47 of admin/mnet/delete.php: call to mnet_peer->delete()</li></ul> in /var/www/lib/weblib.php on line 6989, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP Stack trace:, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 1. {main} () /var/www/admin/mnet/delete.php:0, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 2. mnet_peer->delete() /var/www/admin/mnet/delete.php:47, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 3. delete_records() /var/www/mnet/peer.php:124, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 4. debugging() /var/www/lib/dmllib.php:1377, referer: http://moodle.dev/admin/mnet/delete.php [Tue Feb 16 11:19:06 2010] [error] [client 192.168.254.6] PHP 5. trigger_error() /var/www/lib/weblib.php:6989, referer: http://moodle.dev/admin/mnet/delete.php
          Hide
          Penny Leach added a comment -

          go for it!!

          Show
          Penny Leach added a comment - go for it!!
          Hide
          Penny Leach added a comment -

          actually reading the linked bug, it was more complex than just deleting that line, is it possible to backport jerome's patch to 1.9 instead?

          Show
          Penny Leach added a comment - actually reading the linked bug, it was more complex than just deleting that line, is it possible to backport jerome's patch to 1.9 instead?
          Hide
          Dan Poltawski added a comment -

          urgh. It seems the old behaviour of 1.9 where 'If the peer has been actively used, we mark the peer as deleted' wasn't even workign due to the horrible behaviour of commit in 1.9..

          $this->deleted = 1;
          return $this->commit();

          should've actually been:

          $this->updateparams->deleted = 1;
          return $this->commit();

          Preparing patch now

          Show
          Dan Poltawski added a comment - urgh. It seems the old behaviour of 1.9 where 'If the peer has been actively used, we mark the peer as deleted' wasn't even workign due to the horrible behaviour of commit in 1.9.. $this->deleted = 1; return $this->commit(); should've actually been: $this->updateparams->deleted = 1; return $this->commit(); Preparing patch now
          Hide
          Penny Leach added a comment -

          Yeah, I'd like to have been able to change that :/ But it'll have to wait for a rainy day.

          Show
          Penny Leach added a comment - Yeah, I'd like to have been able to change that :/ But it'll have to wait for a rainy day.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: