mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #31362
[Bug 1517658] A change has been merged
Reviewed: https://reviews.mahara.org/5741
Committed: https://git.mahara.org/mahara/mahara/commit/7a0fef3e41c5a99594b3005c403f95f56a7c1a61
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: master
commit 7a0fef3e41c5a99594b3005c403f95f56a7c1a61
Author: Aaron Wells <aaronw@xxxxxxxxxxxxxxx>
Date: Thu Nov 19 18:03:09 2015 +1300
CONCAT() not supported in Postgres prior to 9.1
Bug 1517658
Change-Id: I531a1c95b94910e564e71e1f2dc26754eefa45d5
behatnotneeded: platform-specific bug
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1517658
Title:
Upgrade to 1.10+ fails on Postgres <9.1
Status in Mahara:
Fix Committed
Status in Mahara 1.10 series:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
Fix Committed
Bug description:
Upgrading from 1.5.1 to versions higher than 1.9 (either directly or incrementally by version) fails on Postgres 8.4.
(And I'm assuming any version of Postgres prior to 9.1.)
Existing installation of Mahara 1.5.1.
Run through normal upgrade steps.
Expected result: Successful upgrade.
Actual result: upgrade screen reports this error in core upgrade section:
Could not execute command: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200)
Call stack (most recent first):
* execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at /srv/www/mahara/mahara-15.10.0/htdocs/lib/db/upgrade.php:3340
* xmldb_core_upgrade("2012080604") at /srv/www/mahara/mahara-15.10.0/htdocs/lib/upgrade.php:359
* upgrade_core(object(stdClass)) at /srv/www/mahara/mahara-15.10.0/htdocs/admin/upgrade.json.php:90
Errors from Apache logs:
[DBG] 25 (lib/db/upgrade.php:3274) Filling in parent artefact paths, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) postgres7 error: [-1: ERROR: function concat(unknown, bigint) does not exist, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) LINE 1: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SE..., referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) ^, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) HINT: No function matches the given name and argument types. You might need to add explicit type casts.] in adodb_throw(UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200), ), referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [DBG] 25 (lib/dml.php:147) Command was: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200), referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] [WAR] 25 (lib/errors.php:745) Could not execute command: UPDATE "artefact" SET path = CONCAT('/', id) WHERE id IN (SELECT id FROM "artefact" WHERE path IS NULL AND parent IS NULL LIMIT 200), referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] Call stack (most recent first):, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * log_message("Could not execute command: UPDATE "artefact" SET p...", 8, true, true) at /srv/www/mahara/mahara-1.10.7/htdocs/lib/errors.php:95, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * log_warn("Could not execute command: UPDATE "artefact" SET p...") at /srv/www/mahara/mahara-1.10.7/htdocs/lib/errors.php:745, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * SQLException->__construct("Could not execute command: UPDATE "artefact" SET p...") at /srv/www/mahara/mahara-1.10.7/htdocs/lib/dml.php:148, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * execute_sql("UPDATE {artefact} SET path = CONCAT('/', id) WHERE...") at /srv/www/mahara/mahara-1.10.7/htdocs/lib/db/upgrade.php:3290, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * xmldb_core_upgrade("2014032729") at /srv/www/mahara/mahara-1.10.7/htdocs/lib/upgrade.php:359, referer: https://HOSTNAME/admin/upgrade.php
[Tue Nov 17 16:11:01 2015] [error] [client --removed--] * upgrade_core(object(stdClass)) at /srv/www/mahara/mahara-1.10.7/htdocs/admin/upgrade.json.php:86, referer: https://HOSTNAME/admin/upgrade.php
(Why does it say "postgres7 error" above?)
It looks like it's asking Postgres to use the CONCAT function which, as far as I'm aware, did not exist in Postgres until 9.1.
http://www.postgresql.org/docs/8.4/static/functions-string.html
http://www.postgresql.org/docs/9.1/static/functions-string.html
Mahara explicitly states that it's supported on "PostgreSQL, all
versions from 8.3" (
https://wiki.mahara.org/wiki/System_Administrator's_Guide/Requirements#Database_Server
)
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1517658/+subscriptions
References