upgrade from 1.4_STABLE to master breaks

Bug #800917 reported by Hugh Davenport
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Critical
Unassigned

Bug Description

When upgrading from 1.4_STABLE to master, certain errors are made.

During the upgrade process, the following DBG message is given
[DBG] ae (lib/ddl.php:486) Function find_index_name called on an index usr_fir_ix with no columns. Attempting match on index names of all indexes on usr without columns.

After login, the following errors are shown
2011/06/23 10:09:07 [error] 12309#0: *4434 FastCGI sent in stderr: "[WAR] 96 (lib/errors.php:745) Failed to get a recordset: postgres7 error: [-1: ERROR: column i.showonlineusers does not exist
[WAR] 96 (lib/errors.php:745) LINE 1: ...dentid,u.staff,u.admin,i.theme,i.registerallowed, i.showonli...
[WAR] 96 (lib/errors.php:745) ^] in EXECUTE("
[WAR] 96 (lib/errors.php:745) SELECT u.institution,FLOOR(EXTRACT(EPOCH FROM ctime)) AS ctime,FLOOR(EXTRACT(EPOCH FROM u.expiry)) AS membership_expiry,u.studentid,u.staff,u.admin,i.theme,i.registerallowed, i.showonlineusers,i.allowinstitutionpublicviews
[WAR] 96 (lib/errors.php:745) FROM "usr_institution" u INNER JOIN "institution" i ON u.institution = i.name
[WAR] 96 (lib/errors.php:745) WHERE u.usr = ? ORDER BY i.priority DESC")
[WAR] 96 (lib/errors.php:745) Command was:
[WAR] 96 (lib/errors.php:745) SELECT u.institution,FLOOR(EXTRACT(EPOCH FROM ctime)) AS ctime,FLOOR(EXTRACT(EPOCH FROM u.expiry)) AS membership_expiry,u.studentid,u.staff,u.admin,i.theme,i.registerallowed, i.showonlineusers,i.allowinstitutionpublicviews
[WAR] 96 (lib/errors.php:745) FROM "usr_institution" u INNER JOIN "institution" i ON u.institution = i.name
[WAR] 96 (lib/errors.php:745) WHERE u.usr = ? ORDER BY i.priority DESC and values was (1)
Call stack (most recent first):
  * log_message("Failed to get a recordset: postgres7 error: [-1: E...", 8, true, true) at /home/hugh/src/mahara/mahara/htdocs/lib/errors.php:109
  * log_warn("Failed to get a recordset: postgres7 error: [-1: E...") at /home/hugh/src/mahara/mahara/htdocs/lib/errors.php:745
  * SQLException->__construct("Failed to get a recordset: postgres7 error: [-1: E...") at /home/hugh/src/mahara/mahara/htdocs/lib/dml.php:484
  * get_recordset_sql("
        SELECT u.institution,FLOOR(EXTRACT(EPOCH ...", array(size 1), "", "") at /home/hugh/src/mahara/mahara/htdocs/lib/dml.php:650
  * get_records_sql_assoc("
        SELECT u.institution,F
2011/06/23 10:09:07 [error] 12309#0: *4434 FastCGI sent in stderr: "licviews
[WAR] 96 (lib/dml.php:484) FROM "usr_institution" u INNER JOIN "institution" i ON u.institution = i.name
[WAR] 96 (lib/dml.php:484) WHERE u.usr = ? ORDER BY i.priority DESC and values was (1)
Call stack (most recent first):
  * get_recordset_sql("
        SELECT u.institution,FLOOR(EXTRACT(EPOCH ...", array(size 1), "", "") at /home/hugh/src/mahara/mahara/htdocs/lib/dml.php:650
  * get_records_sql_assoc("
        SELECT u.institution,FLOOR(EXTRACT(EPOCH ...", array(size 1)) at /home/hugh/src/mahara/mahara/htdocs/lib/user.php:1267
  * load_user_institutions("1") at /home/hugh/src/mahara/mahara/htdocs/auth/user.php:804
  * User->reset_institutions() at /home/hugh/src/mahara/mahara/htdocs/auth/user.php:1302
  * LiveUser->reset_institutions() at /home/hugh/src/mahara/mahara/htdocs/auth/user.php:1183
  * LiveUser->authenticate(object(stdClass), "1") at /home/hugh/src/mahara/mahara/htdocs/auth/user.php:1058
  * LiveUser->login("admin", "aY1sea'th0") at /home/hugh/src/mahara/mahara/htdocs/auth/lib.php:1151
  * login_submit(object(Pieform), array(size 6)) at Unknown:0
  * call_user_func_array("login_submit", array(size 2)) at /home/hugh/src/mahara/mahara/htdocs/lib/pieforms/pieform.php:512
  * Pieform->__construct(array(size 8)) at /home/hugh/src/mahara/mahara/htdocs/auth/lib.php:478
  * auth_setup() at /home/hugh/src/mahara/mahara/htdocs/init.php:268
  * require("/home/hugh/src/mahara/mahara/htdocs/init.php") at /home/hugh/src/mahara/mahara/htdocs/index.php:32

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

version no for 1.4_STABLE
 1.4.1testing (2011061003)
version no for master
 1.5.0dev (2011062100)

merge base between branches
 b3177ad2355306faea9a8e2ca9fd79afae12706a
version no for merge base
 1.4.0alpha2dev (2011051700)

Basically, the upgrade doesn't run the if statements in lib/db/upgrade.db with the following version nos
(taken from git diff 1.4_STABLE..master htdocs/lib/db/upgrade.php)
2011051300 - delete wwwroot
2011052400 - ctime in view access
2011053100 - default quota for institutions
2011053101 - group quota
2011060700 - retain view access on copy, and cronjob for sitemap (should be in seperate one...)
2011060701 - set onlineuserssideblockmaxusers to 10, and add showonlineusers field to institutions

This will be a difficult one, and will get worse when 1.4_STABLE version no is bumped

What I suggest for now
- bump version no on master, add all the stuff it might of missed (making sure to test whether it has been done already or not...)
- in future, when we bump version no on 1.4_STABLE, we need to check if anything will be missed on the upgrade, and bump masters version to add in stuff that may not be done

Changed in mahara:
importance: Undecided → High
milestone: none → 1.5.0
importance: High → Critical
status: New → Triaged
Changed in mahara:
status: Triaged → Confirmed
milestone: 1.5.0 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/378
Committed: http://gitorious.org/mahara/mahara/commit/73d613c10127c5398b4ba39cce883abcee9fab4b
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit 73d613c10127c5398b4ba39cce883abcee9fab4b
Author: Hugh Davenport <email address hidden>
Date: Thu Jun 23 11:38:00 2011 +1200

    Fix upgrade from 1.4_STABLE to master

    Bumps master version, and moves the upgrades that didn't happen
    to the new bump, checking where nessesary if they have already been
    applied

    The new version bump is the date after the 1.4_STABLE branch
    2011061100

    Version numbers missed:
    2011052400 - ctime in view access
    2011053100 - default quota for institutions
    2011053101 - group quota
    2011060700 - retain view access on copy
    2011060701 - set onlineuserssideblockmaxusers to 10, and add showonlineusers field to institutions

    Bug #800917

    Change-Id: I3594d22fda6c3c9eca0c5b86fde923ab37eb8752
    Signed-off-by: Hugh Davenport <email address hidden>

Changed in mahara:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.