Issue Details (XML | Word | Printable)

Key: MDL-16565
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Peter Bulmer
Reporter: Eloy Lafuente (stronk7)
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Upgrading 2.0 to 2008091611 get mnet related error

Created: 18/Sep/08 07:44 PM   Updated: 19/Sep/08 07:34 AM
Return to search
Component/s: Networking
Affects Version/s: 2.0
Fix Version/s: 2.0

Participants: Eloy Lafuente (stronk7) and Peter Bulmer
Security Level: None
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
While upgrading to current CVS, in the process I got:

Incorrect integer value: '' for column 'public_key_expires' at row 1

INSERT INTO mdl_mnet_host (wwwroot,ip_address,public_key,public_key_expires,last_connect_time,last_log_id,deleted,name) VALUES(?,?,?,?,?,?,?,?)
[array ( 'wwwroot' => '', 'ip_address' => '', 'public_key' => '', 'public_key_expires' => '', 'last_connect_time' => '0', 'last_log_id' => '0', 'deleted' => 0, 'name' => 'All Hosts', )]

    * line 253 of lib/dml/moodle_database.php: call to debugging()
    * line 272 of lib/dml/adodb_moodle_database.php: call to moodle_database->report_error()
    * line 178 of lib/dml/mysqli_adodb_moodle_database.php: call to adodb_moodle_database->insert_record_raw()
    * line 88 of mnet/environment.php: call to mysqli_adodb_moodle_database->insert_record()
    * line 25 of mnet/lib.php: call to mnet_environment->init()
    * line 9 of portfolio/type/mahara/lib.php: call to require_once()
    * line 628 of lib/portfoliolib.php: call to require_once()
    * line 43 of admin/mnet/adminlib.php: call to portfolio_static_function()
    * line 191 of admin/mnet/adminlib.php: call to mnet_get_functions()
    * line 387 of lib/adminlib.php: call to upgrade_RPC_functions()
    * line 76 of admin/index.php: call to upgrade_db()

Ciao :-)

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 18/Sep/08 07:45 PM
Assigning this to Peter Bulmer... am I correct, Peter?

Eloy Lafuente (stronk7) added a comment - 19/Sep/08 12:18 AM
Peter, I've changed some defaults of the "All hosts" record to be proper zeros. (suggested by Penny). I hope it's ok, now the record is being properly inserted.

One thing that doesn't look "fine", anyway, is that... simply by requiring mnet/lib.php, the mnet_environment->init() is executed (code in global scope). Cannot this be improved? I guess it's to guarantee things to be properly initialised on install/upgrade... if so... I think one method mnet_upgrade() could do the job (and add it to adminlib, instead of automatically launching it by the require_once.

For your consideration... ciao


Peter Bulmer added a comment - 19/Sep/08 07:34 AM
"I've changed some defaults of the "All hosts" record to be proper zeros. (suggested by Penny). I hope it's ok, now the record is being properly inserted."
That sounds great. I am a little surprised that this bug didn't present more agressively (I haven't suffered at its hands).

re: $MNET->init();
Totally agree with you.