From 76bdfc1d79ada9f1b1ac72eac7b6b1cac070dec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Sat, 11 Aug 2012 17:48:29 +0200 Subject: [PATCH] MDL-34840 fix fatal pg error during upgrade This is a regression caused by MDL-30515 --- lib/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 06c895b97da..74ecfd96824 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -164,7 +164,7 @@ function xmldb_main_upgrade($oldversion) { $index = new xmldb_index('contextid-lowerboundary-letter', XMLDB_INDEX_UNIQUE, array('contextid', 'lowerboundary', 'letter')); // MDL-30515 Removing duplicate entries before adding the unique index - $sql = "SELECT MAX(id) as newestid, contextid, lowerboundary, letter, COUNT('x') count + $sql = "SELECT MAX(id) as newestid, contextid, lowerboundary, letter, COUNT('x') AS dcount FROM {grade_letters} GROUP BY contextid, lowerboundary, letter HAVING COUNT('x') > 1";